Skip to content

Instantly share code, notes, and snippets.

@CandyMi
Last active December 8, 2023 03:46
Show Gist options
  • Save CandyMi/a6c7d987ac614d4da6226c8abc412e43 to your computer and use it in GitHub Desktop.
Save CandyMi/a6c7d987ac614d4da6226c8abc412e43 to your computer and use it in GitHub Desktop.
AES vs SM4

CPU

Intel i5-10400 AES-NI

命令

openssl speed -evp 算法名(aes-256-cbc)

结果

type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes
SM4-ECB 129219.15k 137525.08k 139994.37k 140677.12k 140399.96k 140569.26k
SM4-CBC 121125.41k 129264.00k 131292.67k 131901.10k 132169.73k 132136.96k
AES-256-ECB (Native) 258435.80k 291382.70k 298440.11k 301847.21k 296274.60k 297986.73k
AES-256-CBC (Native) 257575.68k 286379.35k 292411.31k 295179.61k 296132.61k 295452.67k
AES-256-ECB (AES-NI) 959181.05k 3563137.39k 4168026.20k 4407112.70k 4475426.13k 4492034.05k
AES-256-CBC (AES-NI) 896420.91k 1053098.18k 1068994.65k 1077697.19k 1083023.36k 1082310.66k
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment