Skip to content

Commit

Permalink
Update src/lib/pubkey/frodokem/frodokem_common/frodo_matrix.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: René Meusel <[email protected]>
  • Loading branch information
randombit and reneme authored Oct 20, 2024
1 parent 8d70463 commit d008c3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/pubkey/frodokem/frodokem_common/frodo_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ FrodoMatrix FrodoMatrix::sample(const FrodoKEMConstants& constants,
load_le<uint16_t>(elements.data(), r.data(), n);

for(auto& elem : elements) {
const uint16_t prnd = CT::value_barrier(elem >> 1); // Drop the least significant bit
const auto sign = CT::Mask<uint16_t>::expand_bit(elem, 0); // Pick the least significant bit
const auto prnd = CT::value_barrier(static_cast<uint16_t>(elem >> 1)); // Drop the least significant bit
const auto sign = CT::Mask<uint16_t>::expand_bit(elem, 0); // Pick the least significant bit

uint32_t sample = 0; // Avoid integral promotion

Expand Down

0 comments on commit d008c3e

Please sign in to comment.