crysol
is a
Features:
- Key generation, verification and de/serialization
- ECDSA and Schnorr signature generation, verification and de/serialization
- Point arithmetic based on complete addition formulas and
ecrecover
precompile optimizations - Prime field arithmetic
- Secure, simple and stable interfaces
For usage examples, see examples/
.
src
├─ Secp256k1 - "Secp256k1 cryptography library"
├─ arithmetic
│ ├─ Points "Secp256k1 point arithmetic library"
│ └─ Fp — "Secp256k1 prime field arithmetic library"
└─ signatures
├─ ECDSA — "ECDSA signature library"
└─ Schnorr — "Schnorr signature library"
offchain
├─ RandomOffchain - "Access to cryptographically secure randomness"
├─ Secp256k1Offchain - "Offchain secp256k1 cryptography library"
└─ signatures
├─ ECDSAOffchain — "Offchain ECDSA signature library"
└─ SchnorrOffchain — "Offchain Schnorr signature library"
unsafe
└─ signatures
└─ ECDSAUnsafe — "Library for unsafe ECDSA signature operations"
Install with Foundry:
$ forge install verklegarden/crysol
The project uses the Foundry toolchain. You can find installation instructions here.
Setup:
$ git clone https://github.com/verklegarden/crysol
$ cd crysol/
$ forge install
Note that the Makefile
provides commands for common development operations:
$ make help
>
> ██████ ██████ ██ ██ ███████ ██████ ██
> ██ ██ ██ ██ ██ ██ ██ ██ ██
> ██ ██████ ████ ███████ ██ ██ ██
> ██ ██ ██ ██ ██ ██ ██ ██
> ██████ ██ ██ ██ ███████ ██████ ███████
>
> build Build project
> clean Clean build artifacts
> coverage Update coverage report and print summary
> examples Run examples
> fmt Format project
> help Print list of all commands
> test-intense Run full test suite with intense fuzzing
> test-summary Print summary of test suite
> test Run full test suite
> todos Grep TODO's in src/ and test/
This is experimental software and is provided on an "as is" and "as available" basis.
We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.