<div dir="ltr"><div><div><div><div><div><div><div><br></div>It depends on the construction.  (I've never seen any form of cipher mode used.  It's more involved.)<br><br>The simplest construction I know of is SSE-2:<br><br></div>Take an inverted index of the corpus:<br><br>w1 : {id1, id2, id3}<br></div>w2 : {id2}<br></div>w3 : {id2, id3}<br><br></div><div>Map it to a set of triples, where the first value is the word, the second is the position, and the third is the id:<br><br></div><div>(w1, 0, id1), (w1, 1, id2), ..., (w3, 0, id2), (w3, 1, id3)<br><br></div><div>Let Pi be a PRP keyed by K.  Generate a table T.  Foreach entry x in the array:<br><br></div><div>k = Pi(K, x(0) || x(1))<br></div><div>T[k] = x(2)<br><br></div><div>And then so many random values are added to T and the dictionary is shuffled if it has order (to obscure the true number of keywords).<br><br></div><div>T is then the index and can be published.<br><br></div><div>A trapdoor to search for w3 is then {Pi(K, w3 || 0), Pi(K, w3 || 1), Pi(K, w3 || 2)}<br></div><div>With the full index, you can simply look each of those up to see if they're in T, and if any are, return the associated ids or the file in the encrypted corpus.<br><br></div><div>Because the data owner has K, he can produce the trapdoor, which allows the server to learn which files it should return.  Without the trapdoor, the server just has a long list of random data and ids.<br><br></div><div>SSE-1 and its derivatives embed linked lists in an array--one linked list for each line of the inverted index, one node for each id (with its data XORed with an analog of Pi(w)).  That leads to a constant-size trapdoor, but more to explain.<br><br></div><div>The game for CKA2 captures the notion that an adversary, allowed to produce the plaintext corpus and query the functions that require a key an unbounded number of times can't distinguish between a real SSE system and a random simulator intentionally leaking specific things like file length.  In other words, given everything except the key, an adversary can't learn anything.<br></div></div></div></div>