From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from amalthea.kjorling.se (amalthea.kjorling.se [IPv6:2a01:4f8:c0c:31d3::2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Tue, 7 Nov 2017 22:22:50 +0100 (CET) Received: from h-174-65.A328.priv.bahnhof.se (h-174-65.A328.priv.bahnhof.se [81.170.174.65]) by amalthea.kjorling.se (Postfix) with ESMTPS id C0EB414090F for ; Tue, 7 Nov 2017 21:12:47 +0000 (UTC) Received: from h-174-65.A328.priv.bahnhof.se (localhost [127.0.0.1]) by h-174-65.A328.priv.bahnhof.se (Postfix) with ESMTPS id 0C6991F8D for ; Tue, 7 Nov 2017 22:12:47 +0100 (CET) Date: Tue, 7 Nov 2017 21:12:45 +0000 From: Michael =?utf-8?B?S2rDtnJsaW5n?= Message-ID: <20171107211245.GC994@h-174-65.A328.priv.bahnhof.se> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [dm-crypt] Can I test for LUKS passphrase strength without formatting a device? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de On 7 Nov 2017 17:51 +0100, from jtulak@redhat.com (Jan Tulak): > Is it possible to test whether a passphrase is strong enough (and > luksFormat will accept it), without the need to really create a device > with this passphrase? I ask because I want to test the password before > I run a sequence of commands and I don't want them to fail in the > middle just because of a weak passphrase. Adding to Milan Broz's answer, you can always use a simple file (or a sparse file) as a backing device for a LUKS container. Doing so will also tell you that the utilities can understand all other options you're feeding them, which may be a consideration if you are providing custom settings (for example, hash algorithm, encryption algorithm, etc.). Just remember to close the container before you delete the file. -- Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se “People who think they know everything really annoy those of us who know we don’t.” (Bjarne Stroustrup)