linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best mode of operation for AES-128 on x86_64?
@ 2010-05-13  0:07 Pedro Ribeiro
  2010-05-13  1:25 ` Zdenek Kaspar
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Ribeiro @ 2010-05-13  0:07 UTC (permalink / raw)
  To: linux-crypto

Hello,

I'm currently using a LUKS volume which contains an encrypted LVM with
itself contains my root, home and swap partitions.

My processor is a core 2 duo 2.26ghz and I'm running x86_64. I'm using
cbc-essiv:sha256 and AES with 128 bit key.

I was wondering, is CBC mode the fastest?
I have a fast processor and can't really complain about the read/write
speed, but I was wondering if I could gain any speed from counter mode
or other mode.

I would also like to ask what are the real world speed gains when
using AES-NI? Can anyone please point me to some benchmarks, if there
are any?

Thank for the help,
Pedro

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Best mode of operation for AES-128 on x86_64?
  2010-05-13  0:07 Best mode of operation for AES-128 on x86_64? Pedro Ribeiro
@ 2010-05-13  1:25 ` Zdenek Kaspar
  0 siblings, 0 replies; 2+ messages in thread
From: Zdenek Kaspar @ 2010-05-13  1:25 UTC (permalink / raw)
  To: linux-crypto

Dne 13.5.2010 2:07, Pedro Ribeiro napsal(a):
> Hello,
> 
> I'm currently using a LUKS volume which contains an encrypted LVM with
> itself contains my root, home and swap partitions.
> 
> My processor is a core 2 duo 2.26ghz and I'm running x86_64. I'm using
> cbc-essiv:sha256 and AES with 128 bit key.
> 
> I was wondering, is CBC mode the fastest?
> I have a fast processor and can't really complain about the read/write
> speed, but I was wondering if I could gain any speed from counter mode
> or other mode.
> 
> I would also like to ask what are the real world speed gains when
> using AES-NI? Can anyone please point me to some benchmarks, if there
> are any?
> 
> Thank for the help,
> Pedro

Hi Pedro, you can get better speeds with lower security. But before you
change your working scheme (which is good imo, I prefer XTS..) do a
quick test and compare if it's worth the pain :) ie:

$ hdparm -t /dev/sda1
$ hdparm -t /dev/mapper/sda1_crypt

Here are some numbers you should check -
http://blog.wpkg.org/2009/04/23/cipher-benchmark-for-dm-crypt-luks

My guess for single drive you're fine with your setup..

>From measuring specific server-loads and the impact on CPU frequency
scaling with cpufreq-ondemand as governor I would recommend lowering
default threshold value (95) for this load on desktop/server. ie:

$ echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

HTH, Z.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-13  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13  0:07 Best mode of operation for AES-128 on x86_64? Pedro Ribeiro
2010-05-13  1:25 ` Zdenek Kaspar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).