What is the time taken by an AES Encryption algorithm, with a key of 128 bits, operating on a normal computer (say with Intel i7) and what will be the impact be on the time if I wish to use a 256 bit key?
-
1define "normal computer"– schroeder ♦Commented Jun 20, 2015 at 18:31
-
Normal computer in the sense consists some standard hardware which is virus free, normal behavior– LokanathCommented Jun 20, 2015 at 18:32
-
2I'm not sure how a virus would affect the algorithm. "Standard Hardware" is just as vague as "normal computer".– schroeder ♦Commented Jun 20, 2015 at 18:36
-
Wow, chill out, am new here, but am quite sure a virus can affect algorithms– LokanathCommented Jun 20, 2015 at 18:38
2 Answers
Roughly: For one i7-4750HQ core: 700MByte/s vs. 500MByte/s.
Source: https://calomel.org/aesni_ssl_performance.html
I suggest you check on your target hardware with the
openssl speed
command.
-
1Thank you, one of the software(AIDA64) gives me 3526MBps for i5 cpu, is it accurate– LokanathCommented Jun 20, 2015 at 11:39
-
@user78766 Maybe? Do you understand that even on your computer, each test will give you a different result? Benchmarking which makes sense can´t be done with one measurement. Commented Jun 20, 2015 at 13:22
-
The openssl utility does not necessarily use AES-NI, which makes a massive difference.– forestCommented Dec 26, 2017 at 14:03
-
Why in this publication cse.wustl.edu/~jain/cse567-06/ftp/encryption_perf/index.html, author received different results - about 50 MB/s?– TomCommented Apr 24, 2021 at 12:46
-
1@Tom: That seems to be from before the times of the fast "AES-NI" instruction set. He is using a Pentium 4. That was discontinued in 2008. Same year that AES-NI was first introduced. I I guess P4 didn't have it yet. Commented Apr 26, 2021 at 7:32
If you are wondering where that difference in encryption/decryption speed comes from, it's quite easy: AES uses different number of encryption rounds depending on key length.
For 128 bit keys it does 10 rounds, for 192 bit keys it does 12 rounds and for 256 bit keys it does 14 rounds.
So, AES-256 will typically be 40% slower than AES-128 (provided that encryption speed is bounded by CPU and not I/O). Note that this aligns perfectly with benchmarks provided by @StackzOfZtuff :)