Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXeSH-00BnhI-OD for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 10:47:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tXeSG-00HCqr-91 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 10:47:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXeSF-00HCqj-I9 for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 10:47:28 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tXeSE-000LCd-2m for pgsql-hackers@postgresql.org; Tue, 14 Jan 2025 10:47:27 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id C80E91140192; Tue, 14 Jan 2025 05:47:24 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 14 Jan 2025 05:47:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1736851644; x=1736938044; bh=T 0eyt+/cFd6xKKnY5b2w8FkeoG56DBI6QyesYFXYIQc=; b=w3BEX/uvx1fYFE2uE UIv+IvOkqKVbVqsluncO66Q/EL5+m6RFiD3O2DReXMk2IniZbBlQtaA9XKDndch8 HgK4XvqkzGXcmRaFRKBeQnt/wyWiCgNwLLRXECq9TJArQqkSWzSTGiq+axomozK0 uQAPyozypIoghYK3/xdmW26enPqQ7WDcHcZixD9SepVMaAq4c3POoTXH6Me6uDu7 oIeD9sB6A7TdB3CaTiTGpG940H1Zi8USnlchyVdVJxmITBIDBS/OOTxs3CvN6TZ3 bSfCQQ0CQKh6SmCxOvUQwspyYyBcr3i9JoiuYCSNKfvxbMyKlEaxYji6KwMCbG6i tdZnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudehiedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepveeihfdvveegjeduieeftdev jeehhedtkeehheduleevjeetjeeufeetgfdujeffnecuffhomhgrihhnpeihohhuthhusg gvrdgtohhmpdgvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnoh dqihhprdhorhhgpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgt phhtthhopehjrghpihhnlhhisehhohhtmhgrihhlrdgtohhmpdhrtghpthhtohepmhgrih hlihhnghhssehoohhpshifrghrvgdruggvpdhrtghpthhtohepphhgshhqlhdqhhgrtghk vghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Jan 2025 05:47:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1736851641; bh=6cdksT3aqaiyWhQ2FJKCZXgxzJrdzJNOCMK84Qrcxzo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=c4RGM1hvx6+Nl2C7RoKt0P4ZE2olElynLpNDW+vy4ANnk6eL3gb8pT4orLvK9hY82 7q+s/ArSE03jIMS9CtwWWoRYP+NsjGsS0vrVOPZA6PRARu6jSbN4eOyzTpYGbH4VXe Cw6ds6A+LPUl2gZR7GHyRvOfLVfMpMwr8s4jNTbI4isnu49LjaEEYi3Gk+dwPtMpzw ssnk3VZ8E+FWmWA6RHqX9i/p4si9rEIq/TvmEJe4ATzrkGO8ceeOLRa27XbEWcafbO 84zNsvxuD+IGWAhjrVchusK+SXHZLgelIXR6+gFX9qXpo0r82SGmVg5qkCGhIe/PbF 6DcfJBbu1v5Ww== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 12AE4329; Tue, 14 Jan 2025 11:47:21 +0100 (CET) Date: Tue, 14 Jan 2025 11:47:21 +0100 From: Alvaro Herrera To: Bernd Helmle Cc: Japin Li , PostgreSQL Development Subject: Re: Modern SHA2- based password hashes for pgcrypto Message-ID: <202501141047.kzibjx4yh2i4@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <32aca3e1303734c45da7a2bfcd6f4c22e1c20c04.camel@oopsware.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Bernd, On 2025-Jan-14, Bernd Helmle wrote: > > It's been said in my presence that pgcrypto is obsolete and > > shouldn't be used anymore.  I'm not sure I believe that, but even if > > that's true, it's clear that there's plenty of people who has an > > interest on it, so I don't see that as an objection to reject this > > work.  So let's move on. > > Oh, that's news to me. Is there a plan for it somewhere? I agree that > pgcrypto is widley used and needs a proper replacement when we decide > to deprecate it. I don't know about a plan, but https://www.youtube.com/watch?v=pp6xdr3TuWM&t=1088s > I originally thought about StringInfo but went with just the fixed > length character buffers since we access them directly anyways (and the > px_*/OpenSSL API needs char * ). Note that you can access the char * via StringInfo->data. Just don't modify it without the StringInfo APIs. > > Some of your elog(ERROR)s should probably be ereport(), and I'm not > > sure we want all the elog(DEBUG1)s. > > I added them during development. I am not married to them, but found > them useful during testing. If we come to the conclusion they're not > really that important, i drop them entirely. Yeah, the DEBUGs are a pretty minor issue -- it's easy to remove them afterwards. For any actual error condition that's not a "can't happen" one, please use ereport() for consistency. (There's no translation support for contrib, so they won't be translated anyway.) -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "No deja de ser humillante para una persona de ingenio saber que no hay tonto que no le pueda enseñar algo." (Jean B. Say)