Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 9009718EF8DE for ; Thu, 22 Dec 2011 23:19:16 -0400 (AST) Received: from mail-qy0-f174.google.com ([209.85.216.174]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rdvf7-0002qc-LY for pgsql-admin@postgresql.org; Fri, 23 Dec 2011 03:19:15 +0000 Received: by qcqz2 with SMTP id z2so5367076qcq.19 for ; Thu, 22 Dec 2011 19:18:59 -0800 (PST) Received: by 10.229.134.213 with SMTP id k21mr5159916qct.28.1324610339289; Thu, 22 Dec 2011 19:18:59 -0800 (PST) Received: from [10.1.1.6] ([124.150.53.33]) by mx.google.com with ESMTPS id ha3sm21343513qab.2.2011.12.22.19.18.55 (version=SSLv3 cipher=OTHER); Thu, 22 Dec 2011 19:18:58 -0800 (PST) Message-ID: <4EF3F318.8080706@ringerc.id.au> Date: Fri, 23 Dec 2011 11:18:48 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: lst_hoe02@kwsoft.de CC: pgsql-admin@postgresql.org Subject: Re: User password encryption using a stronger hashing function? References: <47AB18AC0F23934383F2BBA7EE3D8D742281BB698C@DC-US1MBEX4.global.avaya.com> <47AB18AC0F23934383F2BBA7EE3D8D742281EB9415@DC-US1MBEX4.global.avaya.com> <20111222104153.10445qh7dzbv35s0@webmail.kwsoft.de> In-Reply-To: <20111222104153.10445qh7dzbv35s0@webmail.kwsoft.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201112/136 X-Sequence-Number: 38894 On 22/12/2011 5:41 PM, lst_hoe02@kwsoft.de wrote: > Zitat von "Liu, Jianli (Jianli)" : > >> No one has responded to my questions. I am wondering if anyone can >> point me to where in postgresql source code I can further look into >> the issue and explore the possibility of this change? Thanks. > > I was already looking for the same topic but could not find anything > useful. Maybe no one is using the build-in password encryption, but > does it at application level with transparent data access? > > Maybe one of the developers can explain why the choices for build-in > password encryption are that limited. > I'm not a Pg dev, but I won't be surprised if the v3 protocol doesn't support other hash functions. I haven't looked into it. If you'd like to know more I suggest you search for things like "md5", "sha1", "sha256", "stronger hash" etc on the pogsql-hackers mailing list archives. The main downside of md5 as a password hash function is that the result is small and quick to compute the standard of today's hashes, so rainbow tables are easier to build and can have better coverage. Brute-force cracking is also faster but there's not as much difference there. If you have a need for stronger hashing functions you might want to contact one of the consultants who does contract work on PostgreSQL development and find out what'd be involved in funding the development of the feature. Think about why you need it first, though; what threat(s) are you trying to protect from? -- Craig Ringer