Обсуждение: pg_pub_decrypt: 10x performance hit with gpg v2

Поиск
Список
Период
Сортировка

pg_pub_decrypt: 10x performance hit with gpg v2

От
"Felix A. Kater"
Дата:
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