From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cHCZef71S3mJ for ; Sat, 23 Mar 2013 15:48:20 +0100 (CET) Received: from v4.tansi.org (ns.km33513-03.keymachine.de [87.118.94.3]) by mail.saout.de (Postfix) with ESMTP for ; Sat, 23 Mar 2013 15:48:19 +0100 (CET) Received: from gatewagner.dyndns.org (84-74-164-49.dclient.hispeed.ch [84.74.164.49]) by v4.tansi.org (Postfix) with ESMTPA id 444EE1404001 for ; Sat, 23 Mar 2013 15:48:17 +0100 (CET) Date: Sat, 23 Mar 2013 15:48:16 +0100 From: Arno Wagner Message-ID: <20130323144816.GA7389@tansi.org> References: <1364017090.19617.140661208074749.347286A1@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dm-crypt] does luksDump guarantee header integrity? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On Sat, Mar 23, 2013 at 08:59:08AM -0500, Robert Nichols wrote: > On 03/23/2013 12:38 AM, hank wrote: > >Hi, > > > >I accidentally "formatted" an encrypted partition with mkfs.nilfs2 > >(incl. -K option). Luckily mkfs.nilfs2 normally only overwrites data > >after 1024 bytes from the start of the block device, so the LUKS header > >should have remained intact. > > The LUKS header, including the key material, is roughly a half Megabyte > in size. The key material, expanded and broken up into 4000 stripes for > each key slot, follows the 592-byte LUKS partition header (PHDR). Your > accidental formatting left the parameters in the PHDR and the > descriptors for first 6 key slots untouched, but overwrote the actual > key material. Without a backup of the entire ~.5MB LUKS header you > cannot obtain the master key, and your data is unrecoverable. Unfortunately, that is accuirate. Just to be sure, you can run the LUKS keyslot cheker included in the newer sources and found unter /cryptsetup-1.6.0/misc/keyslot_checker/. It has to be built separately (just call "make" in its directory) after installing cryptsetuo from the same package (or one that has the features the keyslot checker needs). It will check each in-use keyslot for overwritten areas. If there are any, that keyslot becomes unusable and unrecoverable. Arno -- Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718 ---- One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision. -- Bertrand Russell