4

Is there any way to check how fast an Ubuntu 16.04 machine can do AES ciphering?

I'm not interesting in comparing AES levels, but am just curious to see the cost quantified in some way.

Since it's used for things like whole-disk encryption and wireless keyboards,I know it must be extremely cheap. Still, I'm curious to see some numbers.

I don't see it mentioned in the OpenSSL speed library. Is there some other tool I can use or download?

7

While it's not listed in the man page of openssl speed, it can still measure aes speed (on my machine at least). Running openssl speed {some random value} will print an error message that includes the list of ciphers it can test.

For me (on a debian), this includes aes-128-cbc, aes-192-cbc, aes-256-cbc, aes-128-ige, aes-192-ige and aes-256-ige.

If you want to test the speed of disk encryption algorithms, you can also use cryptsetup benchmark, which will show you the speed of different encryption algorithms and modes in bytes/second. You'll notice that the mode can influence speed quite a bit (on my machine, aes-xts is three times as fast as aes-cbc).

As @txtechhelp noted, the results of those tests are highly dependent on the machine on which you run them. Some processors have an AES instruction set which can allow massive improvements in speed.

On my system (i7 4GHz) the results of cryptsetup benchmark gives AES256-CBC at about 600MiB/s for encryption and 2.1GiB/s for decryption, and AES256-XTS (when using XTS, the key is split in half so you have to look at the 512bits key result for AES256) at about 1.8GiB/s for encryption and 2GiB/s for decryption. As you can see, that's much faster than the speed of even a good SSD, and certainly a lot faster than even an excellent typist.

| improve this answer | |
  • 2
    It should be noted that processor type can greatly affect the speed of AES operations. Some processors have an AES instruction set built in which can allow massive improvements in speed (that is, the bottleneck is usually the disk when decrypting/encrypting and not the CPU/algorithm). – txtechhelp Jul 9 '16 at 20:19
  • @txtechhelp Good point. Mind if I add that to my answer? – user2313067 Jul 9 '16 at 20:21
  • Indeed! As a side note to that, on my i7 2.2GHz, encrypting/decrypting a 500MB buffer goes at about 1.2GB/s for straight AES (AES-256). – txtechhelp Jul 9 '16 at 21:14
  • Yep, you're right! – Louis Waweru Jul 11 '16 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.