I'm interested in building a service that stores client-side-encrypted text-documents.
Would it be possible to implement a search where the user inputs a search string (this search string would also be encrypted on the client's side) and where the server can perform the search over the encrypted documents without knowing their contents nor the contents of the encrypted search string?
I don't know very much about encryption and I just thought I'd see if I could somehow get a very naive example working. However, using the 'aes-256-ctr' algorithm, I get the following results for my little encryption program:
$ node encrypt.js 123 'hello my friend'
90cbf635540412a202eb46dada1fcf
$ node encrypt.js 123 'hello'
90cbf63554
$ node encrypt.js 123 ' my '
d8c3e379
node encrypt.js 123 'friend'
9edcf33c5540
What kind of encryption algorithms should I be looking at to perform a text search on an encrypted document with an encrypted search string without being able to decipher any of it?
Thanks a lot for your help!