This commit is contained in:
arnaucube
2018-12-30 21:16:19 +01:00
parent 1375596a74
commit 33de628a91
11 changed files with 404 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
package r1csqap
import (
"bytes"
"math/big"
"github.com/arnaucube/go-snark/fields"
@@ -28,6 +29,17 @@ func ArrayOfBigZeros(num int) []*big.Int {
}
return r
}
func BigArraysEqual(a, b []*big.Int) bool {
if len(a) != len(b) {
return false
}
for i := 0; i < len(a); i++ {
if !bytes.Equal(a[i].Bytes(), b[i].Bytes()) {
return false
}
}
return true
}
// PolynomialField is the Polynomial over a Finite Field where the polynomial operations are performed
type PolynomialField struct {