mirror of
https://github.com/emmansun/gmsm.git
synced 2025-05-11 03:26:17 +08:00
Updated SM4性能优化 (markdown)
parent
630811386d
commit
4ccc5c0f0b
@ -119,9 +119,12 @@ Golang没提供这两种模式的优化接口,可能这两种模式不怎么
|
|||||||
XTS模式主要用于磁盘加密,不过基本没有用sm4直接作为磁盘加密算法的,最多作为CMK,用来加解密Data Key。
|
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)
|
* [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
|
goos: windows
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
pkg: github.com/emmansun/gmsm/sm4_test
|
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
|
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
|
BenchmarkAES256XTS4K-6 49514 24088 ns/op 170.04 MB/s 0 B/op 0 allocs/op
|
||||||
|
|
||||||
|
|
||||||
# 和AES的比较
|
# 和AES的比较
|
||||||
相比而言,差距还是有点大,最大的是GCM sign/open, 有二十多倍。
|
相比而言,差距还是有点大,最大的是GCM sign/open, 有二十多倍。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user