[dm-crypt] iv generation from third-party code

Milan Broz gmazyland at gmail.com
Thu May 7 09:03:34 CEST 2015


On 05/06/2015 10:28 PM, Fraser Scott wrote:
> 
> 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.

Do you have some pointer to official source code modified by WD?

For what products it was used? (WD have sometimes different chips even
in the same product line.)

I remember I tried to find some documentation for WD encrypted drives
and there was nothing available.

> 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.

If there is some test image and it is really only about IV, then
it should be relatively simple.
(And maybe it would be nice to include it upstream as well.)

If they are using some modified LRW mode, it is much more worse
(you will have to write own crypto mode implementation).

Milan


More information about the dm-crypt mailing list