Skip to content

feature request: PGP encode/decode func like postgres #23374

@tabVersion

Description

@tabVersion

Is your feature request related to a problem? Please describe.

you can refer to https://www.postgresql.org/docs/current/pgcrypto.html#PGCRYPTO-PGP-ENC-FUNCS

related impl in postgres source code: https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/pgp-encrypt.c & https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/pgp-decrypt.c

related tests in postgres: https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/sql/pgp-decrypt.sql & https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/sql/pgp-encrypt.sql & https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/sql/pgp-pubkey-decrypt.sql & https://github.com/postgres/postgres/blob/REL_16_1/contrib/pgcrypto/sql/pgp-pubkey-encrypt.sql

You need to:

  1. read the context above and understand how pgp encrypt and decrypt impl
  2. refer to feat: support sql func encrypt/decrypt  #14717 for similar raw encrypt/decrypt impl, you need to impl all pgp_sym_encrypt , pgp_sym_decrypt , pgp_pub_encrypt and pgp_pub_decrypt
  3. apply all related tests from postgres and make sure the feature give the same result as postgres does.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions