pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add modern SHA-2 based password hashes to pgcrypto.
Date: Sat, 05 Apr 2025 17:21:25 +0000
Message-ID: <E1u17Cv-002pvr-0K@gemulon.postgresql.org> (raw)

Add modern SHA-2 based password hashes to pgcrypto.

This adapts the publicly available reference implementation on
https://www.akkadia.org/drepper/SHA-crypt.txt and adds the new hash
algorithms sha256crypt and sha512crypt to crypt() and gen_salt()
respectively.

Author: Bernd Helmle <mailings@oopsware.de>
Reviewed-by: Japin Li <japinli@hotmail.com>
Discussion: https://postgr.es/m/c763235a2757e2f5f9e3e27268b9028349cef659.camel@oopsware.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/749a9e20c9790006f3af47f7a8faf4ad8dc358d9

Modified Files
--------------
contrib/pgcrypto/Makefile                    |   3 +-
contrib/pgcrypto/crypt-gensalt.c             |  82 ++++
contrib/pgcrypto/crypt-sha.c                 | 640 +++++++++++++++++++++++++++
contrib/pgcrypto/expected/crypt-shacrypt.out | 196 ++++++++
contrib/pgcrypto/meson.build                 |   2 +
contrib/pgcrypto/px-crypt.c                  |  22 +
contrib/pgcrypto/px-crypt.h                  |  31 ++
contrib/pgcrypto/sql/crypt-shacrypt.sql      |  99 +++++
doc/src/sgml/pgcrypto.sgml                   |  41 +-
9 files changed, 1114 insertions(+), 2 deletions(-)



Message-ID: <E1u17Cv-002pvr-0K@gemulon.postgresql.org>
Permalink:  ../E1u17Cv-002pvr-0K@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u17Cv-002pvr-0K@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add modern SHA-2 based password hashes to pgcrypto.
  In-Reply-To: <E1u17Cv-002pvr-0K@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox