Skip to content

Security Notes

Audits

This extension relies on the following Rust libraries ("crates") for performing its cryptographic operations.

  • RustCrypto's chacha20poly1305 crate is a pure Rust implementation of the RFC8439. This library has received a security audit by NCC Group, with no significant findings. The report confirmed the implementation uses recommended constant-time techniques. The report is available here

  • RustCrypto's RSA crate is a pure Rust implementation of the RSA cryptosystem. This library has received one security audit by Include Security, with only one minor finding which has since been addressed. The report is available here

DEK zeroization on session end

Each Postgres session runs in its own backend process, and the Data Encryption Key (DEK) is held only in that backend's in-memory, never written to disk or shared across sessions.

When the session stops, an exit callback calls for the "zeroization" of the DEK. As a result, the DEK does not remain in the backend's heap after a normal session shutdown. This does not protect against a hard kill (SIGKILL) or crash, where no cleanup code runs and the memory is released to the OS rather than scrubbed by the process. It also does not cover copies of the key made elsewhere, such as swap, core dumps or any type of memory copy that would outlive the DEK lifetime.

Deployments with those concerns should disable core dumps and use encrypted swap.