From 544f123e390b4697075a65d4dcacac06368dbb84 Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Mon, 29 Jan 2024 22:17:00 +0100 Subject: [PATCH 1/2] Hacspec Halfagg: Match BIP340 challenge input to BIP --- hacspec-halfagg/src/halfagg.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacspec-halfagg/src/halfagg.rs b/hacspec-halfagg/src/halfagg.rs index 074ac47..c68f757 100644 --- a/hacspec-halfagg/src/halfagg.rs +++ b/hacspec-halfagg/src/halfagg.rs @@ -120,7 +120,7 @@ pub fn verify_aggregate(aggsig: &AggSig, pm_aggd: &Seq<(PublicKey, Message)>) -> VerifyResult::Err(Error::InvalidSignature)?; } let r = r_res.unwrap(); - let e = scalar_from_bytes(hash_challenge(rx, bytes_from_point(p), msg)); + let e = scalar_from_bytes(hash_challenge(rx, pk, msg)); pmr[i] = (pk, msg, rx); let z = randomizer(&pmr, i); terms[2 * i] = (z, r); From c3236ba6ef2727a88077beea45df04454706629d Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Mon, 29 Jan 2024 22:22:12 +0100 Subject: [PATCH 2/2] BIP Halfagg: Match IncAggregate signature in Aggregate --- half-aggregation.mediawiki | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/half-aggregation.mediawiki b/half-aggregation.mediawiki index 0fb7ab6..bb3ecec 100644 --- a/half-aggregation.mediawiki +++ b/half-aggregation.mediawiki @@ -123,7 +123,8 @@ Input: '''''Aggregate(pms0..u-1)''''': * Let ''aggsig = bytes(0)'' -* Return ''IncAggregate(aggsig, pms0..u-1)''; fail if that fails. +* Let ''pm_aggd'' be an empty array +* Return ''IncAggregate(aggsig, pm_aggd, pms0..u-1)''; fail if that fails. ==== IncAggregate ====