Open djmdjm opened 5 days ago
Thanks for the report and good catch! The C code here has mainly been tested on Arm64 and X64/AVX2. We do indeed have the endian conversions code elsewhere, we will either integrate it here, or document how to use the current code safely on big-endian systems.
Thanks for the report @djmdjm. We minimised the glue here and apparently went a little too far. We'll get this fixed. But I want to have a big endian CPU on CI as well to make sure this doesn't happen again.
Yes, we've faced the CI problem too - BE architectures are not very common these days. We're looking at using FreeBSD/ppc64 on qemu
The
libcrux-ml-kem/cg
extraction is broken on big-endian systems. The root cause seems to be these functions ineurydice_glue.h
:which don't do any byte-swapping. We just fixed them in OpenSSH using
endian.h
macros: https://github.com/openssh/openssh-portable/commit/cf3e48ee8ba1beeccddd2f203b558fa102be67a2#diff-36ddc54729ced4a7ff0c5351a9fa6db5229d806a9268fc33f10c61d6cef9811e but it would be nice for them to be fixed upstream.