IJSRD - International Journal for Scientific Research & Development| Vol.

4, Issue 02, 2016 | ISSN (online): 2321-0613

Public Key Encryption with Content Search
Khomane Sharmila1 Nale Supriya2 Pondkule Priyanka3 Yadav Ashwini4 Prof. Kadam P. R.5
1,2,3,4
Student 5Asst. Professor
1,2,3,4,5
Department of Computer Engineering
1,2,3,4,5
S. B. Patil College of Engineering, India
Abstract— Today’s network faces problems over secure
communication so various methods are developed to deal
with problems. Previous Technique deals with the public
key encryption with semantic security. In this technique the
sender sends or uploads any file to the server with one
keyword and at another end receiver downloads the file by
searching the desired keyword but server is not able to
reveal anything. Existing systems take searching time linear
with the actual numbers of cipher texts. This makes difficult
to retrieve the keywords from large scale database. To tackle
with this problem we can implement the SPCHS but the
pervious one doesn’t tackle with the content searching. In
this paper we provide solution for this by implementing the
SPCHS algorithm for content searching. The SPCHS
generates the keyword searchable cipher texts so following
same technique we are generating content searchable cipher
texts with provision of search trapdoor which is corresponds
to the content. In the generation of hidden structures we are
applying the chain of content searchable cipher texts and
this structure is useful to make search fast. In this technique
the search complexity is linear with the actual queried
content. While working with the SPCHS we are constructing
it by using identity based encryption and collision free, full
identity malleable and Identity Based Key Encapsulation
Mechanism. Such type of content searching is very useful
in case to filter the unwanted spam file or mails. Finally we
present SPCHS algorithm for content searching and
reporting the spam mail to the server.
Key words: Identity based Key Encapsulation Mechanism,
SPCHS
I. INTRODUCTION
As we know the securing information in this networking era
is very important and plays important role in the
development. For this purpose various methods got
developed but the best among this is public key encryption
technique. In this era users are using various wireless
Devices to send or receive mails from anywhere or from any
location. So users may store there data on the remote servers
for convenience rather to store it on own machine. For
security purpose they are saving data in encrypted format.
But receiver faces problems when it searches data at server
side so it makes difficult for the server to search the data as
it contains lot of files and mail at own side. This situation
becomes more difficult when user stores data by using
keywords. In these situations public key encryption
technique works lot.
Public encryption technique first introduces by Boneh[1]
and has advantage that the any sender who knows public
key of receiver can upload the files with keyword searchable
generated cipher texts to the server side. At the receivers end
he can give any keyword to the server for searching at
trapdoor. Specifically we can say that
sender first
separately encrypts the file and keyword which is extracted.
Afterwards it sends these cipher texts to the server. When

Server wants to download any sort of file then he will give
that specific keyword to the search trapdoor and server will
find the data but server will not get anything from the
original file and keyword also. Server will return the
specific data in decrypted form then server will decrypt this.
The author also presented the semantic security to the
keywords given for search by receiver. This technique has
time complexity linear to the actual numbers of cipher texts.
So this is facing big problem when searching from large
databases.
To speed up this process Bellare[2] proposed scheme in
which if the encryption technique which used is
deterministic the encryption algorithm which is used is also
deterministic. The author purposes the efficient algorithm
for the search over the encrypted keyword. This is
achievable because of tree like structure of the encrypted
keyword store as per there binary values. This tree like
structure has two disadvantages:
1) Privacy of keyword can be guaranteed only for those
keywords which are in the priori.
2) As the encryption is deterministic so some information of
cipher texts may leaked.
The technique proposed by Peng Xu [3] works with the
public key encryption techniques and implementing the
same for the fast keyword searching with the hidden star
like structure to boost the searching process. This works
with the generation of cipher texts and takes search time
linear with total number of cipher texts. In this technique
still the scope is there for content searching by
implementing the same technique given by them. Such type
of content searching is useful for filtering the spam mails
and such spam will get noted at server side for further
serching of spam mails or spam files.
A. Our Motivation and Basic Idea
In the PEKS Scheme we are interested to apply this with the
content searching without sacrificing the semantic security
of the search. Important aspect of our idea is to content
search and this type of search is important for filtering the
spam. In the existing technique work has been done with the
keyword search but on that basis we can’t fine any sort of
spam things. Major thing in previous technique is it takes
searching time linear with the actual numbers of cipher texts
but this will take more time I database entries are large.
Server will face difficulty to scan and find each and every
entry. So in improvement the fast searching of this keyword
is very important but without semantic security.
So one can design this system by organizing the cipher
texts in such a manner that server can easily search it or scan
it very speedily. While designing if we design it with the
hidden relations then it will become easier to search it. In
the content searching we will create the hidden star like
structure of content which is a sequence of words.in this
way it will become indistinguishable so the trapdoor. No
any information will be leaked about this hidden star like

