Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdf8b-0001j8-Bq for pgsql-general@arkaria.postgresql.org; Tue, 26 May 2020 19:21:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jdf8a-00081c-3T for pgsql-general@arkaria.postgresql.org; Tue, 26 May 2020 19:21:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdf8Z-00081V-RY for pgsql-general@lists.postgresql.org; Tue, 26 May 2020 19:21:19 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jdf8W-0007Cj-EV for pgsql-general@lists.postgresql.org; Tue, 26 May 2020 19:21:18 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 5ED13C1488; Tue, 26 May 2020 19:21:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wCDgMRRz40M5; Tue, 26 May 2020 19:21:15 +0000 (UTC) Received: from major.bloodnok.com (107-190-22-212.cpe.teksavvy.com [107.190.22.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 796CBC140C; Tue, 26 May 2020 19:21:13 +0000 (UTC) Message-ID: <1590520872.31834.34.camel@bloodnok.com> Subject: Re: GPG signing From: Marc Munro To: Adrian Klaver , pgsql-general@lists.postgresql.org Date: Tue, 26 May 2020 12:21:12 -0700 In-Reply-To: <61f127e1-2e25-10e8-7c0b-4b8b4676b586@aklaver.com> References: <1590519662.31834.32.camel@bloodnok.com> <61f127e1-2e25-10e8-7c0b-4b8b4676b586@aklaver.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, 2020-05-26 at 12:04 -0700, Adrian Klaver wrote: > On 5/26/20 12:01 PM, Marc Munro wrote: > > I need to be able to cryptographically sign objects in my database > > using a public key scheme. > > [ . . . ] > > Any other options?  Am I missing something? > > https://www.postgresql.org/docs/12/pgcrypto.html#id-1.11.7.34.7 I looked at that but I must be missing something. In order to usefully sign something, the private, secret, key must be used to encrypt a disgest of the thing being signed (something of a simplification, but that's the gist). This can then be verified, by anyone, using the public key. But the pgcrypto functions, for good reasons, do not allow the private (secret) key to be used in this way. Encryption and signing algorithms are necessarily different as the secret key must be protected; and we don't want signatures to be huge, and it seems that pgcrypto has not implemented signing algorithms. What am I missing? __ Marc