shuklaayush / circom-monolith

Monolith hash function implementation in circom.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

circom-monolith

This repository contains a circom implementation of the Monolith hash function over the Goldilocks prime field $\mathbb{F}_p$ where $p = 2^{64} - 2^{32} + 1$.

Open in zkREPL

Test

To run a test against the test vectors

yarn install
yarn test

Acknowledgements

The code is based on the reference implementation of Monolith from Horizon Labs.

The implementation of the Goldilocks field is taken from plonky2-circom.

Disclaimer

These circuits were written over a few hours during ZK Hack Istanbul.

While they pass the test vectors, they have NOT been formally audited. Therefore, they should not be deployed in production. There's also a lot of scope for optimizations to reduce the number of constraints.

The plonky2-circom Goldilocks implementation might be underconstrained.

PRs welcome

About

Monolith hash function implementation in circom.


Languages

Language:Circom 97.7%Language:JavaScript 2.3%