Black Lives Matter. Support the Equal Justice Initiative.

Source file src/crypto/ecdsa/ecdsa_s390x_test.go

Documentation: crypto/ecdsa

     1  // Copyright 2020 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build s390x
     6  // +build s390x
     7  
     8  package ecdsa
     9  
    10  import (
    11  	"crypto/elliptic"
    12  	"testing"
    13  )
    14  
    15  func TestNoAsm(t *testing.T) {
    16  	testingDisableKDSA = true
    17  	defer func() { testingDisableKDSA = false }()
    18  
    19  	curves := [...]elliptic.Curve{
    20  		elliptic.P256(),
    21  		elliptic.P384(),
    22  		elliptic.P521(),
    23  	}
    24  
    25  	for _, curve := range curves {
    26  		name := curve.Params().Name
    27  		t.Run(name, func(t *testing.T) { testKeyGeneration(t, curve) })
    28  		t.Run(name, func(t *testing.T) { testSignAndVerify(t, curve) })
    29  		t.Run(name, func(t *testing.T) { testNonceSafety(t, curve) })
    30  		t.Run(name, func(t *testing.T) { testINDCCA(t, curve) })
    31  		t.Run(name, func(t *testing.T) { testNegativeInputs(t, curve) })
    32  	}
    33  }
    34  

View as plain text