You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
875 B

  1. package types
  2. import (
  3. "math/big"
  4. bn256 "github.com/ethereum/go-ethereum/crypto/bn256/cloudflare"
  5. )
  6. // Proof is the data structure of the Groth16 zkSNARK proof
  7. type Proof struct {
  8. A *bn256.G1
  9. B *bn256.G2
  10. C *bn256.G1
  11. }
  12. // Pk holds the data structure of the ProvingKey
  13. type Pk struct {
  14. A []*bn256.G1
  15. B2 []*bn256.G2
  16. B1 []*bn256.G1
  17. C []*bn256.G1
  18. NVars int
  19. NPublic int
  20. VkAlpha1 *bn256.G1
  21. VkDelta1 *bn256.G1
  22. VkBeta1 *bn256.G1
  23. VkBeta2 *bn256.G2
  24. VkDelta2 *bn256.G2
  25. HExps []*bn256.G1
  26. DomainSize int
  27. PolsA []map[int]*big.Int
  28. PolsB []map[int]*big.Int
  29. PolsC []map[int]*big.Int
  30. }
  31. // Witness contains the witness
  32. type Witness []*big.Int
  33. // Vk is the Verification Key data structure
  34. type Vk struct {
  35. Alpha *bn256.G1
  36. Beta *bn256.G2
  37. Gamma *bn256.G2
  38. Delta *bn256.G2
  39. IC []*bn256.G1
  40. }