OpenSSL Cyphers AES GCM vs CBC on APU3 and Raspberry Pi 3

Questions & Discussion about the right Hardware to run IPFire on
Post Reply
kressd
Posts: 14
Joined: January 26th, 2018, 8:06 pm

OpenSSL Cyphers AES GCM vs CBC on APU3 and Raspberry Pi 3

Post by kressd » May 9th, 2018, 2:31 pm

With the new cipher AES-GCM class, introduced in core 120, I was curious how much my PC Engines APU3 would benefit from changing from AES-CBC to AES-GCM. I made a very quick speed test and additional compared it to the Raspberry Pi 3 which I have also in use for OpenVPN.

The APU3 has an AMD Embedded G series GX-412TC, 1 GHz quad Jaguar core with 64 bit and AES-NI support. OS is ipFire core 120 64bit.
The Raspberry Pi 3 runs with a ARM Cortex-A53, 1.2GHz quad core 64-bit, no AES support. OS is Raspbian Stretch 32bit.

The commands I run are (AES-256 only)

Code: Select all

$ openssl speed -evp aes-256-cbc
$ openssl speed -evp aes-256-gcm
Here are the results. The x-axis is the size of the blocks, the y-axis are in 1000s of bytes per second processed. The higher the bar, the more blocks are processed.
Image

GCM (orange bars) is much faster for bigger packages with hardware acceleration.
On my RPi I should stick with CBC and I should use my ipFire more often for my VPN connections.
Keep in mind that this is just a quick test, but I thought it’s still worth sharing.

What are your results?
Are there any other test I could run easily with the tools on board?

You can add your results into this public spreadsheet:
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Last edited by kressd on May 14th, 2018, 6:32 am, edited 4 times in total.
Image

JonM
Posts: 144
Joined: August 4th, 2017, 5:49 pm
Location: US

Re: OpenSSL AES GCM vs CBC on APU3 vs Raspberry Pi 3

Post by JonM » May 9th, 2018, 11:08 pm

What are your results?
I ran the same tests last night. If you send your bar graph template I’ll create the same form. I am assuming it is something excel-ish.

This was run on an QOTOM 4 LAN Mini PC, Q190G4N-S08 with 4GB RAM and 64GB SSD, Intel Celeron J1900 processor, Quad core 2.0 GHz

Code: Select all

[root@ipfire ~]# openssl speed -evp aes-256-cbc
...
OpenSSL 1.1.0h  27 Mar 2018
...
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc      25938.89k    27962.79k    28653.16k    28,782.25k    28806.25k    28957.90k

Code: Select all

[root@ipfire ~]# openssl speed -evp aes-256-gcm
...
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-gcm      21482.07k    23956.22k    82562.99k    92,674.39k    95155.54k    95212.89k

Code: Select all

[root@ipfire ~]# openssl speed -evp camellia-256-cbc
...
type                 16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
camellia-256-cbc    27354.45k    46222.10k    56411.65k    59,657.22k    60473.83k    60659.03k
Production:
Image

Testing Raspi 3B+:
Image

kressd
Posts: 14
Joined: January 26th, 2018, 8:06 pm

Re: OpenSSL AES GCM vs CBC on APU3 vs Raspberry Pi 3

Post by kressd » May 10th, 2018, 6:12 am

Feel free do add your data to this public spreadsheet:
https://docs.google.com/spreadsheets/d/ ... sp=sharing

On my machines the camellia is really slow.
Image

minime
Posts: 20
Joined: October 29th, 2017, 4:49 pm

Re: OpenSSL Cyphers AES GCM vs CBC on APU3 and Raspberry Pi 3

Post by minime » May 13th, 2018, 3:04 pm

GCM looking good :-)
Image

Post Reply