pgsodium
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pgsodium | 3.1.11 | SEC | BSD-3-Clause | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 7020 | pgsodium | No | Yes | Yes | Yes | No | No | pgsodium |
| Related | pgcrypto shacrypt cryptint pguecc pgcryptokey pgsmcrypto column_encrypt supabase_vault pg_tde pg_enigma |
|---|---|
| Depended By | supabase_vault |
+fix missing pg17
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 3.1.11 | 1817161514 | pgsodium | - |
| RPM | PGDG | 3.1.11 | 1817161514 | pgsodium_$v | - |
| DEB | PIGSTY | 3.1.9 | 1817161514 | postgresql-$v-pgsodium | - |
Build
You can build the RPM / DEB packages for pgsodium using pig build:
Install
You can install pgsodium directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
pgsodium: libsodium-based cryptographic functions for PostgreSQL
pgsodium is an encryption library extension for PostgreSQL using the libsodium library. It provides a direct SQL interface to libsodium, server-managed key derivation, and Transparent Column Encryption (TCE).
Generating Random Data
Secret Key Encryption (Authenticated)
Public Key Encryption
Public Key Signatures
Password Hashing
Hashing
Server Key Management
pgsodium can load an external root key into memory that is never accessible to SQL. Sub-keys are derived by key id:
Transparent Column Encryption (TCE)
Encrypted data is stored on disk and automatically decrypted via a generated view.
Security Roles
pgsodium_keyiduser– less privileged, can only access keys by UUIDpgsodium_keymaker– more privileged, can work with raw keys
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)