Documentation ¶
Index ¶
- func ExtractKeys(srs1 *Phase1, srs2 *Phase2, evals *Phase2Evaluations, nConstraints int) (pk groth16.ProvingKey, vk groth16.VerifyingKey)
- func InitPhase2(r1cs *cs.R1CS, srs1 *Phase1) (Phase2, Phase2Evaluations)
- func VerifyPhase1(c0, c1 *Phase1, c ...*Phase1) error
- func VerifyPhase2(c0, c1 *Phase2, c ...*Phase2) error
- type Phase1
- type Phase2
- type Phase2Evaluations
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractKeys ¶
func ExtractKeys(srs1 *Phase1, srs2 *Phase2, evals *Phase2Evaluations, nConstraints int) (pk groth16.ProvingKey, vk groth16.VerifyingKey)
func InitPhase2 ¶
func InitPhase2(r1cs *cs.R1CS, srs1 *Phase1) (Phase2, Phase2Evaluations)
func VerifyPhase1 ¶
func VerifyPhase2 ¶
Types ¶
type Phase1 ¶
type Phase1 struct { Parameters struct { G1 struct { Tau []curve.G1Affine // {[τ⁰]₁, [τ¹]₁, [τ²]₁, …, [τ²ⁿ⁻²]₁} AlphaTau []curve.G1Affine // {α[τ⁰]₁, α[τ¹]₁, α[τ²]₁, …, α[τⁿ⁻¹]₁} BetaTau []curve.G1Affine // {β[τ⁰]₁, β[τ¹]₁, β[τ²]₁, …, β[τⁿ⁻¹]₁} } G2 struct { Tau []curve.G2Affine // {[τ⁰]₂, [τ¹]₂, [τ²]₂, …, [τⁿ⁻¹]₂} Beta curve.G2Affine // [β]₂ } } PublicKeys struct { Tau, Alpha, Beta PublicKey } Hash []byte // sha256 hash }
Phase1 represents the Phase1 of the MPC described in https://eprint.iacr.org/2017/1050.pdf
Also known as "Powers of Tau"
func InitPhase1 ¶
InitPhase1 initialize phase 1 of the MPC. This is called once by the coordinator before any randomness contribution is made (see Contribute()).
func (*Phase1) Contribute ¶
func (phase1 *Phase1) Contribute()
Contribute contributes randomness to the phase1 object. This mutates phase1.
type Phase2 ¶
type Phase2 struct { Parameters struct { G1 struct { Delta curve.G1Affine L, Z []curve.G1Affine } G2 struct { Delta curve.G2Affine } } PublicKey PublicKey Hash []byte }
func (*Phase2) Contribute ¶
func (c *Phase2) Contribute()
Click to show internal directories.
Click to hide internal directories.