https://github.com/jumpcrypto/plonky2-crypto
Crypto Gadgets for Plonky2
https://github.com/jumpcrypto/plonky2-crypto
Last synced: about 1 year ago
JSON representation
Crypto Gadgets for Plonky2
- Host: GitHub
- URL: https://github.com/jumpcrypto/plonky2-crypto
- Owner: JumpCrypto
- License: apache-2.0
- Created: 2023-05-05T18:12:46.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T14:54:54.000Z (about 2 years ago)
- Last Synced: 2025-04-06T23:12:41.293Z (about 1 year ago)
- Language: Rust
- Homepage: https://jumpcrypto.com
- Size: 63.5 KB
- Stars: 72
- Watchers: 7
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crypto Gadgets for Plonky2
A collection of efficient gadgets for Plonky2.
As we're building larger and larger circuits with Plonky2, we want to share some of our work and optimizations, packaged in a single and simple to use library.
## Complete Example
See the [`hello-world` example](examples/hello-world/) to get started and build your own circuit.
Or run:
```
cd examples/hello-world
cargo test --release -- --nocapture
```
(don't forget the `--release`!)
For more examples you can run the library tests:
```
cargo test --release -- --nocapture
```
## Features
Hash functions:
- [x] Sha256
* [x] Hash Arbitrary Length Data
* [x] Hash Two to One (For use with Merkle Proofs)
* [x] Merkle Proof Gadget
* [x] Delta Merkle Proof Gadget
- [x] Keccak256
* [x] Hash Arbitrary Length Data
* [ ] Hash Two to One (For use with Merkle Proofs)
* [ ] Merkle Proof Gadget
* [ ] Delta Merkle Proof Gadget
Integer arithmetic:
- [x] Uint32 arithmetic ops (add, mul, ...)
- [x] Uint32 bitwise ops (and, xor, ...)
- [x] BigUint arithmetic ops (add, sub, mul, div/rem, ...)
- [x] BigUint optimized mul, sqr
Finite field arithmetic:
- [ ] Prime fields
- [ ] Extension fields
- [ ] Extension towers
Elliptic curve cryptography:
- [ ] ECDSA (secp256k1)
- [ ] EDDSA (ed25519)
- [ ] BLS (bls12-381)
## Contribute
We welcome contribution, whether in form of bug fixed, documentation, new gadgets, new functionality.
Just open an issue to discuss what you'd like to contribute and then submit a PR.
**Disclaimer. This alpha software has been open sourced. All software and code are provided “as is,” without any warranty of any kind, and should be used at your own risk.**