paragonie / ciphersweet

Fast, searchable field-level encryption for PHP projects
https://ciphersweet.paragonie.com
Other
439 stars 32 forks source link

New Feature: EncryptedJsonField #69

Closed paragonie-security closed 2 years ago

paragonie-security commented 2 years ago

This is useful for encrypting parts of a JSON field (e.g. JSONB in PostgreSQL).

Every JSON field uses a root key (which is the same as the per-field symmetric key), from which it derives a distinct key for each encrypted JSON attribute. The full canonical path of the element in the JSON document is used for key derivation.

Any attempt to restructure the document or replay ciphertexts in the wrong attribute will cause a decryption failure.