github.com/emmansun/gmsm@v0.29.1/zuc/eia256_asm.go (about) 1 //go:build (amd64 || arm64 || ppc64 || ppc64le) && !purego 2 3 package zuc 4 5 //go:noescape 6 func eia256RoundTag8(t *uint32, keyStream *uint32, p *byte) 7 8 //go:noescape 9 func eia256RoundTag16(t *uint32, keyStream *uint32, p *byte) 10 11 func block256(m *ZUC256Mac, p []byte) { 12 if supportsGFMUL { 13 for len(p) >= chunk { 14 m.genKeywords(m.k0[4:]) 15 switch m.tagSize { 16 case 8: 17 eia256RoundTag8(&m.t[0], &m.k0[0], &p[0]) 18 case 16: 19 eia256RoundTag16(&m.t[0], &m.k0[0], &p[0]) 20 default: 21 eia3Round16B(&m.t[0], &m.k0[0], &p[0], m.tagSize) 22 } 23 p = p[chunk:] 24 } 25 } else { 26 block256Generic(m, p) 27 } 28 }