As of PHP 7.1, the mcrypt extension has been deprecated and will stop being distributed as part of the core PHP package in a future release. Usage of mcrypt_*
functions emits E_DEPRECATED
messages as seen in this Travis-CI build for the Framework's Crypt package.
To prepare for this, Joomla core should begin planning for ways to replace uses of the mcrypt
extension as practical, either by introducing new API endpoints (i.e in the JCrypt
class chain if we keep rolling our own crypto) or introducing switches in places where mcrypt_*
functions are used standalone.
Category | ⇒ | External Library Libraries |
Labels |
Added:
?
|
This will also need @nikosdion help as mcrypt appears in the updater/restore.php etc.
Status | New | ⇒ | Confirmed |
Um, if mcrypt is no longer supported how do we implement AES encryption in PHP? Native PHP code is orders of magnitude slower.
Edit: I mean that we'd have to go through the OpenSSL extension which is even less popular than mcrypt. This is going to be "fun" on shared hosts. Especially those running PHP 5.3. We need to raise the minimum PHP requirement to 5.5 or 5.6 if we want people to run Joomla on configurations that have a chance of providing an alternative. Otherwise we will have a problem, especially with data migration of extensions using Joomla's crypto functions.
See. I knew it was important to tag @nikosdion ;-)
FWIW the restore.php only uses mcrypt out of context of the Joomla Update (extracting JPS archives). The part used during the update is native PHP code implementing AES-CTR, used to encrypt the serialized extraction engine state with a server side key and send encrypted instructions to the JavaScript side (which also implements AES-CTR in native JavaScript).
Um, if mcrypt is no longer supported how do we implement AES encryption in PHP?
According to the RFC I linked OpenSSL can handle AES encryption. Not sure about many details beyond that but that seems to be the primary recommendation from Scott.
Hence I edited my reply (sorry; just having my first coffee of the day). While OpenSSL handles AES encryption the extension itself is not as widely deployed as mcrypt on older PHP installs. So it's not a matter of replacing code but adding if-blocks to use what is available. If you want to be very conservative we'd also need a full native implementation so the order of preference would be:
On a different note, there is one place in Joomla where replacing mcrypt will be tricky: FOF2. It's obsolete and I'm not going to maintain it. The good news is that nobody seems to be using that code.
@nikosdion has updated FOF2
[HIGH] mcrypt is deprecated in PHP 7.1. This will cause Two Factor Authentication to fail under PHP 7.1 unless you apply this PR.
So the "tricky" bit has already been done :)
Remaining mcrypt uses are in deprecated code or third party libraries. Complete enough.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-11 22:59:38 |
Closed_By | ⇒ | mbabker |
I guess the start of this then would be
?