npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arianee/privacy-circuits

v1.83.0

Published

This repository contains the circuits and libraries used to generate and verify the proofs of the "Full-Privacy" version of the Arianee protocol. The two main parts of this repository are the following:

Downloads

1,074

Readme

@arianee/privacy-circuits

This repository contains the circuits and libraries used to generate and verify the proofs of the "Full-Privacy" version of the Arianee protocol. The two main parts of this repository are the following:

  • The circuits that are written in the circom language, they are used to generate the proofs under the hood.
  • A TypeScript library that is a friendly interface to interact with the circuits in order to generate and verify the proofs.

Security & Audits

In July 2024, a comprehensive audit of the circuits was conducted by Veridise to ensure the security and integrity of our privacy protocol. The full audit report is available in the repository for detailed insights and findings.

You can access the reports by following the links below:

Installation

You need several dependencies to build the circuits.

First, you need to install the circom compiler wich is written in Rust. To have Rust available in your system, you can install rustup. If you’re using Linux or macOS, open a terminal and enter the following command:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Then, you need to clone the circom repository and build the compiler. You can do this by running the following commands:

git clone https://github.com/iden3/circom.git
cargo build --release

The build takes around 3 minutes to be completed. When the command successfully finishes, it generates the circom binary in the directory target/release. You can install this binary as follows (Note: Make sure you're still in the circom directory when running this command):

cargo install --path circom

The previous command will install the circom binary in the directory $HOME/.cargo/bin.

Now, you should be able to see all the options of the executable by using the help flag:

circom --help

Finally, you can install the dependencies of the project by running the following command from the root of this monorepo:

npm install

Building

Circom circuits

You can build the circuits by running the following command (Note: Make sure you're in the monorepo root directory when running this command):

nx build-circom privacy-circuits --circuit=<circuit-file-name> --ptau=<ptau-file-name>

For example, to build the ownershipVerifier.circom circuit, you can run the following command:

nx build-circom privacy-circuits --circuit=ownershipVerifier/ownershipVerifier.circom --ptau=powersOfTau_final_12.ptau

The previous command will generate the build directory in the privacy-circuits directory. This directory contains another directory with the name of the circuit file (e.g., ownershipVerifier). Inside this directory, you can find the following:

  • A keys directory that contains the proving and verifying keys.
  • An r1cs directory that contains the R1CS file.
  • A wasm directory that contains the WebAssembly file.
  • A solidity directory that contains the Solidity verifier contract.

TypeScript library

You can build the TypeScript library by running the following command (Note: Make sure you're in the monorepo root directory when running this command):

nx build privacy-circuits

Running unit tests

Run nx test privacy-circuits to execute the unit tests via Jest.

Trusted Setup Ceremony

The "Powers of Tau Ceremony" is a protocol used to generate public parameters for cryptographic systems that rely on zero-knowledge proofs. By involving multiple participants, the ceremony ensures that no single party can access the "Toxic Waste" — sensitive data whose exposure could compromise the system. This process distributes trust among various contributors by creating a Common Reference String (CSR), a crucial element used across different users and applications to construct and verify zero-knowledge proofs consistently and securely. This setup minimizes potential security risks and maintains the integrity of the cryptographic framework.

How to start the ceremony

First, you need to have completed the installation steps described in the previous section. Once you are ready, you can start a new ceremony by running the following command:

npx snarkjs powersoftau new <curve> <power> <output-file>

The <power> parameter allows you to control the limit of constraints that this ceremony output will be able to handle. If you set the power to 12, the output will be able to handle up to 2^12 constraints.

For example, to start a new ceremony for the BN128 curve with a power of 12, you can run the following command:

npx snarkjs powersoftau new bn128 12 pot12_0000.ptau -v

The previous command will generate a new file named pot12_0000.ptau in the current directory. This file contains the initial contribution of the ceremony, you can share it with other participants to continue the process.

How to contribute to the ceremony

To contribute to an existing ceremony, you need to run the following command:

npx snarkjs powersoftau contribute pot12_0000.ptau pot12_0001.ptau --name=<your-name> -v

The --name parameter allows you to specify your name (preferably your GitHub username) to identify your contribution.

The previous command will generate a new file named pot12_0001.ptau in the current directory. This file contains your contribution to the ceremony, you can share it with other participants to continue the process.

Powers of Tau — 29/04/2024

The Arianee Team has organized a Powers of Tau ceremony to generate the public parameters for the Arianee protocol. 6 key members of the Arianee Team have participated in the ceremony to ensure the integrity of the process.

The ceremony has been completed successfully, and the final public parameters are available in the following files: