Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Utils = prepareUtils()
Utils is the data structure holding the BN128, FqR Finite Field over R, PolynomialField, that will be used inside the snarks operations
Functions ¶
Types ¶
type Pk ¶
type Pk struct { BACDelta [][3]*big.Int // {( βui(x)+αvi(x)+wi(x) ) / δ } from l+1 to m Z []*big.Int G1 struct { Alpha [3]*big.Int Beta [3]*big.Int Delta [3]*big.Int At [][3]*big.Int // {a(τ)} from 0 to m BACGamma [][3]*big.Int // {( βui(x)+αvi(x)+wi(x) ) / γ } from 0 to m } G2 struct { Beta [3][2]*big.Int Gamma [3][2]*big.Int Delta [3][2]*big.Int BACGamma [][3][2]*big.Int // {( βui(x)+αvi(x)+wi(x) ) / γ } from 0 to m } PowersTauDelta [][3]*big.Int // powers of τ encrypted in G1 curve, divided by δ }
type Setup ¶
type Setup struct { Toxic struct { T *big.Int // trusted setup secret Kalpha *big.Int Kbeta *big.Int Kgamma *big.Int Kdelta *big.Int } // public Pk Pk Vk Vk }
Setup is the data structure holding the Trusted Setup data. The Setup.Toxic sub struct must be destroyed after the GenerateTrustedSetup function is completed
func GenerateTrustedSetup ¶
func GenerateTrustedSetup(witnessLength int, circuit circuitcompiler.Circuit, alphas, betas, gammas [][]*big.Int) (Setup, error)
GenerateTrustedSetup generates the Trusted Setup from a compiled Circuit. The Setup.Toxic sub data structure must be destroyed
Click to show internal directories.
Click to hide internal directories.