dm crypt: make wipe message also wipe essiv key
commit80b337ebf9ff4e06cd4185b31d8972193a985262
authorMilan Broz <mbroz@redhat.com>
Thu, 10 Dec 2009 23:51:57 +0000 (10 23:51 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:04 +0000 (18 14:05 -0800)
tree4beb70fb9ae3e0fff251f01c7b5c2a21d12e2e4d
parent7d41627824496f9c69ab2da972a72521ebeebf7a
dm crypt: make wipe message also wipe essiv key

commit 542da317668c35036e8471822a564b609d05af66 upstream.

The "wipe key" message is used to wipe the volume key from memory
temporarily, for example when suspending to RAM.

But the initialisation vector in ESSIV mode is calculated from the
hashed volume key, so the wipe message should wipe this IV key too and
reinitialise it when the volume key is reinstated.

This patch adds an IV wipe method called from a wipe message callback.
ESSIV is then reinitialised using the init function added by the
last patch.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/md/dm-crypt.c