All rights reserved by www.ijsrd.com

1812

Public Key Encryption with Content Search
(IJSRD/Vol. 4/Issue 02/2016/506)

structure. The hidden star like structure is as follows given
in [23].
Especially in this star like structure the keywords will
form the tree with the corresponding nodes by the hidden
relations. The link is also present between the head node
with the child nodes. All nodes are cipher texts in these
hidden relations. With the help of searching trapdoor with
the head node admin will going to find the matching cipher
texts given by the receiver from the tree. While searching
for the the next keyword the previous found keyword will
help to disclose the further relations.The structure is shown
as per Fig. 1. With showing head following the child node
with the same relations for fast serching of the keyword.

al. [13] works on PEKS with filling some loop holes with
respect to keeping consistency for the PEKS. To make this
technique many sided lot of work has been done in [14],
[15] and [16]. PEKS with subset search is given in [18],
searching with time scope is given in [13] and searching
with authorization is given in [19]. Similarity search is
proposed in [20] and fuzzy keyword search is also given in
[21]. In addition to this keeping searching at trapdoor is
given in [22]. All these technique works for the keeping
searching time linear with the actual number of cipher texts.
The tree like structure is given in [23] works for the speed
up the searching process.
Deterministic public key encryption is introduced in [2]
by Bellare et al. [2] which is stronger than one ways system
bot no good at semantic security. Brakerski et al. [24] with
extension to deterministic Public key encryption they
provides better secure technique. All these technique doesn’t
provide any sort of semantic security. Peng Xu et al in [3]
introduce a technic of PEKS with provision of semantic
security by providing the hidden tree like structure in it.
They propose the search algorithm as SPCHS in which it
takes searching time linear with the matching cipher texts
only with exact numbers. When work with the large scale
database we find cipher texts then it takes more time. In this
technique they focus on keyword searching not on content
searching this content searching is possible by using same
methodology is useful for the filtering the spam. Content
searching is done by using symmetric key encryption but
there is also scope for the work with content search in
asymmetric key encryption and we can use such type of
encryption for more security and authenticity.

Fig. 1: Hidden Star Like structure

III. SYSTEM ARCHITECTURE

II. RELATED WORK
Encrypted data searching is very broadly getting
investigated in this era. The existing work done felled into
two categories first is symmetric searchable encryption and
another one is public key searchable encryption.
A. Symmetric searchable encryption
This type of searching techniques is formally known as
symmetric key encryption technique with keyword
search(SEKS).This technique introduced by Song et al in
there paper [4] with searching time linear with the actual
size of database. Refinement to this work has been done in
[5], [6] and [7].The SEKS technique with semantic security
is proposed by Curtmola et in [8] with allowing logarithmic
time searching but keeping searching time liner with the
actual size of database. To extend these works various many
sided work has been done for improvement in performance
or security. Multiple sender scenarios are given by Bao F et
al in [9]. Keyword searching by fuzzy logic proposed in [10]
by Wang et al. The practical application given in [11] works
with audit logs which are encrypted and searchable. To get
strong security and very high efficiency Cash et al [12]
proposed Dynamic Searchable Encryption technique for
large scale database.
B. Public Key Searchable Encryption
This type of searching techniques is formally known as
Public Key Searchable Encryption technique with keyword
search (PEKS). With keeping same goal in mind Abdalla et

Fig. 2: System Architecture

All rights reserved by www.ijsrd.com

1813

Public Key Encryption with Content Search
(IJSRD/Vol. 4/Issue 02/2016/506)

