clean md files

pull/4301/head
yann300 11 months ago
parent f0c31cbb53
commit 9eaaa5170f
  1. 35
      libs/remix-ws-templates/src/templates/hashchecker/README.md
  2. 10
      libs/remix-ws-templates/src/templates/hashchecker/README.txt
  3. 2
      libs/remix-ws-templates/src/templates/hashchecker/index.ts
  4. 46
      libs/remix-ws-templates/src/templates/rln/README.md
  5. 26
      libs/remix-ws-templates/src/templates/semaphore/README.md
  6. 10
      libs/remix-ws-templates/src/templates/semaphore/README.txt
  7. 2
      libs/remix-ws-templates/src/templates/semaphore/index.ts

@ -0,0 +1,35 @@
## CIRCOM ZKP Hash Checker WORKSPACE
Welcome to the Remix Circom ZKP Hash Checker Workspace.
The workspace comprises two main directories:
### circuits: Contains sample Hash Checker contracts. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
### scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids in generating Solidity code, which is essential for on-chain deployment.
### first steps:
#### 1) compile the hash checker circuit using the remix circom compiler. This will generate artifacts.
#### 2) execute the file `run_setup.ts`:
This step generate a verification key that can be used for generating proof, it will also generate a Solidity contract for on-chain verification.
Note that this section should only be used for development purposes as this way of running the setup is heavily centralized (although some pieces of this script can be used to achieve that).
This generates a verification key (`./zk/build/verification_key.json`) and artifacts from the setup (`./zk/build/zk_setup.txt`).
#### 3) execute the file `run_verification.ts`:
This script:
- generate a witness and a proof of execution. The input parameters of `snarkjs.wtns.calculate` are:
- 4 values, that should remain private. We want to verify that we know a hash that satisfy these 4 values.
- a hash, this is a public signal.
The witness will be generated only if the provided hash is the poseidon hash of these 4 values.
- verify that the proof is valid `(snarkjs.groth16.verify)`

@ -1,10 +0,0 @@
CIRCOM ZKP Hash Checker WORKSPACE
Welcome to the Remix Circom ZKP Hash Checker Workspace.
The workspace comprises two main directories:
- circuits: Contains sample Hash Checker contracts. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
- scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids in generating Solidity code,
which is essential for on-chain deployment.

@ -9,6 +9,6 @@ export default async () => {
// @ts-ignore // @ts-ignore
'templates/groth16_verifier.sol.ejs': (await import('!!raw-loader!./templates/groth16_verifier.sol.ejs')).default, 'templates/groth16_verifier.sol.ejs': (await import('!!raw-loader!./templates/groth16_verifier.sol.ejs')).default,
// @ts-ignore // @ts-ignore
'README.txt': (await import('raw-loader!./README.txt')).default 'README.md': (await import('raw-loader!./README.md')).default
} }
} }

@ -1,26 +1,38 @@
<h1 align=center>Rate-Limiting Nullifier circuits in Circom</h1>
<p align="center">
<img src="https://github.com/Rate-Limiting-Nullifier/rln-circuits-v2/workflows/Test/badge.svg" width="110">
</p>
<div align="center">
*The project was audited by Veridise, yAcademy fellows and internally.* ## What's RLN?
</div> Welcome to the Remix Circom ZKP RLN Workspace.
___ RLN is a zero-knowledge gadget that enables spam prevention in anonymous environments.
To learn more on RLN and how it works - check out [documentation](https://rate-limiting-nullifier.github.io/rln-docs/).
## What's RLN? The workspace comprises two main directories:
RLN is a zero-knowledge gadget that enables spam ### circuits: Contains sample semaphore contracts. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
prevention in anonymous environments.
The core parts of RLN are: ### scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids in generating Solidity code, which is essential for on-chain deployment.
* zk-circuits in Circom (this repo);
* [registry smart-contract](https://github.com/Rate-Limiting-Nullifier/rln-contract);
* set of libraries to build app with RLN ([rlnjs](https://github.com/Rate-Limiting-Nullifier/rlnjs), [zerokit](https://github.com/vacp2p/zerokit)).
--- ### first steps:
To learn more on RLN and how it works - check out [documentation](https://rate-limiting-nullifier.github.io/rln-docs/). #### 1) compile the semaphore circuit using the remix circom compiler. This will generate artifacts.
#### 2) execute the file `run_setup.ts`:
This step generate a verification key that can be used for generating proof, it will also generate a Solidity contract for on-chain verification.
Note that this section should only be used for development purposes as this way of running the setup is heavily centralized (although some pieces of this script can be used to achieve that).
This generates a verification key (`./zk/build/verification_key.json`) and artifacts from the setup (`./zk/build/zk_setup.txt`).
#### 3) execute the file `run_verification.ts`:
This script:
- create a list of identity commitments and add it to a `IncrementalMerkleTree`. The tree is used to generate a merkle proof that a specified identity is actually in the tree (see`tree.createProof(0)`).
- generate a witness and a proof of execution with `messageId`equal to 0.
- generate a witness and a proof of execution with `messageId`equal to 0.
- generating 2 proofs (two different messages) with the same `messageId` reveal the two points of the polynomial necessary to deduct the `identitySecret` (using `shamirRecovery`).

@ -0,0 +1,26 @@
## CIRCOM ZKP SEMAPHORE WORKSPACE
Welcome to the Remix Circom ZKP Semaphore Workspace.
The workspace comprises two main directories:
### circuits: Contains sample semaphore contracts. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
### scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids in generating Solidity code, which is essential for on-chain deployment.
### first steps:
#### 1) compile the semaphore circuit using the remix circom compiler. This will generate artifacts.
#### 2) execute the file `run_setup.ts`:
This step generate a verification key that can be used for generating proof, it will also generate a Solidity contract for on-chain verification.
Note that this section should only be used for development purposes as this way of running the setup is heavily centralized (although some pieces of this script can be used to achieve that).
This generates a verification key (`./zk/build/verification_key.json`) and artifacts from the setup (`./zk/build/zk_setup.txt`).
#### 3) execute the file `run_verification.ts`:
This script:
- create a list of identity commitments and add it to a `IncrementalMerkleTree`. The tree is used to generate a merkle proof that a specified identity is actually in the tree (see`tree.createProof(0)`).
- generate a witness and a proof of execution.
- verify that the proof is valid `(snarkjs.groth16.verify)`
- ultimately verify that the hash generated by the circom compiler is the same as the root hash for the Tree. `(proof1.root.toString() === publicSignals[0]`). This assert that the identity provided to the circuit is actually part of that semaphore group.

@ -1,10 +0,0 @@
CIRCOM ZKP SEMAPHORE WORKSPACE
Welcome to the Remix Circom ZKP Semaphore Workspace.
The workspace comprises two main directories:
- circuits: Contains sample semaphore contracts. These can be compiled to generate a witness using 'Circom ZKP Compiler' plugin.
- scripts: Provides a sample script designed for a trusted setup using snarkjs. This script also aids
in generating Solidity code, which is essential for on-chain deployment.

@ -13,6 +13,6 @@ export default async () => {
// @ts-ignore // @ts-ignore
'templates/groth16_verifier.sol.ejs': (await import('!!raw-loader!./templates/groth16_verifier.sol.ejs')).default, 'templates/groth16_verifier.sol.ejs': (await import('!!raw-loader!./templates/groth16_verifier.sol.ejs')).default,
// @ts-ignore // @ts-ignore
'README.txt': (await import('raw-loader!./README.txt')).default 'README.md': (await import('raw-loader!./README.md')).default
} }
} }
Loading…
Cancel
Save