Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Koshi Shibagaki (Fujitsu)" <shibagaki(dot)koshi(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Replace current implementations in crypt() and gen_salt() to OpenSSL
Date: 2025-01-15 14:24:52
Message-ID: 93828399-BE7E-4EC1-A372-E0196E81F2D4@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 14 Jan 2025, at 13:12, Hayato Kuroda (Fujitsu) <kuroda(dot)hayato(at)fujitsu(dot)com> wrote:

> Similar with [1], `pg_gen_salt_rounds` is not an SQL function.
> I think we do not have to mention the function because it's just another implementation of gen_salt().
> Also, use <function> instead of <literal>.

Fixed.

> I think we must call MarkGUCPrefixReserved() to catch the mis-spell.

Good point, fixed.

> Also: I'm not sure whether we should bump the version of pgcrypto. It should be done when
> the API is changed, but the patch does not do. Thought?

I don't think this constitutes a change which warrants a version bump so I've
left that out for now.

The attached includes a rename from "legacy_crypto" to "builtin_crypto". While
legacy might apply now, there is work ongoing to modernize the algorithms
supported by crypt [0] so legacy might not be applicable soon (this GUC would
however still be relevant as the proposed code isn't FIPS certified). Builtin
seems like a more future-proof choice in terms of naming.

--
Daniel Gustafsson

[0] c763235a2757e2f5f9e3e27268b9028349cef659(dot)camel(at)oopsware(dot)de

Attachment Content-Type Size
v8-0001-pgcrypto-Make-it-possible-to-disable-built-in-cry.patch application/octet-stream 8.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-01-15 14:31:12 Re: Index AM API cleanup
Previous Message Nazir Bilal Yavuz 2025-01-15 14:20:57 Re: per backend I/O statistics