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

Fixes to support broader set of parameters #60

Merged
merged 2 commits into from
Apr 15, 2024
Merged

Conversation

kste
Copy link
Contributor

@kste kste commented Apr 15, 2024

This includes two changes:

  • Copy the full key pair address, to support parameters which have more than > 2^16 leaves in an individual tree. This will now always copy the 4 bytes, which has a barely noticeable performance impact.
  • Fixes an undefined behavior if a single tree (d=1) is used, leading to a right shift of 64-bit values by 64.

The other fields are still only copied partially (it seems unlikely they will ever exceed the boundaries, but for correctness we maybe should consider it):

  • Chain address would only be > 1 byte if W <= 2.
  • Hash address would only be > 1 byte if W > 8 [this may happen, but would lead to very slow parameters].
  • Tree height would only be > 1 byte if h/d >=256 or similar if the FORS tree would be >= 256 layers (which will never happen).

@kste kste linked an issue Apr 15, 2024 that may be closed by this pull request
@bwesterb bwesterb self-requested a review April 15, 2024 16:28
@bwesterb bwesterb merged commit 7ec789a into master Apr 15, 2024
144 checks passed
@bwesterb bwesterb deleted the altparams_fix branch April 15, 2024 16:31
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 this pull request may close these issues.

Bug when using new reduced-size SPHINCS+ parameter sets
2 participants