@@ -157,36 +157,42 @@ def _import_symbols(prefix):
157157else :
158158 CHANNEL_BINDING_TYPES = []
159159
160+
160161# Disable weak or insecure ciphers by default
161162# (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')
162163# Enable a better set of ciphers by default
163164# This list has been explicitly chosen to:
164165# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
165166# * 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
167172# * 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
171175_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+ )
176180
177181# Restricted and more secure ciphers for the server side
178182# This list has been explicitly chosen to:
179183# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
180184# * 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
182189# * 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
186192_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 '
190196)
191197
192198
0 commit comments