-
Notifications
You must be signed in to change notification settings - Fork 32
x-wing: add deterministic encapsulation #183
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
Conversation
|
Can't replicate the clippy error locally when running |
|
I'm just gonna remove the gate actually. This won't stay in this form for that long, since the trait will be upstreamed |
|
I've changed my mind on the trait. I think it's probably not necessary if it's just useful for testing purposes. No need to make a testing trait public imo. I'm happy to leave things as-is |
|
FWIW: https://docs.rs/ml-kem/0.2.1/ml_kem/trait.EncapsulateDeterministic.html (you're probably already using it) I would like to get rid of all of the bespoke traits in these crates though |
|
I removed the Ready for review @tarcieri |
Deterministic encapsulation is super helpful for known-answer tests. I'm currently extending
hpketo support X-Wing, and I need to be able to do deterministic encapsulation in order to check against the HPKE test vectors.The
randomnessrepresentation is the least controversial in my opinion. Rather than make it a 32-byte seed that gets expanded in some bespoke way, we make it 64 bytes. Thus, this API just exposes a passthrough to the underlying deterministic encapsulation methods. This happens to be how the hybrid KEM draft does this. If this changes in the future, that's fine, because this representation gives the caller full control.Next steps
I think it'd be nice to move the
EncapsulateDeterministictrait intotraits/kem. Specifically I was thinking something like