Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTDOD-00047v-5P for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2015 17:47:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YTDOC-00067e-DR for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2015 17:47:20 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YTDOB-00067M-CZ for pgsql-hackers@postgreSQL.org; Wed, 04 Mar 2015 17:47:19 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YTDO8-0006rI-1L for pgsql-hackers@postgreSQL.org; Wed, 04 Mar 2015 17:47:17 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 5C18A5F7AB; Wed, 4 Mar 2015 12:47:15 -0500 (EST) Date: Wed, 4 Mar 2015 12:47:15 -0500 From: Stephen Frost To: Bruce Momjian Cc: Andres Freund , PostgreSQL-development Subject: Re: MD5 authentication needs help Message-ID: <20150304174715.GD29780@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YCIOI/gPzpKZYkSw" Content-Disposition: inline In-Reply-To: <20150304173210.GG23933@momjian.us> 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:43:56 up 41 days, 17:33, 8 users, load average: 0.23, 0.18, 0.15 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 --YCIOI/gPzpKZYkSw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * 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 move= the > > > > > > needle between "network data sensitivity" and "on-disk data sen= sitivity" > > > > > > a bit back in the direction of making the network data more sen= sitive. > > > > >=20 > > > > > I think that's a really bad tradeoff for pg. There's pretty good = reasons > > > > > not to encrypt database connections. I don't think you really can > > > > > compare routinely encrypted stuff like imap and submission with > > > > > pg. Neither is it as harmful to end up with leaked hashes for dat= abase > > > > > users as it is for a email provider's authentication database. > > > >=20 > > > > I'm confused.. The paragraph you reply to here discusses an approa= ch > > > > which doesn't include encrypting the database connection. > > >=20 > > > An increase in "network data sensitivity" also increases the need for > > > 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 network > > based attacks. The best part about md5 is that we don't send the user's > > password over the wire in the clear, the actual challenge/response piece > ----- 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? 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. 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). Thanks, Stephen --YCIOI/gPzpKZYkSw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJU90UiAAoJEO1sijiDR2RVNBwQAJG1SLuHTEmsTfjoQGPLUVMw JObmngMSvqy4IQ1/C+qEmjvjoagzF5l7eQ53Fi2mkM3wLnko3Xv3RsbFAEriAR8B ow0ZyOfLeHFRue7CJ9FBkhSvTNNavd+TcFKgMMCurj8yavmpKjoAkVV7ZqviFXCg sx+NiAVHLDZIa/PLb4QoRYyNGIDYW8Yxm2iwyvaE026wshe+76YMUzsPUOkcnMk6 bFJ3FPivsolqRUFwiEGfqOclAQl4E0S/gaIAQDHZvVUvPvgtxgIH74PRgtJy9gs6 svPgCzCGjROSO6nm1wWHUD9VmTkzP5Zx/XoPSPZ7DfgS0ojPMtKPo8dV/odMUAd7 cwkV8DBNWVn2Awa5FayPvEVFWHpiIPDCp6If3oJJ3HeV8mJnb+n4kTI2/w+rGGdy ipQdkdq9mD0xZi8Aa4Pkg3KuahYvp3RRmkwLsYph0NjW4gz7khz5DEBx0ao+txpA Fdu4aQvF+5d8ITwpbCb5R8mg/+80ni4xjm8xpP+WGKOLu0KMVmc5zHWN3T18jlsS nlZqw1C0NajefyU3zCJBMPj39yCt8Iu6AQPrw0iSEmb5lnD4lPrttFF0gNvBz85W a4NcKMeL6CZubur+BMw5F3V0c9XKZWtxQBq1xm8jT+352V1F7/j4RZHFHn1tUlFT Oc2nmQBJDSNyxkpL4Iof =Tl0R -----END PGP SIGNATURE----- --YCIOI/gPzpKZYkSw--