From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Thu, 7 May 2015 09:03:37 +0200 (CEST) Received: by widdi4 with SMTP id di4so229837466wid.0 for ; Thu, 07 May 2015 00:03:36 -0700 (PDT) Message-ID: <554B0E46.7000102@gmail.com> Date: Thu, 07 May 2015 09:03:34 +0200 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] iv generation from third-party code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fraser Scott , dm-crypt@saout.de 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