Skip to content

Commit

Permalink
More Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Jan 10, 2024
1 parent 7f63e04 commit 3118890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/pubkey/classic_mceliece/cmce_decaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Classic_McEliece_Polynomial Classic_McEliece_Decryptor::berlekamp_massey(
big_c.at(i) += mne.if_set_return((f * big_b.at(i)));
}

big_l = mle.elem_mask().select((big_n + 1) - big_l, big_l);
big_l = mle.elem_mask().select(uint16_t((big_n + 1) - big_l), uint16_t(big_l));

for(size_t i = 0; i <= params.t(); ++i) {
big_b.at(i) = mle.select(big_t.at(i), big_b.at(i));
Expand Down Expand Up @@ -104,7 +104,7 @@ std::pair<CT::Mask<uint8_t>, secure_bitvector> Classic_McEliece_Decryptor::decod
e.push_back(is_zero_mask.as_bool());
hamming_weight_e += is_zero_mask.if_set_return(1);
}
decode_success &= CT::Mask<uint8_t>::is_equal(hamming_weight_e, sk.params().t());
decode_success &= CT::Mask<uint8_t>(CT::Mask<size_t>::is_equal(hamming_weight_e, sk.params().t()));

// Check the error vector
auto syndrome_from_e = compute_goppa_syndrome(sk.params(), sk.g(), sk.field_ordering(), e);
Expand Down

0 comments on commit 3118890

Please sign in to comment.