Skip to content

Commit

Permalink
Fix typos in README and verify.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
sschwarzmann authored and aewag committed Sep 1, 2024
1 parent a7a659f commit 5de5d17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This demo application can be used in the console as follows:

```
# Key generation
# Generates `mykey.priv`, `mykey.pub` with merkle tree height 10 and winternitz parameter 2
# Generates `mykey.prv`, `mykey.pub` with merkle tree height 10 and winternitz parameter 2
cargo run --release --example lms-demo -- genkey mykey 10/2 --seed 0123456701234567012345670123456701234567012345670123456701234567
# Signing
Expand Down
4 changes: 2 additions & 2 deletions src/lm_ots/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub fn verify_signature_inmemory<H: HashChain>(
return false;
}

let public_key_candidate = generate_public_key_candiate(
let public_key_candidate = generate_public_key_candidate(
signature,
&public_key.lms_tree_identifier,
u32::from_be_bytes(public_key.lms_leaf_identifier),
Expand All @@ -88,7 +88,7 @@ pub fn verify_signature_inmemory<H: HashChain>(
public_key_candidate == public_key.key
}

pub fn generate_public_key_candiate<H: HashChain>(
pub fn generate_public_key_candidate<H: HashChain>(
signature: &InMemoryLmotsSignature<'_, H>,
lms_tree_identifier: &[u8],
lms_leaf_identifier: u32,
Expand Down
6 changes: 3 additions & 3 deletions src/lms/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn verify<'a, H: HashChain>(
return Err(());
}

let public_key_canditate = generate_public_key_candiate(signature, public_key, message)?;
let public_key_canditate = generate_public_key_candidate(signature, public_key, message)?;

if public_key_canditate.as_slice() == public_key.key {
Ok(())
Expand All @@ -28,7 +28,7 @@ pub fn verify<'a, H: HashChain>(
}
}

fn generate_public_key_candiate<'a, H: HashChain>(
fn generate_public_key_candidate<'a, H: HashChain>(
signature: &InMemoryLmsSignature<'a, H>,
public_key: &InMemoryLmsPublicKey<'a, H>,
message: &[u8],
Expand All @@ -40,7 +40,7 @@ fn generate_public_key_candiate<'a, H: HashChain>(
return Err(());
}

let ots_public_key_canditate = lm_ots::verify::generate_public_key_candiate(
let ots_public_key_canditate = lm_ots::verify::generate_public_key_candidate(
&signature.lmots_signature,
public_key.lms_tree_identifier,
signature.lms_leaf_identifier,
Expand Down

0 comments on commit 5de5d17

Please sign in to comment.