Return-Path: Received: from nekare.kjorling.se (nekare.kjorling.se [89.221.249.175]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Sat, 26 Sep 2015 00:24:20 +0200 (CEST) Received: from yeono.kjorling.se (h-9-65.a328.priv.bahnhof.se [46.59.9.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "yeono", Issuer "yeono" (not verified)) by nekare.kjorling.se (Postfix) with ESMTPS id 9CA71114064 for ; Fri, 25 Sep 2015 22:24:12 +0000 (UTC) Received: from yeono.kjorling.se (localhost [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by yeono (Postfix) with ESMTPS id 5A6921B6A for ; Sat, 26 Sep 2015 00:24:12 +0200 (CEST) Date: Fri, 25 Sep 2015 22:24:10 +0000 From: Michael =?utf-8?B?S2rDtnJsaW5n?= Message-ID: <20150925222410.GD14230@yeono.kjorling.se> References: <20150925173316.GA32719@manjaro.chello.hu> <20150925194446.GZ14230@yeono.kjorling.se> <20150925214834.GA5103@manjaro.chello.hu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150925214834.GA5103@manjaro.chello.hu> Subject: Re: [dm-crypt] Basics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 25 Sep 2015 23:48 +0200, from promike1987@gmail.com (Mike Nagie): > I'll probably use this command: > cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 (or > an other one I haven't decided yet) --iter-time (about) 2000 (I'm > generous, about 2 secs seems fine) --use-random Looks reasonable, except you forgot to pass "luksFormat" and a device to cryptsetup, so it won't know what to do with the rest. :-) (Oh, and note that as discussed here previously, the problems with SHA-1 leading to its current sunsetting don't affect its usage in LUKS. In fact, I'd expect that for LUKS' purposes, even MD5 would still be a secure choice, if perhaps somewhat... unusual.) If you want additional security against forensic analysis, a good strategy might be to set up a LUKS container with a throwaway passphrase and key, and then "dd" or "ddrescue" zeroes into it, then create your real LUKS container in place of the throwaway one. That will ensure that any remnants of old data are gone, and will prevent forensic analysis based around which parts of the container appear to hold encrypted data. In other words: cryptsetup luksFormat /dev/something cryptsetup luksOpen /dev/something dummy dd if=/dev/zero of=/dev/mapper/dummy bs=1M cryptsetup luksClose dummy cryptsetup luksFormat ... the real deal goes here ... cryptsetup luksOpen /dev/something the_real_deal ... now make a file system on /dev/mapper/the_real_deal and start using it ... Note that the "dd" will take many hours to complete on large drives. Given that you have a 1 TiB drive and assuming it's a 7200 rpm drive, I would expect that to take about 3-4 hours if you give LUKS the whole drive and assuming that there are no other disk accesses going on concurrently. Using GNU ddrescue instead will provide you with a nice, continually updated progress report, but effectively does the same thing. The all-zeroes will be encrypted and on the next luksFormat the key will be overwritten, resulting in unused portions of the drive looking like random garbage to anyone looking. -- Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se OpenPGP B501AC6429EF4514 https://michael.kjorling.se/public-keys/pgp “People who think they know everything really annoy those of us who know we don’t.” (Bjarne Stroustrup)