@@ -151,9 +151,9 @@ SECP256K1_API int secp256k1_musig_pubkey_combine(
151
151
* NULL). If a non-unique session_id32 was given then a partial
152
152
* signature will LEAK THE SECRET KEY.
153
153
* msg32: the 32-byte message to be signed. Shouldn't be NULL unless you
154
- * require sharing public nonces before the message is known
154
+ * require sharing nonce commitments before the message is known
155
155
* because it reduces nonce misuse resistance. If NULL, must be
156
- * set with `musig_session_set_msg` before signing and verifying .
156
+ * set with `musig_session_get_public_nonce` .
157
157
* combined_pk: the combined public key of all signers (cannot be NULL)
158
158
* pk_hash32: the 32-byte hash of the signers' individual keys (cannot be
159
159
* NULL)
@@ -190,14 +190,17 @@ SECP256K1_API int secp256k1_musig_session_initialize(
190
190
* In: commitments: array of 32-byte nonce commitments (cannot be NULL)
191
191
* n_commitments: the length of commitments and signers array. Must be the total
192
192
* number of signers participating in the MuSig.
193
+ * msg32: the 32-byte message to be signed. Must be NULL if already
194
+ * set with `musig_session_initialize` otherwise can not be NULL.
193
195
*/
194
196
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_musig_session_get_public_nonce (
195
197
const secp256k1_context * ctx ,
196
198
secp256k1_musig_session * session ,
197
199
secp256k1_musig_session_signer_data * signers ,
198
200
secp256k1_pubkey * nonce ,
199
201
const unsigned char * const * commitments ,
200
- size_t n_commitments
202
+ size_t n_commitments ,
203
+ const unsigned char * msg32
201
204
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 ) SECP256K1_ARG_NONNULL (5 );
202
205
203
206
/** Initializes a verifier session that can be used for verifying nonce commitments
@@ -209,9 +212,7 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_musig_session_get_publi
209
212
* Out: session: the session structure to initialize (cannot be NULL)
210
213
* signers: an array of signers' data to be initialized. Array length must
211
214
* equal to `n_signers`(cannot be NULL)
212
- * In: msg32: the 32-byte message to be signed If NULL, must be set with
213
- * `musig_session_set_msg` before using the session for verifying
214
- * partial signatures.
215
+ * In: msg32: the 32-byte message to be signed (cannot be NULL)
215
216
* combined_pk: the combined public key of all signers (cannot be NULL)
216
217
* pk_hash32: the 32-byte hash of the signers' individual keys (cannot be NULL)
217
218
* commitments: array of 32-byte nonce commitments. Array length must equal to
@@ -229,7 +230,7 @@ SECP256K1_API int secp256k1_musig_session_initialize_verifier(
229
230
const unsigned char * pk_hash32 ,
230
231
const unsigned char * const * commitments ,
231
232
size_t n_signers
232
- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (5 ) SECP256K1_ARG_NONNULL (6 ) SECP256K1_ARG_NONNULL (7 );
233
+ ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 ) SECP256K1_ARG_NONNULL ( 5 ) SECP256K1_ARG_NONNULL (6 ) SECP256K1_ARG_NONNULL (7 );
233
234
234
235
/** Checks a signer's public nonce against a commitment to said nonce, and update
235
236
* data structure if they match
@@ -275,20 +276,6 @@ SECP256K1_API int secp256k1_musig_session_combine_nonces(
275
276
const secp256k1_pubkey * adaptor
276
277
) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
277
278
278
- /** Sets the message of a session if previously unset
279
- *
280
- * Returns 1 if the message was not set yet and is now successfully set
281
- * 0 otherwise
282
- * Args: ctx: pointer to a context object (cannot be NULL)
283
- * session: the session structure to update with the message (cannot be NULL)
284
- * In: msg32: the 32-byte message to be signed (cannot be NULL)
285
- */
286
- SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_musig_session_set_msg (
287
- const secp256k1_context * ctx ,
288
- secp256k1_musig_session * session ,
289
- const unsigned char * msg32
290
- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
291
-
292
279
/** Serialize a MuSig partial signature or adaptor signature
293
280
*
294
281
* Returns: 1 when the signature could be serialized, 0 otherwise
0 commit comments