Skip to content

Commit

Permalink
WIP - fix compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed May 31, 2024
1 parent 70cf7d9 commit 066fc6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/pubkey/kyber/kyber_common/kyber_algos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void kyber_sample_ntt_uniform(KyberPolyNTT& p, XOF& xof) {
std::array<uint8_t, 4> buf = {0};
xof.output(std::span{buf}.first<3>());
const auto x = load_le(buf);
const auto d1 = static_cast<uint16_t>(x) & 0x0FFF;
const auto d2 = static_cast<uint16_t>(x >> 12);
const uint16_t d1 = static_cast<uint16_t>(x) & 0x0FFF;
const uint16_t d2 = static_cast<uint16_t>(x >> 12);

if(d1 < KyberConstants::Q) {
p[count++] = d1;
Expand Down

0 comments on commit 066fc6d

Please sign in to comment.