Updated SM4性能优化 (markdown)

Sun Yimin 2021-04-07 10:24:25 +08:00
parent 630811386d
commit 4ccc5c0f0b

@ -119,9 +119,12 @@ Golang没提供这两种模式的优化接口可能这两种模式不怎么
XTS模式主要用于磁盘加密不过基本没有用sm4直接作为磁盘加密算法的最多作为CMK用来加解密Data Key。
* [The XTS-AES Tweakable Block Cipher](https://luca-giuzzi.unibs.it/corsi/Support/papers-cryptography/1619-2007-NIST-Submission.pdf)
* [AES-XTS Block Cipher Mode is used in Kingston's Encrypted USB Flash Drives](https://www.kingston.com/unitedstates/en/solutions/data-security/xts-encryption)
* [AES-XTS Block Cipher Mode is used in Kingston's Encrypted USB Flash Drives](https://www.kingston.com/unitedstates/en/solutions/data-security/xts-encryption)
***
CPU: i5-8265U
CPU: i5-9500
goos: windows
goarch: amd64
pkg: github.com/emmansun/gmsm/sm4_test
@ -132,6 +135,7 @@ XTS模式主要用于磁盘加密不过基本没有用sm4直接作为磁盘
BenchmarkAES256XTS1K-6 197138 6100 ns/op 167.86 MB/s 0 B/op 0 allocs/op
BenchmarkAES256XTS4K-6 49514 24088 ns/op 170.04 MB/s 0 B/op 0 allocs/op
# 和AES的比较
相比而言差距还是有点大最大的是GCM sign/open, 有二十多倍。