ML-DSA: Fix endian issue in ossl_ml_dsa_poly_sample_in_ball().

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/26451)
This commit is contained in:
slontis 2025-01-17 18:48:53 +11:00 committed by Tomas Mraz
parent f92855441f
commit aabb69b8ba
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
* https://www.openssl.org/source/license.html
*/
#include <openssl/byteorder.h>
#include "ml_dsa_local.h"
#include "ml_dsa_vector.h"
#include "ml_dsa_matrix.h"
@ -322,7 +323,7 @@ int ossl_ml_dsa_poly_sample_in_ball(POLY *out_c, const uint8_t *seed, int seed_l
* grab the first 64 bits - since tau < 64
* Each bit gives a +1 or -1 value.
*/
memcpy(&signs, block, 8);
OPENSSL_load_u64_le(&signs, block);
poly_zero(out_c);