gmsm/zuc/core_generic.go
2023-09-07 16:27:58 +08:00

18 lines
342 B
Go

//go:build (!amd64 && !arm64) || purego
// +build !amd64,!arm64 purego
package zuc
func genKeyStream(keyStream []uint32, pState *zucState32) {
for i := 0; i < len(keyStream); i++ {
keyStream[i] = pState.genKeyword()
}
}
func genKeyword(s *zucState32) uint32 {
s.bitReorganization()
z := s.x3 ^ s.f32()
s.enterWorkMode()
return z
}