Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YULWO-0003Rr-FL for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Mar 2015 20:40:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YULWN-0006rp-Tz for pgsql-hackers@arkaria.postgresql.org; Sat, 07 Mar 2015 20:40:27 +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 1YULWM-0006ri-Kr for pgsql-hackers@postgreSQL.org; Sat, 07 Mar 2015 20:40:26 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YULWJ-0004Xj-Ao for pgsql-hackers@postgreSQL.org; Sat, 07 Mar 2015 20:40:25 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BD5D75F7A8; Sat, 7 Mar 2015 15:40:22 -0500 (EST) Date: Sat, 7 Mar 2015 15:40:22 -0500 From: Stephen Frost To: Bruce Momjian Cc: Josh Berkus , Alvaro Herrera , PostgreSQL-development Subject: Re: MD5 authentication needs help Message-ID: <20150307204022.GN29780@tamriel.snowman.net> References: <54FA1306.6010900@agliodbs.com> <20150306231720.GC12967@momjian.us> <20150307000236.GB29780@tamriel.snowman.net> <20150307172232.GG12967@momjian.us> <20150307174915.GG29780@tamriel.snowman.net> <20150307182846.GJ12967@momjian.us> <20150307185651.GJ29780@tamriel.snowman.net> <20150307201546.GM12967@momjian.us> <20150307203240.GO12967@momjian.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BHAjPJTFBOjGMyr2" Content-Disposition: inline In-Reply-To: <20150307203240.GO12967@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: 15:37:35 up 44 days, 20:26, 17 users, load average: 0.33, 0.25, 0.23 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 --BHAjPJTFBOjGMyr2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bruce Momjian (bruce@momjian.us) wrote: > On Sat, Mar 7, 2015 at 03:15:46PM -0500, Bruce Momjian wrote: > > > Gave me 9.15s, or ~0.00915s per connection on a single thread. That > > > times 16k is 146s or about two and a half minutes. Of course, I'm > > > comparing this against what we currently do since, well, that's what = we > > > currently do. Changing it to 4b would certainly improve that. Of > > > course, using multiple threads, having multiple challenge/responses on > > > hand (due to listening for a while) or simply breaking the MD5 hash > > > (which we know isn't a terribly great hashing algorithm these days) > > > would change that. > >=20 > > Uh, my calculations show that as 434 days of trying. (Not sure why you > > didn't bother doing that calculation.) I think anyone who is worried > > about that level of attack would already be using MD5. Again, MD5 is > > mostly used in low-security settings where you just don't want the > > password sent over the wire in cleartext. Frankly, without TLS, you are > > already sending your queries and data across in clear-text, and there > > are other attack vectors. >=20 > Actually, with a counter, the bad guy just has to wait for the counter > to roll around, and then try to catch the counter on the values he has > recorded, meaning you wouldn't even be able to detect the hack attempts. > :-) That's true, if the counter is at an individual-level. If it's cluster wide then they aren't very likely to have the same counter for the same individual after the wrap-around. Then again, what individual is going to be logging in 4 billion times? There's a number of trade-offs here, which is why we'd really be better off using an approach which security folks have already vetted. Thanks! Stephen --BHAjPJTFBOjGMyr2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJU+2I2AAoJEO1sijiDR2RVsI0QAJwxh9/7GLMQENAYwrQLaiPa Xq+EexrflcHaMpCYQ2VbkARWojIUbOTxT0tS9OyLwmfD5HZ34U8BWZBY/uPs8wxH MVrnQay/lDbUEA+lhHkmo6sw4Of7nA0JM/7u07YqwKe1s5chTBinrbPMVw+wAg21 PZ3jNRlMwSX3S1bPstNVZyjyzCVG/0SkUzC6EFanlDICzO5Lj1Hs0IVqIFsJwfUT 732JIt6rHRk7qgCdaTloKG73/uOXa8PQzFKXAcKzUOKOvtFocbVfMi/NQaf8FOli G7kOjAl9bp2OziFKCbbTN5LlZuD7cD1eHTgAt5ZOSEpA75+4nTNbyK99OrhHTF3v 1kbj4h9a6bLSqKuCDBNR3DKAVKc78pY5jNrNMyqhNekl5ESEJqs1eLjQOm1q+brn Wxt4Py0s9w8CntMr66xb6F2YV7VAKbVdEae2jnLfwpqMruFe0BOWUE8IXNMPVweS 1hoTWPPa0imj+Ll9b0DUqUC+ytqAH4OhOLTXeUjlFtgDOJf+umCyy/PCRhvWG/0T ExkRVOG0f+cG5fPVlnS30wpp2XTHFQqc7VFF3WKPDHSjBbCOJ7gJy+fw2UKqCZqC mvqwp+2zsoDSKtkPlz8qZtyKwFpKAe1BBKnzFizxty98yXM6H19j1/D2FkkT7j8X N86MhVc+ecmwAOHpRMzz =NHq7 -----END PGP SIGNATURE----- --BHAjPJTFBOjGMyr2--