snarkjs | zkSNARK implementation in JavaScript & WASM

 by   iden3 JavaScript Version: 0.7.4 License: GPL-3.0

kandi X-RAY | snarkjs Summary

kandi X-RAY | snarkjs Summary

snarkjs is a JavaScript library. snarkjs has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has medium support. You can install using 'npm i snarkjs-scrypt' or download it from GitHub, npm.

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

            kandi-support Support

              snarkjs has a medium active ecosystem.
              It has 1410 star(s) with 325 fork(s). There are 33 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 47 open issues and 85 have been closed. On average issues are closed in 82 days. There are 33 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of snarkjs is 0.7.4

            kandi-Quality Quality

              snarkjs has 0 bugs and 0 code smells.

            kandi-Security Security

              snarkjs has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              snarkjs code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              snarkjs is licensed under the GPL-3.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              snarkjs releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed snarkjs and discovered the below as its top functions. This is intended to give you an instant insight into snarkjs implemented functionality, and help decide if they suit your requirements.
            • 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
            Get all kandi verified functions for this library.

            snarkjs Key Features

            No Key Features are available at this moment for snarkjs.

            snarkjs Examples and Code Snippets

            No Code Snippets are available at this moment for snarkjs.

            Community Discussions

            QUESTION

            How to fix nodejs throw err; ^ Error: ENOENT: no such file or directory, open
            Asked 2021-Jan-14 at 17:35

            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:35

            Looks 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.

            Source https://stackoverflow.com/questions/65723993

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install snarkjs

            First off, make sure you have a recent version of Node.js installed. While any version after v12 should work fine, we recommend you install v14 or later.
            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

            The contribute command creates a ptau file with a new contribution. You'll be prompted to enter some random text to provide an extra source of entropy. contribute takes as input the transcript of the protocol so far, in this case pot12_0000.ptau, and outputs a new transcript, in this case pot12_0001.ptau, which includes the computation carried out by the new contributor (ptau files contain a history of all the challenges and responses that have taken place so far). name can be anything you want, and is just included for reference (it will be printed when you verify the file (step 5).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i snarkjs

          • CLONE
          • HTTPS

            https://github.com/iden3/snarkjs.git

          • CLI

            gh repo clone iden3/snarkjs

          • sshUrl

            git@github.com:iden3/snarkjs.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by iden3

            circom

            by iden3Rust

            circomlib

            by iden3JavaScript

            wasmsnark

            by iden3JavaScript

            rapidsnark

            by iden3C++

            rollup

            by iden3JavaScript