zendframework/zend-crypt
Zend\Crypt provides secure PHP cryptography utilities including encryption/decryption, hashing, HMAC, key generation, and password adapters. Designed for Zend Framework apps but usable standalone, with pluggable algorithms and safer defaults for common crypto tasks.
ext/mbstring in order to install successfully.Zend\Crypt\Password\Bcrypt::benchmarkCost(), which allows you to find the
maximum cost value possible for your hardware within a 50ms timeframe.Zend\Crypt\PublicKey\RsaOptions class, openssl_padding (or
setOpensslPadding(); this is now consumed in
Zend\Crypt\PublicKey\Rsa::encrypt() and
Zend\Crypt\PublicKey\Rsa::decrypt(), instead of the optional $padding
argument.$padding argument from each of Zend\Crypt\PublicKey\Rsa's
encrypt() and decrypt() methods; you can now specify the value via the
RsaOptions.substr() and strlen() to use mb_substr() and
mb_strlen(), respectively. This provides better security with binary values.Zend\Crypt\Password\Bcrypt implementation to use password_hash() and
password_verify() internally, as they are supported in all PHP versions we
support.DiffieHellman publickey implementation to initialize the BigInteger
adapter from zend-math as the first operation of its constructor, fixing a
fatal error that occurs when binary data is provided.ArrayObject, which implements the same
behavior being tested.AbstractPluginManager.ZF2015-10: Zend\Crypt\PublicKey\Rsa\PublicKey has a call to openssl_public_encrypt()
which used PHP's default $padding argument, which specifies
OPENSSL_PKCS1_PADDING, indicating usage of PKCS1v1.5 padding. This padding
has a known vulnerability, the
Bleichenbacher's chosen-ciphertext attack,
which can be used to recover an RSA private key. This release contains a patch
that changes the padding argument to use OPENSSL_PKCS1_OAEP_PADDING.
Users upgrading to this version may have issues decrypting previously stored
values, due to the change in padding. If this occurs, you can pass the
constant OPENSSL_PKCS1_PADDING to a new $padding argument in
Zend\Crypt\PublicKey\Rsa::encrypt() and decrypt() (though typically this
should only apply to the latter):
$decrypted = $rsa->decrypt($data, $key, $mode, OPENSSL_PKCS1_PADDING);
where $rsa is an instance of Zend\Crypt\PublicKey\Rsa.
(The $key and $mode argument defaults are null and
Zend\Crypt\PublicKey\Rsa::MODE_AUTO, if you were not using them previously.)
We recommend re-encrypting any such values using the new defaults.
ZF2015-10: Zend\Crypt\PublicKey\Rsa\PublicKey has a call to openssl_public_encrypt()
which used PHP's default $padding argument, which specifies
OPENSSL_PKCS1_PADDING, indicating usage of PKCS1v1.5 padding. This padding
has a known vulnerability, the
Bleichenbacher's chosen-ciphertext attack,
which can be used to recover an RSA private key. This release contains a patch
that changes the padding argument to use OPENSSL_PKCS1_OAEP_PADDING.
Users upgrading to this version may have issues decrypting previously stored
values, due to the change in padding. If this occurs, you can pass the
constant OPENSSL_PKCS1_PADDING to a new $padding argument in
Zend\Crypt\PublicKey\Rsa::encrypt() and decrypt() (though typically this
should only apply to the latter):
$decrypted = $rsa->decrypt($data, $key, $mode, OPENSSL_PKCS1_PADDING);
where $rsa is an instance of Zend\Crypt\PublicKey\Rsa.
(The $key and $mode argument defaults are null and
Zend\Crypt\PublicKey\Rsa::MODE_AUTO, if you were not using them previously.)
We recommend re-encrypting any such values using the new defaults.
hotfix/5
How can I help you explore Laravel packages today?