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.96) (envelope-from ) id 1vP3Dr-001zxy-1Z for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Nov 2025 18:29:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vP3Dq-00Cynl-0Y for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Nov 2025 18:29:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP3Dp-00Cyna-2y for pgsql-bugs@lists.postgresql.org; Fri, 28 Nov 2025 18:29:34 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vP3Dn-00221h-2w for pgsql-bugs@lists.postgresql.org; Fri, 28 Nov 2025 18:29:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5ASITLSc505782; Fri, 28 Nov 2025 13:29:22 -0500 From: Tom Lane To: Daniel Gustafsson cc: Marco.Lebahn@kfw.de, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19335: the function encrypt does not work correct - ERROR: encrypt error: Key was too big In-reply-to: <5448DF07-F573-4F90-8D71-C3F746C122D9@yesql.se> References: <19335-0ba21e6ccf61a219@postgresql.org> <9BAD0CC4-5170-4976-AF06-30E3EC9F008C@yesql.se> <20251128092235.E4AFD2C8BA6B@s899.loopia.se> <0628D055-2B0C-4852-AE0A-1B60545CF4AB@yesql.se> <20251128093111.648D47CEB0C@s934.loopia.se> <20251128103836.F0FA510BC47D@s979.loopia.se> <5448DF07-F573-4F90-8D71-C3F746C122D9@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Fri, 28 Nov 2025 12:07:54 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <505780.1764354561.1@sss.pgh.pa.us> Date: Fri, 28 Nov 2025 13:29:21 -0500 Message-ID: <505781.1764354561@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 28 Nov 2025, at 11:38, wrote: >> It seems that < 16.11 does and not check if I use "bf" from legacy provider > OpenSSL doesn't support blowfish without the legacy provider loaded. Your > 16.10 is most likely linked against another version of OpenSSL, or at least > using another OpenSSL configuration/openssldir. It seems quite odd that this changed at a minor PG version update. I wonder if there was an upgrade of the underlying platform at the same time, or if the new version was built by a different packager. I confirmed on a fresh Fedora installation (with OpenSSL 3.2.6) that it works as Daniel described. Blowfish and other old ciphers don't work with the out-of-the-box OpenSSL configuration, but if you edit `openssl info -configdir`/openssl.cnf and uncomment the lines that enable the legacy provider, it will work. (I found I had to restart the PG server, too --- apparently we only absorb that configuration at postmaster start. Didn't think to try "pg_ctl reload"; perhaps that would have been enough.) Of course the real bottom line here is you should be migrating away from use of these ciphers. There's a reason they are deprecated and intentionally made hard-to-reach. regards, tom lane