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

@@ -9,7 +9,7 @@ import (
)
func TestNewEG(t *testing.T) {
ec := ecc.NewEC(1, 18, 19)
ec := ecc.NewEC(big.NewInt(int64(1)), big.NewInt(int64(18)), big.NewInt(int64(19)))
g := ecc.Point{big.NewInt(int64(7)), big.NewInt(int64(11))}
eg, err := NewEG(ec, g)
assert.Nil(t, err)
@@ -23,7 +23,7 @@ func TestNewEG(t *testing.T) {
}
}
func TestEGEncrypt(t *testing.T) {
ec := ecc.NewEC(1, 18, 19)
ec := ecc.NewEC(big.NewInt(int64(1)), big.NewInt(int64(18)), big.NewInt(int64(19)))
g := ecc.Point{big.NewInt(int64(7)), big.NewInt(int64(11))}
eg, err := NewEG(ec, g)
assert.Nil(t, err)
@@ -46,7 +46,7 @@ func TestEGEncrypt(t *testing.T) {
}
func TestEGDecrypt(t *testing.T) {
ec := ecc.NewEC(1, 18, 19)
ec := ecc.NewEC(big.NewInt(int64(1)), big.NewInt(int64(18)), big.NewInt(int64(19)))
g := ecc.Point{big.NewInt(int64(7)), big.NewInt(int64(11))}
eg, err := NewEG(ec, g)
assert.Nil(t, err)