dmpierre / zkrsa

Generate zero-knowledge proofs of valid RSA signatures from your browser.

Home Page:https://zkrsa.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zkRSA

code style: prettier

This repository's goal is to perform zero knowledge (zk) proofs generation and verification of RSA signatures. All from within a web browser, with local computing resources.

The circom-rsa-verify folder contains all necessary circuits and tests for generating zk proofs of valid RSA signatures. It has been cloned from here. You should check it out!

The frontend folder contains the UI for generating or verifying proofs of valid RSA signatures using circom.

Generating RSA-SHA256 signatures from the CLI

To generate signatures from the CLI - note that your message does not need to be quoted and can be of arbitrary length -, you can clone this repo and run:

$ yarn install
$ yarn sign this is a message to sign

It will log a new signature, generated out of an randomly generated RSA keypair - uses node:crypto -. You can copy those values and use them directly within the zkRSA UI for generating a new proof.

Verifying proofs

On the zkRSA UI, you can generate and verify proofs for valid RSA signatures. The verify tab accepts a JSON with the following format:

{
    "proof": proof,
    "publicSignals": publicSignals
}

This is the output format when downloading a proof from the "generate" tab. You can also pre-format your own proof to verify it from the UI.

Running a frontend locally

To run the UI locally you can clone the repo and run:

$ cd frontend && yarn install
$ yarn dev

There are a few other commands within frontend/package.json file, for testing or building the project.

Links

About

Generate zero-knowledge proofs of valid RSA signatures from your browser.

https://zkrsa.vercel.app


Languages

Language:TypeScript 97.1%Language:JavaScript 2.6%Language:Shell 0.2%Language:CSS 0.1%