Skip to content

Commit

Permalink
Use separate personalization string for fmd scalar hash
Browse files Browse the repository at this point in the history
BREAKING: This will break old clues and their detection
  • Loading branch information
cronokirby committed Mar 29, 2024
1 parent ddc683c commit 50fc83a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion crates/crypto/decaf377-fmd/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn to_scalar(point: &[u8; 32], n: u8, bits: &[u8]) -> Fr {
assert_eq!(bits.len(), 3);

let hash = blake2b_simd::Params::default()
.personal(b"decaf377-fmd.bit")
.personal(b"decaf377-fmd.sca")
.to_state()
.update(point)
.update(&[n])
Expand Down
1 change: 0 additions & 1 deletion crates/crypto/decaf377-fmd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ pub use error::Error;
pub use precision::Precision;

pub(crate) use precision::MAX_PRECISION;

0 comments on commit 50fc83a

Please sign in to comment.