*This is the third part of a series on searching on encrypted data. See parts 1, 2 and 4.*

Previously, we covered the simplest solution for encrypted search which consisted of using a deterministic encryption scheme (more generally, using a property-preserving encryption scheme) to encrypt keywords. This resulted in an encrypted search solution with sub-linear (in ) search time but that leaked quite a bit of information to the server.

We’ ll now describe a different approach that provides the opposite properties: slow search but better security. At a high-level, one can view this approach as simply replacing the PPE scheme in the previous solution with a *functional encryption* (FE) scheme.

** Functional and Identity-Based Encryption **

The notion of FE was first described by Sahai and Waters in a talk [SW09] and later formalized by Boneh, Sahai and Waters [BSW10] and by O’Neill [O’Neill10]. Starting with the work of Boneh and Franklin on identity-based encryption (IBE), there was a slew of new encryption schemes achieving various properties (e.g., attribute-based encryption, hidden vector encryption, predicate encryption). Many of these constructions felt loosely related so the idea behind FE was to capture all these schemes under a single framework. Though everything we’ll cover can be done with FE, for concreteness, we’ll consider the special case of IBE, which was first suggested by Shamir [Shamir84] and realized by Boneh and Franklin [BF01].

A public-key IBE scheme consists of four algorithms:

- A setup algorithm used to generate a master secret and public key pair .
- An encryption algorithm that takes as input the master public-key , an identity and a message as input and returns a ciphertext .
- A key generation algorithm that takes as input the master secret key and an identity and returns a secret key .
- And finally a decryption algorithm that takes as input a secret key and a ciphertext and returns a message or a failure symbol .

The motivation behind IBE is key distribution. In particular, using an IBE scheme should be easier than using a standard (public-key) encryption scheme where public keys have to be certified, revoked and verified.

Let’s consider a concrete example. Suppose Alice wants to send an encrypted message to Bob who works at Microsoft. The idea is that Microsoft would first generate a pair of master keys and distribute together with a certificate. To send her message , Alice would retrieve Microsoft’s master public key , verify its certificate and then encrypt under Bob’s identity by computing:

To decrypt the ciphertext , Bob needs to hold a secret key for his identity under Microsoft’s master key:

Given this key, he can then recover the message by computing .

Notice that Alice never needed to know what Bob’s public key was or to verify any certificate for his key. The only certificate she had to verify was for Microsoft’s master public key but once that key is authenticated she can send email to anyone at Microsoft without any additional work.

** Public-Key Encrypted Search **

We are now ready to see how (anonymous) IBE can be used to search over encrypted data. This idea was first proposed by Boneh, Di Crescenzo, Ostrovsky and Persiano [BCOP04] and is best explained by considering the following email scenario where Alice wants to send an encrypted email to Bob.

Bob first generates a master secret and public key pair for the IBE scheme and a secret and public key pair for a standard public-key encryption scheme . He then makes the public keys public and keeps the secret keys private. Alice encrypts her message under using the standard public-key encryption scheme, resulting in a ciphertext . She then attaches IBE encryptions of under Bob’s master public key with the keywords as the identity. This results in a set of IBE encryptions where each (for ) is defined as

where are the keywords.

Let’s suppose Bob’s email server has received emails of this form, so that it now holds a set of encrypted emails and an encrypted database

Now, if Bob wants to retrieve the emails with keyword , he just needs to generate a secret IBE key as and send it as the token to the server. The server then tries to decrypt each IBE ciphertext in and if successful follows the associated pointer to return the appropriate encrypted email.

An important observation is that a standard IBE scheme here will not be enough. The problem is that the notion of IBE does not necessarily guarantee that a ciphertext hides information about the identity used to create it. This means that if we were to use a standard IBE scheme, could leak the keywords to the server. To address this, Boneh et al. observe that what you actually need is an *anonymous* IBE scheme which essentially means that the ciphertexts do not reveal information about the identities. Fortunately, we know how to construct such schemes efficiently so this is not a major concern from a practical point of view (e.g., the Boneh-Franklin IBE scheme is anonymous).

Search time for the server is since it has to try to decrypt each ciphertext in the . Assuming , this is which is a *a lot* slower than the solution based on deterministic encryption described in the previous post which required time (i.e., sub-linear in ).

** Is this Secure? **

While this approach is slower than the PPE-based approach, it has better security properties. First, the encrypted database by itself does not reveal much useful information to the server since—unlike the deterministic approach—keywords are encrypted using a *randomized* (identity-based) encryption scheme. So even if two documents have keywords in common, the encrypted keywords in will be different. This means that we don’t have to make unnatural assumptions about the data (e.g., that it has high entropy) to use it safely.

There is an issue, however, with this approach: *it does not protect the search terms*. In particular, the server could mount the following attack to figure out which keyword the client is searching for.

Suppose the server has some dictionary of words. For each keyword it encrypts with key and identity . This results in a set of (identity-based) encryptions . Now, given some token , the server can learn by simply trying to decrypt each of the ciphertext with . If the decryption works for some , then the server knows that is for the identity used to generate .

Notice that the attack does not result from a deficiency of any particular IBE scheme but that it applies to *any* public-key encrypted search solution. The fundamental problem is that the server has both the ability to create EDBs (since it has the public-key) and to search over them. So what this tells us is that, as defined, the notion of search on publicly-encrypted data cannot protect search terms.

So what can we do about this? Recently, Boneh, Raghunathan and Segev [BRS13] and Arriaga and Tang [AT13] set out to design public-key encrypted search solutions that achieved the best possible level of confidentiality for search terms. Roughly speaking, what this means is that if the search terms are hard enough to guess, then the schemes proposed will protect them.

But what do we do if (as in most cases) our search terms are not hard to guess? Well, we don’t really have a good answer except that this problem does not occur in the symmetric setting since only the client can generate EDBs so, depending on the application, a symmetric solution might be preferable.

** Conclusions **

So far, we’ ve seen two approaches to searching on encrypted data. The first, the PPE-based approach, resulted in schemes with fast search (sub-linear in ) but with relatively weak security guarantees. The second, the FE-based approach, resulted in schemes with slow search (linear in ) but with better security guarantees.

In the next post, we’ll go over solutions that are even slower, but that achieve the strongest possible levels of security!

Pingback: How to Search on Encrypted Data: Intro (Part 1) | Outsourced Bits

Waiting for next part…

Pingback: How to Search on Encrypted Data (Part 4): Oblivious RAMs | Outsourced Bits

Pingback: How to Search on Encrypted Data: Deterministic Encryption (Part 2) | Outsourced Bits

In the email scenario under section “Public-Key Encrypted Search”. when Bob wants to retrive an email from the server he sends sk_w to the serve. If the server successfully decrypt an IBE ciphertext, e, in EDB then he knows the keyword: w = Dec(sk_w, e). Would you please explain this point in more details.

Thanks

Oh, it looks like I forgot the 1. Thank you very much for catching this! w_j is the

identityand themessageis 1, so decryption would not leak any information.It’s fixed in the text.

Aha … Thank you so much!

Pingback: How to Search on Encrypted Data: Searchable Symmetric Encryption (Part 5) | Outsourced Bits

I want to know that, can we able to encrypt the documents using RSA. and aslo encrypt the index structure based on B Tree using RSA. How we can perform search operation on this RSA encrypted index B Tree. Please answer

I don’t know of a searchable encryption scheme that is based on RSA. I’m not sure why you want to build one based on RSA though. Also note that encrypting the documents with RSA woule be very inefficient.