dbTalk Databases Forums  

[BUGS] BUG #6434: Wishlist: SHA-512 ("$6$" salt) for crypt()

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #6434: Wishlist: SHA-512 ("$6$" salt) for crypt() in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ch@lathspell.de
 
Posts: n/a

Default [BUGS] BUG #6434: Wishlist: SHA-512 ("$6$" salt) for crypt() - 02-06-2012 , 06:16 AM






The following bug has been logged on the website:

Bug reference: 6434
Logged by: Christian Hammers
Email address: ch (AT) lathspell (DOT) de
PostgreSQL version: 9.1.2
Operating system: Debian GNU/Linux
Description:

The crypt() function from the pgcrypto extension is great to store and check
passwords in a format that can also be used by Linux PAM and all programming
languages that support the libc crypt() function.

Recent Linux versions started to use a crypt algorithm that is based on
SHA-512 and stores hashes in the form "$6$xxsaltxx$....." but Postgres can
only hash/verify password hashes in the old DES or the "$1$xxsaltxx$..." MD5
based format.

It would be nice if the pgcrypt extension would be extendet to support the
new SHA-256 and SHA-512 algorithms.

Further documentation on the libc implementation can be found on
http://www.akkadia.org/drepper/SHA-crypt.txt but you can probably copy it
from the OpenBSD source like you did with crypt-md5.c.

Testcase in SQL:
SELECT crypt('geheim', '$6$xxxxxxxx$');

Does give "$6C0C9PsKORBQ" but should lead to
"$6$xxxxxxxx$wuSdyeOvQXjj/nNoWnjjo.6OxUWrQFRIj019kh1cDpun6l6cpr3ywSrBprYRYZX cm4Kv9lboCEFI3GzBkdNAz/"






--
Sent via pgsql-bugs mailing list (pgsql-bugs (AT) postgresql (DOT) org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.