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

crypto/tls: de-prioritize AES cipher suites when lacking hardware support #41181

Closed
FiloSottile opened this issue Sep 2, 2020 · 2 comments
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@FiloSottile
Copy link
Contributor

We already prioritize ChaCha20 if we lack AES hardware, as software AES implementations are slow and less secure, and on the client side that's the best we can do. On the server, though, that only applies if PreferServerCipherSuites is set, and it ignores the client preference.

func initDefaultCipherSuites() {

When CipherSuites is nil, we should only pick AES if we have hardware support for it and the client communicated it prefers AES (implying they have hardware support). I think we should do this regardless of PreferServerCipherSuites if CipherSuites is nil, and regardless of CipherSuites if PreferServerCipherSuites is false: the only combination that expresses a strong application preference ordering is when they are both set.

This is why I didn't expose the default preference order! This logic can't be expressed as a static preference order.

@FiloSottile FiloSottile added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 2, 2020
@FiloSottile FiloSottile added this to the Go1.16 milestone Sep 2, 2020
@FiloSottile FiloSottile self-assigned this Sep 22, 2020
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/262857 mentions this issue: crypto/tls: de-prioritize AES-GCM ciphers when lacking hardware support

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/268437 mentions this issue: crypto/tls: prefer ChaCha20-Poly1305 ciphers when lacking AES hardware support

@golang golang locked and limited conversation to collaborators Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants