mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
fix bug introduced by https://go-review.googlesource.com/c/go/+/233939
This commit is contained in:
parent
dc5c7205f0
commit
3914a43b10
@ -4,11 +4,15 @@
|
||||
package sm2
|
||||
|
||||
import (
|
||||
"crypto/elliptic"
|
||||
"crypto/rand"
|
||||
"io"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
var _ = elliptic.P256()
|
||||
|
||||
func TestFuzz(t *testing.T) {
|
||||
p256 := P256()
|
||||
p256Generic := p256.Params()
|
||||
@ -30,8 +34,8 @@ func TestFuzz(t *testing.T) {
|
||||
default:
|
||||
}
|
||||
|
||||
rand.Read(scalar1[:])
|
||||
rand.Read(scalar2[:])
|
||||
io.ReadFull(rand.Reader, scalar1[:])
|
||||
io.ReadFull(rand.Reader, scalar2[:])
|
||||
|
||||
x, y := p256.ScalarBaseMult(scalar1[:])
|
||||
x2, y2 := p256Generic.ScalarBaseMult(scalar1[:])
|
||||
|
Loading…
x
Reference in New Issue
Block a user