pg_pub_decrypt: 10x performance hit with gpg v2

Поиск
Список
Период
Сортировка
От Felix A. Kater
Тема pg_pub_decrypt: 10x performance hit with gpg v2
Дата
Msg-id 20180918142818.GA24012@comppasch2
обсуждение исходный текст
Список pgsql-performance
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


В списке pgsql-performance по дате отправления:

Предыдущее
От: Andrey Zhidenkov
Дата:
Сообщение: Performance problems with Thai language
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LEFT JOIN LATERAL optimisation at plan time