-
Notifications
You must be signed in to change notification settings - Fork 13
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
Only generate parameters approved by current crypto-policy #19
Comments
I'm not entirely sure what you are asking for here. SSCG already provides:
Are you asking for the defaults to differ depending on |
Maybe you could provide a patch to https://github.com/sgallagher/sscg/blob/master/src/sscg.c#L59 ? |
The current output of this function is a random Diffie-Hellman group parameters. Instead, per FIPS, it really shouldn't be generating any parameters at all, but spitting out one of the pre-approved values instead. This is also more in line with what, e.g., TLSv1.3 is expecting also. You can see some more context on some of these other BZs (some are internal only):
So I'd add a parameter:
And have it output some well-known dhparam values from RFCs such as: &c. |
Sorry it's taken so long to get back to this, but I'm working on it now. Can you tell me if there's a standard I can use for the well-known names? You gave |
Hi @sgallagher, Two things here...
My 2c., hth. |
They're actually already available in OpenSSL 3.0: https://www.openssl.org/docs/man1.1.0/man3/BN_get_rfc3526_prime_8192.html I'm currently working on OpenSSL 3.0 compatibility, after which I'll look at backporting to OpenSSL 1.1.1. |
Aha :-) Well that's definitely useful! Perhaps he was talking about backporting this patch to the 1.1.1 series then. Edit: I just realized that the link you posted is in the 1.1.1 maintenance branch as well, so all modern OpenSSL versions should have that function since 2016: openssl/openssl@9021a5dfb37 |
@cipherboy Would you be so kind as to build and test the contents of the |
Fixes #19 Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
@cipherboy You can install testing packages from https://copr.fedorainfracloud.org/coprs/packit/sgallagher-sscg-24/ |
@sgallagher This looks fairly good, but from a UX perspective the CLI doesn't give a way of indicating what the supported group names are. Maybe if a bad option is specified it should output an error like Otherwise, I used ffdhe8192 (from looking at the code) and got a rfc7919 known DH parameter so I think it looks good from my PoV. I didn't do a code review :-) Thanks! |
I'll see what I can do to improve this here, but the
I agree, a more helpful error message might be useful. |
Ah ok, I see now. That's probably fine if I actually had taken the time to read it. ;-) |
The help text is more clear now:
(Note that's for OpenSSL 1.1; the list is longer on OpenSSL 3.0). It will also provide this list as an error message if an unknown one was specified. |
Thanks for the feedback! |
Fixes #19 Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1871988
Essentially, dhparam generation in FIPS mode should only allow output of known parameter sets, rather than actually invoking the underlying OpenSSL calls. Various linked BZs describe the actual set of allowed parameters. Perhaps a "named parameter" generator could be provided?
Thanks!
The text was updated successfully, but these errors were encountered: