From: Felix A. Kater <fkater@posteo.net>
To: pgsql-performance@lists.postgresql.org
Subject: pg_pub_decrypt: 10x performance hit with gpg v2
Date: Tue, 18 Sep 2018 16:28:18 +0200
Message-ID: <20180918142818.GA24012@comppasch2> (raw)
Hi,
pg_pub_decrypt() is ~10x slower when the priv/pub keys have been
generated with gnupg version 2.x instead of version 1.x.
What I do is:
- Create keys with gpg
- Export priv/pub keys
- Store keys in binary form in a bytea
- Create 32 byte random data and encrypt it with pg_pub_encrypt()
- \timing on
- Decrypt with pg_pub_decrypt().
I see ~8ms with v1 keys vs. ~100ms with v2 keys.
I am using defaults everywhere, when generating keys as well as
encrypting with pg_pub_encrypt().
Outside postgresql, I've tested random file encryption/decryption
with gpg 2.x and with both the v1 keys against the v2 keys (both in
the gpg keyring) and cannot detect significant differences.
What can I do to track that issue further down.
Thanks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: fkater@posteo.net, pgsql-performance@lists.postgresql.org
Subject: Re: pg_pub_decrypt: 10x performance hit with gpg v2
In-Reply-To: <20180918142818.GA24012@comppasch2>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox