Skip to content

Version 0.1.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@paragonie-scott paragonie-scott released this 11 Feb 22:09
· 46 commits to master since this release
v0.1.0
31a874c

Introducing Easy-ECC, a usability wrapper for phpecc/phpecc.

I should probably have a big asterisk on that statement: In its default configuration, it uses libsodium instead.

$ecc = new ParagonIE\EasyECC\EasyECC(); // libsodium
$ecc = new ParagonIE\EasyECC\EasyECC('K256'); // phpecc/phpecc with secp256k1 + SHA256
$ecc = new ParagonIE\EasyECC\EasyECC('P256'); // phpecc/phpecc with NIST P-256 + SHA256
$ecc = new ParagonIE\EasyECC\EasyECC('P384'); // phpecc/phpecc with NIST P-384 + SHA384

This isn't merely an easy-to-use interface, it also is secure-by-default. For example, if you're not using libsodium and want to sign a message, Easy-ECC opts for RFC 6979 (deterministic ECDSA) instead of risking k-value reuse/bias.

Furthermore, this includes an integration with defuse/php-encryption for public-key authenticated encryption.

$defuse = new ParagonIE\EasyECC\Integration\Defuse($ecc);
$ctxt = $defuse->asymmetricEncrypt($msg, $sk, $pk);