Re: [openpgp] Partial review of the crypto refresh

Paul Wouters <paul@nohats.ca> Fri, 25 November 2022 17:16 UTC

Return-Path: <paul@nohats.ca>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DE8B2C1522C1 for <openpgp@ietfa.amsl.com>; Fri, 25 Nov 2022 09:16:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nohats.ca
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01RvVXnWifQu for <openpgp@ietfa.amsl.com>; Fri, 25 Nov 2022 09:15:56 -0800 (PST)
Received: from mx.nohats.ca (mx.nohats.ca [IPv6:2a03:6000:1004:1::85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5C855C14CE28 for <openpgp@ietf.org>; Fri, 25 Nov 2022 09:15:56 -0800 (PST)
Received: from localhost (localhost [IPv6:::1]) by mx.nohats.ca (Postfix) with ESMTP id 4NJhMs29Cmz1Hm; Fri, 25 Nov 2022 18:15:53 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nohats.ca; s=default; t=1669396553; bh=Fz6M3aPXUsC3aQsJ5H6bsRAZpQPoT5Iff4DL79avc5o=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=YMvVIJ/iRncfdNRhoTXEz2y12V/8ILT+MJ9ycrYlDOExLTnWVDhz/x2qfSgYWBpJO o8IndRLOJSP+KYniWT2253rjTzAVgqDH/G38FSDAjVOzwFdDcpmuaMVN1I8I5Ek2Ug EhFbojbc7CPtWPZuRADzzPCMBTRACGQZDYy4v/xg=
X-Virus-Scanned: amavisd-new at mx.nohats.ca
Received: from mx.nohats.ca ([IPv6:::1]) by localhost (mx.nohats.ca [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id GmTLxSAY6sCs; Fri, 25 Nov 2022 18:15:52 +0100 (CET)
Received: from bofh.nohats.ca (bofh.nohats.ca [193.110.157.194]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.nohats.ca (Postfix) with ESMTPS; Fri, 25 Nov 2022 18:15:52 +0100 (CET)
Received: by bofh.nohats.ca (Postfix, from userid 1000) id 59BCE411F7B; Fri, 25 Nov 2022 12:15:51 -0500 (EST)
Received: from localhost (localhost [127.0.0.1]) by bofh.nohats.ca (Postfix) with ESMTP id 58BF0411F7A; Fri, 25 Nov 2022 12:15:51 -0500 (EST)
Date: Fri, 25 Nov 2022 12:15:51 -0500
From: Paul Wouters <paul@nohats.ca>
To: Marcus Brinkmann <marcus.brinkmann=40rub.de@dmarc.ietf.org>
cc: Daniel Huigens <d.huigens=40protonmail.com@dmarc.ietf.org>, IETF OpenPGP WG <openpgp@ietf.org>
In-Reply-To: <3E09FE42-EA91-4F43-804C-2718B8383F53@rub.de>
Message-ID: <d1276cfa-e060-a8f2-6266-cade9bc53c22@nohats.ca>
References: <HniDSkOrqQhzJeIb0B_7yLgQjsIDVZZdGPnwttTdfpk4LCN7B4Nh1J6xzv1eZIV-OR6UemykSEdao4pWe5gFfr5BUWhEfHX8mdj6Jhla6xg=@protonmail.com> <3E09FE42-EA91-4F43-804C-2718B8383F53@rub.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/Y-SiqUSBnlEgPA-d9hcjpH2UdPY>
Subject: Re: [openpgp] Partial review of the crypto refresh
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 25 Nov 2022 17:16:01 -0000

On Fri, 25 Nov 2022, Marcus Brinkmann wrote:

> The count consists of a "mantisse" between 16 and 31, and an exponent (to basis 2) between 6 and 21. The total count is mantisse*2^exponent, which is a
> number between 1024 and 65,011,712. With a blocksize of 512 bits (SHA-1, SHA-2), we have to divide by 64, giving an iteration count of up to approx. 1M.
> Computing SHA-1 can be done very quickly using standard CPUs (~100MH/s), GPUs (~20 GH/s), and dedicated ASICs (such as used for Bitcoin mining, total
> network capacity ~160 Million TeraHash/s!). We can now compute how hard it is to brute-force a PGP password. With a single GPU (such as an RTX3090 with 23
> GH/s) and 1M H/Password, we are looking at 2.3M password guesses per second. A stronger hash function only reduces this by a small factor (SHA-256: Faktor
> 2.3, SHA-512: Faktor 7), but really the only viable option here is a much stronger password. Using a uniformly distributed random password from a
> 64-letter alphabet (a-zA-Z0-9+/) and a password length of 14 characters (= 2^84 passwords), you can pretty much ignore the PGP S2K settings for now
> (ignoring QC).
> 
> Suggestion:
> 
>   If Argon2 is not available, Iterated and Salted S2K MAY be used if
>   care is taken to use a high octet count and a strong passphrase.
>   However, this method does not provide memory-hardness, unlike Argon2.

Any reason not to suggest 14 instead of "high" ? or say "high octect (14
or more) ?

Paul