Skip to content

Commit

Permalink
musig: minor comment corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
siv2r committed Aug 28, 2024
1 parent 6152622 commit 95585bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/musig/keyagg_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void secp256k1_musig_keyaggcoef_sha256(secp256k1_sha256 *sha) {
}

/* Compute KeyAgg coefficient which is constant 1 for the second pubkey and
* otherwise tagged_hash(pk_hash, x) where pk_hash is the hash of public keys.
* otherwise tagged_hash(pk_hash, pk) where pk_hash is the hash of public keys.
* second_pk is the point at infinity in case there is no second_pk. Assumes
* that pk is not the point at infinity and that the Y-coordinates of pk and
* second_pk are normalized. */
Expand Down Expand Up @@ -162,7 +162,7 @@ static void secp256k1_musig_keyaggcoef_internal(secp256k1_scalar *r, const unsig
}
}

/* Assumes both field elements x and second_pk_x are normalized. */
/* Assumes both field elements pk_x and second_pk_x are normalized. */
static void secp256k1_musig_keyaggcoef(secp256k1_scalar *r, const secp256k1_keyagg_cache_internal *cache_i, secp256k1_ge *pk) {
secp256k1_musig_keyaggcoef_internal(r, cache_i->pk_hash, pk, &cache_i->second_pk);
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/musig/session_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ int secp256k1_musig_partial_sig_verify(const secp256k1_context* ctx, const secp2
return 0;
}

/* Compute "effective" nonce rj = aggnonce[0] + b*aggnonce[1] */
/* TODO: use multiexp to compute -s*G + e*mu*pubkey + aggnonce[0] + b*aggnonce[1] */
/* Compute "effective" nonce rj = pubnonce[0] + b*pubnonce[1] */
/* TODO: use multiexp to compute -s*G + e*mu*pubkey + pubnonce[0] + b*pubnonce[1] */
if (!secp256k1_musig_pubnonce_load(ctx, nonce_pt, pubnonce)) {
return 0;
}
Expand Down

0 comments on commit 95585bd

Please sign in to comment.