Skip to content

Commit

Permalink
explicit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
FAlbertDev committed Sep 28, 2023
1 parent 5ceeb8d commit ae8bf94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/pubkey/hss_lms/lm_ots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ LMOTS_Params::LMOTS_Params(LMOTS_Algorithm_Type algorithm_type, std::string_view
// RFC 8553 Appendix B - Parameter Computation
auto u = ceil_division<size_t>(8 * m_n, m_w); // ceil(8*n/w)
auto v = ceil_division<size_t>(high_bit(((1 << m_w) - 1) * u), m_w); // ceil((floor(lg[(2^w - 1) * u]) + 1) / w)
m_ls = 16 - (v * w);
m_ls = static_cast<uint8_t>(16 - (v * w));
m_p = u + v;
}

Expand Down

0 comments on commit ae8bf94

Please sign in to comment.