pgsodium is a PostgreSQL extension that brings modern cryptographic functions to Postgres. pgsodium exposes most of the libsodium API and supports public key and shared secret encryption, signing and more. Information about the libsodium API can be found here: