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

Bug when using new reduced-size SPHINCS+ parameter sets #59

Closed
crypto4a opened this issue Apr 12, 2024 · 3 comments · Fixed by #60
Closed

Bug when using new reduced-size SPHINCS+ parameter sets #59

crypto4a opened this issue Apr 12, 2024 · 3 comments · Fixed by #60

Comments

@crypto4a
Copy link

There is an issue with the existing reference implementation when experimenting with the new reduced-signature size SPHINCS+ parameter sets due to the fact that some of the new parameter sets utilize large subtree sizes (i.e., > 16) that result in the address.c::set_keypair_addr() function not setting all of the necessary bits as it only copies over the first two bytes.

In general, you may want to modify all ADDR-handling functions to ensure they copy over, or set, all of the bytes of each of the ADDR fields to ensure this doesn't happen.

@bwesterb bwesterb added wontfix This will not be worked on and removed wontfix This will not be worked on labels Apr 15, 2024
@bwesterb
Copy link
Contributor

Feel free to send a PR.

@kste
Copy link
Contributor

kste commented Apr 15, 2024

I will send a pull request. There is actually another issue, as

*tree &= (~(uint64_t)0) >> (64 - SPX_TREE_BITS);
can lead to undefined behaviour for additional parameters if there is only a single tree (d=1) [SPX_TREE_BITS becomes zero in that case].

@kste kste linked a pull request Apr 15, 2024 that will close this issue
@bwesterb
Copy link
Contributor

Thanks @kste

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

Successfully merging a pull request may close this issue.

3 participants