We can start with a typical example of the cryptographic algorithm: the data owner first uses certain algorithms to build a database and places it in a risky third-party location. Then, users can search the database through some special tokens, and the database can perform the action and return the encrypted information through the algorithm. Throughout the whole process, even if the third party who controls the database participates with the attack, it will not leak any sensitive information.

This process seems magical, but it is doable. For example, we can implement this function with a simple (but flawed) design.

Every word that appears in the document is associated with the document, and the searching is to return all the documents of the link according to a certain weight through this index.With the searchable encryption example, we can first index and then encrypt the document to form a chain that all documents are related to the target word. Subsequently, we can store these encrypted documents in an unreliable third party, and mess up the order of data location order and add some masking codes to reduce the possibility of data leaking.

For the third-party storage, there is very little information available because it does not know the correct order of data location and masking codes

During the searching, users can send the disorder data and the masking codes of the targeting word as a token, and the third party who receives it can find the target word on document chain and return it through an algorithm computation. This process inevitably will reveal some information, but it can minimize the information leaking by some additional actions such as mandatory equal length of word chains.

With this simple design, we have completed the functionality of searching for an encrypted document. This simple design achieves the goal, but obviously, this design is unlikely to provide sufficient security. However, a modification with different algorithms can satisfy higher security requirements, which we will not elaborate here.

Since the introduction of this concept (searchable encryption), many different schemes have been proposed and tested. We have listed some of the test results here. From the table below you can understand the potential of searchable encryption.