Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vocdoni/keccak256-circom
keccak256 hash implementation in Circom
https://github.com/vocdoni/keccak256-circom
Last synced: 3 months ago
JSON representation
keccak256 hash implementation in Circom
- Host: GitHub
- URL: https://github.com/vocdoni/keccak256-circom
- Owner: vocdoni
- License: gpl-3.0
- Created: 2021-10-31T11:32:01.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-24T14:12:03.000Z (over 2 years ago)
- Last Synced: 2024-07-16T07:39:22.110Z (4 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 73
- Watchers: 5
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-circom - keccak256-circom - keccak256 implementation (Cryptographic primitives / Cryptographic primitives in Circom)
README
# keccak256-circom [![Test](https://github.com/vocdoni/keccak256-circom/workflows/Test/badge.svg)](https://github.com/vocdoni/keccak256-circom/actions?query=workflow%3ATest)
Keccak256 hash function (ethereum version) implemented in [circom](https://github.com/iden3/circom). Spec: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
**Warning**: WIP, this is an experimental repo.
## Status
Initial version works, compatible with Ethereum version of Keccak256.It needs around `150848` (`151k`) constraints.
> For context: [Rapidsnark](https://github.com/iden3/rapidsnark) proof generation time:
> - 1.1M constraints -> 7 seconds (8 CPU)
> - 128M constraints -> <2min (64 CPU)## Usage
- import the lib in the `package.json`:
```
"dependencies": {
"keccak256-circom": "git+https://github.com/vocdoni/keccak256-circom"
}
```- Usage:
```
pragma circom 2.0.0;include "../node_modules/keccak256-circom/circuits/keccak.circom";
// for a input & output of 32 bytes:
component main = Keccak(32*8, 32*8);
```