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 // --> hint.Register(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. |
algebra
|
|
sw_bls12377
Package sw (short weierstrass)
|
Package sw (short weierstrass) |
sw_bls24315
Package sw (short weierstrass)
|
Package sw (short weierstrass) |
weierstrass
Package weierstrass implements elliptic curve group operations in (short) Weierstrass form.
|
Package weierstrass implements elliptic curve group operations in (short) Weierstrass form. |
commitments
|
|
kzg_bls12377
Package kzg_bls12377 provides a ZKP-circuit function to verify BLS12_377 KZG inside a BW6_761 circuit.
|
Package kzg_bls12377 provides a ZKP-circuit function to verify BLS12_377 KZG inside a BW6_761 circuit. |
kzg_bls24315
Package kzg_bls24315 provides a ZKP-circuit function to verify BLS24_315 KZG inside a BW6_633 circuit.
|
Package kzg_bls24315 provides a ZKP-circuit function to verify BLS24_315 KZG inside a BW6_633 circuit. |
Package groth16_bls12377 provides a ZKP-circuit function to verify BLS12_377 Groth16 inside a BW6_761 circuit.
|
Package groth16_bls12377 provides a ZKP-circuit function to verify BLS12_377 Groth16 inside a BW6_761 circuit. |
Package groth16_bls24315 provides a ZKP-circuit function to verify BLS24-315 Groth16 inside a BW6-633 circuit.
|
Package groth16_bls24315 provides a ZKP-circuit function to verify BLS24-315 Groth16 inside a BW6-633 circuit. |
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. |
math
|
|
emulated
Package emulated implements operations over any modulus.
|
Package emulated implements operations over any modulus. |
permutation
|
|
keccakf
Package keccakf implements the KeccakF-1600 permutation function.
|
Package keccakf implements the KeccakF-1600 permutation function. |
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. |
Click to show internal directories.
Click to hide internal directories.