@@ -36,7 +36,8 @@ extern "C" {
36
36
* comparison, use the corresponding serialization and parsing functions.
37
37
*/
38
38
39
- /** Opaque data structure that caches information about key tweaking.
39
+ /** Opaque data structure that caches information about the FROST group public
40
+ * key and tweak state used for signing and verification.
40
41
*
41
42
* Guaranteed to be 101 bytes in size. It can be safely copied/moved. No
42
43
* serialization and parsing functions.
@@ -106,7 +107,7 @@ typedef struct {
106
107
* Out: nonce: pointer to a nonce object
107
108
* In: in66: pointer to the 66-byte nonce to be parsed
108
109
*/
109
- SECP256K1_API int secp256k1_frost_pubnonce_parse (
110
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_pubnonce_parse (
110
111
const secp256k1_context * ctx ,
111
112
secp256k1_frost_pubnonce * nonce ,
112
113
const unsigned char * in66
@@ -149,7 +150,7 @@ SECP256K1_API int secp256k1_frost_partial_sig_serialize(
149
150
* encoded numbers are out of range, signature verification with it is
150
151
* guaranteed to fail for every message and public key.
151
152
*/
152
- SECP256K1_API int secp256k1_frost_partial_sig_parse (
153
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_partial_sig_parse (
153
154
const secp256k1_context * ctx ,
154
155
secp256k1_frost_partial_sig * sig ,
155
156
const unsigned char * in32
@@ -175,7 +176,7 @@ SECP256K1_API int secp256k1_frost_share_serialize(
175
176
* Out: share: pointer to a share object
176
177
* In: in32: pointer to the 32-byte share to be parsed
177
178
*/
178
- SECP256K1_API int secp256k1_frost_share_parse (
179
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_share_parse (
179
180
const secp256k1_context * ctx ,
180
181
secp256k1_frost_secshare * share ,
181
182
const unsigned char * in32
@@ -245,9 +246,8 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_share_verify(
245
246
* id: the participant ID of the participant whose partial
246
247
* signature will be verified with the pubshare
247
248
* vss_commitment: input array of the elements of the VSS commitment
248
- * n_participants: the total number of participants
249
249
*/
250
- SECP256K1_API int secp256k1_frost_compute_pubshare (
250
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_compute_pubshare (
251
251
const secp256k1_context * ctx ,
252
252
secp256k1_pubkey * pubshare ,
253
253
size_t threshold ,
@@ -303,10 +303,9 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_pubkey_get(
303
303
* earlier failures).
304
304
*
305
305
* secp256k1_frost_pubkey_gen(..., keygen_cache, ...)
306
- * secp256k1_frost_pubkey_tweak(..., keygen_cache, xonly_pk)
307
306
* secp256k1_frost_pubkey_ec_tweak_add(..., output_pk, keygen_cache, tweak32)
308
307
* secp256k1_ec_pubkey_serialize(..., buf, output_pk)
309
- * secp256k1_frost_pubkey_get(..., ec_pk, xonly_pk )
308
+ * secp256k1_frost_pubkey_get(..., ec_pk, keygen_cache )
310
309
* secp256k1_ec_pubkey_tweak_add(..., ec_pk, tweak32)
311
310
* secp256k1_ec_pubkey_serialize(..., buf2, ec_pk)
312
311
*
@@ -323,7 +322,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_pubkey_get(
323
322
* to an invalid value if this function returns 0. If you
324
323
* do not need it, this arg can be NULL.
325
324
* In/Out: keygen_cache: pointer to a `frost_keygen_cache` struct initialized by
326
- * `frost_pubkey_tweak `
325
+ * `frost_pubkey_gen `
327
326
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid
328
327
* according to `secp256k1_ec_seckey_verify`, this function
329
328
* returns 0. For uniformly random 32-byte arrays the
@@ -364,7 +363,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_pubkey_ec_tweak_a
364
363
* to an invalid value if this function returns 0. If you
365
364
* do not need it, this arg can be NULL.
366
365
* In/Out: keygen_cache: pointer to a `frost_keygen_cache` struct initialized by
367
- * `frost_pubkey_tweak `
366
+ * `frost_pubkey_gen `
368
367
* In: tweak32: pointer to a 32-byte tweak. If the tweak is invalid
369
368
* according to secp256k1_ec_seckey_verify, this function
370
369
* returns 0. For uniformly random 32-byte arrays the
@@ -422,7 +421,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_pubkey_xonly_twea
422
421
* extra_input32: an optional 32-byte array that is input to the nonce
423
422
* derivation function (can be NULL)
424
423
*/
425
- SECP256K1_API int secp256k1_frost_nonce_gen (
424
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_nonce_gen (
426
425
const secp256k1_context * ctx ,
427
426
secp256k1_frost_secnonce * secnonce ,
428
427
secp256k1_frost_pubnonce * pubnonce ,
@@ -447,10 +446,10 @@ SECP256K1_API int secp256k1_frost_nonce_gen(
447
446
* n_pubnonces: number of elements in the pubnonces array. Must be
448
447
* greater than 0.
449
448
* msg32: the 32-byte message to sign
450
- * myd_id : the ID of the participant who will use the session for
449
+ * my_id : the ID of the participant who will use the session for
451
450
* signing
452
451
* ids: array of the participant IDs of the signers
453
- keygen_cache: pointer to frost_keygen_cache struct
452
+ * keygen_cache: pointer to frost_keygen_cache struct
454
453
* adaptor: optional pointer to an adaptor point encoded as a
455
454
* public key if this signing session is part of an
456
455
* adaptor signature protocol (can be NULL)
@@ -582,7 +581,7 @@ SECP256K1_API int secp256k1_frost_nonce_parity(
582
581
* nonce_parity: the output of `frost_nonce_parity` called with the
583
582
* session used for producing the pre-signature
584
583
*/
585
- SECP256K1_API int secp256k1_frost_verify_adaptor (
584
+ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_verify_adaptor (
586
585
const secp256k1_context * ctx ,
587
586
const unsigned char * pre_sig64 ,
588
587
const unsigned char * msg32 ,
@@ -628,7 +627,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_frost_adapt(
628
627
* grossly invalid (overflowing) values. 1 otherwise (which does NOT
629
628
* mean the signatures or the adaptor are valid!)
630
629
* Args: ctx: pointer to a context object
631
- * Out:sec_adaptor32: 32-byte secret adaptor
630
+ * Out: sec_adaptor32: 32-byte secret adaptor
632
631
* In: sig64: complete, valid 64-byte signature
633
632
* pre_sig64: the pre-signature corresponding to sig64, i.e., the
634
633
* aggregate of partial signatures without the secret
0 commit comments