diff --git a/SM4性能优化.md b/SM4性能优化.md index 972eb44..57a908e 100644 --- a/SM4性能优化.md +++ b/SM4性能优化.md @@ -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, 有二十多倍。