All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] using a salt for encrypting blocks
@ 2010-12-27 16:10 octane indice
  2010-12-27 21:52 ` Arno Wagner
  0 siblings, 1 reply; 10+ messages in thread
From: octane indice @ 2010-12-27 16:10 UTC (permalink / raw)
  To: dm-crypt

Hello

I'm working with dm-crypt.
Basically, we have a key, which I call Master key, which is used to cipher
blocks (or sectors).
This master key is wrapped with another keys, the 8 slots, this is not the
point here.

Each block is then ciphered. the cipher mode is CBC, and each block has a
different IV. Today, the ESSIV is used, which means that the IV is derived
by the sector number and a hash of the master key. I'm OK with that.

So, this means that the same block of the same plaintext is ciphered the
same way. So if a file is unchanged, then the ciphered is unchanged.

Which means that an attacker could track the change of the ciphered blocks
and gain some (very little) knowledge, as the size of the document being
added to a encrypted partition.

My question is: can we avoid this? The answer is yes, we just have to use a
salt.
For example, for 512byte blocks, we could use 16bytes of salt for each block.

Which means that one block each 32 blocks stores the salt of the other
blocks. This way, it's possible to update all blocks and cipher them. Same
data, cipher is different.
I think we could have 
-performance issue, 
-decrease the size of 'usable' part of disk, 3% is used to store the salt,
which is acceptable.

but an attacker wouldn't be able to gain any information!

Any advice on that, or a reason why the salt is not used for encrypting blocks?

thanks

Envoyé avec Inmano, ma messagerie renversante et gratuite : http://www.inmano.com

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

end of thread, other threads:[~2010-12-30 12:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-27 16:10 [dm-crypt] using a salt for encrypting blocks octane indice
2010-12-27 21:52 ` Arno Wagner
2010-12-28  8:29   ` octane indice
2010-12-28 11:03     ` Milan Broz
2010-12-28 14:05       ` octane indice
2010-12-28 19:49         ` Milan Broz
2010-12-30 10:11           ` octane indice
2010-12-30 12:27             ` Arno Wagner
2010-12-28 13:32     ` Arno Wagner
2010-12-28 14:23       ` octane indice

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.