Download the PHP package simplito/elliptic-php without Composer
On this page you can find all versions of the php package simplito/elliptic-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simplito/elliptic-php
More information about simplito/elliptic-php
Files in simplito/elliptic-php
Package elliptic-php
Short Description Fast elliptic curve cryptography
License MIT
Homepage https://github.com/simplito/elliptic-php
Informations about the package elliptic-php
Fast Elliptic Curve Cryptography in PHP
Information
This library is a PHP port of elliptic, a great JavaScript ECC library.
- Supported curve types: Short Weierstrass, Montgomery, Edwards, Twisted Edwards.
- Curve 'presets':
secp256k1
,p192
,p224
,p256
,p384
,p521
,curve25519
,ed25519
.
This software is licensed under the MIT License.
Projects which use Fast ECC PHP library: PrivMX WebMail, ...
Benchmarks
Installation
You can install this library via Composer:
Implementation details
ECDSA is using deterministic k
value generation as per RFC6979. Most of
the curve operations are performed on non-affine coordinates (either projective
or extended), various windowing techniques are used for different cases.
NOTE: curve25519
could not be used for ECDSA, use ed25519
instead.
All operations are performed in reduction context using bn-php.
API
ECDSA
EdDSA
ECDH
NOTE: .derive()
returns a BN instance. The resulting hex string is not zero-padded to constant size. Note that when interoperating with other libraries or using the result in a hash function.
Using EC directly
Use case examples:
Computing public key from private
Verifying Bitcoin Message Signature
Verifying Ethereum Signature
ECDH (secret based, base58 format)
For usage in ed25519 oriented platforms like e.g. BigChainDB who use base58 encoded public / private keys.