I am writing an implementation of OpenPGP (RFC 4880) with PHP7.
GPG and PGP use the symmetric-key algorithm CAST5
(aka CAST-128
) to secure private keys.
Note: please note that other symmetric-key algorithms are usable (CF RFC 4880) : IDEA
, TripleDES
, Blowfish
, AES with 128-bit key
, AES with 192-bit key
, AES with 256-bit key
or Twofish with 256-bit key
.
Mcript implements these algorithms :
http://php.net/manual/fr/mcrypt.ciphers.php
However, Mcrypt is obsolete. We should use Sodium instead.
All right... but it seems to me that Sodium does not provide the symmetric-key algorithms mentioned above.
Note: please note that some hash algorithms seems to be missing from the Sodium implementation : MD5
, SHA-1
, RIPE-MD/160
, SHA384
, SHA224
.
Am I wrong ?
If I am right, then it means to me that Sodium does not replace Mcrypt.
Thanks
Denis