#Search in Encrypted data
4 messages · Page 1 of 1 (latest)
This is in db topic, I assume you have some encrypted column. Encrypted data is opaque to the DB, it sees it as text. The only way to search it to read all records, decrypt in memory and filter.
You can encrypt the user’s input and query by the ciphertext (and index that column), you avoid decrypting too many records but this only works for exact equality queries.
If you need to search by "contains", encrypted values are opaque to the DB, so you’ll need a different design, like maintain a separate search index.
You should only be encrypting data that needs to be encrypted like personal information, credentials or other secrets or sensitive data. These encrypted pieces of data you will never ever find in an open text search. Never ever. So, I'd respectfully suggest you need to re-evaluate your requirements for either what is encrypted or what needs to be openly searched for.