Fig. 2 explains the overall system architecture with
different modules in it. Each sender will first separately
encrypts the content and file and send it to server as
ciphertexts. In next step if receiver wants to retrieve the files
t containing specific content then he/she gives this content to
the search trapdoor at server side and will find the file
containing specific content . Server is not able to recognize
any original data from file and from content also. Then
receiver will get the files and he/she will decrypt it if he /she
want to report this file as spam then they will report it as
spam and server will keep such files as spam in database
with receivers ID.
Our work concentrated on public key encryption
with content search by providing semantic security by using
hidden tree like structure to report the spam files. Previous
techniques focuses on applying PEKS on to the keyword
search only but content searching for filtering spam is
equally important thing. In this technique by generating
searchable cipher texts is done with the receiver’s public key
and with the help of content search trapdoor at server side
another hidden relations can be disclosed can easily find the
next relations.
Suppose for senders send the file f
with
concatenating extracted encrypted content C(C1,C2….,Cn)
with receiver’s public key PK. We are explaining it as
public key encryption with the extracted content search.
ERPK (f) || PECS (RPK, C1) ,………, PECS(RPK, Cn) (1.1)
In the next step it will forms the tree like structures
as explained in Fig1. When receiver will get contain then
he/she finds that this content is spam then they will report
such to server. Such technique is applicable to find the
encrypted spams.
The brief explanation about the entities in
architecture and their operations is as follows, Sender (Data
Owner):The sender or data owner is entities which will
register first with server afterwards encrypt the data in file
and extracted content with the receiver’s public key and
uploads it to server. Sender may be any individual person or
any organization.
A. Receiver (Data User): This entity will also register with the server and sends the
content for search in encrypted format for searching
particular file and if encrypted spam finds then report it to
the server.
B. Server: This entity will provide the storage of files and content in
encrypted format and provides retrieval service. This entity
will work with data server and data manager. Data server is
used for storing of outsourced data and manager is used to
management. Upon receiving the encrypted content from the
receiver server will test it with the database. The matching
files get retrieved and given to the receiver after completion
of the test but without knowing the original file data.
C. Key Generator: This entity is nothing but trusted third party and responsible
for generation and management of keys used for encryption
and decryption. According to the requirement keys will get
distributed during set up of system.

D. Implementation Details
The architecture mainly contains functions as key
generation, File preprocessing, encryption, search and
decryption and described as follows,
1) Key generation:This will take one security parameter and the keyword space
as input and generates pair of keys known as public and
secrete key as PK and SK. This is public key encryption so
that different keys for encryption and decryption.
2) File preprocessing:In this first we have to extract the content from specific files
foe encryption .Let sender having set of five files like
F={F1,F2,F3,F4,F5} to get upload to the server. At this step
sender will preprocess these set of files. Ci where i=1, 2, 3,
4, 5,……., n is extracted contents. We will get following
tables as
File File ID Encrypted Content
F1
1
C1
F2
2
C2,C3
F3
3
C2, C4
F4
4
C5,C6,C7
F5
5
C8,C9
Table – 1.File index creation
Encrypted Content File ID
C1
1
C2
2,3
C3
2
C4
3
C5
4
C6
4
C7
4
C8
5
C9
5
Table - 2.Inverted creation
3) Encryption:This will provide the encryption with the help of key
generated by key generation. First encryption of file set as
ERPK (F) as encrypting file F with receivers public key PK.
File ID Encrypted File
1
ERPK1 (F1)
2
ERPK2 (F2)
3
ERPK3 (F3)
4
ERPK4 (F4)
5
ERPK5 (F5)
Table - 3.Encrypted file list
Next step is to encrypt the content set and content
encryption is computed as ERPK (C1,id) where RPK is
public key and C1 is content and id is file id and we prepare
table as
Encrypted content File ID
ERPK (C1,1)
1
ERPK (C2,2)
2
ERPK (C2,3)
3
ERPK (C3,2)
2
Table - 4.Encrypted index
From this encrypted index table we create hidden star like
structure
4) Search:In the search function first trapdoor will take input as SK
and a content and gives output as Tw. In next step it will

All rights reserved by www.ijsrd.com

1814

Public Key Encryption with Content Search
(IJSRD/Vol. 4/Issue 02/2016/506)

