cpython: 6f4f19217d9b (original) (raw)

Mercurial > cpython

changeset 103125:6f4f19217d9b 2.7

Issues #27850 and #27766: Remove 3DES from ssl default cipher list and add ChaCha20 Poly1305. [#27850]

Christian Heimes christian@python.org
date Tue, 06 Sep 2016 20:06:47 +0200
parents 5e75bf8e5526
children 74805fd9e734
files Doc/library/ssl.rst Lib/ssl.py Misc/NEWS
diffstat 3 files changed, 33 insertions(+), 15 deletions(-)[+] [-] Doc/library/ssl.rst 6 Lib/ssl.py 36 Misc/NEWS 6

line wrap: on

line diff

--- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -280,6 +280,12 @@ purposes. RC4 was dropped from the default cipher string.

+

+ .. function:: _https_verify_certificates(enable=True) Specifies whether or not server certificates are verified when creating

--- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -152,36 +152,42 @@ if _ssl.HAS_TLS_UNIQUE: else: CHANNEL_BINDING_TYPES = [] +

Disable weak or insecure ciphers by default

(OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')

Enable a better set of ciphers by default

This list has been explicitly chosen to:

* Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)

* Prefer ECDHE over DHE for better performance

-# * Prefer any AES-GCM over any AES-CBC for better performance and security +# * Prefer AEAD over CBC for better performance and security +# * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI +# (ChaCha20 needs OpenSSL 1.1.0 or patched 1.0.2) +# * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better +# performance and security

* Then Use HIGH cipher suites as a fallback

-# * Then Use 3DES as fallback which is secure but slow -# * Disable NULL authentication, NULL encryption, and MD5 MACs for security -# reasons +# * Disable NULL authentication, NULL encryption, 3DES and MD5 MACs +# for security reasons _DEFAULT_CIPHERS = (

-)

Restricted and more secure ciphers for the server side

This list has been explicitly chosen to:

* Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)

* Prefer ECDHE over DHE for better performance

-# * Prefer any AES-GCM over any AES-CBC for better performance and security +# * Prefer AEAD over CBC for better performance and security +# * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI +# * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better +# performance and security

* Then Use HIGH cipher suites as a fallback

-# * Then Use 3DES as fallback which is secure but slow -# * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, and RC4 for -# security reasons +# * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, RC4, and +# 3DES for security reasons _RESTRICTED_SERVER_CIPHERS = (

)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -36,6 +36,12 @@ Core and Builtins Library ------- +- Issue #27850: Remove 3DES from ssl module's default cipher list to counter