All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] iv generation from third-party code
@ 2015-05-06 20:28 Fraser Scott
  2015-05-07  6:40 ` Arno Wagner
  2015-05-07  7:03 ` Milan Broz
  0 siblings, 2 replies; 7+ messages in thread
From: Fraser Scott @ 2015-05-06 20:28 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1224 bytes --]

Hi all,

I had a Western Digital My Book World Edition which died a few years ago.
My wife now wants the photos that were on it :)

The good news is, the hard disk is fine. The bad news is that I used the
hardware assisted encryption on the data partition.

WD make the source code available, so I've been poking around. Thanks to
help from the peeps on ##crypto (freenode), it seems clear that the custom
device mapper module isn't using any keys store on a chip etc, it is just
using hardware for speed. It looks like it is using AES in LRW mode but
uses some sort of custom IV tweaking.

What are my chance of "porting" the IV stuff from the module to a clean
dm-crypt.c so that I can do the AES decryption in software? Given that I
don't know much C, or know much about kernel development or dm-crypt? ;) In
the meantime I am trying to source some replacement hardware.

The module was called as follows:

# echo 0 $(cat /sys/block/md4/size)  ox-crypt hexkey hexiv 0 /dev/md4 0 |
dmsetup create dmmd4

(I have the key and IV)

and can be viewed here:

https://gist.github.com/zeroXten/be5322ee4a1000c0c7fc

My attempt so far can be seen here:

https://gist.github.com/zeroXten/0ba59291f05aa5a0f513

Many thanks!
-Fraser

[-- Attachment #2: Type: text/html, Size: 1741 bytes --]

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

end of thread, other threads:[~2015-05-07 10:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 20:28 [dm-crypt] iv generation from third-party code Fraser Scott
2015-05-07  6:40 ` Arno Wagner
2015-05-07  8:12   ` Fraser Scott
2015-05-07  9:29     ` Arno Wagner
2015-05-07  9:36       ` Fraser Scott
2015-05-07 10:09         ` Arno Wagner
2015-05-07  7:03 ` Milan Broz

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.