rfc:mcrypt-viking-funeral

This is an old revision of the document!


PHP RFC: Deprecate Mcrypt

Introduction

Let's get rid of ext/mcrypt, which is abandonware and inhibits the growth of the language, as soon as humanly possible.

Proposal

In PHP 7.1, all mcrypt_* functions will raise an E_DEPRECATED notice.

In PHP 7.1+1 (be it 7.2 or 8.0), the mcrypt extension will be moved out of core and into PECL, where people who *really* want to install it may still do so if they can install PHP extensions from PECL.

This RFC does not concern itself with the concept of shims or compatibility layers, and those topics are out of scope. If this RFC passes, another RFC could be drafted by interested parties to propose such a feature at a later date.

Backward Incompatible Changes

Any cryptography code that depends on mcrypt will need to be refactored against openssl. This isn't as difficult as it sounds, provided you're using a trustworthy cipher (e.g. MCRYPT_RIJNDAEL_128). Based on this 3v4l, I can generally conclude that the following MCRYPT ciphers are not supported by openssl:

  • GOST
  • TwoFish
  • Loki97
  • RC6
  • Rijndael-192 (not to be confused with AES-192)
  • Rijndael-256 (not to be confused with AES-256)
  • Saferplus
  • Wake
  • Serpent
  • XTEA
  • Enigma

Proposed PHP Version(s)

Deprecation: Next minor version (7.1.0).

Removal from core: The following major/minor version (7.2.0 or 8.0.0).

Proposed Voting Choices

Vote “Yes” to raise an E_DEPRECATED notice in PHP 7.1 when any mcrypt function is used and to remove the extension from core in 7.1+1.

Vote “No” otherwise.

Since this would break backwards compatiblity, a 2/3 majority is appropriate.

Deprecate then Remove Mcrypt from the PHP Core?
Real name Yes No
bwoebi (bwoebi)  
colinodell (colinodell)  
davey (davey)  
derick (derick)  
diegopires (diegopires)  
dmitry (dmitry)  
frozenfire (frozenfire)  
gasolwu (gasolwu)  
jedisct1 (jedisct1)  
krakjoe (krakjoe)  
leigh (leigh)  
lstrojny (lstrojny)  
mariano (mariano)  
mbeccati (mbeccati)  
mcmic (mcmic)  
mightyuhu (mightyuhu)  
mikemike (mikemike)  
nikic (nikic)  
ocramius (ocramius)  
pauloelr (pauloelr)  
philstu (philstu)  
pollita (pollita)  
ramsey (ramsey)  
remi (remi)  
sammyk (sammyk)  
svpernova09 (svpernova09)  
trowski (trowski)  
willfitch (willfitch)  
zimt (zimt)  
Count: 23 6

Patches and Tests

If this RFC is accepted, I will author the patch to expunge ext/mcrypt.

References

Rejected Features

rfc/mcrypt-viking-funeral.1458057988.txt.gz · Last modified: 2017/09/22 13:28 (external edit)