func TestNISTECAllocations(t *testing.T) {
cryptotest.SkipTestAllocations(t)
t.Run("P224", func(t *testing.T) {
- if allocs := testing.AllocsPerRun(10, func() {
+ if allocs := testing.AllocsPerRun(100, func() {
p := nistec.NewP224Point().SetGenerator()
scalar := make([]byte, 28)
rand.Read(scalar)
}
})
t.Run("P256", func(t *testing.T) {
- if allocs := testing.AllocsPerRun(10, func() {
+ if allocs := testing.AllocsPerRun(100, func() {
p := nistec.NewP256Point().SetGenerator()
scalar := make([]byte, 32)
rand.Read(scalar)
}
})
t.Run("P384", func(t *testing.T) {
- if allocs := testing.AllocsPerRun(10, func() {
+ if allocs := testing.AllocsPerRun(100, func() {
p := nistec.NewP384Point().SetGenerator()
scalar := make([]byte, 48)
rand.Read(scalar)
}
})
t.Run("P521", func(t *testing.T) {
- if allocs := testing.AllocsPerRun(10, func() {
+ if allocs := testing.AllocsPerRun(100, func() {
p := nistec.NewP521Point().SetGenerator()
scalar := make([]byte, 66)
rand.Read(scalar)
t.Skip("Test reports non-zero allocation count. See issue #70448")
}
cryptotest.SkipTestAllocations(t)
- if allocs := testing.AllocsPerRun(10, func() {
+ if allocs := testing.AllocsPerRun(100, func() {
key := make([]byte, 32)
nonce := make([]byte, 24)
plaintext := make([]byte, 16)