-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from zkp-application/circom2.0
feat(upgrade circom2.0): Circom2.0
- Loading branch information
Showing
20 changed files
with
2,999 additions
and
7,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
[submodule "circomlib"] | ||
path = circomlib | ||
url = https://github.com/iden3/circomlib.git | ||
[submodule "circom-bigint"] | ||
path = circom-bigint | ||
url = https://github.com/jacksoom/circom-bigint.git | ||
|
||
[submodule "circom-ecdsa"] | ||
path = circom-ecdsa | ||
url = https://github.com/agnxsh/circom-ecdsa.git | ||
branch = 0xagnish/circom_tester-fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
# circom-rsa-verify | ||
This repository contains an implementation of a Zero Knowledge Proof for RSA signature verify for the circom language. | ||
Currently supported pkcs1v15 + sha256 and exponent is 65537 | ||
|
||
This repository contains an implementation of a Zero Knowledge Proof for RSA signature verify for the [Circom](https://docs.circom.io) language. | ||
Currently supported pkcs1v15 + sha256 and exponent is 65537. The Montgomery Exponentiation algorithm and Montgomery CIOS product is used to calculate large numbers [Modular exponentiation](https://en.wikipedia.org/wiki/Modular_exponentiation) | ||
|
||
# Getting started | ||
|
||
Running circuits test cases | ||
|
||
```sh | ||
git submodule update --init --recursive; npm install; npm test | ||
git submodule update --init --recursive; npm i; npm test | ||
``` | ||
|
||
## Circuits Benchmark | ||
|
||
RSA verify: pkcs1v15/sha256/2048 bits key | ||
* Env: Mac mini (M1, 2020). 8 cores. 8 threads | ||
* Memory consumption: 1.7G | ||
* Time consumption: 150s | ||
## The circom compiler | ||
|
||
This repository uses a modified version of the circom compiler found at | ||
[alex-ozdemir/circom](https://github.com/alex-ozdemir/circom). | ||
It includes a few extra features not found in the original: | ||
|
||
* Clearer error printouts | ||
* More comprehensive/informative treatment of `log` statements | ||
* A new type `int` which enables bigints to be handled during witness | ||
computations. | ||
* `compute` blocks | ||
|
||
* Env: Mac mini (M1, 2020). 8 cores. 8 threads | ||
|
||
Circuit infomation | ||
|
||
* snarkJS: Curve: bn-128 | ||
* snarkJS: # of Wires: 530676 | ||
* snarkJS: # of Constraints: 536212 | ||
* snarkJS: # of Private Inputs: 0 | ||
* snarkJS: # of Public Inputs: 100 | ||
* snarkJS: # of Labels: 583860 | ||
* snarkJS: # of Outputs: 0 | ||
|
||
## Ref | ||
|
||
2. [Arithmetic of Finite Fields](https://www.researchgate.net/publication/319538235_Arithmetic_of_Finite_Fields) |
Submodule circom-bigint
deleted from
caa929
Submodule circom-ecdsa
added at
a9b0e0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.