Suppose I am storing a number of encrypted documents in a database. I would like to make it possible to identify the subset of documents whose contents match user-specified search terms without a) maintaining a plaintext index or b) decrypting documents on the fly. Is there any way to accomplish this securely?

By the same token, I'm wondering if a collection of encrypted documents can be sorted according to an encrypted attribute (e.g., document title) without first decrypting all attribute values.


1 Answer 1


Yes. If you encrypt the documents with this purpose in mind (you have to use a special kind of encryption algorithm), then yes, it is possible to do this, for certain kinds of search queries.

There is a rich research literature on this topic. The buzzword is "search on encrypted data". I'll point you to a few sample papers in this space. Do a literature search, and you should be able to find many more for yourself.

The best scheme for your situation will depend upon your application requirements. If you have a read-mostly database (updates are rarer than searches), then I would suggest a scheme based upon encrypted indexes. If you need to make modifications frequently, or if searching is relatively rare, the other schemes might be preferable.

  • $\begingroup$ I'll put this in a comment because it's not directly related: 'Structured Encryption and Controlled Disclosure' Chase and Kamara 2011 $\endgroup$
    – pg1989
    Aug 21, 2013 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.