2 ms·
I'm a regular contributor to a FOSS project that supports fairly old versions of PHP. We use defuse/php-encryption where possible, but fall back to an mcrypt w
by kijin 11y ago
I'm a regular contributor to a FOSS project that supports fairly old versions of PHP.
We use defuse/php-encryption where possible, but fall back to an mcrypt wrapper on older platforms. The wrapper implements key splitting, PKCS#7 padding, HMAC, and constant-time string comparison in a way that is fully compatible with defuse/php-encryption, and we have unit tests to ensure that data encrypted with the former can be decrypted with the latter and vice versa. Still, I'm not thrilled by having to keep this wrapper around. Our next major version will finally drop support for PHP < 5.5, and I'm very much looking forward to it.
On the other hand, using OpenSSL doesn't feel all that safer, either, given its terrible codebase and frequent vulnerabilities. Can't wait for libsodium!
- CiPHPerCoder 11y agoNone of the OpenSSL vulnerabilities that were published in the past few years affected its AES implementation.