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

Fix LMS crash #1998

Merged
merged 2 commits into from
Nov 24, 2024
Merged

Fix LMS crash #1998

merged 2 commits into from
Nov 24, 2024

Conversation

ashman-p
Copy link
Contributor

HSS signing operation crashed after exhausting the number of signatures available at a given level.
The multi-level tree was not properly populated.

Fixes #1966.

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • Does this PR change the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in fully supported downstream projects dependent on these, i.e., oqs-provider will also need to be ready for review and merge by the time this is merged.)

Signed-off-by: Norman Ashley <nashley@cisco.com>
@ashman-p ashman-p self-assigned this Nov 19, 2024
Signed-off-by: Norman Ashley <nashley@cisco.com>
@dstebila dstebila added this to the 0.12.0 milestone Nov 19, 2024
@ashman-p ashman-p requested review from cothan and SWilson4 November 19, 2024 18:07
@ashman-p ashman-p marked this pull request as ready for review November 19, 2024 18:10
@SWilson4
Copy link
Member

Thanks for the fix, @ashman-p. Would it be feasible to add a test that catches the original bug to prevent a regression and catch similar errors that may arise in the future? Something that fails on the current main but passes on this branch. I can help with integrating it into CI.

@ashman-p
Copy link
Contributor Author

Thanks for the fix, @ashman-p. Would it be feasible to add a test that catches the original bug to prevent a regression and catch similar errors that may arise in the future? Something that fails on the current main but passes on this branch. I can help with integrating it into CI.

Thanks @SWilson4 . I thought about that and wondered if this speed test would suffice? IOW invoking a small HSS and LMS variant?

@SWilson4
Copy link
Member

Thanks @SWilson4 . I thought about that and wondered if this speed test would suffice? IOW invoking a small HSS and LMS variant?

I think that would do the trick. Would it be more of a stress test? If so, maybe we can add it to the extended tests so it only runs once a week or on-demand. If that makes sense, how about I push a commit to this branch to add the CI framework, and then you can refine it as need be?

@ashman-p
Copy link
Contributor Author

ashman-p commented Nov 19, 2024

Thanks @SWilson4 . I thought about that and wondered if this speed test would suffice? IOW invoking a small HSS and LMS variant?

I think that would do the trick. Would it be more of a stress test? If so, maybe we can add it to the extended tests so it only runs once a week or on-demand. If that makes sense, how about I push a commit to this branch to add the CI framework, and then you can refine it as need be?

I am not sure this particular test needs to be a stress test. Seems that the duration and number of iterations are configurable.
Therefore, the options can be selected to really make it a sanity test rather than a stressor. And it can cover LMS and XMSS.
Please push the branch to the CI framework and maybe give me some instructions about what to do next? Thanks

@SWilson4 SWilson4 self-assigned this Nov 22, 2024
@ashman-p ashman-p merged commit fbaf871 into main Nov 24, 2024
80 checks passed
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.

LMS multi-tree signing crashes after first subtree is exhausted.
4 participants