Elliptic Curve Implementation in Solidity (fork of https://github.com/jbaylina/ecsol) with implemented ecrecover
trick by Vitalik Buterin (https://ethresear.ch/t/you-can-kinda-abuse-ecrecover-to-do-ecmul-in-secp256k1-today/2384).
- Methods
ecadd
andecmul
withoutz
argument - Methods
ecmulVerify
andpublicKeyVerify
for super-fast (25x) verifications (31-33k gas instead of 700k-1000k gas)
- Install truffle globally with
npm install -g truffle
- Install ganache-cli globally with
npm install -g ganache-cli
- Install local packages with
npm install
- Run ganache in separate terminal
scripts/rpc.sh
- Run tests with
npm test
On macOS you also need to install watchman: brew install watchman