Classic McEliece on arch which doesn't like unaligned access

Simon Josefsson simon at josefsson.org
Mon Aug 5 09:09:21 CEST 2024


Hi.

As a first step towards fixing this, please find attached patch to add a
script that re-generate mceliece6688128f.c from upstream libmceliece.

This should have been part of the first patch, but I cheated and
manually modified the generated code to fix some issues.  For that
reason, this patch modify mceliece6688128f.c too.  All of those changes
should be no-ops and are to make the mceliece6688128f.sh script simpler.

After applying this patch, you can reproduce the generated code:

$ cd ~/src/libgcrypt/cipher
$ wget -nv https://lib.mceliece.org/libmceliece-20230612.tar.gz
$ tar xfa libmceliece-20230612.tar.gz
$ ./mceliece6688128f.sh . > mceliece6688128f.c
$ git diff

Syncing the code with latest libmceliece was a bit more complicated than
I thought so I think the right approach is to first get this patch in
and later finish updating to latest libmceliece 20240726.  That should
fix the alignment issue and some other problems.

The patch in this e-mail should go in first though, to have a good way
to reproduce the existing code for auditing.

What do you think?

/Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-cipher-Add-script-to-re-generate-mceliece6688128f.c.patch
Type: text/x-diff
Size: 18180 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20240805/5d7fb9b1/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 255 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20240805/5d7fb9b1/attachment-0001.sig>


More information about the Gcrypt-devel mailing list