bypass gcm asm first

This commit is contained in:
Sun Yimin 2021-12-31 10:48:34 +08:00 committed by GitHub
parent fa0206e30a
commit 0e13bac951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,9 +33,9 @@ func newCipher(key []byte) (cipher.Block, error) {
} }
c := sm4CipherAsm{sm4Cipher{make([]uint32, rounds), make([]uint32, rounds)}} c := sm4CipherAsm{sm4Cipher{make([]uint32, rounds), make([]uint32, rounds)}}
expandKeyAsm(&key[0], &ck[0], &c.enc[0], &c.dec[0]) expandKeyAsm(&key[0], &ck[0], &c.enc[0], &c.dec[0])
if supportsAES && supportsGFMUL { //if supportsAES && supportsGFMUL {
return &sm4CipherGCM{c}, nil // return &sm4CipherGCM{c}, nil
} //}
return &c, nil return &c, nil
} }