Energon is a traits contract that resolves the power of cryptographic libraries (inputs) into a single generalized API (output). Inspired by Kyber
- Inputs specified at compile time via feature flag(s) may be selected based on supported architectures, performance, or other considerations.
- Output need to be combined into a Scheme trait to perform static dispatch, e.g.
Drand Scheme
├── backends
│ ├── <curve_A_crate_X> --feature <A_X> │
│ │ ├── g1 │
│ │ ├── g2 │
│ │ └── scalar │
│ ├── <curve_B_crate_Y> --feature <B_Y> │
│ │ │
│ ├── : [INPUTS] │
│ └────────────────────────────────────────┘
│
└───────── traits [OUTPUT]
|
┌────batteries |
│ |
├──Drand(Cyber)────── | ────────────┐
│ ├── ecies | │
│ ├── poly | │
│ ├───lib───── [SCHEME] ───────────────> [APP]
│ ├── schnorr │
│ ├── tbls │
│ └── : │
├───────────────────────────────────┘
├── :
- bls12381_arkworks
- bls12381_blstrs
- rustdoc
- builder interface
- bn254 curve
This library does not make any guarantees about constant-time operations, memory access patterns, or resistance to side-channel attacks.
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 in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.