rfc:distrust-sha1-certificates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:distrust-sha1-certificates [2017/02/24 12:52]
emir add a note about sha1 collisions
rfc:distrust-sha1-certificates [2017/09/22 13:28] (current)
Line 1: Line 1:
 ====== PHP RFC: Distrust SHA-1 Certificates ====== ====== PHP RFC: Distrust SHA-1 Certificates ======
  
-  * Version: 0.2+  * Version: 0.3
   * Date: 2016-11-25   * Date: 2016-11-25
-  * Last Update: 2016-11-28+  * Last Update: 2017-05-29
   * Author: Niklas Keller <me@kelunik.com>   * Author: Niklas Keller <me@kelunik.com>
   * Status: Under Discussion   * Status: Under Discussion
Line 12: Line 12:
 As of 2016-01-01, the CA/B Forum forbids issuing new SHA-1 certificates. The CA/B has advised CAs starting 2015-01-16 to issue no SHA-1 certificates with an expiration date greater than 2017-01-01, as browsers had already announced (see references) to deprecate and remove SHA-1. [[http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf|NIST recommends]] that SHA-1 should no longer be used for digital signatures. Starting with Java 9, [[http://openjdk.java.net/jeps/288|Java will also no longer accept SHA-1]] starting 2017-01-01 by default.  As of 2016-01-01, the CA/B Forum forbids issuing new SHA-1 certificates. The CA/B has advised CAs starting 2015-01-16 to issue no SHA-1 certificates with an expiration date greater than 2017-01-01, as browsers had already announced (see references) to deprecate and remove SHA-1. [[http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf|NIST recommends]] that SHA-1 should no longer be used for digital signatures. Starting with Java 9, [[http://openjdk.java.net/jeps/288|Java will also no longer accept SHA-1]] starting 2017-01-01 by default. 
  
-Meanwhile, PHP doesn't have any restrictions here at all. There's [[http://php.net/manual/en/context.ssl.php|no context option]] that let's users specify which signature algorithms they accept. Even worse, PHP currently seems to accept even MD5 certificates.+Meanwhile, PHP doesn't have any restrictions here at all. There's [[http://php.net/manual/en/context.ssl.php|no context option]] that let's users specify which signature algorithms they accept. Even worse, PHP currently accepts even MD5 certificates.
  
-As of February 23, 2017,  [[https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html|SHA-1 is considered broken]].+As of 23rd of February 2017, [[https://security.googleblog.com/2017/02/announcing-first-sha1-collision.html|SHA-1 is considered broken]]. MD5 has been known to be broken for a way longer time.
  
 ===== Proposal ===== ===== Proposal =====
  
-This RFC proposes to use [[https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_security_level.html|OpenSSL's new security level]] to restrict the accepted certificates. The RFC proposes to set this level to ''2'' if OpenSSL 1.1 is available, otherwise those rules are enforced by PHP itself. Quoting from the above manual pagethis security level has the following effect: +This RFC proposes to introduce a new ''"min_signature_bits"'' context option to restrict the accepted certificate message digests. The RFC proposes to set this option to ''128'' (accepting SHA2 and better) by defaultallowing ''80'' (accepting also SHA1) to be set for legacy applicationsbut this is strongly discouraged. This setting will be applied to all certificates that are not in the trust store.
- +
-> Security level set to 112 bits of security. As a result RSADSA and DH keys shorter than 2048 bits and ECC keys shorter than 224 bits are prohibited. In addition to the level 1 exclusions any ciphersuite using RC4 is also prohibited. SSL version 3 is also not allowed. Compression is disabled. +
- +
-This will be implemented as a new ''"ssl"'' context option named ''"security_level"'' using the same values as OpenSSL, it defaults to ''2'' starting 2017-01-01.+
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
  
-MD5 and SHA-1 certificates are no longer accepted by default starting 2017-01-01. This break is intentional and is in line with the CA/B rules and major browser policies.+MD5 certificates won't be accepted any longer. SHA-1 certificates are no longer accepted by default starting in PHP 7.2. This break is intentional and is in line with the CA/B rules and major browser policies.
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
-All supported versions, because of the security impact.+All supported versions should be updated to restrict the usage of MD5 certificates. All versions except PHP 7.2 should default to ''80'' for lower BC impact. PHP 7.2 will default to ''128''.
  
 ===== RFC Impact ===== ===== RFC Impact =====
  
-Browsers start on 2017-01-01 with no longer accepting SHA-1 certificates, tooImpact is expected to be rather low. People in need of SHA-1 certificates, e.g. for private CAs, can set the mentioned context option to ''0'' to get the previous behavior, but are strongly discouraged to do so.+Browsers started on 2017-01-01 with no longer accepting SHA-1 certificates. The impact is expected to be rather low. People in need of SHA-1 certificates, e.g. for private CAs, can set the mentioned context option to ''80'' to get the previous behavior (except for MD5 not being accepted), but are strongly discouraged to do so. It is explicitly not possible to set this value lower than 80. There's no option to enable MD5.
  
 ===== Future Scope ===== ===== Future Scope =====
Line 59: Line 55:
   * http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf   * http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r4.pdf
   * http://openjdk.java.net/jeps/288   * http://openjdk.java.net/jeps/288
- 
-===== Rejected Features ===== 
- 
-  * Default value for ''signature_algorithms'' 
rfc/distrust-sha1-certificates.1487940750.txt.gz · Last modified: 2017/09/22 13:28 (external edit)