SHA-2 functions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject SHA-2 functions
Date
Msg-id 7b5fca2d-1c5d-a991-fe5c-3851ad57017d@2ndquadrant.com
Whole thread Raw
Responses Re: SHA-2 functions
Re: SHA-2 functions
Re: SHA-2 functions
List pgsql-hackers
There was a complaint recently about the documentation using the widely
frowned-upon md5() function in an unrelated context as an example hash
function.  This is quite common in many examples, such as hashing row
values to compare them, or hashing datums if they don't fit into an
index.  But there is nothing we can easily replace md5 with, without
going to things like pgcrypto.

I also noticed while working on some SSL code that we have perfectly
good SHA-2 functionality in the server already, but it has no test
coverage outside the SCRAM tests.

So I suggest these patches that expose the new functions sha224(),
sha256(), sha384(), sha512().  That allows us to make the SSL and SCRAM
tests more robust, and it will allow them to be used in general purpose
contexts over md5().

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [HACKERS] path toward faster partition pruning
Next
From: Aleksander Alekseev
Date:
Subject: Re: SHA-2 functions