-
Notifications
You must be signed in to change notification settings - Fork 3k
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
FIPS 140-3 vs supported algorithms in ssh #9520
Comments
Also usage of Ed448 curve is approved for digital signatures by FIPS 140-3 (unlike 140-2) but OTP still says |
I did a quick commit that allows EDDSA for FIPS: It seems to work when I test on OpenSSL 3.0.9 with FIPS. But is it the right thing to do, to leave it up to OpenSSL? |
I am not a 100 % sure how the FIPS mode in OpenSSL is supposed to work. Can it be so that FIPS allows sha1 to be called for some circumstances but not for others? So that crypto:supports may correctly return that sha1 hash function can be called but although it mandates it can not be called in combination with a signature algorithm? |
Taking into account these statements from NIST
I would not be bothered much by supporting FIPS 140-2. Especially this is the case for OpenSSL3 which has never been certified for FIPS 140-2, and OpenSSL3 does already have special treatment in OTP. Regarding the reporting of supported algorithms: |
I would prefer if the authority of what algorithms that OpenSSL supports would be OpenSSL (FIPS or not). Such that OTP Even if |
I agree that it would be the best if OpenSSL was the source of authority. But my knowledge of OpenSSL API is not good enough to see if there is a reliable method to get correct information from OpenSSL. For example if I try command-line openssl I get this:
So even in FIPS mode OpenSSL3 CLI tool reports that it can use DSA with SHA1, which is true only with the caveat that this combo can be used only for legacy purposes, i.e. to verify the existing signatures. It seems to me that the only reliable way to get complete and correct information regarding support of a crypto algorithm from OpenSSL in FIPS mode is to try and use the crypto algorithm in question. This does not look as a very practical solution though. But if there are API function calls that provide more accurate information than the command-line invocation - then it would be nice to have it exposed through OTP |
An update (technically covered by the issue title but may be a separate problem):
even when the DH prime size limit is set to be 4096 or higher (FIPS recommendation is 2048 and higher). |
Describe the bug
The output of ssh_transport:supported_algorithms() when used with FIPS-enabled OpenSSL contains algorithms that should not be supported (if I'm reading FIPS 140-3 right, which is not an easy read):
As one can see
ssh-dss
andssh-rsa
are present in the list as supported, although they use SHA1 which is not allowed for signature generation in FIPS 140-3 (and DSA has restriction on bitsize >= 2048 to be allowed, which is not supported byssh-keygen
from OpenSSH). Also among ciphers there is 3DES, which is allowed only for decryption (even in 3-key mode after 2023) so practically it cannot be used by SSH (although maybe there are clients/servers that allow for asymmetrical cipher choice - I have not met one yet).To Reproduce
Build OTP with OpenSSL3.0.0 + FIPS provider, check the supported algorithms. Note that the output of
crypto:supports()
while containing SHA1, 3DES etc is technically correct as it does not assume specific usage of these algorithms.Expected behavior
A list of supported algorithms in OTP SSH should not include those that are not allowed to be used in FIPS mode.
Affected versions
OTP27.2.2
The text was updated successfully, but these errors were encountered: