Return-Path: <0x14@openmailbox.org> Received: from mail.openmailbox.org (mail.openmailbox.org [62.4.1.34]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 1 Dec 2014 04:02:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id 54C6C2E0326 for ; Mon, 1 Dec 2014 03:54:21 +0100 (CET) Received: from mail.openmailbox.org ([62.4.1.34]) by localhost (mail.openmailbox.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KwXh3VlbZ1xs for ; Mon, 1 Dec 2014 03:54:19 +0100 (CET) Received: from www.openmailbox.org (localhost [127.0.0.1]) by mail.openmailbox.org (Postfix) with ESMTP id C0B662E0246 for ; Mon, 1 Dec 2014 03:54:19 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 01 Dec 2014 02:54:19 +0000 From: 0x14@openmailbox.org Message-ID: Subject: [dm-crypt] Pass+keyfile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Hi there, is this construction secure? Assuming "keyfile" is a file and "/dev/device" is a block device, both made with /dev/urandom. cryptsetup open --hash=sha512 --cipher=aes-xts-plain64 --type=plain keyfile keyfile_tmp && cat /dev/mapper/keyfile_tmp | \ cryptsetup open --hash=sha512 --cipher=aes-xts-plain64 --type=plain --key-file=- /dev/device cryptodevice && \ cryptsetup close keyfile_tmp && mount /dev/mapper/cryptodevice /media/cryptodevice The goal is to use pass+keyfile to decrypt storage. I put it in a script and it works as it should at a glance. Are there alternatives or improvements? Stupid errors maybe? Thanks.