Re: [openpgp] Memory requirement for Argon2 (draft-06, sec 3.7.1.4)

Justus Winter <justus@sequoia-pgp.org> Thu, 21 July 2022 16:55 UTC

Return-Path: <justus@sequoia-pgp.org>
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 88EFCC14F606 for <openpgp@ietfa.amsl.com>; Thu, 21 Jul 2022 09:55:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
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 xaf_J1siiZ93 for <openpgp@ietfa.amsl.com>; Thu, 21 Jul 2022 09:55:44 -0700 (PDT)
Received: from harrington.uberspace.de (harrington.uberspace.de [185.26.156.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 13533C13C515 for <openpgp@ietf.org>; Thu, 21 Jul 2022 09:55:42 -0700 (PDT)
Received: (qmail 13152 invoked by uid 500); 21 Jul 2022 16:55:41 -0000
Authentication-Results: harrington.uberspace.de; auth=pass (plain)
From: Justus Winter <justus@sequoia-pgp.org>
To: Bruce Walzer <bwalzer@59.ca>, Daniel Huigens <d.huigens@protonmail.com>
Cc: openpgp@ietf.org
In-Reply-To: <YtlwBsk5qGIhEl7e@ohm.59.ca>
References: <YtHYPyDPY7nm5iSW@ohm.59.ca> <21Rcis4rNky_9wwR_P8GouVhsG9epEjx8lWh2xhTnpj2eTm1iFy-t3VoPTbNULXZEzX-dnTsk0DO_91EB0pUxjQrnVZy_cDJYaXv9utxYfQ=@protonmail.com> <YtlwBsk5qGIhEl7e@ohm.59.ca>
Date: Thu, 21 Jul 2022 18:55:31 +0200
Message-ID: <878rom1k3g.fsf@sequoia-pgp.org>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Bar: /
X-Rspamd-Report: BAYES_HAM(-0.29465) MIME_GOOD(-0.1)
X-Rspamd-Score: -0.39465
Received: from unknown (HELO unkown) (::1) by harrington.uberspace.de (Haraka/2.8.28) with ESMTPSA; Thu, 21 Jul 2022 18:55:40 +0200
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/trkdbmCOsEb_SdpdhUYbUZrmLc4>
Subject: Re: [openpgp] Memory requirement for Argon2 (draft-06, sec 3.7.1.4)
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: Thu, 21 Jul 2022 16:55:46 -0000

Bruce Walzer <bwalzer@59.ca> writes:

> As a practical example, GnuPG adjusts the amount of computational
> effort so that it takes 0.1 seconds to decrypt on the system the S2K
> operation was done on.

Note that on contemporary systems, it doesn't even take that long to
derive a session key from a password even if you max out the number of
bytes to hash.  In Sequoia, we therefore default to the maximum number
of bytes to hash without doing any kind of measurement.

The S2K mechanism is not suitable anymore for current systems and is in
dire need of replacement.

Best,
Justus