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

Impossible to generate a DSA or ElGamal key with a randomly generated DL group #110

Closed
teythoon opened this issue Jul 18, 2023 · 5 comments · Fixed by #111
Closed

Impossible to generate a DSA or ElGamal key with a randomly generated DL group #110

teythoon opened this issue Jul 18, 2023 · 5 comments · Fixed by #111

Comments

@teythoon
Copy link
Contributor

AFAICS there is no parameter string to pass to Privkey::create that selects a randomly generated DL group.

@randombit
Copy link
Owner

Oh interesting - we expose this from FFI but not in the Rust binding.

@randombit
Copy link
Owner

Can you take a look at #110?

@teythoon
Copy link
Contributor Author

#111 seems to work fine.

@randombit
Copy link
Owner

randombit commented Jul 18, 2023

Just released botan 0.10.6 with this included

Though I realized after I published, this probably should be 0.11.0 instead? The versioning is a bit wonky ... it may be time to commit to 1.0 on this crate. (#113)

@teythoon
Copy link
Contributor Author

Thanks for the prompt fix!

WRT the 1.0 release I'd still love to see #81 addressed first. I think this would make the interface more ergonomic and more robust.

More ergonomic because while working on this I again read through the Botan source in order to figure out whether there is a magic parameter string that would do what I want.

More robust because it doesn't leak an botan-ffi implementation detail into the Rust API. And, I actually first passed bits.to_string() as parameter, thinking that that should work, and my tests didn't catch that mistake, because failing to generate the key because of the wrong parameter looked to the test like the algorithm wasn't implemented by the underlying cryptographic library.

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

Successfully merging a pull request may close this issue.

2 participants