https://github.com/dl-solarity/circom-lib
Circom circuits library for magnificent ZK applications
https://github.com/dl-solarity/circom-lib
circom solarity solidity zero-knowledge zkp
Last synced: 10 months ago
JSON representation
Circom circuits library for magnificent ZK applications
- Host: GitHub
- URL: https://github.com/dl-solarity/circom-lib
- Owner: dl-solarity
- License: mit
- Created: 2024-02-21T19:36:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-06-04T11:31:10.000Z (12 months ago)
- Last Synced: 2025-07-11T10:14:45.488Z (11 months ago)
- Topics: circom, solarity, solidity, zero-knowledge, zkp
- Language: Circom
- Homepage: https://npmjs.com/package/@solarity/circom-lib
- Size: 61 MB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@solarity/circom-lib)
[](https://opensource.org/licenses/MIT)
# Circom Library by Distributed Lab
The library consists of circom circuits that extend the capabilities of [solarity/solidity-lib](https://github.com/dl-solarity/solidity-lib) to be used in magnificent ZK applications.
```md
circuits
├── bigInt
│ ├── bigInt - "BigInt implementation with chunking"
│ ├── bigIntOverflow — "BigInt implementation with chunk overflow"
│ ├── bigIntFunc — "Additional functions to accommodate BigInt"
│ └── karatsuba — "Karatsuba multiplication for BigInt"
├── bitify
│ ├── bitGates — "Multiple binary gates"
│ ├── bitify — "Convert numbers to bits and vice versa"
│ ├── comparators - "Compare signals in binary representation"
│ └── operations — "Binary sum of multiple elements"
├── blinders
│ └── Commitment — "Commit/reveal scheme implementation"
├── data-structures
│ ├── CartesianMerkleTree — "CMT Merkle inclusion/exclusion proofs verification"
│ ├── IncrementalMerkleTree - "IMT Merkle inclusion proofs verification"
│ └── SparseMerkleTree — "SMT Merkle inclusion/exclusion proofs verification"
├── ec
│ ├── curve — "Elliptic curve operations (secp256r1, secp256k1, brainpoolP256r1, brainpoolP384r1, secp384r1)"
│ ├── get - "Generator point getters for supported elliptic curves"
│ └── powers — "Precompute tables for supported elliptic curves"
├── hasher
│ ├── hash — "Hash functions (sha1, sha224, sha256, sha384, sha512, poseidon)"
│ ├── poseidon - "Poseidon hash function implementation"
│ ├── sha1 — "SHA1 hash function implementation"
│ └── sha2 — "SHA2 hash functions family implementations"
├── int
│ └── arithmetic - "Arithmetic operations over integers"
├── matrix
│ └── matrix — "Common operations for NxM matrices"
├── signatures
│ ├── ecdsa - "ECDSA verification over supported curves"
│ ├── rsa — "RSA-PKCS#1 v1.5 signature verification"
│ ├── rsaPss — "RSASSA-PSS with MGF1 signature verification"
│ └── mask - "Mask generation functions implementation"
├── utils
│ ├── aliascheck — "Check the number fits the scalar field size"
│ ├── compconstant — "Compare a number with a template parameter in a binary form"
│ └── switcher - "Select between two options"
├── main - "Main components for testing purposes"
└── mock - "Mocks (logs) for testing purposes"
```
Powered by [hardhat-zkit](https://github.com/dl-solarity/hardhat-zkit) circom environment.
## Overview
### Installation
```console
$ npm install @solarity/circom-lib
```
> [!TIP]
> No need to install the Circom compiler, the repository leverages `hardhat-zkit` that does everything for you.
### Compile the circuits
You can compile the circuits in the project by executing the following command:
```console
$ npm run zkit-compile
```
## License
The library is released under the MIT License.