Upgrade to HPKE v0.14#109
Conversation
|
Thanks for the PR, Michael. IMO this crate's goal is just to be an adapter to We will also need to update the discussion of features in And wiring up PQ and hybrid HPKE is worthwhile. |
|
Great, I can make those changes 👍 |
|
Thanks, but let's see if @jcjones or @divergentdave have an opinion to share before we make another move. |
divergentdave
left a comment
There was a problem hiding this comment.
Mirroring hpke's features and forwarding them sounds good. Our existing per-algorithm features may have gone a bit overboard.
|
Aligned features and added new KEMs and KDFs. Lmk if there's anything else you'd like. I realized that I'm missing MLKEM-512. I'll add that in a future version. I'm not in much of a rush |
|
One question: is it necessary to feature-gate |
- normalize feature names with hpke - remove base-mode-open, base-mode-seal features - update README - tidy up some doccomments
|
Thanks, Michael. IMO we should align our feature flags as much as possible with
It doesn't seem useful to omit these, especially since users of I pushed a commit that does the above two things, as well as updating Separately from this PR, we should extend |
|
I changed my mind: adding the PQ test vectors is so easy that I think we can just do it here. It's only a few lines of code, plus 122 kB of JSON imported from |
JSON test vector imported from [draft-ietf-hpke-pq][1]'s git repository. [1]: https://github.com/hpkewg/hpke-pq/blob/11b5b9541e9976fc9ce25902011d20dacc089066/test-vectors.json
| # Check using Clippy with the feature combinations listed in the README. | ||
| - run: cargo clippy | ||
| - run: cargo clippy --no-default-features --features algo-all,base-mode-open,serde | ||
| - run: cargo clippy --no-default-features --features algo-all,serde |
There was a problem hiding this comment.
The feature list at the end of the README is now ["aes", "hkdfsha2", "nistp", "serde"]
| /// SHAKE128 [RFC 9861](https://www.rfc-editor.org/info/rfc9861/) | ||
| #[cfg(feature = "shake")] | ||
| Shake128 = 0x0010, | ||
| /// SHAKE256 [RFC 9861](https://www.rfc-editor.org/info/rfc9861/) |
There was a problem hiding this comment.
I think these are just defined in FIPS 202
There was a problem hiding this comment.
We should still reference RFC 9861 for TurboSHAKE128 and TurboSHAKE256
|
Merged -- thank you for the contribution, @rozbb, as well as your continued hard work on HPKE! |
Making this to start the conversation about how to upgrade. Right now it's the absolute minimum possible diff to do the upgrade. But I suspect you might want to change your own feature flags to match the new ones upstream, and also maybe add some to expose the new PQ and hybrid ciphersuites. Let me know what you're thinking