Subject: Re: [Uta] AES-128 vs. AES-256

From: Manuel Pégourié-Gonnard <[email-masked]>
Date: Tue, 02 Dec 2014 15:26:43 +0100

On 20/11/2014 09:45, Viktor Dukhovni wrote:
> As for NSA, they originally specified AES-192 for TOP
> SECRET, but this never became popular in hardware (Intel AES-NI,
> ...) so the suite-B spec got changed to AES-256.
> 
I'm not sure what you mean here. Intel's AES-NI supports AES-192 just as well as
AES-128 and AES-256. (It provides the round functions, and assistance for key
expansion. How much you expand your key and how many rounds you do is up to
you.) There are probably hardware implementations that allow only 128 or 256,
but AES-NI is not one of them.

Manuel.

---

From: Kurt Roeckx <[email-masked]>
Date: Wed, 3 Dec 2014 01:21:43 +0100

On Wed, Nov 19, 2014 at 11:59:50AM -0500, joe wrote:
> But to get to your point on the performance "hit", when I benchmarked
> AES-128 vs. AES-256 in OpenSSL with the openssl speed command, I just 
> didn't see a huge level of pain:
> 
> The 'numbers' are in 1000s of bytes per second processed.
> 
> type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
> aes-128 cbc     110889.82k   120032.96k   123677.01k   125399.38k   125501.99k
> aes-256 cbc      81992.44k    87824.68k    88246.53k    88979.11k    89647.79k

Please note that you're not using the evp interface there, and so
might for instance not be using AES-NI even your hardware has
support for it.

On my box without -evp:
aes-128 cbc        110625.76k   119842.40k   123058.01k   123550.72k   124364.97k
aes-192 cbc         94271.34k   101065.96k   102279.08k   102773.76k   103331.53k
aes-256 cbc         79115.51k    86396.01k    87845.42k    88026.11k    88124.07k
rc4                420860.77k   712188.45k   823340.46k   860657.32k   871604.14k
camellia-128 cbc   101524.14k   154703.91k   175746.65k   181108.05k   182960.13k
camellia-192 cbc    88263.40k   121438.20k   132575.74k   136623.10k   137639.25k
camellia-256 cbc    88055.58k   121427.14k   132664.66k   136543.57k   138179.04k

With -evp:
aes-128-cbc        665401.82k   705108.14k   725408.17k   728927.91k   731252.44k
aes-192-cbc        559985.05k   597358.49k   604821.50k   601399.31k   608561.83k
aes-256-cbc        482553.42k   513640.24k   520753.75k   521101.31k   524263.34k
rc4                387369.55k   677893.89k   816945.83k   856821.76k   869501.61k
camellia-128-cbc    96466.97k   151111.64k   174039.13k   178602.33k   182517.21k
camellia-192-cbc    83364.92k   119781.63k   132168.28k   136482.47k   137655.64k
camellia-256-cbc    83568.77k   119611.78k   132230.49k   136427.18k   137620.14k

Kurt