pgsodium: Encryption Features
libsodium is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing, and more. It is a portable, cross-compilable, installable, and packageable fork of the NaCl library, with a compatible but extended API to improve usability even further.
The design choices emphasize security and ease of use. But despite the emphasis on high security, primitives are faster across-the-board than most implementations.
pgsodium exposes the following libsodium APIs to SQL:
- Generating Random Data
- Secret key cryptography
- Public key cryptography
- Password hashing
- Key Derivation
- Key Exchange
- Advanced Stream API
It also enables some Postgres specific features including:
Enable the extension#
- Go to the Database page in the Dashboard.
- Click on Extensions in the sidebar.
- Search for "pgsodium" and enable the extension.