pgcryptokey
cryptographic key management
Repository
https://momjian.us/download/pgcryptokey/
https://momjian.us/download/pgcryptokey/
Source
pgcryptokey-0.85.tar.gz
pgcryptokey-0.85.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgcryptokey | 0.85 | SEC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7320 | pgcryptokey | No | Yes | No | Yes | No | Yes | - |
| Related | pgcrypto pgsodium column_encrypt supabase_vault pg_enigma pg_tde pgcrypto shacrypt cryptint pguecc pgsmcrypto |
|---|
missing 14 on el pgdg repo
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | MIXED | 0.85 | 1817161514 | pgcryptokey | pgcrypto |
| RPM | PIGSTY | 0.85 | 1817161514 | pgcryptokey_$v | - |
| DEB | PIGSTY | 0.85 | 1817161514 | postgresql-$v-pgcryptokey | - |
Build
You can build the RPM / DEB packages for pgcryptokey using pig build:
Install
You can install pgcryptokey directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
pgcryptokey manages cryptographic data encryption keys within PostgreSQL. Keys are stored encrypted and secured by access passwords, supporting both system-wide and per-session key access.
Key Management Functions
| Function | Description |
|---|---|
create_cryptokey(name, byte_len) | Generate a new cryptographic key |
set_cryptokey(name) | Set the active key for operations |
get_cryptokey(name) | Retrieve key material |
drop_cryptokey(name) | Remove a key |
supersede_cryptokey() | Rotate to a new key (same access password) |
change_key_access_password() | Update key authentication credentials |
reencrypt_data() | Re-encrypt data with a different key |
Session Control
| Function | Description |
|---|---|
get_shared_key() | Establish client/server shared secret (SSL/Unix only) |
set_session_access_password() | Client-supplied password authentication |
Typical Workflow
Access passwords can be configured at database boot time for system-wide access, or per-session by individual clients for granular security control.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)