Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bQNiN-0006Yi-Mh for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jul 2016 23:49:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bQNiN-0004Fr-5H for pgsql-hackers@arkaria.postgresql.org; Thu, 21 Jul 2016 23:49:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQNiM-0004Fa-BJ for pgsql-hackers@postgresql.org; Thu, 21 Jul 2016 23:49:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bQNiH-0006Ke-R6 for pgsql-hackers@postgresql.org; Thu, 21 Jul 2016 23:49:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6LNmhdQ019612; Thu, 21 Jul 2016 19:48:43 -0400 From: Tom Lane To: Michael Paquier cc: David Steele , Robert Haas , David Fetter , Alvaro Herrera , Magnus Hagander , Peter Eisentraut , Heikki Linnakangas , Julian Markwort , Stephen Frost , PostgreSQL mailing lists , Valery Popov Subject: Re: Password identifiers, protocol aging and SCRAM protocol In-reply-to: References: <20160720181257.GA686053@alvherre.pgsql> <20160720202524.GA16111@fetter.org> <88f35221-2abd-6a31-a75d-28a3dc3a5b30@pgmasters.net> <29704.1469122290@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Fri, 22 Jul 2016 08:27:57 +0900" Date: Thu, 21 Jul 2016 19:48:43 -0400 Message-ID: <19611.1469144923@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Michael Paquier writes: > On Fri, Jul 22, 2016 at 2:31 AM, Tom Lane wrote: >> Note that "crypto" for this purpose generally means reversible encryption; >> I've never heard that one-way hashes are illegal anywhere. So password >> hashing such as md5 is fine in core, and a stronger hash would be too. >> But pulling in pgcrypto lock, stock, and barrel is not OK. > So it would be an issue if pgcrypto.so links directly to libpqcommon? No, I don't see why that'd be an issue. What we can't do is have libpgcommon depending on pgcrypto.so, or containing anything more than one-way-hash functionality itself. > Because I would like to just change my set of patches to have the SHA > and the encoding functions in src/backend/libpq instead of src/common, > and then have pgcrypto be compiled with a link to those files. That's > a cleaner design btw, more in line with what is done for md5.. I'm confused. We need that code in both libpq and backend, no? src/common is the place for stuff of that description. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers