Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnZC1-0007I6-CN for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jul 2019 01:57:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hnZC0-0003IT-0a for pgsql-bugs@arkaria.postgresql.org; Wed, 17 Jul 2019 01:57:16 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnZBz-0003IM-PK for pgsql-bugs@lists.postgresql.org; Wed, 17 Jul 2019 01:57:15 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hnZBs-00036L-SF for pgsql-bugs@lists.postgresql.org; Wed, 17 Jul 2019 01:57:15 +0000 Received: from [192.168.127.1] (port=17867 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1hnZBr-0001tR-8L; Wed, 17 Jul 2019 01:57:07 +0000 Received: from [127.0.0.1] (port=31821 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1hnZBq-0000ud-GK; Wed, 17 Jul 2019 01:57:06 +0000 From: Andrew Gierth To: Marco Sulla Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15911: Why no Bcrypt in pg_hba.conf? In-Reply-To: (Marco Sulla's message of "Tue, 16 Jul 2019 22:44:32 +0200") Message-ID: <87blxtzcsq.fsf@news-spur.riddles.org.uk> References: <15911-a96c5fc2f29cdecc@postgresql.org> <87ftn5zze8.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Wed, 17 Jul 2019 02:57:05 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Marco" == Marco Sulla writes: Marco> It seems that SCRAM is hash-agnostic: Marco> https://en.wikipedia.org/wiki/Salted_Challenge_Response_Authentication_Mechanism#Protocol_overview Regardless, SHA256 is the algorithm specified in the current standard (see RFC 7677), and since the client and server need to agree on this, we have very strong reasons (as Tom pointed out) not to proliferate algorithms. Marco> The significant advance is that is well known that SHA Marco> algorithms are not good as Bcrypt for password hashing: Marco> https://rietta.com/blog/bcrypt-not-sha-for-passwords/ This is comparing bcrypt against _one round_ of SHAx, which is not what SCRAM uses (it uses PBKDF2). Marco> https://crypto.stackexchange.com/a/46552 This starts out by comparing bcrypt with (unsalted!) SHA-512, but then does at least go on to mention PBKDF2. Marco> https://security.stackexchange.com/a/133251/27264 This at least looks like it's comparing the right things. -- Andrew (irc:RhodiumToad)