wolfcrypt/src/wc_kyber_poly.c: fix bugprone-macro-parentheses for FROM_MSG_BIT.

This commit is contained in:
Daniel Pouzzner
2024-06-06 16:21:32 -05:00
parent d80f05bf77
commit ef925b8b30

View File

@ -2785,8 +2785,8 @@ void kyber_decompress_5(sword16* p, const unsigned char* b)
* @param [in] j Index of bit in byte. * @param [in] j Index of bit in byte.
*/ */
#define FROM_MSG_BIT(p, msg, i, j) \ #define FROM_MSG_BIT(p, msg, i, j) \
(p)[8 * (i) + (j)] = (((sword16)0 - (sword16)(((msg)[i] >> (j)) & 1)) ^ \ ((p)[8 * (i) + (j)] = (((sword16)0 - (sword16)(((msg)[i] >> (j)) & 1)) ^ \
kyber_opt_blocker) & KYBER_Q_1_HALF kyber_opt_blocker) & KYBER_Q_1_HALF)
/* Convert message to polynomial. /* Convert message to polynomial.
* *