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