@@ -160,36 +160,42 @@ def _import_symbols(prefix):
160
160
else :
161
161
CHANNEL_BINDING_TYPES = []
162
162
163
+
163
164
# Disable weak or insecure ciphers by default
164
165
# (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')
165
166
# Enable a better set of ciphers by default
166
167
# This list has been explicitly chosen to:
167
168
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
168
169
# * Prefer ECDHE over DHE for better performance
169
- # * Prefer any AES-GCM over any AES-CBC for better performance and security
170
+ # * Prefer AEAD over CBC for better performance and security
171
+ # * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI
172
+ # (ChaCha20 needs OpenSSL 1.1.0 or patched 1.0.2)
173
+ # * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better
174
+ # performance and security
170
175
# * Then Use HIGH cipher suites as a fallback
171
- # * Then Use 3DES as fallback which is secure but slow
172
- # * Disable NULL authentication, NULL encryption, and MD5 MACs for security
173
- # reasons
176
+ # * Disable NULL authentication, NULL encryption, 3DES and MD5 MACs
177
+ # for security reasons
174
178
_DEFAULT_CIPHERS = (
175
- 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256: DH+AES256 :ECDH+AES128 :DH+AES:ECDH+HIGH :'
176
- 'DH+HIGH :ECDH+3DES :DH+3DES :RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL :'
177
- '!eNULL:!MD5'
178
- )
179
+ 'ECDH+AESGCM:ECDH+CHACHA20: DH+AESGCM:DH+CHACHA20 :ECDH+AES256 :DH+AES256 :'
180
+ 'ECDH+AES128: DH+AES :ECDH+HIGH :DH+HIGH :RSA+AESGCM:RSA+AES:RSA+HIGH:'
181
+ '!aNULL:! eNULL:!MD5:!3DES '
182
+ )
179
183
180
184
# Restricted and more secure ciphers for the server side
181
185
# This list has been explicitly chosen to:
182
186
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
183
187
# * Prefer ECDHE over DHE for better performance
184
- # * Prefer any AES-GCM over any AES-CBC for better performance and security
188
+ # * Prefer AEAD over CBC for better performance and security
189
+ # * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI
190
+ # * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better
191
+ # performance and security
185
192
# * Then Use HIGH cipher suites as a fallback
186
- # * Then Use 3DES as fallback which is secure but slow
187
- # * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, and RC4 for
188
- # security reasons
193
+ # * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, RC4, and
194
+ # 3DES for security reasons
189
195
_RESTRICTED_SERVER_CIPHERS = (
190
- 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256: DH+AES256 :ECDH+AES128 :DH+AES:ECDH+HIGH :'
191
- 'DH+HIGH :ECDH+3DES :DH+3DES :RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL :'
192
- '!eNULL:!MD5:!DSS:!RC4'
196
+ 'ECDH+AESGCM:ECDH+CHACHA20: DH+AESGCM:DH+CHACHA20 :ECDH+AES256 :DH+AES256 :'
197
+ 'ECDH+AES128: DH+AES :ECDH+HIGH :DH+HIGH :RSA+AESGCM:RSA+AES:RSA+HIGH:'
198
+ '!aNULL:! eNULL:!MD5:!DSS:!RC4:!3DES '
193
199
)
194
200
195
201
0 commit comments