bn128.NewFqR with field over R. Setup.Pk & .Vk

This commit is contained in:
arnaucube
2018-12-12 14:05:59 +01:00
parent 439d894ee7
commit 7aafcfd5f3
4 changed files with 142 additions and 80 deletions

View File

@@ -105,6 +105,15 @@ func NewBn128() (Bn128, error) {
return b, nil
}
func NewFqR() (fields.Fq, error){
r, ok := new(big.Int).SetString("21888242871839275222246405745257275088548364400416034343698204186575808495617", 10)
if !ok {
return fields.Fq{}, errors.New("err parsing R")
}
fqR := fields.NewFq(r)
return fqR, nil
}
func (bn128 *Bn128) preparePairing() error {
var ok bool
bn128.LoopCount, ok = new(big.Int).SetString("29793968203157093288", 10)