mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-25 03:36:18 +08:00
16 lines
337 B
Go
16 lines
337 B
Go
//go:build !amd64 && !arm64 || purego
|
|
|
|
package cipher
|
|
|
|
func mul2(tweak *[blockSize]byte, isGB bool) {
|
|
mul2Generic(tweak, isGB)
|
|
}
|
|
|
|
func doubleTweaks(tweak *[blockSize]byte, tweaks []byte, isGB bool) {
|
|
count := len(tweaks) >> 4
|
|
for i := 0; i < count; i++ {
|
|
copy(tweaks[blockSize*i:], tweak[:])
|
|
mul2(tweak, isGB)
|
|
}
|
|
}
|