Skip to content

Commit ffd5bfd

Browse files
xmss: bind WOTS recover_public_key to self.randomness, drop mismatched signature param
Co-Authored-By: Nikos Baxevanis <nikos.baxevanis@gmail.com>
1 parent 6c12958 commit ffd5bfd

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

crates/xmss/src/wots.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@ impl WotsSignature {
7575
message: &[F; MESSAGE_LEN_FE],
7676
slot: u32,
7777
xmss_pub_key: &XmssPublicKey,
78-
signature: &Self,
7978
) -> Option<WotsPublicKey> {
80-
let encoding = wots_encode(message, slot, xmss_pub_key, &signature.randomness)?;
79+
let encoding = wots_encode(message, slot, xmss_pub_key, &self.randomness)?;
8180
Some(WotsPublicKey(std::array::from_fn(|i| {
8281
iterate_hash(
8382
&self.chain_tips[i],

crates/xmss/src/xmss.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub fn xmss_verify(
211211
) -> Result<(), XmssVerifyError> {
212212
let wots_public_key = signature
213213
.wots_signature
214-
.recover_public_key(message, slot, pub_key, &signature.wots_signature)
214+
.recover_public_key(message, slot, pub_key)
215215
.ok_or(XmssVerifyError::InvalidWots)?;
216216
let mut current_hash = wots_public_key.hash(pub_key.public_param, slot);
217217
for (level, neighbour) in signature.merkle_proof.iter().enumerate() {

0 commit comments

Comments
 (0)