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

FiloSottile opened this issue Sep 2, 2020 · 0 comments


Copy link

@FiloSottile FiloSottile commented Sep 2, 2020

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 label Sep 2, 2020
@FiloSottile FiloSottile added this to the Go1.16 milestone Sep 2, 2020
@FiloSottile FiloSottile self-assigned this Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.