Skip to content

Commit eb543cb

Browse files
Simplify code
Co-authored-by: Sebastian Falbesoner <[email protected]>
1 parent 6aa7df2 commit eb543cb

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/modules/frost/keygen_impl.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,9 @@ int secp256k1_frost_pubkey_xonly_tweak_add(const secp256k1_context* ctx, secp256
400400

401401
static int secp256k1_frost_lagrange_coefficient(secp256k1_scalar *r, const unsigned char * const *ids33, size_t n_participants, const unsigned char *my_id33) {
402402
size_t i;
403-
secp256k1_scalar num;
404-
secp256k1_scalar den;
403+
secp256k1_scalar num = secp256k1_scalar_one;
404+
secp256k1_scalar den = secp256k1_scalar_one;
405405
secp256k1_scalar party_idx;
406-
407-
secp256k1_scalar_set_int(&num, 1);
408-
secp256k1_scalar_set_int(&den, 1);
409406
secp256k1_frost_compute_indexhash(&party_idx, my_id33);
410407
for (i = 0; i < n_participants; i++) {
411408
secp256k1_scalar mul;

0 commit comments

Comments
 (0)