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.

36 lines
719 B

  1. package gocircomprover
  2. import (
  3. "math/big"
  4. bn256 "github.com/ethereum/go-ethereum/crypto/bn256/cloudflare"
  5. )
  6. type Proof struct {
  7. A *bn256.G1
  8. B *bn256.G2
  9. C *bn256.G1
  10. }
  11. type ProvingKey struct {
  12. A []*bn256.G1
  13. B2 []*bn256.G2
  14. B1 []*bn256.G1
  15. C []*bn256.G1
  16. NVars int
  17. NPublic int
  18. VkAlpha1 *bn256.G1
  19. VkDelta1 *bn256.G1
  20. VkBeta1 *bn256.G1
  21. VkBeta2 *bn256.G2
  22. VkDelta2 *bn256.G2
  23. HExps []*bn256.G1
  24. DomainSize int
  25. PolsA []map[int]*big.Int
  26. PolsB []map[int]*big.Int
  27. PolsC []map[int]*big.Int
  28. }
  29. type Witness []*big.Int
  30. var R, _ = new(big.Int).SetString("21888242871839275222246405745257275088548364400416034343698204186575808495617", 10)