Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

size of buffer in kyber768/m4fstack/matacc.c (and probably m4fspeed too) #357

Open
marco-palumbi opened this issue Aug 27, 2024 · 1 comment

Comments

@marco-palumbi
Copy link
Contributor

unsigned char buf[XOF_BLOCKBYTES+2]; could be of size XOF_BLOCKBYTES (see: https://github.com/mupq/pqm4/blob/master/crypto_kem/kyber768/m4fstack/matacc.c#L20)

if I'm not wrong the code relay on XOF_BLOCKBYTES being multiple of 3 (see pq-crystals/kyber@ce492cd) and xof_squeezeblocks() is always called with the address of the first byte of buf (see also https://github.com/mupq/pqm4/blob/master/crypto_kem/kyber768/m4fstack/matacc.i#L101)

buf can then be defined: unsigned char buf[XOF_BLOCKBYTES];
the same should apply to the m4fspeed version.
Can please check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@marco-palumbi and others