Files
xgcl/sm/sm4/cipher_amd64.go
2026-05-27 23:03:00 +08:00

23 lines
678 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package sm4
// TODO: implemt the 3 funcs in asm_*.s
//should implement in asm, add go:noescape
// xk 轮密钥,指向32个uint32 dst,src分别指向一个分组。
// func encryptBlockAsm(xk *uint32, dst, src *byte) {
func encryptBlockAsm(xk []uint32, dst, src []byte) {
encryptBlockGo(xk, dst, src)
}
//should implement in asm, add go:noescape
// func decryptBlockAsm(xk *uint32, dst, src *byte) {
func decryptBlockAsm(xk []uint32, dst, src []byte) {
decryptBlockGo(xk, dst, src)
}
//should implement in asm, add go:noescape
// func expandKeyAsm(key *byte, enc *uint32, dec *uint32) {
func expandKeyAsm(key []byte, enc, dec []uint32) {
expandKeyGo(key, enc, dec)
}