
Transparent Column Encryption for PostgreSQL
The Cryptic Elephant is a PostgreSQL extension for Transparent Column Encryption (TCE). It encrypts sensitive columns so that the data stays protected on disk, in backups, and in memory (“data in use” encryption), while authorized users keep reading it in plain text.
The extension is developed in Rust and relies heavily on the Rust Crypto libraries.
Disclaimer: This is an early working version. As we move towards a beta version, we may introduce breaking changes. Do not use in production.
This extension is designed for databases subject to very strict data protection regulations such as DORA and PCI DSS. It implements “data in use” encryption for PostgreSQL as a complement to the classic “encryption at rest” approach.
If these regulations don’t apply to you, basic disk-level or filesystem-level encryption is most probably good enough. See Why? for a detailed analysis.
tcetext, tceint, tcedate, tcebyteaALTER TABLE spies
ALTER COLUMN realname
TYPE TCETEXT
USING realname::TCETEXT;
SET tce.show_raw TO TRUE;
SELECT realname, raw(realname) FROM spies;
realname | raw
-------------+----------------------------------------------
James Bond | \x34bebe556560e7fdd4abb441fcb537b7b8c0d67733
Mata Hari | \x37bdb54762699534529bb40655fb01232e6f12
The data is encrypted on disk and displayed in plain text only to the users holding the key.
This project is sponsored by CAF, CNRS, Dalibo and NLnet.
We are open to other organizations wishing to join this collaborative effort. Check out our Development Partners Program for more details!
The Cryptic Elephant is licensed under the PostgreSQL license.
We need your feedback and ideas! You can either open an issue or send a message at contact@dalibo.com.
The Cryptic Elephant is maintained by the following Dalibo Labs team members, with the help of many contributors: