zkp-application / circom-rsa-verify

Zero Knowledge Proof for RSA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. The Montgomery Exponentiation algorithm and Montgomery CIOS product is used to calculate large numbers Modular exponentiation

Getting started

Running circuits test cases

git submodule update --init --recursive; cd circom-ecdsa; npm i; cd ..; npm i; npm test

Circuits Benchmark

RSA verify: pkcs1v15/sha256/2048 bits key

  • 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

  1. Arithmetic of Finite Fields

About

Zero Knowledge Proof for RSA

License:MIT License


Languages

Language:JavaScript 36.5%Language:TypeScript 28.8%Language:Circom 17.4%Language:Solidity 17.1%Language:Shell 0.2%