Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Mon, 25 Nov 2019 16:27:52 +0100 (CET) Received: by mail-wm1-x32c.google.com with SMTP id t26so16431760wmi.4 for ; Mon, 25 Nov 2019 07:27:52 -0800 (PST) References: <62fc7ef6-e289-b268-17d5-6ac1df2f3904@gmx.ch> <39693781-1472-1aeb-5005-5141c02c6746@gmx.ch> <4c3b11fc-783c-e58f-681d-7acee12376d7@gmail.com> <5DDBF073.1050409@gmx.ch> From: Milan Broz Message-ID: <7644c056-b962-1730-2ef4-66a81f3a8e7f@gmail.com> Date: Mon, 25 Nov 2019 16:27:50 +0100 MIME-Version: 1.0 In-Reply-To: <5DDBF073.1050409@gmx.ch> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] detached LUKS header size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fourhundred Thecat <400thecat@gmx.ch>, dm-crypt@saout.de On 25/11/2019 16:17, Fourhundred Thecat wrote: >> On 2019-11-25 14:55, Milan Broz wrote: > > Hi Milan, > > just to make sure there is no misunderstanding: > >> Then there is alignment, so the real data offset is aligned by default to >> the 1MB boundary. >> >> With this padding, header size is for 128bit key 2MB, for 256/512 key 4MB. > > I am actually using 512 bit key: > > --cipher aes-xts-plain64 --key-size 512 --hash sha512 > > so it would seem I need 4MB header for luks1 with 512 key > >> Yes. For reference: for 128bit it is 528384 bytes, for 256bit 1052672 >> bytes, >> for 512bit (2x256bits in XTS mode) it is 2068480 bytes. > > now I am confused. 2068480 is less than 2MB. So when aligned to 1MB > boundary, 2MB would be enough for luks1 with 512 key. > > So is it 2MB or 4MB ? Ah, yes, sorry, it is 2MB. (The real used space is 4040 512-byte sectors.) Milan