aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/crypto/elliptic/p256_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-11 14:53:56 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-11 15:01:19 -0800
commit8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch)
tree43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/go/crypto/elliptic/p256_test.go
parent9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff)
downloadgcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.zip
gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz
gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.bz2
libgo: update to Go1.18beta2
gotools/ * Makefile.am (go_cmd_cgo_files): Add ast_go118.go (check-go-tool): Copy golang.org/x/tools directories. * Makefile.in: Regenerate. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
Diffstat (limited to 'libgo/go/crypto/elliptic/p256_test.go')
-rw-r--r--libgo/go/crypto/elliptic/p256_test.go19
1 files changed, 1 insertions, 18 deletions
diff --git a/libgo/go/crypto/elliptic/p256_test.go b/libgo/go/crypto/elliptic/p256_test.go
index 1435f5e..c6862d9 100644
--- a/libgo/go/crypto/elliptic/p256_test.go
+++ b/libgo/go/crypto/elliptic/p256_test.go
@@ -34,7 +34,7 @@ var p256MultTests = []scalarMultTest{
func TestP256BaseMult(t *testing.T) {
p256 := P256()
- p256Generic := p256.Params()
+ p256Generic := genericParamsForCurve(p256)
scalars := make([]*big.Int, 0, len(p224BaseMultTests)+1)
for _, e := range p224BaseMultTests {
@@ -60,23 +60,6 @@ func TestP256BaseMult(t *testing.T) {
func TestP256Mult(t *testing.T) {
p256 := P256()
- p256Generic := p256.Params()
-
- for i, e := range p224BaseMultTests {
- x, _ := new(big.Int).SetString(e.x, 16)
- y, _ := new(big.Int).SetString(e.y, 16)
- k, _ := new(big.Int).SetString(e.k, 10)
-
- xx, yy := p256.ScalarMult(x, y, k.Bytes())
- xx2, yy2 := p256Generic.ScalarMult(x, y, k.Bytes())
- if xx.Cmp(xx2) != 0 || yy.Cmp(yy2) != 0 {
- t.Errorf("#%d: got (%x, %x), want (%x, %x)", i, xx, yy, xx2, yy2)
- }
- if testing.Short() && i > 5 {
- break
- }
- }
-
for i, e := range p256MultTests {
x, _ := new(big.Int).SetString(e.xIn, 16)
y, _ := new(big.Int).SetString(e.yIn, 16)