From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8EE2C433DB for ; Wed, 6 Jan 2021 11:18:26 +0000 (UTC) Received: from mail.server123.net (mail.server123.net [78.46.64.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0B0822B37 for ; Wed, 6 Jan 2021 11:18:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0B0822B37 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=kngnt.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-crypt-bounces@saout.de X-Virus-Scanned: amavisd-new at saout.de Authentication-Results: mail.server123.net (amavisd-new); dkim=pass (2048-bit key) header.d=kngnt.org Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.54.42.167; helo=smtpq4.tb.mail.iss.as9143.net; envelope-from=felix@kngnt.org; receiver= Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.server123.net (Postfix) with ESMTPS for ; Wed, 6 Jan 2021 12:17:33 +0100 (CET) Received: from [212.54.42.110] (helo=smtp7.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx6on-0008Eg-9C for dm-crypt@saout.de; Wed, 06 Jan 2021 12:17:33 +0100 Received: from 80-115-99-116.cable.dynamic.v4.ziggo.nl ([80.115.99.116] helo=mail.kngnt.org) by smtp7.tb.mail.iss.as9143.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kx6om-00CMXQ-MS for dm-crypt@saout.de; Wed, 06 Jan 2021 12:17:32 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kngnt.org; s=mail; t=1609931851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kD+dqaJ52uy/EPnkGnOZTPHMkBBZWLgGY3Zmy9K87F0=; b=7SRo2UbfNgqr943pNfw+hb77ePqbu+tiI80wMC4ceN448sXzN9ei/5oUhp0xJfjd/GI+Pq Vy7WsRmgLVhiTNOjsWcBnLuarSXSy+Sr6y0lp/RNQAWpF0G7bbQVskUHqbfWW+p1Sb8CYV cCC0STGJehqL1NtFF4Nbm6jzk14JjrVtWsTZAAwdLrkXP1beBZdsW/c8Z7BeM3u9lgW5/k b+c5GHvZ2ecxqTr1uAhEFQA1AkEPu9ZnJh9qgdEipcKXNdoC7aVHXZu1IRNdKfzZoAmo4j HWhcKVTBIQ2UlxVYlplaGGa3Erh69kxmtmPjBJ6n9PoyftERpUc9EFeAmw62FA== MIME-Version: 1.0 Date: Wed, 06 Jan 2021 12:17:30 +0100 From: Felix Rubio To: dm-crypt@saout.de In-Reply-To: <3674619b2202e99b31fac7043e6edba5@kngnt.org> References: <20210106104746.GA3386@tansi.org> <3674619b2202e99b31fac7043e6edba5@kngnt.org> Message-ID: <4eecfe4743d91d6cc565a276776d1020@kngnt.org> X-Sender: felix@kngnt.org X-SourceIP: 80.115.99.116 X-Authenticated-Sender: f.rubiodalmau@ziggo.nl (via SMTP) X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.4 cv=Ff+JeLy6 c=1 sm=1 tr=0 ts=5ff59c4c a=L5q10J0BAxueQzk5LW0IQA==:17 a=9+rZDBEiDlHhcck0kWbJtElFXBc=:19 a=IkcTkHD0fZMA:10 a=EmqxpYm9HcoA:10 a=WxEJytdoAAAA:8 a=tuoTK42FULtPWEmRtbkA:9 a=QEXdDO2ut3YA:10 a=Pjb4ukjMmGjbsrBi06EW:22 X-Ziggo-Spam-Status: No Subject: Re: [dm-crypt] length of keyfiles X-BeenThere: dm-crypt@saout.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: dm-crypt-bounces@saout.de Sender: "dm-crypt" Follow up question: right now I am generating the 4 kB keyfile using openssl rand 4096. Should the quality of the key, then, be the same if doing dd if=/dev/random bs=64 count=1? Thank you! Felix On 2021-01-06 12:08, Felix Rubio wrote: > Thank you for your answer Arno... and for confirming that I should > finally get rid of those double density floppy disks and reader :-P > > Regards! > Felix > > On 2021-01-06 11:47, Arno Wagner wrote: >> Hi Felix, >> >> I assume we are talking LUKS here, plain mode is different. >> >> The longer length is both convenience and helps if you >> use low-entropy input. The keyfile does not actually >> hold a key (LUKS mode), but a passphrase. Passphrases >> get hashed, and once you have maximum entropy, you >> cannot get more. I would need to look up what length >> is actually used, but it does not depend on the lenght >> of the encryption key. That one is stored in the anti-forensic >> stripes, protected with the hash from that passphrase. >> >> So, to make this short, if you use LUKS with a keyfile, >> putting in more entropy than used is meaningless. >> If your random data is from /dev/random or (properly >> initialized) /dev/urandom, 64 bytes are more than enough. >> >> Also, the differences between an 8kB passphrase and a >> 64B one in execution time should not be noticeable at all. >> Unless you read it from floppy disk ;-) >> >> Regards, >> Arno >> >> >> On Wed, Jan 06, 2021 at 10:17:22 CET, Felix Rubio wrote: >>> Hi everybody, >>> >>> I have seen that keyfiles can be used in cryptsetup up to 8 kB, but >>> internally the master key is 512 bits at max. Is there any >>> recommendation >>> / increased security by using a random sequence of 8 kB w.r.t., let's >>> say, >>> one of just 64 bytes? >>> >>> I understand that using one of 8kB will require more time than one of >>> 64 B >>> when unlocking the volume, but... is the former really that much >>> more >>> secure than the latter? >>> >>> Regards! >>> Felix >>> _______________________________________________ >>> dm-crypt mailing list >>> dm-crypt@saout.de >>> https://www.saout.de/mailman/listinfo/dm-crypt > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > https://www.saout.de/mailman/listinfo/dm-crypt _______________________________________________ dm-crypt mailing list dm-crypt@saout.de https://www.saout.de/mailman/listinfo/dm-crypt