@solarity/circom-lib

0.2.0 • Public • Published

License: MIT

Circom Library by Distributed Lab

The library consists of circom circuits that extend the capabilities of solarity/solidity-lib to be used in magnificent ZK applications.

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    
│   └── 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"
├── main - "Main components for testing purposes"
└── mock - "Mocks (logs) for testing purposes"

Powered by hardhat-zkit circom environment.

Overview

Installation

$ 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:

$ npm run zkit-compile

License

The library is released under the MIT License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.055latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.055
0.1.318
0.1.21
0.1.11
0.1.01

Package Sidebar

Install

npm i @solarity/circom-lib

Weekly Downloads

76

Version

0.2.0

License

MIT

Unpacked Size

26.2 MB

Total Files

52

Last publish

Collaborators

  • hrom_h
  • arvolear