fastcrypto_zkp/lib.rs
1// Copyright (c) 2022, Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Fastcrypto-zkp is an experimental crate that offers a faster implementation of the Groth16 zkSNARK
5//! verifier, based on BLST, but following the same API as Arkworks' Groth16 implementation.
6//! It includes benchmarks and tests to compare the performance and native formats of the two implementations.
7
8extern crate ff;
9
10use ff::PrimeField;
11
12/// Definition of the BN254 prime field.
13#[derive(PrimeField)]
14#[PrimeFieldModulus = "21888242871839275222246405745257275088548364400416034343698204186575808495617"]
15#[PrimeFieldGenerator = "5"]
16#[PrimeFieldReprEndianness = "big"]
17pub struct Fr([u64; 4]);
18
19pub mod bls12381;
20
21pub mod bn254;
22
23/// Simple circuits used in benchmarks and demos
24pub mod dummy_circuits;
25
26/// Circom-compatible deserialization of points
27pub mod zk_login_utils;