Skip to content

Allow ChaCha20 type ciphers to avoid crippling servers without AES hardware acceleration #903

Closed
@fakuivan

Description

@fakuivan

The chacha20 family of ciphers are not considered insecure, and are an order of magnitude more efficient on servers that do not provide hardware acceleration for AES encryption (like all the raspberry pi models). Wireguard uses this cipher, it has been thoroughly analyzed and considered to be secure, so I see no reason why ChaCha20 should not be added to this list:

protected String[] getCipherList() {
// only allow ciphers which are still considered secure.
// based on:
// https://briansmith.org/browser-ciphersuites-01.html
String[] preferredCiphers;
// Android up to 2.2 use other names
if (Build.VERSION.SDK_INT <= 8) {
preferredCiphers = new String[] {
"DHE-RSA-AES128-SHA",
"DHE-RSA-AES256-SHA",
"DHE-DSS-AES128-SHA",
"AES128-SHA",
"AES256-SHA"
};
} else {
preferredCiphers = new String[] {
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
// backward compatibility. offers no forward security.
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
// RFC 5746
"TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
};
}

This could be a massive performance buff for Raspberry Pi 4s running seafile with https on a gigabit lan.

Link to this topic in the forums:
https://forum.seafile.com/t/use-chacha-encryption-algorithms-instead-of-aes-for-https/14201/5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions