signatures icon indicating copy to clipboard operation
signatures copied to clipboard

Add lms to RustCrypto/signatures

Open incertia opened this issue 1 year ago • 1 comments

This adds the lms directory to RustCrypto/signatures under the crate name lms-signature. The authors of the original RFC seem quite happy using the phrase so this keeps the naming in the signatures repository consistent. Hopefully I ported the Github workflow without any issues.

There are two notable limitations to our implementation:

  1. We rely on generic_array::GenericArray from the older digest-0.10.7 instead of using the hybrid_array::Array approach from the upcoming digest-0.11 ecosystem.
  2. We lack a way of compressing Merkle tree data so we just store the entire tree which causes H15, H20, and H25 variants of LMS to not work due to storage limitations.

This PR also does not modify the main README in any way. I have also refrained from committing any changes to Cargo.lock.

incertia avatar Jan 31 '24 16:01 incertia

@tarcieri do you have opinions on large in-file KAT buffers like this?

Debating whether we should

  1. Leave as-is
  2. Break large KATs out to a separate directory
  3. Just include a hash of the actual expected result and compare against that

There will be a couple more large KATs eventually once HSS is implemented, and if we want to support the larger merkle tree sizes then they will start getting really big.

tjade273 avatar Feb 16 '24 18:02 tjade273

@tjade273 we generally just check them in, but for very large ones omit them from the resulting .crate, e.g.:

https://github.com/RustCrypto/MACs/blob/43cc597/cmac/Cargo.toml#L14

tarcieri avatar Mar 05 '24 20:03 tarcieri

utACK, let me know if you'd like to make any additional changes or otherwise we can get this merged

tarcieri avatar Mar 05 '24 20:03 tarcieri

We can probably get this merged.

incertia avatar Mar 06 '24 19:03 incertia