Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn’t Seem So Bad

From the previous test (Performance Comparison of Different Encryption Algorithms in OpenVPN), we found that there are differences in forwarding performance when OpenVPN uses different encryption algorithms, as shown below:

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

Comparing the encryption algorithms, we can see that the specific encryption algorithms are divided into three parts: the first part is the algorithm name, which determines the basic encryption logic, mainly divided into AES, ARIA, and CAMELLIA, with performance ranking seemingly as ARIA > CAMELLIA > AES; the second part is the key length, which is a key parameter balancing security and performance, mainly having 128, 192, and 256 bits, with specific performance rankings needing further testing to clarify; the third part is the encryption mode, which affects the data processing flow and security enhancement features, divided into CBC, CFB, CFB1, CFB8, GCM, and OFB, with performance ranking seemingly as GCM > OFB > CFB > CBC > CFB8 > CFB1.

To further clarify the impact of encryption algorithms, key lengths, and encryption modes on performance, we will supplement the tests today with the national secret algorithm SM4 and the remaining AES encryption algorithms.

First, let’s test the national secret algorithm SM4-CBC, with a maximum bandwidth of 220 Mbps and an average bandwidth of 171 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the SM4-CFB encryption algorithm, the maximum bandwidth is 235 Mbps and the average bandwidth is 180 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the SM4-OFB encryption algorithm, the maximum bandwidth is 234 Mbps and the average bandwidth is 218 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-192-CBC encryption algorithm, the maximum bandwidth is 271 Mbps and the average bandwidth is 233 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-192-CFB encryption algorithm, the maximum bandwidth is 328 Mbps and the average bandwidth is 249 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-192-CFB1 encryption algorithm, the maximum bandwidth is 23.6 Mbps and the average bandwidth is 20.4 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-192-CFB8 encryption algorithm, the maximum bandwidth is 117 Mbps and the average bandwidth is 108 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-192-OFB encryption algorithm, the maximum bandwidth is 325 Mbps and the average bandwidth is 290 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-256-CBC encryption algorithm, the maximum bandwidth is 328 Mbps and the average bandwidth is 244 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-256-CFB encryption algorithm, the maximum bandwidth is 317 Mbps and the average bandwidth is 276 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-256-CFB1 encryption algorithm, the maximum bandwidth is 22 Mbps and the average bandwidth is 19.1 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-256-CFB8 encryption algorithm, the maximum bandwidth is 109 Mbps and the average bandwidth is 102 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

When using the AES-256-OFB encryption algorithm, the maximum bandwidth is 292 Mbps and the average bandwidth is 254 Mbps.

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

Summarizing the test results:

Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

It can be seen that the ranking of encryption modes remains as follows: GCM > OFB > CFB > CBC > CFB8 > CFB1; the key length of SM4 is 128 bits, with performance lower than other algorithms with 128 bits, and the algorithm ranking seems to be ARIA > CAMELLIA > AES > SM4; in terms of key length, overall performance shows 128 bits > 192 bits > 256 bits.

***Recommended Reading***

Performance Comparison of Different Encryption Algorithms in OpenVPNComparative Analysis of Packet Encapsulation Differences in IPsec VPN with Different Configurations and Algorithms Using WireSharkTesting the Performance Differences of Various Encryption Algorithms in IPsec VPN with vSRXA Fourth Grade Math Problem: The DeepSeek-R1 Model Below 32b is Completely Defeated, Video Evidence!Even Running DeepSeek on a Laptop with a 4070 GPU is Much Faster than a 128-Core CPU!Save 20 bucks! Just 2 commands to locally deploy the DeepSeek-R1 model via OllamaOffline file sharing is available, come and copy the homework, locally deploy a personal assistant with DeepSeekA Math Problem in a Game that Stumped All AI: ChatGPT, DeepSeek, Doubao, Tongyi Qianwen, Wenxin YiyanThe Linux Client of OpenVPN Surprisingly Outperforms the Windows Client by More than 5 TimesHow to Quickly Deploy an Ubuntu 24.10 Server Virtual Machine Without a Graphical InterfaceWhen You Buy a Linux Cloud Host, How Should You Test the Host’s Performance?Complete Experience of Installing, Configuring, Operating, and Evaluating MySQL Database on UbuntuHow to Expand When Ubuntu’s Disk Space is Insufficient or Configuration is Incorrect?The Latency from Beijing to Singapore is Already 300+, Can WireGuard or OpenVPN Save the Day?Performance Comparison of AES and SM4 Encryption Algorithms Using OpenVPN: National Secret Algorithm Doesn't Seem So Bad

Leave a Comment