Skip to content

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

@FiloSottile

Description

@FiloSottile

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions