Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p53IR-0003wH-SO for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Dec 2022 11:18:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p53IQ-0001QG-M2 for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Dec 2022 11:18:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p53IQ-0001Q7-Cj for pgsql-hackers@lists.postgresql.org; Tue, 13 Dec 2022 11:18:02 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p53IO-00033k-KR for pgsql-hackers@lists.postgresql.org; Tue, 13 Dec 2022 11:18:01 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 7F5AD2F5274F for ; Tue, 13 Dec 2022 12:17:59 +0100 (CET) Received: from s979.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 6FC822E27996; Tue, 13 Dec 2022 12:17:59 +0100 (CET) Received: from s473.loopia.se (unknown [172.22.191.5]) by s979.loopia.se (Postfix) with ESMTP id 6CE1210BC499; Tue, 13 Dec 2022 12:17:59 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s934.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id EaNV4WwteOnN; Tue, 13 Dec 2022 12:17:59 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s934.loopia.se (Postfix) with ESMTPSA id E77617CEA62; Tue, 13 Dec 2022 12:17:58 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Re: Raising the SCRAM iteration count From: Daniel Gustafsson In-Reply-To: <4880738a-cbf7-c9a1-4faf-ba861c731c63@postgresql.org> Date: Tue, 13 Dec 2022 12:17:58 +0100 Cc: Andres Freund , PostgreSQL Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <75619A47-4CD0-4E0F-8A30-32F83FF593DD@yesql.se> References: <20221210001538.czikyvk3xtkphxfu@awork3.anarazel.de> <4880738a-cbf7-c9a1-4faf-ba861c731c63@postgresql.org> To: "Jonathan S. Katz" X-Mailer: Apple Mail (2.3696.100.31) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 12 Dec 2022, at 15:47, Jonathan S. Katz = wrote: > To throw on a bit of paint, if we do change it, we should likely = follow what would come out in a RFC. >=20 > While the SCRAM-SHA-512 RFC is still in draft[1], the latest draft it = contains a "SHOULD" recommendation of 10000, which was bumped up from = 4096 in an earlier version of the draft: This is however the draft for a different algorithm: SCRAM-SHA-512. We = are supporting SCRAM-SHA-256 which is defined in RFC7677. The slightly = lower recommendation there makes sense as SHA-512 is more computationally = expensive than SHA-256. It does raise an interesting point though, if we in the future add = suppprt for SCRAM-SHA-512 (which seems reasonable to do) it's not good enough to = have a single GUC for SCRAM iterations; we'd need to be able to set the = iteration count per algorithm. I'll account for that when updating the patch = downthread. -- Daniel Gustafsson https://vmware.com/