# Lightweight, Secure, Similar-Document Retrieval over Encrypted Data
## 4 Scheme Overview
### Private Similarity Computation and Search Queries Stage  
Once the secure document set and the secure searchable inverted index have been outsourced to the remote server, authorized users can retrieve similar documents. These users can remotely access these documents via the server. In this subsection, the details of the proposed privacy-preserving DSD programme are explained. Algorithm 2 shows the private and secure DSD proposal. ```
1:the document \(Q\). 2:the Scores. 3:start;
4:Use equations 1 and 3 to generate the fingerprint \(df_{i}=\{f_{i1},\ldots,f_{ia}\}\);
5:Send \(Q\!f\) to server \(S\);
6:(Server \(S\))
7:For\(i=1\ldots m\)
8:\(Score(ID(id_{i}))=Enc_{kpub}(0)\)
9:Endfor
10:For\(j=1\ldots c\)
11:If\(gf_{i}\in I\)
12:For\(i=1\ldots m\)
13:\(Score(ID(id_{i}))=Score(ID(id_{i}))+Enc_{kpub}(e_{ij})\)
14:Endfor
15:End If
16:Endfor (Alice)
17:For\(i=1\ldots m\)
18:\(\alpha_{i}\)=\(Dec_{kpriv}(Score(ID(id_{i}))\)
19:Endfor
20:end;
```  
**Algorithm 2** Private and Secure DSD. ### Private Similarity Computation and Search Queries Stage  
Once the secure document set and the secure searchable inverted index have been outsourced to the remote server, authorized users can retrieve similar documents. These users can remotely access these documents via the server. In this subsection, the details of the proposed privacy-preserving DSD programme are explained. Algorithm 2 shows the private and secure DSD proposal. ```
1:the document \(Q\). 2:the scores. 3:\(\{Alice:\}\)
4:start;
5:Use equations 1 and 3 to generate the fingerprint \(df_{i}=\{f_{i1},\ldots,f_{ia}\}\);
6:Send \(Q\!f\) to server \(S\);
7:\(\{Server\) \(S\}\)
8:For\(i=1\ldots m\)
9:For\(i=1\ldots m\)
10:\(Score(ID(id_{i}))=Score(ID(id_{i}))+Enc_{kpub}(e_{ij})\)
11:Endfor
12:End If
13:Endfor
14:(Alice)
15:For\(i=1\ldots m\)
16:\(\alpha_{i}\)=\(Dec_{kpriv}(Score(ID(id_{i}))\)
17:Endfor
18:end;
```  
**Algorithm 3** Private and Secure DSD. ### Private Similarity Computation and Search Queries Stage  
Once the secure document set and the secure searchable inverted index have been outsourced to the remote server, authorized users can retrieve similar documents. These users can remotely access these documents via the server. In this subsection, the details of the proposed privacy-preserving DSD programme are explained. Algorithm 2 shows the private and secure DSD proposal. ```
1:the document \(Q



Score decryption: On the client-side, _[PERSON]_ uses the secret key _Kpriv_ to decrypt the received score values \(\varpropto(d_{i})\) for all \(i=1\ldots m\), showing her which documents are similar to her own document \(Q\). The score values are small in size and limited in number, so they do not invoke a significant computational and communication cost for client implementation. 4. Document retrieval: _[PERSON]_ asks the server \(S\) to retrieve the documents with the top-\(h\) scores. After retrieving the most similar documents, she decrypts them using an efficient symmetric cipher AES with the _Kcoll_ 128-bit length secret key; because this uses a much shorter key, it reduces lightweight client computation requirements. _[PERSON]_ can then manually decide which of the top-\(h\) retrieved documents are the most suitable for her request. Continuing with the index illustrated in Table 1, suppose that the terms of the query document are: 400, 500, 600, 710, and 800. Thus, the scores of the 14 documents are calculated as in Table 2. We see that Document 1 is the most similar with three scores, followed by Document 14 with two scores, and so on. ## 6 Security Analysis

### Security of Encryption

It is assumed here that the encrypted document database, secure searchable inverted index, and encrypted query will not disclose information to the non-secure remote server. It is reasonable to assert that the document database will be made secure through AES with CTR mode encryption. Nevertheless, certain problems remain that must be solved. The encrypted document files may disclose vital information to a remote server due to their actual size.