Skip to content

Commit e2f9fe0

Browse files
BIP-327: correct DeterministicSign pubnonce and key length (#2071)
Co-authored-by: lisenokdonbassenok <[email protected]>
1 parent fc00f51 commit e2f9fe0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bip-0327.mediawiki

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Algorithm ''DeterministicSign(sk, aggothernonce, pk<sub>1..u</sub>, tweak<sub>1.
606606
** The secret signing key ''sk'': a 32-byte array
607607
** The aggregate public nonce ''aggothernonce'' (see [[#modifications-to-nonce-generation|above]]): a 66-byte array
608608
** The number ''u'' of individual public keys with ''0 < u < 2^32''
609-
** The individual public keys ''pk<sub>1..u</sub>'': ''u'' 32-byte arrays
609+
** The individual public keys ''pk<sub>1..u</sub>'': ''u'' 33-byte arrays
610610
** The number ''v'' of tweaks with ''0 &le; v < 2^32''
611611
** The tweaks ''tweak<sub>1..v</sub>'': ''v'' 32-byte arrays
612612
** The tweak methods ''is_xonly_t<sub>1..v</sub>'': ''v'' booleans
@@ -623,7 +623,7 @@ Algorithm ''DeterministicSign(sk, aggothernonce, pk<sub>1..u</sub>, tweak<sub>1.
623623
* Let ''k<sub>i</sub> = int(hash<sub>MuSig/deterministic/nonce</sub>(sk' || aggothernonce || aggpk || bytes(8, len(m)) || m || bytes(1, i - 1))) mod n'' for ''i = 1,2''
624624
* Fail if ''k<sub>1</sub> = 0'' or ''k<sub>2</sub> = 0''
625625
* Let ''R<sub>⁎,1</sub> = k<sub>1</sub>⋅G, R<sub>⁎,2</sub> = k<sub>2</sub>⋅G''
626-
* Let ''pubnonce = cbytes(R<sub>⁎,2</sub>) || cbytes(R<sub>⁎,2</sub>)''
626+
* Let ''pubnonce = cbytes(R<sub>⁎,1</sub>) || cbytes(R<sub>⁎,2</sub>)''
627627
* Let ''d = int(sk)''
628628
* Fail if ''d = 0'' or ''d &ge; n''
629629
* Let ''pk = cbytes(d⋅G)''
@@ -782,6 +782,8 @@ An exception to this rule is <code>MAJOR</code> version zero (0.y.z) which is fo
782782
The <code>MINOR</code> version is incremented whenever the inputs or the output of an algorithm changes in a backward-compatible way or new backward-compatible functionality is added.
783783
The <code>PATCH</code> version is incremented for other changes that are noteworthy (bug fixes, test vectors, important clarifications, etc.).
784784
785+
* '''1.0.3''' (2026-01-05):
786+
** Fix minor bugs in the specification of ''DeterministicSign''.
785787
* '''1.0.2''' (2024-07-22):
786788
** Fix minor bug in the specification of ''DeterministicSign'' and add small improvement to a ''PartialSigAgg'' test vector.
787789
* '''1.0.1''' (2024-05-14):

0 commit comments

Comments
 (0)