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 1vOwKk-00DuB5-1Q for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Nov 2025 11:08:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vOwKj-00AsDz-0K for pgsql-bugs@arkaria.postgresql.org; Fri, 28 Nov 2025 11:08:13 +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.96) (envelope-from ) id 1vOwKi-00AsDf-2K for pgsql-bugs@lists.postgresql.org; Fri, 28 Nov 2025 11:08:13 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vOwKf-001v59-1E for pgsql-bugs@lists.postgresql.org; Fri, 28 Nov 2025 11:08:12 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id A62AC4CAA6E for ; Fri, 28 Nov 2025 12:08:06 +0100 (CET) Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 92B564CB7AB; Fri, 28 Nov 2025 12:08:06 +0100 (CET) Received: from s473.loopia.se (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 8F63222B17C5; Fri, 28 Nov 2025 12:08:06 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s979.loopia.se ([172.22.191.5]) by s473.loopia.se (s473.loopia.se [172.22.190.13]) (amavisd-new, port 10024) with UTF8LMTP id 5f7Uz6S2y0-X; Fri, 28 Nov 2025 12:08:05 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s979.loopia.se (Postfix) with ESMTPSA id 8C64710BC3C8; Fri, 28 Nov 2025 12:08:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1764328084; bh=ZDoeuPVea8ad1IZtm/GFKbyDYyHlT0T1nv6+9n6xTzo=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=MAr9k0O9hFE0IuJJYAzNGOUM1H/v/wkM9ObPc2ivTfcNKpkzFk6Chg3XmY/GCmTCC attPk7IDqRJ3F1ShzB0DlIdrpBsnt/jFJpzcyKQBvZg37RkAB8VnisUvgPYgpGO2S6 ctLAK5ZgpsN8toiNZSW6mhk5kii3EIyptED/e/fjUnGqi0k57MzNaY00uiz7lYvQRb kqQLQeix6kdbpSlpTfT3iVXmgTC09hn4pxLJ7K7cV01E8yJ7krTrW1x8JyZih3/pTY caPsnHxyNUduj5S4tr30QiAAsRiZbn8dj0qjU99G/vVeBnCKpm68vxr3+X4770bQ4l yPGM+uHkd5F2A== Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: BUG #19335: the function encrypt does not work correct - ERROR: encrypt error: Key was too big From: Daniel Gustafsson In-Reply-To: <20251128103836.F0FA510BC47D@s979.loopia.se> Date: Fri, 28 Nov 2025 12:07:54 +0100 Cc: pgsql-bugs@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <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> To: Marco.Lebahn@kfw.de X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 28 Nov 2025, at 11:38, = wrote: >=20 > It seems that < 16.11 does and not check if I use "bf" from legacy = provider postgres does not consider which providers are loaded at all, since we = support OpenSSL 1.1.1+ the code doesn't even know of the provider concept. = Further, pgcrypto in v16 hasn't been changed at all since January 2024. If 16.10 = allows blowfish and 16.11 doesn't then, as Tom suggested upthread, you need to = look at which OpenSSL pgcrypto.so is linked against and how they are configured. > :~> openssl list -providers > Providers: > default > name: OpenSSL Default Provider > version: 3.2.3 > status: active >=20 > :~> psql postgres > psql (16.10) > Type "help" for help. >=20 > postgres=3D# SELECT encrypt('sdafgsdfgsdafgasdf', 'thelongkeyfoobar', = 'bf'); > encrypt > ---------------------------------------------------- > \x74a761b105fbc8f535f666e952e00018deb1349fbf27a87b > (1 row) The above pgcrypto is highly unlikely to run against the same OpenSSL = instance (lib + configuration) in that case, note this from the OpenSSL 3.0 = changelog: * Moved all variations of the EVP ciphers CAST5, BF, IDEA, SEED, RC2, RC4, RC5, and DES to the 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. -- Daniel Gustafsson