snarkjs | zkSNARK implementation in JavaScript & WASM
kandi X-RAY | snarkjs Summary
kandi X-RAY | snarkjs Summary
This is a JavaScript and Pure Web Assembly implementation of zkSNARK and PLONK schemes. It uses the Groth16 Protocol (3 point only and 3 pairings) and PLONK. This library includes all the tools required to perform trusted setup multi-party ceremonies: including the universal powers of tau ceremony, and the second phase circuit specific ceremonies. Any zk-snark project can pick a round from the common phase 1 to start their circuit-specific phase 2 ceremony. The formats used in this library for the multi-party computation are compatible with the ones used in Semaphore's Perpetual Powers of Tau and other implementations. This library uses the compiled circuits generated by the circom compiler. It works in node.js as well as directly in the browser. It's an ES module, so it can be directly imported into bigger projects using Rollup or Webpack. The low-level cryptography is performed directly in wasm, and uses worker threads to parallelize the computations. The result is a high performance library with benchmarks comparable to host implementations.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- PUBLIC CONSTRUCTOR
- Build the FT object
- Build the FTF object
- Creates a new ZKey using ROC .
- Calculate phase generation using phase initialization
- verify the contribution of the curve
- round 1 4 quad
- Fetch the entire FFT
- Build a modular division .
- Function to build the
snarkjs Key Features
snarkjs Examples and Code Snippets
Community Discussions
Trending Discussions on snarkjs
QUESTION
This is how my output looks like. I have exhausted so many methods from previous similar questions but none of them worked in my case. I am really new with node js so any suggestion would be really helpful -
...ANSWER
Answered 2021-Jan-14 at 17:35Looks like this is a known bug in the module. You could try patching their code as recommended in the issue, or (what I personally would recommend), get WSL set up so you don't have to fight with as many inconsistencies on Windows. Or you could submit a pull request to that module to fix the issue.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install snarkjs
To install snarkjs run:. If you're seeing an error, try prefixing both commands with sudo and running them again.
To install circom, follow the instructions at installing circom.
Currently, snarkjs supports 2 proving systems: groth16 and PLONK. Groth16 requires a trusted ceremony for each circuit. PLONK does not require it, it's enough with the powers of tau ceremony which is universal. You can jump directly to Section 21 as PLONK does not require a specific trusted ceremony. This generates the reference zkey without phase 2 contributions. IMPORTANT: Do not use this zkey in production, as it's not safe. It requires at least a contribution,. The zkey new command creates an initial zkey file with zero contributions. The zkey is a zero-knowledge key that includes both the proving and verification keys as well as phase 2 contributions. Importantly, one can verify whether a zkey belongs to a specific circuit or not. Note that circuit_0000.zkey (the output of the zkey command above) does not include any contributions yet, so it cannot be used in a final circuit.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page