randrei98 / ecdsaphp
Elliptical curve cryptography for PHP
Installs: 43
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/randrei98/ecdsaphp
Requires
- php: >=8.1
- ext-gmp: *
- ext-openssl: *
- brick/math: 0.11.0
Requires (Dev)
- phpunit/phpunit: ^5.2
This package is auto-updated.
Last update: 2025-10-01 00:16:19 UTC
README
Elliptic Curve Cryptography for PHP
##Usage
use \ECDSA\Key; use \ECDSA\Curves; use \ECDSA\Algorithms; use \ECDSA\ECDSA; $pem = 'EC PRIVATE KEY PEM FORMAT'; $curve = Curves::NIST256p(); $algorithm = Algorithms::ES256(); $key = new Key($pem, '', $curve, $algorithm); $message = 'HELLO'; $Signature = ECDSA::Sign($message, $key); $verif = ECDSA::Verify($message, $Signature, $key); var_dump($verif);