Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTDRA-0004IJ-7G for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2015 17:50:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YTDR9-0007ff-46 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2015 17:50:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTDR8-0007fT-6p for pgsql-hackers@postgreSQL.org; Wed, 04 Mar 2015 17:50:22 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTDR4-0007tO-Mx for pgsql-hackers@postgreSQL.org; Wed, 04 Mar 2015 17:50:21 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 04B405F7AB; Wed, 4 Mar 2015 12:50:17 -0500 (EST) Date: Wed, 4 Mar 2015 12:50:17 -0500 From: Stephen Frost To: Bruce Momjian Cc: Andres Freund , PostgreSQL-development Subject: Re: MD5 authentication needs help Message-ID: <20150304175017.GE29780@tamriel.snowman.net> References: <20150304020146.GD24063@momjian.us> <20150304155230.GW29780@tamriel.snowman.net> <20150304155921.GJ30405@awork2.anarazel.de> <20150304160633.GZ29780@tamriel.snowman.net> <20150304160829.GK30405@awork2.anarazel.de> <20150304163623.GB29780@tamriel.snowman.net> <20150304173210.GG23933@momjian.us> <20150304174715.GD29780@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qlKgXtgT3zdCOf4I" Content-Disposition: inline In-Reply-To: <20150304174715.GD29780@tamriel.snowman.net> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-45-generic (x86_64) X-Uptime: 12:49:53 up 41 days, 17:38, 9 users, load average: 0.09, 0.10, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) 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 --qlKgXtgT3zdCOf4I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Stephen Frost (sfrost@snowman.net) wrote: > * Bruce Momjian (bruce@momjian.us) wrote: > > On Wed, Mar 4, 2015 at 11:36:23AM -0500, Stephen Frost wrote: > > > * Andres Freund (andres@2ndquadrant.com) wrote: > > > > On 2015-03-04 11:06:33 -0500, Stephen Frost wrote: > > > > > * Andres Freund (andres@2ndquadrant.com) wrote: > > > > > > On 2015-03-04 10:52:30 -0500, Stephen Frost wrote: > > > > > > > The first is a "don't break anything" approach which would mo= ve the > > > > > > > needle between "network data sensitivity" and "on-disk data s= ensitivity" > > > > > > > a bit back in the direction of making the network data more s= ensitive. > > > > > >=20 > > > > > > I think that's a really bad tradeoff for pg. There's pretty goo= d reasons > > > > > > not to encrypt database connections. I don't think you really c= an > > > > > > compare routinely encrypted stuff like imap and submission with > > > > > > pg. Neither is it as harmful to end up with leaked hashes for d= atabase > > > > > > users as it is for a email provider's authentication database. > > > > >=20 > > > > > I'm confused.. The paragraph you reply to here discusses an appr= oach > > > > > which doesn't include encrypting the database connection. > > > >=20 > > > > An increase in "network data sensitivity" also increases the need f= or > > > > encryption. > > >=20 > > > Ok, I see what you're getting at there, though our existing md5 > > > implementation with no lock-out mechanism or ability to deal with > > > hijacking isn't exactly making us all that safe when it comes to netw= ork > > > based attacks. The best part about md5 is that we don't send the use= r's > > > password over the wire in the clear, the actual challenge/response pi= ece > > ----- here is where I was lost > > > is not considered terribly secure today, nor is the salt+password we = use > > > for pg_authid for that matter. :/ > >=20 > > Can you please rephrase the last sentence as it doesn't make sense to > > me? >=20 > The best part of the existing authentication method we call "md5" is > that the user's password is never sent over the network in the clear. >=20 > The challenge/response implementation we have only provides for 4 bytes > of hash (or around four billion possible permutations) which is not very > secure today (as compared to the 16-character base64 salt used in SCRAM, > which is 16^64 or 2^96 instead of 2^32). Err, 64^16 or 2^96, that is. 16^64 is not the same and would be way larger. :) Thanks! Stephen --qlKgXtgT3zdCOf4I Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJU90XZAAoJEO1sijiDR2RVwqQP/iKyC+qy+9VOhQlAt8Pvo6WH YZILSbHaAHH7hnU9MD8gYZxbV3DMM72fLWgvfP2ylqETL+eg8JM00+nkzV2GjqT2 /1r2OYLmsGV949sa35NekGYYmmO/LbvenM4U1Ce3GAH89YSL1l0ZnLRkSl9ze2YQ qdq8ep8ZaGGzEVqK2O0ex4kbhMs7hqvebsrG8HwuaRME8cTIsYkSq3LHaI9mwPES X1+zn71mED3SQagOtNpV22alIKRvrxz6x/uVataVtMjZS+DILxbhxJqRgdX5v0IG Vb0Kny9V6VbY66Ep3yIBEiooBoRCzJbBTJ1gTj3LfsGpB9MwU1w0WP76AATU80od u3bvzcfLM7iu/ky6BQN1n0/lEmJQ/6yiD9aygRIyL4z8yf4eqpQAfeOEx1Jl6QZP kFwO0BebtFt8Bm3a7H4UN434EQLMVzY5LSOjluIkkn3gTO+zM4Kj7Oc0VejTAK1o rySKvuiPwl46ZcXRtLItrLDuRbL9Zs38yRHQfzmWAffcjtOPQXFcUGreedMvsy5s kvGrVpXUruflWU3s25JY1s5HPStqa89IQbuPWh8Byt/Q7OmQ/9tCgtC4SpPcAlqt JWTWh5Uk5VZoPUWcyVbTRqO1IYVEuF7ypF/nxihfRb4oeWiX2krt+xjjOpM3CoVt MfH3iUiWK1GAngjJ8TM6 =RcRj -----END PGP SIGNATURE----- --qlKgXtgT3zdCOf4I--