Re: Reg: Alternate way of hashing database role passwords

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "M, Anbazhagan" <Anbazhagan(dot)M(at)netapp(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Reg: Alternate way of hashing database role passwords
Date: 2024-07-01 13:25:38
Message-ID: BB8EEC27-7A0E-4F5E-8C93-4D1628F4BFE6@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 26 Jun 2024, at 18:59, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> However, it seems like SCRAM is designed so
> that different hash functions can be substituted into it, so what I'm
> hoping is that we can keep SCRAM and just replace SCRAM-SHA-256 with
> SCRAM-WHATEVER when SHA-256 starts to look too weak.

Correct, SCRAM is an authentication method which can use different hashing
algorithms. There are current drafts for SCRAM-SHA-512 and SHA3-512 but they
are some way away from being standardized. If they become standards at some
point reasonable to extend our support, but until then there is no evidence
that what we have is insecure AFAIK.

https://datatracker.ietf.org/doc/html/draft-melnikov-scram-sha-512
https://datatracker.ietf.org/doc/html/draft-melnikov-scram-sha3-512

> What I find a bit surprising about Anbazhagan's question is that he
> asks about PBKDF2, which seems to be part of SCRAM already.

In scram_SaltedPassword() we perform PBKDF2 with HMAC as the pseudorandom
function.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message James Coleman 2024-07-01 13:37:17 Re: Should we document how column DEFAULT expressions work?
Previous Message Joel Jacobson 2024-07-01 13:14:58 Re: Optimize numeric multiplication for one and two base-NBASE digit multiplicands.