Different methods of block encryption are used for VPN connections. In most cases, users tend to select the highest encryption algorithm available. The question, however, is what impact this choice has on performance.
To test the performance of DES, AES, and CAST, I created a small one-liner that shows which encryption algorithm achieves the highest performance on your appliances or open servers. Please note that the test runs on only one CPU core. Since VPN is multi-core capable, you can achieve significantly higher VPN encryption rates. Under normal circumstances, you should always achieve the best encryption throughput with AES, as modern CPUs include hardware acceleration for AES. You can find more information in the following article (Performance Tuning Tip - AES-NI).
Run this one-liner preferably on the standby gateway in a cluster, as it can temporarily generate 100% CPU load. This is necessary to avoid disrupting the production environment.
The one-liner shows how many kilobytes each encryption algorithm can process within three seconds and sorts the results by speed. Adjust your VPN settings to use the fastest algorithm if necessary. However, be aware that this may reduce the overall level of security.
Copy the one-liner via copy and paste into the bash shell of your gateway. Please note that execution may take between 2 and 5 minutes, depending on the CPU speed:
cpopenssl speed aes-128-cbc aes-256-cbc des-ede3 des-cbc cast-cbc 2>/dev/null | grep "aes\|cast\|des" | awk '{print $1, $2, $(NF-1)}' | sort -k3 -n -r | grep -v opt | sed -E 's/aes-128 cbc/AES-128/g; s/aes-256 cbc/AES-256/g ; s/des cbc/DES /g; s/des ede3/3DES /g ; s/cast cbc/CAST /g'
This is what an example output might look like on your system:

In this case, AES-128 would be the fastest encryption algorithm on the gateway.
PS:
In my tests on various Check Point appliances, "AES-128" was always the fastest algorithm. However, from a security perspective, I would recommend using AES-256 or higher.
➜ CCSM Elite, CCME, CCTE ➜ www.checkpoint.tips