bn128 finite fields operations

This commit is contained in:
arnaucube
2018-10-07 00:16:23 +02:00
parent 4acca94c9e
commit 151ca78806
14 changed files with 712 additions and 54 deletions

View File

@@ -10,11 +10,11 @@ const (
bits = 1024
)
// Create calculates the secrets to share from given parameters
// t: number of secrets needed
// n: number of shares
// p: random point
// k: secret to share
// Create calculates the secrets to share from given parameters
func Create(t, n, p, k *big.Int) (result [][]*big.Int, err error) {
if k.Cmp(p) > 0 {
return nil, errors.New("Error: need k<p. k: " + k.String() + ", p: " + p.String())