Skip to content

Commit

Permalink
poly1305: formatting of hex literal in soft.rs (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeisler authored Jul 26, 2024
1 parent 878e527 commit 418f198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poly1305/src/backend/soft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl State {
pub(crate) fn new(key: &Key) -> State {
let mut poly = State::default();

// r &= 0xffffffc0ffffffc0ffffffc0fffffff
// r &= 0x0ffffffc_0ffffffc_0ffffffc_0fffffff
poly.r[0] = (u32::from_le_bytes(key[0..4].try_into().unwrap())) & 0x3ff_ffff;
poly.r[1] = (u32::from_le_bytes(key[3..7].try_into().unwrap()) >> 2) & 0x3ff_ff03;
poly.r[2] = (u32::from_le_bytes(key[6..10].try_into().unwrap()) >> 4) & 0x3ff_c0ff;
Expand Down

0 comments on commit 418f198

Please sign in to comment.