check the encrypted content from the tree like structure and
then by matching with encrypts index table server will give
the queried file.
a)
Decryption:- The receiver will decrypt the content
by its own secrete key as DESK(F).
E. Implementation Classes
At implementation we have generated different classes as
follows,
1) Key generation class:In this class we have used RSA Algorithm with functions
like,random_prime(min, max)-which will generate the prime
numbers.
compute()-is used to compute the functions to generate the
keys.
2) Encryption class:In this we used different classes like,File ID allocation()This function will assign one unique ID to each file.
Keyword and content extraction()-This fuction is uded for
extraction process of consecutive sequences of the
charactes. encrypt()-This function takes inputas files from
data sender path and encrypt them by using receivers public
key.
3) File Process:In this we used two different classes as follows Uploadfile()This function is used for uploading of file to the server.
Downloadfile()-This function is used for downloading of
file from the server.
Search()-This function is used for searching of file and
sending queries by receiver.
4) Decryption class:In this we use,
decrypt()- this function takes input required file and
decrypt the file .
Spam()-This function is used for filtering the spam
contains.
IV. CONCLUSION
This paper works with SPCHS methodology for the content
search to filter the spam. This scheme works without
sacrificing any semantic security with creating hidden
relations to get fast search. This new concept will allow us
generations of content searchable cipher texts by using
hidden star like structure. This structure will guide to search
next relations at the search trapdoor. Neither any original
contains of file data will leaked to neither the server nor any
content cipher texts given for the search by providing
semantic security. This is like very promising tool to solve
the problems of content searching. In future one can work
for the retrieval of completeness of hidden relations with
verification by forming the hidden relations.
ACKNOWLEDGEMENT
We thank colleagues of S.B. Patil College of Engineering
Pune, for their constant feedback on the paper. We also
thank the anonymous reviewers for their valuable
comments.
REFERENCES
[1] Boneh D., Crescenzo G. D., Ostrovsky R., Persiano G.:
Public Key Encryption with Keyword Search. In:
Cachin C., Camenisch J.(eds.) EUROCRYPT 2004.

LNCS, vol. 3027, pp. 506-522. Springer,Heidelberg
(2004)
[2] Bellare M., Boldyreva A., O’Neill A.: Deterministic
and Efficiently Searchable Encryption. In: Menezes A.
(ed.) CRYPTO 2007. LNCS, vol. 4622, pp. 535-552.
Springer, Heidelberg (2007)
[3] Peng Xu, Qianhong Wu, Wei Wang, Willy Susilo,
Josep Domingo-Ferrer, Hai Jin, “Generating
Searchable Public-Key Ciphertexts with Hidden
Structures for Fast Keyword Search”, IEEE
Transactions on Information Forensics and Security
Volume: PP Year: 2015.
[4] Song D. X., Wagner D., Perrig A.: Practical techniques
for searches on encrypted data. In: IEEE S&P 2000,
pp. 44-55. IEEE (2000).
[5] Goh E.-J.: Secure Indexes. Cryptography ePrint
Archive, Report 2003/216 (2003).
[6] Bellovin S. M., Cheswick W.R.: Privacy-Enhanced
Searches
Using
Encrypted
Bloom
Filters.
Cryptography ePrint Archive, Report 2004/022 (2004).
[7] Agrawal R., Kiernan J., Srikant R., Xu Y.: Order
Preserving Encryption for Numeric Data. In:
Proceedings of the 2004 ACM SIGMOD international
conference on Management of data, pp. 563-574. ACM
(2004).
[8] Curtmola R., Garay J., Kamara S., Ostrovsky R.:
Searchable
Symmetric
Encryption:
Improved
Definitions and Efficient Constructions.In: ACM CCS
2006, pp. 79-88. ACM (2006).
[9] Bao F., Deng R. H., Ding X., Yang Y.: Private Query
on Encrypted Data in Multi-User Settings. In: Chen L.,
Mu Y., Susilo W. (eds.) ISPEC 2008. LNCS, vol.
4991, pp. 71-85. Springer, Heidelberg (2008).
[10] Li J., Wang Q., Wang C., Cao N., Ren K., Lou W.:
Fuzzy Keyword Search over Encrypted Data in Cloud
Computing. In: IEEE INFOCOM 2010, pp. 1-5.
(2010).
[11] Waters B. R., Balfanz D., Durfee G., Smetters D. K.:
Building an Encrypted and Searchable Audit Log. In:
NDSS 2004 (2004).
[12] Cash D., Jaeger J., Jarecki S., Jutla C., Krawczyk H.,
Ros M.-C.,Steiner M.: Dynamic Searchable Encryption
in Very Large Databases:Data Structures and
Implementation. In: NDSS 2014.
[13] Abdalla M., Bellare M., Catalano D., Kiltz E., Kohno
T., Lange T.,Malone-Lee J., Neven G., Paillier P., Shi
H.: Searchable Encryption Revisited: Consistency
Properties, Relation to Anonymous IBE, and
Extensions. In: Shoup V. (ed.) CRYPTO 2005. LNCS,
vol. 3621, pp.205-222. Springer, Heidelberg (2005)
[14] Park D. J., Kim K., Lee P. J.: Public Key Encryption
with Conjunctive Field Keyword Search. In: Lim C. H.
and Yung M. (eds.) WISA 2004. LNCS, vol. 3325, pp.
73-86. Springer, Heidelberg (2004).
[15] Golle P., Staddon J., Waters B. R.: Secure Conjunctive
Keyword Search over Encrypted Data. In: Jakobsson
M., Yung M., Zhou J.(eds.) ACNS 2004. LNCS, vol.
3089, pp. 31-45. Springer, Heidelberg (2004).
[16] Ballard L., Kamara S., Monrose F.: Achieving
Efficient Conjunctive Keyword Searches over
Encrypted Data. In: Qing S. et al. (eds.) ICICS 2005.

