botan
botan copied to clipboard
HSS-LMS Signature Algorithm Implementation
Pull Request Dependencies
- #3869
Description
This is adding the Hierarchical Signature System (HSS) with Leighton-Micali Hash-Based Signatures (LMS) as defined in RFC 8554.
The first commit (9dddcf6) contains some preparations, mainly common utility functions, and minor cleanup. HSS-LMS is implemented in the second commit (ba36c5e).
For this algorithm, we tried to find a way to generalize the logic to construct a Merkle tree, which is used in all hash-based signature algorithms so far. We introduce the tree_hash.h containing a generalized (and highly flexible) logic for creating Merkle trees. We only apply it for HSS-LMS in this PR but aim to apply it for (at least) SPHINCS+ in a follow-up PR.
If you are interested, you can drop some comments and suggestions.
#3105
coverage: 91.857% (-0.2%) from 92.028% when pulling 24c8b6c6eb7bcbfa2c430d0658984492c7255cfe on Rohde-Schwarz:pl/lms into bf86f1a9f99aa1fc62f9884d0bda8193fb1d57b7 on randombit:master.
This PR is now ready! Any review is welcome ❤️
Thanks again for your review, @reneme! I addressed your suggestions in https://github.com/randombit/botan/pull/3716/commits/a4c5df28bc9126a3f4de5fc3b02ec523863184a4.
rebased to current master
I force pushed the changes here, to:
- take advantage of the changes in #3869
- squash and clean up the history
Thanks for your detailed and comprehensive review, @reneme 👍 I addressed your suggestions in 1f3befe.
Rebased to (latest) master
after #3888.
Rebased after the underlying #3869 needed to get conflicts resolved after #3908 was merged. Also, the code here needed minor conflict resolving due to #3908.
#3869 is approved; I'll review LMS after this is rebased post merge
I'll review LMS after this is rebased post merge
Done. I merged #3869 and rebased. No history rewrite was done.
Rebased to fix conflicts on master (likely introduced by merging #3933).