gmsm/cipher/xts_tweak_test.go
2023-08-17 12:48:53 +08:00

21 lines
322 B
Go

package cipher
import (
"crypto/aes"
"testing"
)
func BenchmarkDoubleTweak(b *testing.B) {
var tweak [16]byte
block, err := aes.NewCipher(make([]byte, 16))
if err != nil {
b.Failed()
}
block.Encrypt(tweak[:], tweak[:])
b.ResetTimer()
for i := 0; i < b.N; i++ {
mul2(&tweak, false)
}
}