From 26bb1d8ea3e2f0f7e02e1ec37a4b70fbc0781f85 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 22 Jul 2024 14:14:33 +0000 Subject: [PATCH] bip-0327: 1.0.1 -> 1.0.2 (cherry picked from commit 4f2e6e7ffbd2fdc095ab8d59827be9da18b790be) --- bip-0327.mediawiki | 4 +++- bip-0327/reference.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bip-0327.mediawiki b/bip-0327.mediawiki index 77a0024e..c9e88abd 100644 --- a/bip-0327.mediawiki +++ b/bip-0327.mediawiki @@ -782,6 +782,8 @@ An exception to this rule is MAJOR version zero (0.y.z) which is fo The MINOR 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. The PATCH version is incremented for other changes that are noteworthy (bug fixes, test vectors, important clarifications, etc.). +* '''1.0.2''' (2024-07-22): +** Fix minor bug in the specification of ''DeterministicSign'' and add small improvement to a ''PartialSigAgg'' test vector. * '''1.0.1''' (2024-05-14): ** Fix minor issue in ''PartialSigVerify'' vectors. * '''1.0.0''' (2023-03-26): @@ -825,4 +827,4 @@ The PATCH version is incremented for other changes that are notewor == Acknowledgements == -We thank Brandon Black, Riccardo Casatta, Lloyd Fournier, Russell O'Connor, and Pieter Wuille for their contributions to this document. +We thank Brandon Black, Riccardo Casatta, Sivaram Dhakshinamoorthy, Lloyd Fournier, Russell O'Connor, and Pieter Wuille for their contributions to this document. diff --git a/bip-0327/reference.py b/bip-0327/reference.py index dd3bf68c..17831c5f 100644 --- a/bip-0327/reference.py +++ b/bip-0327/reference.py @@ -367,7 +367,7 @@ def sign(secnonce: bytearray, sk: bytes, session_ctx: SessionContext) -> bytes: raise ValueError('secret key value is out of range.') P = point_mul(G, d_) assert P is not None - pk = PlainPk(cbytes(P)) + pk = cbytes(P) if not pk == secnonce[64:97]: raise ValueError('Public key does not match nonce_gen argument') a = get_session_key_agg_coeff(session_ctx, P) @@ -430,7 +430,7 @@ def partial_sig_verify(psig: bytes, pubnonces: List[bytes], pubkeys: List[PlainP session_ctx = SessionContext(aggnonce, pubkeys, tweaks, is_xonly, msg) return partial_sig_verify_internal(psig, pubnonces[i], pubkeys[i], session_ctx) -def partial_sig_verify_internal(psig: bytes, pubnonce: bytes, pk: PlainPk, session_ctx: SessionContext) -> bool: +def partial_sig_verify_internal(psig: bytes, pubnonce: bytes, pk: bytes, session_ctx: SessionContext) -> bool: (Q, gacc, _, b, R, e) = get_session_values(session_ctx) s = int_from_bytes(psig) if s >= n: