sign: Adding SLH-DSA signature#512
Conversation
|
there is a timeout happening on the ARM build because tests are running in parallel, but it doesn't seems to be related to a failure in the code. |
rozbb
left a comment
There was a problem hiding this comment.
This looks great! Almost all my comments are nitpicky bc I didn't have anything else to talk about :)
| } | ||
|
|
||
| // See FIPS 205 -- Section 6.1 -- Algorithm 9 -- Iterative version. | ||
| func (s *statePriv) xmssNodeIter( |
There was a problem hiding this comment.
Similar thing. I had trouble following along with this algorithm, since it differs so much from the paper. Also why is i a parameter at all if it's not a recursive algorithm?
There was a problem hiding this comment.
Internally, the index of each node is used as part of the hash parameters. So, i denotes the first index of a sub-tree.
sign/slhdsa/internal.go
Outdated
| defer s.Clear() | ||
|
|
||
| s.forsSign(sig.forsSig, md, addr) | ||
| pkFors := s.forsPkFromSig(md, sig.forsSig, addr) |
There was a problem hiding this comment.
Would it be possible to compute pkFors as a side effect of forsSign? Can save a few hashes if so. Similarly might be able to do this in the htSign function
There was a problem hiding this comment.
I've tried to coalesce these functions, but didn't found any savings on the number of hashes.
12020e3 to
32046e4
Compare
32046e4 to
c74a2d3
Compare
|
ACVP test vectors updated to v1.1.0.37 |
| addressSizeNonCompressed = 32 | ||
| ) | ||
|
|
||
| type address struct { |
There was a problem hiding this comment.
Might be more efficient with respect to allocations to use [32]byte as address type.
There was a problem hiding this comment.
I tried that but didn't see any postive effect on allocs.
Passes Test vectors from ACVP for internal functions.
a91ad61 to
5e2385c
Compare
|
Hi, thanks for adding support for SLH-DSA. Is there anything else that needs to happen before this can be merged? Today, we are using liboqs bindings today in our GO code, but prefer GO direct implementation over native code (in C) to de-risk any unexpected memory issues. From GO dev group, the support for ML-DSA and SLH-DSA is not planned anytime soon (none this year), hence we are looking for alternate options to improve memory safety. |
|
Thanks for merging! |
This implementation supports the twelve parameter sets approved at FIPS 205
Test vectors match the ones at ACVP-Server version 1.1.0.38. These test vectors target both internal and external functions.
Pure and Prehash-based signatures are supported.
Implementation makes a good effort to avoid heap allocations that usually add a significant overhead.