mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 04:45:08 +03:00
Update apps/docs/pages/guides/database/column-encryption.mdx
Co-authored-by: Oliver Rice <github@oliverrice.com>
This commit is contained in:
1 parent
35552848e0
commit
b7e1d97e8a
1 file changed
+1
-1
@@ -27,7 +27,7 @@ In general, it is a bad idea to over-use column encryption for mundane data or d
|
||||
|
||||
## Encryption Keys
|
||||
|
||||
Encryption requires keys, but keeping the keys in the same database as the encrypted data doesn't make any sense, it would be like leaving a key in a door lock, a door lock only makes sense when the lock and key can be separated. So similarly, the encryption keys in Supabse are kept separate from the database.
|
||||
Encryption requires keys. Keeping the keys in the same database as the encrypted data would be unsafe. It would be like leaving a key in a door lock. For that reason, encryption keys are kept separate from the database.
|
||||
|
||||
Supabase column encryption and the Vault both use a low level Postgres extension library called [pgsodium](https://github.com/michelp/pgsodium/). This library in turn wraps a very popular encryption library called [libsodium](https://doc.libsodium.org/). These libraries provide functionally for doing something called [Key Derivation](https://libsodium.gitbook.io/doc/key_derivation). Supabase uses key derivation to _derive_ the encryption keys used by column encryption. These keys are derived from a _Root Key_ that is stored by Supabase, outside the database. If you need to migrate encrypted data from one system to another, you must ensure that this root key is copied over as well. There is a [REST API for getting the root key for a project](https://supabase.com/docs/reference/api/gets-projects-pgsodium-config).
|
||||
|
||||
|
||||
Reference in new issue
Block a user