All rights reserved by www.ijsrd.com

1815

Public Key Encryption with Content Search
(IJSRD/Vol. 4/Issue 02/2016/506)

LNCS, vol. 3783, pp. 414-426. Springer, Heidelberg
(2005).
[17] Hwang Y. H., Lee P. J.: Public Key Encryption with
Conjunctive Keyword Search and Its Extension to a
Multi-user System. In: Takagi T., Okamoto T.,
Okamoto E. and Okamoto T. (eds.) Pairing
2007.LNCS, vol. 4575, pp. 2-22. Springer, Heidelberg
(2007).
[18] Boneh D., Waters B. R.: Conjunctive, Subset, and
Range Queries on Encrypted Data. In: Vadhan S. P.
(ed.) TCC 2007. LNCS, vol. 4392,pp. 535-554.
Springer, Heidelberg (2007).
[19] Tang Q., Chen X.: Towards asymmetric searchable
encryption with message recovery and flexible search
authorization. ASIACCS 2013, pp. 253-264 (2013).
[20] Cheung D. W., Mamoulis N., Wong W. K., Yiu S. M.,
Zhang
Y.:Anonymous
Fuzzy
Identity-based
Encryption for Similarity Search.In: Cheong O., Chwa
K.-Y and Park K. (eds.) ISAAC 2010. LNCS,vol.
6505, pp. 61-72. Springer, Heidelberg (2010).
[21] Xu P., Jin H., Wu Q., Wang W.: Public-Key
Encryption with Fuzzy Keyword Search: A Provably
Secure Scheme under Keyword Guessing Attack. IEEE
Transactions on Computers, 62(11), pp. 2266-2277
(2013).
[22] Arriaga A., Tang Q., Ryan P.: Trapdoor Privacy in
Asymmetric Searchable Encryption Schemes. In:
Pointcheval
D.
and
Vergnaud
D.
(eds.)
AFRICACRYPT 2014. LNCS, vol. 8469, pp. 31-50.
Springer, Heidelberg (2014).
[23] Camenisch J., Kohlweiss M., Rial A., Sheedy C.: Blind
and Anonymous Identity-Based Encryption and
Authorised Private Searches on Public Key Encrypted
Data. In: Jarecki S. and Tsudik G. (eds.) PKC 2009.
LNCS, vol. 5443, pp. 196-214. Springer, Heidelberg
(2009).
[24] Brakerski Z., Segev G.: Better Security for
Deterministic Public-Key Encryption: The AuxiliaryInput Setting. In: Rogaway P. (ed.)CRYPTO 2011.
LNCS, vol. 6841, pp. 543-560. Springer, Heidelberg
(2011).

All rights reserved by www.ijsrd.com

1816