* [dm-crypt] HDD sector size interrelated with dm-crypt?
@ 2011-03-17 14:29 Lars Täuber
2011-03-17 15:03 ` Arno Wagner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lars Täuber @ 2011-03-17 14:29 UTC (permalink / raw)
To: dm-crypt
Hi there,
does dm-crypt depend in any way on the sector size of the block device to be encrypted?
So the real question is: Does dm-crypt work as expected on a 4KiB sector sized SATA drive when there is no translation to 512B sector size? Are there options that must be taken then?
I've read somewhere that the encryption algorithm work with 512B block sizes.
Could this be changed to 4KiB block sizes to gain speed with the upcoming devices?
Thanks
Lars
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] HDD sector size interrelated with dm-crypt?
2011-03-17 14:29 [dm-crypt] HDD sector size interrelated with dm-crypt? Lars Täuber
@ 2011-03-17 15:03 ` Arno Wagner
2011-03-17 15:04 ` Christoph Anton Mitterer
2011-03-17 15:08 ` Milan Broz
2 siblings, 0 replies; 4+ messages in thread
From: Arno Wagner @ 2011-03-17 15:03 UTC (permalink / raw)
To: dm-crypt
Should not matter. Also a speed increase is unlikely,
disks are still dog-slow compared to things the CPU does, like
encrypting sectors. They are not written/read individually
anyways in most cases.
Arno
On Thu, Mar 17, 2011 at 03:29:18PM +0100, Lars T??uber wrote:
> Hi there,
>
> does dm-crypt depend in any way on the sector size of the block device to be encrypted?
> So the real question is: Does dm-crypt work as expected on a 4KiB sector sized SATA drive when there is no translation to 512B sector size? Are there options that must be taken then?
>
> I've read somewhere that the encryption algorithm work with 512B block sizes.
> Could this be changed to 4KiB block sizes to gain speed with the upcoming devices?
>
> Thanks
> Lars
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
>
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name
GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] HDD sector size interrelated with dm-crypt?
2011-03-17 14:29 [dm-crypt] HDD sector size interrelated with dm-crypt? Lars Täuber
2011-03-17 15:03 ` Arno Wagner
@ 2011-03-17 15:04 ` Christoph Anton Mitterer
2011-03-17 15:08 ` Milan Broz
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Anton Mitterer @ 2011-03-17 15:04 UTC (permalink / raw)
To: dm-crypt
Hi.
The definite source of info here is Milan but I guess:
Quoting Lars Täuber <taeuber@bbaw.de>:
> So the real question is: Does dm-crypt work as expected on a 4KiB
> sector sized SATA drive when there is no translation to 512B sector
> size? Are there options that must be taken then?
It uses 512B sectors for the encryption, but AFAIK it optimises all
reads/writes depending on the device topology.
> I've read somewhere that the encryption algorithm work with 512B block sizes.
> Could this be changed to 4KiB block sizes to gain speed with the
> upcoming devices?
No,.. and (although I'm not sure whether 4KiB would already be
problematic) such high block sizes can cause security issues with some
cipher modes (i.e. XTS).
Cheers,
Chris.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dm-crypt] HDD sector size interrelated with dm-crypt?
2011-03-17 14:29 [dm-crypt] HDD sector size interrelated with dm-crypt? Lars Täuber
2011-03-17 15:03 ` Arno Wagner
2011-03-17 15:04 ` Christoph Anton Mitterer
@ 2011-03-17 15:08 ` Milan Broz
2 siblings, 0 replies; 4+ messages in thread
From: Milan Broz @ 2011-03-17 15:08 UTC (permalink / raw)
To: dm-crypt
On 03/17/2011 03:29 PM, Lars Täuber wrote:
> does dm-crypt depend in any way on the sector size of the block
> device to be encrypted? So the real question is: Does dm-crypt work
> as expected on a 4KiB sector sized SATA drive when there is no
> translation to 512B sector size? Are there options that must be taken
> then?
>
> I've read somewhere that the encryption algorithm work with 512B
> block sizes. Could this be changed to 4KiB block sizes to gain speed
> with the upcoming devices?
dmcrypt always uses 512 bytes sector for encryption, it cannot be changed
easily to 4k sectors (internal block layer bio structure and device-mapper
always counts in 512 sectors).
I do not think that with accelerated encryption like AES-NI the speed up
would be so visible.
But the whole stack (including device-mapper) properly aligns
to drive sector size, so it will work with 4k drives without problems.
I think many people is already using it on true 4k drives.
In fact mapping sector is the block layer problem, device-mapper targets
just propagates block size information up the stack.
Milan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-17 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17 14:29 [dm-crypt] HDD sector size interrelated with dm-crypt? Lars Täuber
2011-03-17 15:03 ` Arno Wagner
2011-03-17 15:04 ` Christoph Anton Mitterer
2011-03-17 15:08 ` Milan Broz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox