Skip to content
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

kem::encap_with_eph parameters disambiguition #24

Closed
BoOTheFurious opened this issue Apr 9, 2022 · 2 comments
Closed

kem::encap_with_eph parameters disambiguition #24

BoOTheFurious opened this issue Apr 9, 2022 · 2 comments

Comments

@BoOTheFurious
Copy link

Hello,

What is the purpose of the sk_eph: Self::PrivateKey parameter in the kem::encap_with_eph function.
The name suggest it is the ephemeral secret but it's the role of this function to generate it and it is not coherent with the type.
This parameters seems to be useless. Is there something I did not understand ?

Regards

@rozbb
Copy link
Owner

rozbb commented Apr 9, 2022

encap_with_eph doesn't generate its own ephemeral secret, in fact, it doesn't even take an RNG as input. Generating sk_eph is the job of encap. I split out the functionality because 1) it's slightly easier this way and 2) I need encap_with_eph for running test vectors.

@rozbb
Copy link
Owner

rozbb commented Apr 20, 2022

Fixed in #27

@rozbb rozbb closed this as completed Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants