std

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package std provides components or functions to help design gnark circuits. Note that this package is being re-visited as part of v0.5.0 release, and API may change.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHints

func RegisterHints()

RegisterHints register all gnark/std hints In the case where the Solver/Prover code is loaded alongside the circuit, this is not useful. However, if a Solver/Prover services consumes serialized constraint systems, it has no way to know which hints were registered; caller code may add them through backend.WithHints(...).

Example
// this constraint system correspond to a circuit using gnark/std components which rely on hints
// like bits.ToNAF(...)
var ccs constraint.ConstraintSystem

// since package bits is not imported, the hint NNAF is not registered
// --> solver.RegisterHint(bits.NNAF)
// rather than to keep track on which hints are needed, a prover/solver service can register all
// gnark/std hints with this call
RegisterHints()

// then -->
_ = ccs.IsSolved(nil)
Output:

Types

This section is empty.

Directories

Path Synopsis
accumulator
merkle
Package merkle provides a ZKP-circuit function to verify merkle proofs.
Package merkle provides a ZKP-circuit function to verify merkle proofs.
Package algebra implements:
Package algebra implements:
algopts
Package algopts provides shareable options for modifying algebraic operations.
Package algopts provides shareable options for modifying algebraic operations.
emulated/fields_bls12381
Package fields_bls12381 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BLS12-381 curve.
Package fields_bls12381 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BLS12-381 curve.
emulated/fields_bn254
Package fields_bn254 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BN254 curve.
Package fields_bn254 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BN254 curve.
emulated/fields_bw6761
Package fields_bw6761 implements the fields arithmetic of the Fp6 tower used to compute the pairing over the BW6-761 curve.
Package fields_bw6761 implements the fields arithmetic of the Fp6 tower used to compute the pairing over the BW6-761 curve.
emulated/sw_bls12381
Package sw_bls12381 implements G1 and G2 arithmetics and pairing computation over BLS12-381 curve.
Package sw_bls12381 implements G1 and G2 arithmetics and pairing computation over BLS12-381 curve.
emulated/sw_bn254
Package sw_bn254 implements G1 and G2 arithmetics and pairing computation over BN254 curve.
Package sw_bn254 implements G1 and G2 arithmetics and pairing computation over BN254 curve.
emulated/sw_bw6761
Package sw_bw6761 implements G1 and G2 arithmetics and pairing computation over BW6-761 curve.
Package sw_bw6761 implements G1 and G2 arithmetics and pairing computation over BW6-761 curve.
emulated/sw_emulated
Package sw_emulated implements elliptic curve group operations in (short) Weierstrass form.
Package sw_emulated implements elliptic curve group operations in (short) Weierstrass form.
native/fields_bls12377
Package fields_bls12377 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BLS12-377 curve.
Package fields_bls12377 implements the fields arithmetic of the Fp12 tower used to compute the pairing over the BLS12-377 curve.
native/fields_bls24315
Package fields_bls24315 implements the fields arithmetic of the Fp24 tower used to compute the pairing over the BLS24-315 curve.
Package fields_bls24315 implements the fields arithmetic of the Fp24 tower used to compute the pairing over the BLS24-315 curve.
native/sw_bls12377
Package sw_bls12377 implements the arithmetics of G1, G2 and the pairing computation on BLS12-377 as a SNARK circuit over BW6-761.
Package sw_bls12377 implements the arithmetics of G1, G2 and the pairing computation on BLS12-377 as a SNARK circuit over BW6-761.
native/sw_bls24315
Package sw_bls24315 implements the arithmetics of G1, G2 and the pairing computation on BLS24-315 as a SNARK circuit over BW6-633.
Package sw_bls24315 implements the arithmetics of G1, G2 and the pairing computation on BLS24-315 as a SNARK circuit over BW6-633.
native/twistededwards
Package twistededwards implements the arithmetic of twisted Edwards curves in native fields.
Package twistededwards implements the arithmetic of twisted Edwards curves in native fields.
commitments
fri
kzg
Package kzg implements KZG polynomial commitment verification.
Package kzg implements KZG polynomial commitment verification.
Package evmprecompiles implements the Ethereum VM precompile contracts.
Package evmprecompiles implements the Ethereum VM precompile contracts.
Package hash provides an interface that hash functions (as gadget) should implement.
Package hash provides an interface that hash functions (as gadget) should implement.
mimc
Package mimc provides a ZKP-circuit function to compute a MiMC hash.
Package mimc provides a ZKP-circuit function to compute a MiMC hash.
sha2
Package sha2 implements SHA2 hash computation.
Package sha2 implements SHA2 hash computation.
sha3
Package sha3 provides ZKP circuits for SHA3 hash algorithms applying sponge construction over Keccak f-[1600] permutation function.
Package sha3 provides ZKP circuits for SHA3 hash algorithms applying sponge construction over Keccak f-[1600] permutation function.
internal
logderivarg
Package logderivarg implements log-derivative argument.
Package logderivarg implements log-derivative argument.
logderivprecomp
Package logderivprecomp allows computing functions using precomputation.
Package logderivprecomp allows computing functions using precomputation.
lookup
logderivlookup
Package logderiv implements append-only lookups using log-derivative argument.
Package logderiv implements append-only lookups using log-derivative argument.
math
cmp
Package cmp provides methods and functions for comparing two numbers.
Package cmp provides methods and functions for comparing two numbers.
emulated
Package emulated implements operations over any modulus.
Package emulated implements operations over any modulus.
emulated/emparams
Package emparams contains emulation parameters for well known fields.
Package emparams contains emulation parameters for well known fields.
uints
Package uints implements optimised byte and long integer operations.
Package uints implements optimised byte and long integer operations.
Package multicommit implements commitment expansion.
Package multicommit implements commitment expansion.
permutation
keccakf
Package keccakf implements the KeccakF-1600 permutation function.
Package keccakf implements the KeccakF-1600 permutation function.
Package rangecheck implements range checking gadget
Package rangecheck implements range checking gadget
Package recursion provides in-circuit verifiers for different proofs systems.
Package recursion provides in-circuit verifiers for different proofs systems.
groth16
Package groth16 provides in-circuit Groth16 verifier.
Package groth16 provides in-circuit Groth16 verifier.
plonk
Package plonk implements in-circuit PLONK verifier.
Package plonk implements in-circuit PLONK verifier.
Package selector provides a lookup table and map, based on linear scan.
Package selector provides a lookup table and map, based on linear scan.
signature
ecdsa
Package ecdsa implements ECDSA signature verification over any elliptic curve.
Package ecdsa implements ECDSA signature verification over any elliptic curve.
eddsa
Package eddsa provides a ZKP-circuit function to verify a EdDSA signature.
Package eddsa provides a ZKP-circuit function to verify a EdDSA signature.
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL