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

Add Ed25519KeyPair::generate(&rng) function #572

Closed
vmsp opened this issue Oct 30, 2024 · 0 comments · Fixed by #576
Closed

Add Ed25519KeyPair::generate(&rng) function #572

vmsp opened this issue Oct 30, 2024 · 0 comments · Fixed by #576
Assignees
Labels
enhancement New feature or request

Comments

@vmsp
Copy link

vmsp commented Oct 30, 2024

Problem:

An Ed25519KeyPair can't be generated without serializing it first, which is a bit awkward. E.g.

use aws_lc_rs::signature::Ed25519KeyPair;

let rng = rand::SystemRandom::new();
let bytes = Ed25519KeyPair::generate_pkcs8v1(&rng).unwrap();
let signing_key_pair = Ed25519KeyPair::from_pkcs8_maybe_unchecked(bytes.as_ref()).unwrap();

Solution:

There should be a Ed25519KeyPair::generate() much like there is a EcdsaKeyPair::generate(). E.g.

use aws_lc_rs::signature::Ed25519KeyPair;

let rng = rand::SystemRandom::new();
let signing_key_pair = Ed25519KeyPair::generate(&rng).unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants