-
Notifications
You must be signed in to change notification settings - Fork 139
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
Allow longer RSA key lengths and add PSS support for acmeServerCert profile #3492
base: master
Are you sure you want to change the base?
Conversation
…rofile. - Allow using RSA key length up to 16384, this is what OpenSSL recommends to generate. OpenSSL can generate longer keys, but shows a warning that it is not recommended. - Allow using PSS signing algorithms for ACME Server certificates. Related: dogtagpki#3491 Signed-off-by: Yevhen Syvachenko <[email protected]>
This looks fine and all, I would just ask cfu if we even support some of these huge key sizes. That is based on how long it might take for software or hardware to simply generate RSA keys of these sizes. |
I have tested FreeIPA installation with such key sizes for Dogtag:
I have checked the certificates in FreeIPA and Dogtag generated them correctly. The only issue I found is related to pki_admin_key_size and pki_sslserver_key_size. I guess, it is certutil tool that generates keys for Tomcat, and certutil does not support keys longer than 8192. It would be nice to use openssl instead of certutil, but it is not critical for me. As for key generation, it is mainly related to the availability of entropy, I think. The worst case I saw in my testing was ~20 minutes for the key 16384 on the quite old Xeon from 2013 without hardware support of cryptography and definitely without any hardware random generator. In any case, I have successfully installed FreeIPA and Dogtag after such a long delay. On some recent installation in the cloud it was ~3 minutes for the same key size, there CPU has some crypto support, but I have not investigated it deeply. |
sorry for the late response. |
@ladycfu Thanks for your response. This quite old article from 2016 notices 'that a quantum computer capable of breaking 2000-bit RSA in a matter of hours could be built by 2030': https://nvlpubs.nist.gov/nistpubs/ir/2016/NIST.IR.8105.pdf A special post-quantum cryptography standard is not available yet, as far as I know. The main hope here is that the current technologies for building quantum computers will face technical issues (the ion trap line should have issues with scaling, superconducting - with accuracy). To leverage possible technical issues we must use as large a key as possible. I have investigated a few libraries and found that 2 modulus RSA with 16384 key is acceptable in my cases and it seems all modern browsers support this key length. I found that 32768-bit key length is a bit unreliable as key generation is too long on old hardware. This seems to correspond to OpenSSL's vision - it starts showing warnings on 32768-bit keys and larger. I have successfully installed the FreeIPA system with most certificates using 15360-bit keys. To achieve this I indeed needed to patch a lot of files and profiles. Finally, I can say that it works fine for me and my cases. Most fixes I made were related to FreeIPA itself and there we can find some controversy, but this particular fix for Dogtag looks fine for me. The reasons are following (I could be wrong, please feel free to correct me):
|
@ysyvachenko I do not disagree with you irt the benefits of longer keys against future attacks, as that's a known fact. Although there are other alternatives such as EC keys, or in the case of TLS, Forward secrecy provided by TLS 1.3. There is also a question of how long is long enough, and how much time would that buy us. Could the heartache one bears for 16384 bit key in the name of security in the end proves to be just as useless as 4096 bit key in the case of a Quantum leap in computing powers? |
To my understanding the key lengths that we include in these profiles are the default policies that we recommend for most people. The profiles can always be customized if necessary by the admin. If we merge this PR, how likely would it cause a problem for people in general? Do we need to add a disclaimer somewhere saying that the longer keys have not been tested, or might only work in certain environments, something like that? Also, do we need to update the profiles in existing instances? The PR as it is now will only update the profiles for new installations since during installation the profile configuration files will be copied into the instance folder. To update existing installations we'd have to implement an upgrade script that modifies the profiles already in the instance folder. Here are some examples: https://github.com/dogtagpki/pki/tree/master/base/server/upgrade. Also note that in IPA during installation the profile configuration files will be imported into LDAP as well, so you might need a different mechanism to update the LDAP profiles in existing IPA installation if that is needed. |
The IPA team had similar concerns about the usability of such large keys. To use these in IPA would require an override file to be provided so the user would be in control of their own fate. I think this change fits into balance of power vs protecting the user from themselves. Some sort of support/test level statement might be nice as even with automation it would be difficult to test all combinations of key sizes to determine if everything still works correctly. There is a sister PR to add this capability to IPA in freeipa/freeipa#5640 |
PR Description
This PR is related to #3491:
Concerns