-1

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?

schroeder
  • 123,438
  • 55
  • 284
  • 319
Lokanath
  • 163
  • 1
  • 3

2 Answers2

7

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.

StackzOfZtuff
  • 17,783
  • 1
  • 50
  • 86
  • Thank you, one of the software(AIDA64) gives me 3526MBps for i5 cpu, is it accurate – Lokanath Jun 20 '15 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. – deviantfan Jun 20 '15 at 13:22
  • The openssl utility does not necessarily use AES-NI, which makes a massive difference. – forest Dec 26 '17 at 14:03
  • Why in this publication https://www.cse.wustl.edu/~jain/cse567-06/ftp/encryption_perf/index.html, author received different results - about 50 MB/s? – Tom Apr 24 '21 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. – StackzOfZtuff Apr 26 '21 at 07:32
2

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 :)

Andrey
  • 2,226
  • 16
  • 14