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

Disable ED25519 and ED448 in FIPS mode on openssl3 #671

Merged

Conversation

pemensik
Copy link
Contributor

Both crypto functions are not allowed by FIPS 140-3. Use openssl 3.0
function to check FIPS mode presence and use it to make those algorithms
unsupported.

Would allow flawless fallback to insecure results for ED25519, ED448 and also SHA-1 algorithms.

@pemensik
Copy link
Contributor Author

@pemensik
Copy link
Contributor Author

pemensik commented May 5, 2022

Both crypto functions are not allowed by FIPS 140-3. Use openssl 3.0
function to check FIPS mode presence and use it to make those algorithms
unsupported.
@pemensik
Copy link
Contributor Author

Any comments for this change?

@gthess gthess self-assigned this May 20, 2022
@gthess
Copy link
Member

gthess commented May 20, 2022

Although the code LGTM, I find the change very implicit i.e., if "just fips" is set, disable those algorithms.

@gthess gthess mentioned this pull request May 20, 2022
@pemensik
Copy link
Contributor Author

pemensik commented May 23, 2022

It works around the resolution failure in FIPS mode:

# rpm -q unbound
unbound-1.13.1-13.el9.x86_64
# fips-mode-setup --check && unbound-host -rvD secure.d2a16n3.rootcanary.net
Installation of FIPS modules is not completed.
FIPS mode is disabled.
secure.d2a16n3.rootcanary.net has address 145.97.20.20 (secure)
secure.d2a16n3.rootcanary.net has IPv6 address 2001:610:188:408::20 (secure)
secure.d2a16n3.rootcanary.net has no mail handler record (secure)
# fips-mode-setup --enable && reboot
# fips-mode-setup --check && unbound-host -rvD secure.d2a16n3.rootcanary.net
FIPS mode is enabled.
secure.d2a16n3.rootcanary.net has address 145.97.20.20 (BOGUS (security failure))
validation failure <secure.d2a16n3.rootcanary.net. A IN>: use of key for crypto failed from 10.x.x.1 for key d2a16n3.rootcanary.net. while building chain of trust
secure.d2a16n3.rootcanary.net has IPv6 address 2001:610:188:408::20 (BOGUS (security failure))
validation failure <secure.d2a16n3.rootcanary.net. AAAA IN>: key for validation d2a16n3.rootcanary.net. is marked as invalid because of a previous validation failure <secure.d2a16n3.rootcanary.net. A IN>: use of key for crypto failed from 10.2.32.1 for key d2a16n3.rootcanary.net. while building chain of trust
secure.d2a16n3.rootcanary.net has no mail handler record (BOGUS (security failure))
validation failure <secure.d2a16n3.rootcanary.net. MX IN>: key for validation d2a16n3.rootcanary.net. is marked as invalid because of a previous validation failure <secure.d2a16n3.rootcanary.net. A IN>: use of key for crypto failed from 10.2.32.1 for key d2a16n3.rootcanary.net. while building chain of trust

After this change the result in FIPS mode would switch just to insecure, but still to successful resolution. Of course unbound itself would be affected too.

@pemensik
Copy link
Contributor Author

I expect FIPS mode is not enabled in openssl unless there is a reason for it to be. This might change once those algorithms are accepted by FIPS 140-3. It is expected they might and would be, but not clear when. This change can be reverted once they are acceptable.

@mnordhoff
Copy link

Making security worse for "compliance" is sad.

gthess added a commit that referenced this pull request Jul 3, 2022
- Merge PR #671 from Petr Menšík: Disable ED25519 and ED448 in FIPS
  mode on openssl3.
@gthess gthess merged commit c764206 into NLnetLabs:master Jul 3, 2022
@pemensik pemensik deleted the fips-mode-algo-ed25519 branch July 7, 2022 10:59
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 this pull request may close these issues.

None yet

3 participants