Next Article in Journal
Creative Narration as a Design Technique
Previous Article in Journal
A Blockchain-Based Decentralized Public Key Infrastructure for Information-Centric Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Public Key Encryption with Equality Test in a Cloud Environment

1
School of Mathematics and Statistics, Henan University of Science and Technology, Luoyang 471003, China
2
College of Information Engineering, Henan University of Science and Technology, Luoyang 471003, China
*
Author to whom correspondence should be addressed.
Information 2022, 13(6), 265; https://doi.org/10.3390/info13060265
Submission received: 10 February 2022 / Revised: 19 April 2022 / Accepted: 19 April 2022 / Published: 24 May 2022
(This article belongs to the Special Issue Advances in Functional Encryption)

Abstract

:
With the rapid development and wide application of cloud computing and 5G communication, the number of mobile users is increasing rapidly, meaning that cloud storage services are receiving more and more attention. The equality test technology of retrievable encrypted data has become a hot research topic among scholars in recent years. In view of the problem of offline keyword-guessing attacks (KGAs) caused by collusion between internal servers and users, a public key encryption with equality test scheme (RKGA-CET) with higher security against KGAs is proposed. Based on the assumed difficulty of the discrete logarithm problem (DLP) and the properties of bilinear mapping, a specific encryption algorithm that encrypts the keyword twice is designed. In the first encryption stage, we convert the keyword according to the property of isomorphism of a finite field. In the second encryption stage, we encrypt the converted keyword vector and embed the user’s private key, and then perform the equality test. The algorithm ensures that the adversary cannot generate legal ciphertexts and implement KGAs when the secondary server is offline. At the same time, the algorithm also supports two authorization modes, in which case users can flexibly choose the corresponding authorization mode according to their own needs. Performance analysis shows that this scheme has overall superiority compared with other similar ones.

1. Introduction

In recent years, the rapid development of the Internet and information technology has laid a solid foundation for the application of cloud computing. With the wide application of cloud computing technology, more and more enterprises and individuals prefer to outsource data to cloud servers for storage, so as to reduce the occupation of storage space of local computers. However, there is no such thing as a free lunch. While enjoying the convenient services provided by the cloud servers, the users have to pay attention to the problems of data security, privacy, identity information security, etc. [1,2,3,4]. The privacy data of the users stored in the cloud may be leaked due to the access of incompletely trusted cloud server providers. Therefore, the data owner needs to encrypt their sensitive data before uploading or sharing private files and subsequently sending them to the cloud server. Although traditional encryption technology can protect data privacy, it does not support the retrieval of encrypted data, and the files taking the form of ciphertexts makes their operation more difficult. When searching for the required file, the users must download all of the ciphertexts to the local computer first, and then find the data they need after decryption. However, this undoubtedly occupies a lot of bandwidth and local storage space, which is obviously unreasonable.
In order to solve the problem of keyword search in ciphertexts, the concept of public key encryption with keyword search has been proposed [5,6,7]. The users first use the standard public key encryption system to encrypt the plaintexts, and then use the searchable encryption mechanism to encrypt the keyword and, finally, attach the keyword ciphertext to the plaintext ciphertext and send them to the cloud server for storage. When a user wants to search for a keyword, they can use their private key to generate a trapdoor corresponding to the keyword and send it to the cloud server. Once the cloud server receives this trapdoor, it uses the trapdoor to test the ciphertext of the keyword. If the test is successful, it indicates that the ciphertext contains the keyword required by the user. Then, the server returns the ciphertext containing the keyword to the user. After receiving the ciphertext, the user decrypts it to obtain the required information. Searchable encryption technology solves the problem of searching for keywords in ciphertexts in a single-user environment (or single-public-key environment); that is, this technology can only process the data encrypted by a single public key. However, in a multiuser environment (or multi-public-key environment), searching for keywords encrypted with different public keys in ciphertexts requires equality test technology. The equality test technology, which not only supports keyword retrieval on ciphertexts in multiuser environments, but can also be used to compare whether ciphertexts of different users contain the same keyword, can be regarded as a variant of the searchable encryption technology. Due to the large number of the users in the cloud environment, equality test technology is more practical than searchable encryption technology. As mentioned above, the advantage of equality test technology is that it allows a tester to check whether any two ciphertexts encrypted by different public keys contain the same plaintext without decryption. However, it also has some shortcomings that are exposed in the application process, such as poor flexibility of authorization and too-idealistic proof under a random oracle model. The first point means that users cannot adaptively authorize any number of ciphertexts to testers, which makes the generation and storage of ciphertext-level authorization trapdoors very cumbersome. At the same time, user-level authorization to restrict testers’ testing behaviors is difficult. The second point means that a scheme based on an ideal model cannot accurately reflect reality, so it cannot show that instantiation in the real world is safe. Therefore, the research on equality test technology has important theoretical significance and application value.
Equality test technology can be used by medical systems to protect patients’ historical cases. Suppose the Alice and Bob are patients with the same symptoms who belong to the same medical institution, each of whom holds multiple medical records encrypted with their own public keys. The medical institution uses the public cloud server as the running environment of the medical record management system where patients can upload the encrypted data, and often wants to classify the encrypted medical label Tag in the medical record management system, so as to find potential diseases by comparing the same diseases. At this time, Alice and Bob can authorize the medical institution to perform equality tests on their own encrypted medical records, with the aim of classifying and storing these data with the medical institution. Even if these data have been encrypted with different public keys, with the authorization of the patients, the medical institution can compare and classify the encrypted medical records, and then choose the most suitable treatment scheme for their disease. However, if the medical institution is allowed to arbitrarily detect whether the patients’ encrypted medical records have the same plaintext messages, this will violate the patients’ privacy to a certain extent. Therefore, it is necessary to increase the authorization mechanism to protect the privacy of patients. In this way, when a large number of large-scale equality tests need to be performed on encrypted medical records, patients can directly grant user-level authorization to the medical institution, thereby reducing the waste of time and space in the authorization process, and improving efficiency. If only the label Tag needs to be tested, the ciphertext-level authorization can be generated directly for the corresponding label, and only the medical institution is allowed to perform equality tests on these ciphertexts. A secure equality test technology should be able to prevent KGAs by internal and external adversaries—especially internal adversary attacks. However, if the KGA is initiated by the medical institution itself, patients’ private data are more likely to be leaked, because the information entropy of the keyword space of the disease is relatively small, which may even affect patients’ lives. Therefore, the medical system should adopt a ciphertext equality test technology with higher security [8,9].

1.1. Our Work

Under this background, our paper proposes a RKGA-CET scheme that can resist offline KGAs. Firstly, the scheme encrypts a user’s message according to the isomorphism of the finite field F p [ x ] mod f ( x ) generated by the irreducible polynomial f ( x ) of degree n over the finite field F p , and the finite field generated by the companion matrix derived from f ( x ) , which is equivalent to the conversion of the keyword. Secondly, based on the DLP assumption of bilinear mapping, the encrypted message is re-encrypted. Finally, the equality test is performed. This scheme makes the probability of the polynomial-time adversary guessing the keyword through the exhaustive method negligible. This is because when the auxiliary server is offline, even if the adversary obtains the legal ciphertext (the converted keyword), the polynomial discrete logarithm problem over the finite field F p needs to be solved in order to decrypt the corresponding plaintext message from the ciphertext. Therefore, the adversary cannot implement offline KGAs. In addition, our paper also designs two kinds of granularity authorization algorithm. Under the random oracle model, it is proven that our scheme is a one-way (OW-CCA) and indistinguishable (IND-CCA) secure encryption scheme against chosen ciphertext attacks.
In order to explain the highlights of our work more generally, it is necessary to clarify the benefits of secondary encryption. We note that most of the existing schemes are encrypted once; that is, they encrypt the keyword w into the ciphertext c . During the test, a tester needs to input the ciphertexts c 1 , c 2 and the trapdoor T , and then calculate whether H ( c 1 , T ) and H ( c 2 , T ) are equal based on a hash function H . Here, we use a relatively abstract expression. The specific situation may be different, but there is no difference in essence. Furthermore, the calculation result of H ( c 1 , T ) is H ( w 1 ) , and the calculation result of H ( c 2 , T ) is H ( w 2 ) . If w 1 = w 2 , then it must be the case that H ( w 1 ) = H ( w 2 ) , so that the tester can judge whether the plaintexts corresponding to the ciphertexts are the same without decryption. The premise of algorithm security is that the hash function is a random oracle or anti-collision mechanism. However, it is difficult to meet such strong requirements in real applications, and the number of keywords is often limited, which increases the probability of the adversary successfully breaking the algorithm when executing KGAs. Considering this situation, we carry out an “intermediate process” in our scheme; that is, before encrypting the keyword w into the ciphertext c , we first encrypt the keyword w into the ciphertext v , and then encrypt v into c . Through such processing, the calculation result of H ( c 1 , T ) is H ( v 1 ) , and the calculation result of H ( c 2 , T ) is H ( v 2 ) . If w 1 = w 2 , then it must be the case that H ( v 1 ) = H ( v 2 ) . It should be noted that keywords are no longer required to participate in the equality test, but are required for the results of the “intermediate process”. When an adversary carries out KGAs, they can only encrypt the keyword w into v first, and then perform the equality test. However, it can be seen from the construction process of our scheme that the adversary needs to successfully obtain the random number b used by the user in the encryption, with a probability of 1 / p n 1 to obtain the correct v , which indicates that the adversary has only a small probability to obtain the result of the “intermediate process”, so the probability of successfully executing KGAs is also small. We contend that our scheme has higher security, which is based on this “intermediate process”.

1.2. Related Work

In order to enable the users to search ciphertexts directly in ciphertext space, Boneh et al. [10] proposed a public key encryption with keyword search (PEKS) scheme, in which users can search for the required data only by generating the corresponding query trapdoor with their own private keys and without decrypting the ciphertexts. Since the PEKS scheme was proposed, it has attracted extensive interest from researchers. Baek et al. [11] proposed the SCF-PEKS scheme, which removes the secure channel between the server and each user assumed by Boneh et al. in the PEKS scheme. However, the users of this scheme have to expose their private keys to a third party, leading to security risks. After that, Rhee et al. [12] improved the scheme proposed by Baek et al. by using a more complex public key structure to avoid exposing users’ private keys and strengthen security. In the same year, Fang et al. [13,14] implemented a keyword search encryption scheme without a secure channel in the standard model, and subsequently proposed a secure public key encryption with keyword search scheme against KGAs in the standard model. Since the keyword space is much smaller than the key space, however, most of the existing keyword search schemes have potential KGA threats. After the internal server colludes with malicious users to obtain the trapdoor, in the event of the auxiliary server being offline, it can guess the information of the trapdoor and keywords by exhaustively guessing the keywords, which is not expected by honest users. Therefore, in recent years, academic research has mainly focused on how to design an encryption scheme that can resist KGAs. In 2019, Zeng Qi et al. [15] designed a PKE+PEKS scheme that could resist KGAs, which achieved security by generating a secret value and binding this secret value with keywords. In the same year, Wang Shaohui et al. [16] designed an encryption scheme against inside keyword-guessing attacks (IKGAs) by using a non-deterministic algorithm and introducing random numbers into keyword ciphertexts and search trapdoors. In 2020, Du Ruizhong et al. [17] also designed an encryption scheme against IKGAs by introducing random numbers, and combined their scheme with blockchain technology to enhance security. Then, Zhang Yulei et al. [18] designed a certificateless authentication searchable encryption scheme against IKGAs in multiuser environments by combining public key authentication encryption and proxy re-encryption technology. In 2021, Chen Ningjiang et al. [19] designed an encryption scheme against IKGAs by constructing an inverted index structure of ciphertext and embedding the user’s private key. Meanwhile, Li Zhiyi et al. [20] designed a dynamic PEKS scheme that could resist KGAs based on the ElGamal encryption algorithm. However, PEKS does not support searching for data encrypted with different public keys in multiuser environments, so it has some limitations. Therefore, Yang et al. [21] first proposed a public key encryption with equality test (PKEET) scheme for multiuser environments. This scheme can use the property of bilinear pairing to test whether two ciphertexts encrypted by different public keys contain the same plaintext without decryption. However, this scheme lacks an authorization mechanism, meaning that anyone could perform an equality test on the ciphertexts, resulting in certain security risks. Subsequent research has focused on providing authorization mechanisms, and researchers have put forward different PKEET schemes [22,23,24,25]. Tang [26,27] proposed an FG-PKEET scheme that supports user-level authorization; that is, only when the tester receives the authorization trapdoors of two designated users can they have the authority to perform an equality test for the arbitrary ciphertexts of the two users. Subsequently, Huang et al. [28] proposed a PKE-AET scheme that supports ciphertext-level authorization; that is, only when the tester receives the authorization trapdoors of two designated users can they have the authority to perform an equality test for the designated ciphertexts of the two users. In 2021, Xu Yan et al. [29] put forward an identity-based equality test scheme against IKGAs. In their scheme, the blind signature algorithm is used to convert keywords, and then the ciphertexts of the converted keywords are outsourced to the cloud server. However, the test algorithm in their scheme is slightly high.

1.3. Organizational Structure

The organizational structure of this paper is as follows: Section 1 is the Introduction. In Section 2, we introduce the relevant knowledge used in the paper and the definitions of two types of security threats and security models. Section 3 introduces the concrete construction process of our scheme, including the encryption algorithm, decryption algorithm, authorization algorithm, and test algorithm. In Section 4, we prove the correctness and security of the proposed scheme. Section 5 compares the performance and security of our scheme with other schemes. In Section 6, we give a specific application example. Finally, in Section 7, we summarize the full text.

2. Preliminaries

2.1. Bilinear Mapping

Suppose that there exist three multiplicative cyclic groups G , G 1 , and G T , with the prime number p as the order; g and g 1 are generators of G and G 1 , respectively. The bilinear mapping e : G × G 1 G T satisfies the following conditions [30]:
(1)
Bilinearity: e ( S u , T v ) = e ( S , T ) u v holds for every u , v Z p * , where S G , T G 1 .
(2)
Non-degeneracy: There exists S G , T G 1 , such that e ( S , T ) 1 .
(3)
Computability: Given S G , T G 1 , there is an efficient algorithm to compute e ( S , T ) .

2.2. Isomorphism Theorem of Finite Field

Let us assume that A F p n × n . If the characteristic polynomial φ ( λ ) of A is an irreducible polynomial over the finite field F p , and B is a companion matrix of φ ( λ ) , then o r d ( B ) = p n 1 , and the finite field F p ( B ) is isomorphic to the finite field F p ( λ ) mod φ ( λ ) [31,32].

2.3. Forking Lemma

Let E , S 1 , and S 2 be three different events. If S 1 | ¬ E occurs, if and only if S 2 | ¬ E occurs, then we have | Pr [ S 1 ] Pr [ S 2 ] | Pr [ E ] [20].

2.4. The Discrete Logarithm Problem (DLP)

The discrete logarithm problem can be described as follows: Given a prime number p and a primitive element α over G F ( p ) , find a unique integer 0 x p 2 , such that y = α x mod p for all y G F ( p ) \ { 0 } . Generally, if p is chosen carefully, the problem is considered to be difficult—that is, computationally infeasible.

2.5. Two Types of Security Threats

Figure 1 shows the process of the cloud server stealing the information sent by Alice to the cloud server. The figure describes in detail how the cloud server steals Alice’s plaintext. Nevertheless, the cloud server cannot get Alice’s plaintext by solving the equality test algorithm and the DLP problem. At the same time, the cloud server generates a proof algorithm for the equality test to ensure the security of Alice’s plaintext.
Figure 2 shows the execution process of the system when the cloud server colludes with other users. This figure describes in detail how the cloud server colludes with the dishonest user Bob. Nevertheless, the result obtained after the collusion is still indistinguishable ciphertext information. When Bob sends the ciphertext C j and the private key s k j to the cloud server, the cloud server will decrypt Alice’s ciphertext C i according to the existing information. Nevertheless, the decryption result is still Alice’s ciphertext C i .

2.6. Security Model

The RKGA-CET scheme proposed in this paper considers the following two types of adversaries:
(1)
Type-I adversaries: After obtaining the trapdoor corresponding to the challenge ciphertext, try to guess the plaintext corresponding to the challenge ciphertext.
(2)
Type-II adversaries: Fail to obtain the trapdoor corresponding to the challenge ciphertext, but try to distinguish which plaintext the challenge ciphertext corresponds to.
Game 1 (OW-CCA game): For a Type-I adversary A 1 , the OW-CCA secure model is defined by the following Game 1:
① Initialization phase: The challenger C runs setup(λ) to generate the system parameter pp, runs KeyGen(pp) to get k pairs of public and private keys ( p k i , s k i ) ( 1 i k ) , and sends pp and all public keys p k i to the adversary A 1 , whose target user is U t ( 1 t k ) .
② Inquiry phase 1: The adversary A 1 is allowed to make the following four kinds of inquiries to the challenger C in polynomial time:
Hash query: The list is initialized to be empty. The adversary asks the oracle for x (x represents the input of the inquired oracle), and the challenger C randomly selects y (y represents the output of the inquired oracle) and sends y to the adversary.
Private key query: Send the sequence number i . If i t , the challenger C will send the private key s k i corresponding to the public key p k i to the adversary A 1 .
Decryption query: Send the sequence number i and the ciphertext c i . The challenger C sends the decryption result Dec( c i , s k i ) to the adversary A 1 .
Authorization query: Send the sequence number i or ( i , C i ) . The challenger C returns the trapdoor t d i or t d ( i , C i ) to the adversary A 1 .
③ Challenge phase: When the adversary A 1 finishes the inquiries in inquiry phase 1, the challenger C randomly selects a plaintext Q * F p n × n , runs E n c ( Q * , p k t ) to get the ciphertext C * , and sends C * as the challenge ciphertext to the adversary A 1 .
④ Inquiry phase 2: The adversary A 1 is allowed to continue to query the challenger C with four types of queries of inquiry phase 1 in polynomial time, but is not allowed to query the sequence number t to obtain the private key s k t during the private key query. They are also not allowed to query the sequence number t and the ciphertext C * to get the corresponding decryption result during the decryption query.
⑤ Guess phase: The adversary A 1 outputs Q F p n × n . If Q = Q * , A 1 wins Game 1.
Definition 1.
If A d v A 1 O W C C A ( λ ) = P r ( Q = Q * ) is negligible for all polynomial-time Type-I adversaries, the RKGA-CET scheme is OW-CCA secure under the above model.
Game 2 (IND-CCA game): For a Type-II adversary A 2 , the IND-CCA secure model is defined by the following Game 2:
① Initialization phase: The challenger C performs the same operation as the initialization phase of Game 1.
② Inquiry phase 1: The adversary A 2 is allowed to make four kinds of inquiries of the inquiry phase 1 of Game 1 to the challenger C in polynomial time, and is subject to the same restrictions.
③ Challenge phase: The adversary A 2 selects two pieces of plaintext Q 1 , Q 2 F p n × n with equal length and sends them to C. The challenger C randomly selects b { 0 , 1 } , runs E n c ( Q b , p k t ) to obtain the ciphertext C * , and sends C * as the challenge ciphertext to the adversary A 2 .
④ Inquiry phase 2: The adversary A 2 is allowed to continue to query the challenger C with four kinds of queries of inquiry phase 1 in polynomial time, and is subject to the same restrictions. In addition, they are not allowed to query the sequence number t or ( t , C t ) to get the corresponding trapdoor during the authorization query.
⑤ Guess phase: The adversary A 2 outputs b { 0 , 1 } . If b = b , A 2 wins Game 2.
Definition 2.
If A d v A 2 I N D C C A ( λ ) = | P r ( b = b ) 1 2 | is negligible for all polynomial-time Type-II adversaries, the RKGA-CET scheme is IND-CCA secure under the above model.

3. Encryption and Authorization Scheme

Our scheme can not only realize the basic equality test function, but also solve the hidden security risks of collusion between cloud servers and users in traditional schemes. The new scheme uses discrete logarithms to construct the encryption algorithm, greatly enhancing the security of users’ private information. At the same time, it can also prevent untrusted cloud servers and adversaries from colluding to steal the users’ private information. The specific algorithm is as follows:

3.1. System Initialization

Input the security parameter λ and return the public parameter p p , where p p = { e , G , G 1 , G T , g , g 1 , g α , g 1 α , H 1 , H 2 , H 3 , H 4 , H 5 } . Use bilinear pairing to construct a mapping e = G × G 1 G T ( G , G 1 , G T are three multiplicative cyclic groups with the prime number p as the order; g and g 1 are generators of G and G 1 , respectively). For any α Z p * , calculate g α , g 1 α . Hash functions H 1 : F p n × n G 1 , H 2 : { 0 , 1 } * { 0 , 1 } l , H 3 : G 1 { 0 , 1 } ( n + 1 ) l 1 , H 4 : { 0 , 1 } n l 1 G , H 5 : Z p * G 1 ( l 1 represents the length of a single element in Z p ).

3.2. Key Generation Algorithm

Input the public parameter p p . Randomly select an irreducible polynomial f i ( x ) of degree n and a positive integer a i ( a i < p n 1 ) over F p , and calculate g i ( x ) = x a i mod f i ( x ) , where x is a pure variable notation. Then, randomly select x i , y i Z p * , and calculate X i = g 1 x i , Y i = g y i . The public key of the user U i is p k i = { X i , Y i , f i ( x ) , g i ( x ) , p } , and the private key is s k i = { x i , y i , a i } .

3.3. Encryption Algorithm

For any plaintext message M [ 0 , p n 2 1 ) that needs to be encrypted, it is expressed in the form of the matrix Q = [ q 1 , 1 q 1 , 2 q 1 , n q 2 , 1 q 2 , 2 q 2 , n q n , 1 q n , 2 q n , n ] . For each element in Q , q i , j F p , so Q F p n × n . Given the plaintext matrix Q i F p n × n , the encryption of U i is divided into two phases:
Phase 1:
The user U i randomly selects a positive integer b i ( b i < p n 1 ) , and calculates v i ( x ) = x b i a i , n 1 x n 1 + + a i 1 x + a i 0 mod f i ( x ) and h i ( x ) = ( g i ( x ) ) b i = x a i b i a i , n 1 x n 1 + + a i 1 x + a i 0 mod f i ( x ) over F p .
(1)
Let B be the companion matrix of f i ( x ) . According to the isomorphism theorem of finite fields we have R i = h i ( B ) = j = 0 n 1 a i j B j .
(2)
Let C i = R i + Q i . Then, generate the ciphertext C i = ( v i , C i ) , where v i is an n-dimensional vector composed of coefficients of v i ( x ) , and C i is an n × n matrix in which every element belongs to F p , so the ciphertext space after the first encryption is ( F p n , F p n × n ) .
Phase 2:
The user U i encrypts v i . First, convert v i = ( a i 0 , a i 1 , , a i , n 1 ) T to v i = a i 0 a i 1   a i , n 1 { 0 , 1 } n l 1 . Then, randomly select r i , 1 , r i , 2 Z p * to generate the ciphertext C i = ( C i , 1 , C i , 2 , C i , 3 , C i , 4 , C i , 5 ) as follows:
C i , 1 = g 1 r i , 1 , C i , 2 = g r i , 2 , C i , 3 = H 3 ( X i r i , 1 ) ( v i | | r i , 1 ) , C i , 4 = Y i r i , 2 · ( H 4 ( v i a i ) ) r i , 1 , C i , 5 = H 2 ( C i , 1 C i , 2 C i , 3 C i , 4 v i | | r i , 1 ) .
Finally, output the ciphertext C i = ( C i , C i ) .

3.4. Decryption Algorithm

Corresponding to the encryption phases, the decryption of the ciphertext C i is divided into two phases:
Phase 1:
Input the private key s k i of U i to process the ciphertext C i = ( C i , 1 , C i , 2 , C i , 3 , C i , 4 , C i , 5 ) . Calculate C i , 3 H 3 ( C i , 1 x i ) ( v i | | r i , 1 ) . If both C i , 1 = g 1 r i , 1 and C i , 5 = H 2 ( C i , 1 | | C i , 2 | | C i , 3 | | C i , 4 | | v i | | r i , 1 ) hold, return v i ; otherwise, return the error symbol .
Phase 2:
First, convert v i = a i 0 a i 1 a i , n 1 to v i = ( a i 0 , a i 1 , , a i , n 1 ) T , construct v i ( x ) = a i , n 1 x n 1 + + a i 1 x + a i 0 mod f i ( x ) from the vector v i , and calculate the polynomial h i ( x ) = ( v i ( x ) ) a i = j = 0 n 1 a i j x j mod f i ( x ) . Then, use the companion matrix B of f i ( x ) to calculate the matrix R i = h i ( B ) = j = 0 n 1 a i j B j . Finally, restore the plaintext Q i = C i R i .

3.5. Authorization Algorithm

According to the security requirements of the users, they can choose two kinds of authorization with different granularities:
(1)
A u t ( s k i ) t d i : User-level authorization. All of the ciphertexts of the users can be tested. The authorization algorithm is as follows: input the private key s k i of user U i , and output a trapdoor t d i = y i ;
(2)
A u t ( s k i , C i ) t d i , C i : Ciphertext-level authorization. The ciphertexts designated by the users can be tested. Let the ciphertext to be tested be C i = ( C i , C i ) . The authorization algorithm is as follows: input the private key s k i of user U i and the designated ciphertext C i , and output a trapdoor t d i , C i = ( y i , C i , 2 y i ) .

3.6. Test Algorithm

The equality test algorithm is implemented by the cloud server. After receiving the user’s equality test request, the cloud server can test ciphertexts according to the corresponding authorization type provided by the user, and return the result to the user. Suppose that the users who need to perform equality test are U i and U j . The cloud server first judges the authorization type according to the obtained trapdoor, and then performs different calculations according to different types of authorization (assuming that the users disclose the random numbers of encryption phase 2 to the cloud tester; it can be seen in the following security analysis that this does not affect the security of the scheme at all).
(1)
T e s t ( C i , t d i , C j , t d j ) r e s u l t : If the authorization is user-level authorization, the cloud server obtains the trapdoor t d i = y i , t d j = y j . First, calculate K i = C i , 4 C i , 2 y i , K j = C j , 4 C j , 2 y j , and then judge whether e ( K i , C j , 1 ) = e ( K j , C i , 1 ) is true. If not, the server outputs 0; otherwise, the server outputs 1. Then, continue to judge whether e ( K i r j , 1 , H 1 ( C i ) ) = e ( K j r i , 1 , H 1 ( C j ) ) is true. If so, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the server outputs 1. If not, it indicates that the plaintext messages are not equal, and the server outputs 0.
(2)
T e s t ( C i , t d i , C i , C j , t d j , C j ) r e s u l t : If the authorization is ciphertext-level authorization, the cloud server obtains the trapdoor t d i , C i = ( y i , C i , 2 y i ) , t d j , C j = ( y j , C j , 2 y j ) . First, calculate K i , C i = e ( C i , 4 r j , 1 , H 5 ( y i y j ) ) e ( C i , 2 y i , H 5 ( y i y j ) ) , K j , C j = e ( C j , 4 r i , 1 , H 5 ( y i y j ) ) e ( C j , 2 y j , H 5 ( y i y j ) ) , and then judge whether K i , C i = K j , C j is true. If not, the server outputs 0; otherwise, the server outputs 1. Then, continue to judge whether e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( C j , 2 r i , 2 , H 1 ( C j ) ) is true. If so, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the server outputs 1. If not, it indicates that the plaintext messages are not equal, and the server outputs 0.
(3)
T e s t ( C i , t d i , C j , t d j , C j ) r e s u l t : If one of the authorizations is user-level authorization and the other is ciphertext-level authorization (it may be assumed that the user U i submits the user-level authorization and the user U j submits the ciphertext-level authorization), the cloud server obtains the trapdoor t d i = y i , t d j , C j = ( y j , C j , 2 y j ) . First, calculate K i = C i , 4 C i , 2 y i , K j , C j = e ( C j , 4 r i , 1 , H 5 ( y i y j ) ) e ( C j , 2 y j , H 5 ( y i y j ) ) , and then judge whether e ( K i r j , 1 , H 5 ( y i y j ) ) = K j , C j is true. If not, the server outputs 0; otherwise, the server outputs 1. Then, continue to judge whether e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( C j , 2 r i , 2 , H 1 ( C j ) ) is true. If so, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the server outputs 1. If not, it indicates that the plaintext messages are not equal, and the server outputs 0.

4. Scheme Analysis

4.1. Correctness Analysis

The RKGA-CET scheme satisfies the correctness condition, and its correctness is proven as follows:
Proof. 
(1)
(Decryption correctness): For any plaintext message Q i F p n × n , there is D e c ( E n c ( Q i , p k i ) , s k i ) = Q i .
(2)
(Test consistency): For any Q i , Q j F p n × n , if Q i = Q j and t d j , A u t ( s k j , ) t d i , A u t ( s k i , ) , then Pr [ T e s t ( E n c ( Q i , p k i ) , t d i , , E n c ( Q j , p k j ) , t d j , ) = 1 ] = 1 .
(3)
(Test reliability): For any Q i , Q j F p n × n , if Q i Q j and t d i , A u t ( s k i , ) , t d j , A u t ( s k j , ) , then Pr [ T e s t ( E n c ( Q i , p k i ) , t d i , , E n c ( Q j , p k j ) , t d j , ) = 1 ] n e g l ( λ ) .
(4)
For any ciphertext C i = ( C i , 1 , C i , 2 , C i , 3 , C i , 4 , C i , 5 ) , v i can be recovered.
C i , 3 H 3 ( C i , 1 x i ) = H 3 ( X i r i , 1 ) ( v i r i , 1 ) H 3 ( g 1 r i , 1 x i ) = H 3 ( g 1 x i r i , 1 ) ( v i r i , 1 ) H 3 ( g 1 r i , 1 x i ) = v i r i , 1
(5)
A logical equivalent expression can be derived from the construction process of the scheme as follows: R i = R j V i ( x ) a i = V j ( x ) a j v i a i = v j a j v i a i = v j a j . Given the ciphertext C i = ( C i , C i ) , C j = ( C j , C j ) , it can be calculated in three cases:
① For a user-level authorization trapdoor t d i = y i ,   t d j = y j , calculate:
K i = C i , 4 C i , 2 y i = Y i r i , 2 ( H 4 ( v i a i ) ) r i , 1 g r i , 2 y i = g y i r i , 2 ( H 4 ( v i a i ) ) r i , 1 g r i , 2 y i = ( H 4 ( v i a i ) ) r i , 1 K j = C j , 4 C j , 2 y j = Y j r j , 2 ( H 4 ( v j a j ) ) r j , 1 g r j , 2 y j = g y j r j , 2 ( H 4 ( v j a j ) ) r j , 1 g r j , 2 y j = ( H 4 ( v j a j ) ) r j , 1 e ( K i , C j , 1 ) = ( ( H 4 ( v i a i ) ) r i , 1 , g 1 r j , 1 ) = ( H 4 ( v i a i ) , g 1 ) r i , 1 r j , 1 e ( K j , C i , 1 ) = ( ( H 4 ( v j a j ) ) r j , 1 , g 1 r i , 1 ) = ( H 4 ( v j a j ) , g 1 ) r j , 1 r i , 1
If e ( K i , C j , 1 ) = e ( K j , C i , 1 ) , then v i a i = v j a j R i = R j . Continue to calculate:
e ( K i r j , 1 , H 1 ( C i ) ) = e ( ( H 4 ( v i a i ) ) r i , 1 r j , 1 , H 1 ( C i ) ) = e ( H 4 ( v i a i ) , H 1 ( C i ) ) r i , 1 r j , 1 e ( K j r i , 1 , H 1 ( C j ) ) = e ( ( H 4 ( v j a j ) ) r j , 1 r i , 1 , H 1 ( C j ) ) = e ( H 4 ( v j a j ) , H 1 ( C j ) ) r j , 1 r i , 1
If e ( K i r j , 1 , H 1 ( C i ) ) = e ( K j r i , 1 , H 1 ( C j ) ) , then C i = C j . Therefore, Q i = Q j can be obtained from C i R i = C j R j ; that is, T e s t ( C i , t d i , C j , t d j ) = 1 holds.
② For a ciphertext-level authorization trapdoor t d i , C i = ( y i , C i , 2 y i ) , t d j , C j = ( y j , C j , 2 y j ) , calculate:
K i , C i = e ( C i , 4 r j , 1 , H 5 ( y i y j ) ) e ( C i , 2 y i , H 5 ( y i y j ) ) = e ( Y i r i , 2 ( H 4 ( v i a i ) r i , 1 r j , 1 , H 5 ( y i y j ) ) e ( g r i , 2 y i , H 5 ( y i y j ) ) = e ( g y i r i , 2 ( H 4 ( v i a i ) r i , 1 r j , 1 , H 5 ( y i y j ) ) e ( g r i , 2 y i , H 5 ( y i y j ) ) = e ( H 4 ( v i a i ) , H 5 ( y i y j ) ) r i , 1 r j , 1 K j , C j = e ( C j , 4 r i , 1 , H 5 ( y i y j ) ) e ( C j , 2 y j , H 5 ( y i y j ) ) = e ( Y j r j , 2 ( H 4 ( v j a j ) r j , 1 r i , 1 , H 5 ( y i y j ) ) e ( g r j , 2 y j , H 5 ( y i y j ) ) = e ( g y j r j , 2 ( H 4 ( v j a j ) r j , 1 r i , 1 , H 5 ( y i y j ) ) e ( g r j , 2 y j , H 5 ( y i y j ) ) = e ( H 4 ( v j a j ) , H 5 ( y i y j ) ) r j , 1 r i , 1
If K i , C i = K j , C j , then v i a i = v j a j R i = R j . Continue to calculate:
e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( g r i , 2 r j , 2 , H 1 ( C i ) ) = e ( g , H 1 ( C i ) ) r i , 2 r j , 2 e ( C j , 2 r i , 2 , H 1 ( C j ) ) = e ( g r j , 2 r i , 2 , H 1 ( C i ) ) = e ( g , H 1 ( C i ) ) r j , 2 r i , 2
If e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( C j , 2 r i , 2 , H 1 ( C j ) ) , then C i = C j . Therefore, Q i = Q j can be obtained from C i R i = C j R j ; that is, T e s t ( C i , t d i , C i , C j , t d j , C j ) = 1 holds.
③ For two different types of authorization, where one is user-level authorization and the other is ciphertext-level authorization (let user U i submit the user-level authorization trapdoor t d i = y i , and user U j submit the ciphertext-level authorization trapdoor t d j , C j = ( y j , C j , 2 y j ) ), calculate:
K i = C i , 4 C i , 2 y i = ( H 4 ( v i a i ) ) r i , 1 , K j , C j = e ( C j , 4 r i , 1 , H 5 ( y i y j ) ) e ( C j , 2 y j , H 5 ( y i y j ) ) = e ( H 4 ( v j a j ) , H 5 ( y i y j ) ) r j , 1 r i , 1 , e ( K i r j , 1 , H 5 ( y i y j ) ) = e ( ( H 4 ( v i a i ) ) r i , 1 r j , 1 , H 5 ( y i y j ) ) = e ( H 4 ( v i a i ) , H 5 ( y i y j ) ) r i , 1 r j , 1 .
If e ( K i r j , 1 , H 5 ( y i y j ) ) = K j , C j , then v i a i = v j a j R i = R j . Continue to calculate:
e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( g r i , 2 r j , 2 , H 1 ( C i ) ) = e ( g , H 1 ( C i ) ) r i , 2 r j , 2 , e ( C j , 2 r i , 2 , H 1 ( C j ) ) = e ( g r j , 2 r i , 2 , H 1 ( C i ) ) = e ( g , H 1 ( C i ) ) r j , 2 r i , 2 .
If e ( C i , 2 r j , 2 , H 1 ( C i ) ) = e ( C j , 2 r i , 2 , H 1 ( C j ) ) , then C i = C j . Therefore, Q i = Q j can be obtained from C i R i = C j R j ; that is, T e s t ( C i , t d i , C i , C j , t d j , C j ) = 1 holds.□

4.2. Security Analysis

Theorem 1.
For probabilistic polynomial-time adversaries, the RKGA-CET scheme proposed in this paper can resist offline keyword-guessing attacks.
Lemma 1.
For probabilistic polynomial-time adversaries, the RKGA-CET scheme is OW-CCA secure for user-level authorization and ciphertext-level authorization based on the DLP difficulty problem under the random oracle model.
Proof. 
Let A 1 be a polynomial-time adversary to break the OW-CCA security. Suppose that A 1 requests at most H 1 h a s h query for q H 1 times, H 2 h a s h query for q H 2 times, H 3 h a s h query for q H 3 times, H 4 h a s h query for q H 4 times, H 5 h a s h query for q H 5 times, private key query for q K times, decryption query for q D times, and authorization query (ciphertext-level authorization and user-level authorization) for q A u t times. Note that if the same query is executed multiple times under a random oracle, the same result will be obtained. The game of adversary A and challenger C can be simulated as follows:
(1) System establishment phase:
The adversary A 1 selects a user U t ( 1 t k ) to attack. The challenger C runs s e t u p ( λ ) to get the system parameter p p , runs K e y G e n ( p p ) to get the public key p k i and private key s k i ( 1 i k ) , and sends p p and all public keys p k i to the adversary A 1 . The challenger C responds to the hash query initiated by A 1 to the random oracle by managing and maintaining the list H 1 L i s t , H 2 L i s t , H 3 L i s t , H 4 L i s t , H 5 L i s t . The initialization of these lists is empty.
(2) Inquiry phase 1:
H a s h 1 query ( v 1 ) : Given a new v 1 F p n × n , the challenger C randomly selects h 1 G 1 , puts ( v 1 , h 1 ) as a new item in the list H 1 L i s t , and outputs h 1 to A 1 as the answer.
H a s h 2 query ( v 2 ) : Given a new v 2 { 0 , 1 } * , the challenger C randomly selects h 2 { 0 , 1 } l , puts ( v 2 , h 2 ) as a new item in the list H 2 L i s t , and outputs h 2 to A 1 as the answer.
H a s h 3 query ( v 3 ) : Given a new v 3 G 1 , the challenger C randomly selects h 3 { 0 , 1 } ( n + 1 ) l 1 , puts ( v 3 , h 3 ) as a new item in the list H 3 L i s t , and outputs h 3 to A 1 as the answer.
H a s h 4 query ( v 4 ) : Given a new v 4 { 0 , 1 } n l 1 , the challenger C randomly selects h 4 G , puts ( v 4 , h 4 ) as a new item in the list H 4 L i s t , and outputs h 4 to A 1 as the answer.
H a s h 5 query ( v 5 ) : Given a new v 5 Z p * , the challenger C randomly selects h 5 G 1 , puts ( v 5 , h 5 ) as a new item in the list H 5 L i s t , and outputs h 5 to A 1 as the answer.
⑥ Private key query ( K ) : Send the sequence number i . If i t , the challenger C sends the private key s k i corresponding to the public key p k i to the adversary A 1 .
⑦ Decryption query ( D ) : Send the sequence number i and the ciphertext C i . If i t , C runs the algorithm D e c ( C i , s k i ) to decrypt the ciphertext, and sends the decryption result to A 1 . If i = t , C inputs C i , 1 x i to request H 3 and outputs a result h 3 . Then, C calculates C i , 3 H 3 ( C i , 1 x i ) to get v i | | r i , 1 , and verifies whether the following equation is true:
C i , 1 = g 1 r i , 1 , C i , 5 = H 2 ( C i , 1 C i , 2 C i , 3 C i , 4 v i | | r i , 1 )
If not, C returns to A 1 ; otherwise, C decrypts v i to get Q i and sends it to A 1 .
⑧ Authorization query ( A u t ) : For the two kinds of authorization mentioned in this paper:
– When receiving the sequence number i , C returns the trapdoor t d i to A;
– When receiving the sequence number i and the ciphertext C i , C returns the trapdoor t d ( i , C i ) to A 1 .
(3) Challenge phase:
After A 1 finishes the query in query phase 1, C randomly selects a plaintext Q * F p n × n , encrypts the plaintext through phase 1 of the encryption algorithm to obtain C * , cascades the elements in v * into v * , and then randomly selects r 1 * , r 2 * Z p * and calculates:
C 1 * = g 1 r 1 * , C 2 * = g r 2 * , C 3 * = H 3 ( x r 1 * ) ( v * | | r 1 * ) , C 4 * = Y r 2 * · ( H 4 ( v * a * ) ) r 1 * , C 5 * = H 2 ( C 1 * | | C 2 * | | C 3 * | | C 4 * | | v * | | r 1 * ) .
Finally, return the challenge ciphertext C * to A 1 , where C * = ( C 1 * , C 2 * , C 3 * , C 4 * , C 5 * ) , and the public key is p k t .
(4) Inquiry phase 2:
The adversary A 1 makes the same inquiry as in inquiry phase 1, but they are not allowed to inquire the sequence number t to obtain the private key s k t in the private key query phase, and they are not allowed to inquire the sequence number t and the ciphertext C * to obtain the corresponding decryption result in the decryption query phase.
(5) Guess phase:
A 1 outputs Q F p n × n . If Q = Q * , A 1 guesses successfully.
A 1 ’s advantage of winning the game is A d v A , R K G A C E M O W C C A ( λ ) = Pr ( Q = Q * ) = Pr ( R = R * ) . Now we prove that Pr ( R = R * ) n e g l ( λ ) .
The matrix R is pseudo-random because it is generated by the public key p k t and the random number b; that is, it is generated by solving the polynomial h ( x ) = g b ( x ) = v a ( x ) = x a b . To calculate h ( x ) = x a b mod f ( x ) , however, g ( x ) = x a mod f ( x ) and v ( x ) = x b mod f ( x ) must be calculated. This problem is the D i f f i e H e l l m a n problem over the polynomial finite field F p [ x ] / f ( x ) , and the D i f f i e H e l l m a n problem can be reduced to the D L P problem over the finite field in polynomial time. However, the D L P problem is computationally infeasible. This contradicts the original hypothesis.□
Lemma 2.
For probabilistic polynomial-time adversaries, the RKGA-CET scheme is IND-CCA secure for user-level authorization and ciphertext-level authorization based on the DLP difficulty problem under the random oracle model.
Proof. 
Let A 2 be a polynomial-time adversary to break the IND-CCA security. The game simulation of the adversary A 2 and the challenger C is the same as above, but the adversary is not allowed to query the sequence number t or ( t , C t ) to obtain the corresponding trapdoor in the inquiry phase 2. The adversary selects two pieces of plaintext Q 1 , Q 2 F p n × n with equal length and sends them to the challenger. The challenger randomly selects b { 0 , 1 } , runs E n c ( Q b , p k t ) to get the ciphertext C * , and sends C * to the adversary as the challenge ciphertext. The adversary outputs b { 0 , 1 } . If b = b , the adversary breaks the IND-CCA security.
Let S 1 represent the event that the adversary can correctly output b = b . The advantage of the adversary is:
A d v A , R K G A C E M I N D C C A ( λ ) = | Pr [ S 1 ] 1 2 |
Let S 2 represent the event that the adversary breaks the hash function H 3 with advantage ε 1 . Then, the adversary can calculate C i , 3 H 3 ( C i , 1 x i ) to get v i | | r i , 1 . According to the forking lemma, there is:
| Pr [ S 1 ] Pr [ S 2 ] | ε 1
Let S 3 represent the event that the adversary obtains the private key a i with advantage ε 2 , and then recovers the plaintext by calculating ( V i ( x ) ) a i = h i ( x ) R i = h i ( B ) Q i = C i R i . According to the forking lemma, there is:
| Pr [ S 2 ] Pr [ S 3 ] | ε 2
Since a i is a random element over the finite field F p , we have Pr [ S 3 ] = 1 2 .
Combining (1)–(3), we can get:
A d v A , R K G A C E M I N D C C A ( λ ) = | Pr [ S 1 ] 1 2 | = | Pr [ S 1 ] Pr [ S 3 ] | | Pr [ S 1 ] Pr [ S 2 ] | + | Pr [ S 2 ] Pr [ S 3 ] | ε 1 + ε 2
According to the hypothesis of the random oracle and the difficulty of the DLP problem, ε 1 , ε 2 must be negligible. Hence, A d v A , R K G A C E M I N D C C A ( λ ) must be negligible.□
By Lemmas 1 and 2, Theorem 1 is proven.

5. Performance Analysis

We compared the computational overhead and security of the RKGA-CET scheme with those proposed in [5,6,7,15,29], and the results are shown in Table 1. Since the system establishment algorithm is executed only once, its computational overhead can be negligible. The performance comparison mainly focuses on the bilinear operation e, the modular exponentiation operation m, and the hash operation h, which are the most resource-consuming in the practical operation. The security comparison is to verify whether the scheme has the ability to resist KGA attacks.
Analysis of Table 1 shows that in the encryption phase, the five schemes compared all contain bilinear operations, while the RKGA-CET scheme does not need it. The number of modular exponentiation operations performed by RKGA-CET is more than that in [6,15,29], but less than that in [5,7]. The number of hash operations of the six schemes is essentially the same. Overall, RKGA-CET only needs 11 operations, which is essentially the same as the number of operations in [29], and less than in the other four schemes. In the decryption phase, RKGA-CET has the same number of operations as the schemes in [7,15], and has a lower decryption cost compared with [29], but slightly higher than those in [5,6]. In the test phase, since RKGA-CET performs different equality tests according to different authorization types, we choose the largest test cost as the test cost of RKGA-CET—that is, the test cost when the authorization type is ciphertext-level authorization. It can be seen that the test cost of RKGA-CET is significantly higher than that of the other five schemes. This is because we first use the isomorphism of finite fields to transform keywords, so that the adversary cannot use the weakness of the relatively small information entropy in the keyword space to carry out KGA attacks, and then outsource the ciphertexts of the converted keywords to the cloud server. While enhancing security, RKGA-CET also increases the test cost, so it is suitable for occasions that require high safety but low testing cost, such as medical systems that are related to the safety of patients’ lives. However, it should also be noted that when the authorization type is user-level authorization, the test cost of RKGA-CET is 4m + 2h + 4e, which is close to the scheme in [5] and lower than that of [29]. Although the test cost of the schemes in [6,7] is better than that of RKGA-CET, none of them can resist KGA attacks in terms of security. Considering the encryption process, decryption process, and test process as a whole, the number of bilinear operations of RKGA-CET is the least, which is 6e. The modular exponentiation times of RKGA-CET are 10m more than those of the schemes in [6,15], 5m more than that of the scheme in [29], and essentially equal to those of the schemes in [5,7]. The number of hash operations of the six schemes is generally similar. According to the experimental results in [8], a modular exponentiation operation takes 0.01 ms, a hash operation takes 0.19 ms, and a bilinear operation takes about 1.5 ms. Therefore, in general, the efficiency of RKGA-CET is higher than that of the schemes proposed in the other five references with more bilinear operations.
In order to visually show the comparison results, we conducted simulation experiments of the encryption algorithm and the test algorithm based on the PBC library. The experiment used a 64-bit Windows operating system, the processor was an Intel (R) Core (TM) i5-9500 CPU @ 3.00 GHz, and the running memory was 8 GB. We chose a type A elliptic curve, whose equation is y 2 = x 3 + x and embedding degree is 2. The order q is a prime number of 512 bit. We selected SHA-1 as the hash function, and the bit length of the hash value was 160 bit. The specific experimental results are shown in Figure 3 and Figure 4.
The simulation results show that the RKGA-CET scheme has obvious advantages in the overhead of the encryption algorithm, but the overhead of the test algorithm is slightly higher, which is acceptable because RKGA-CET reduces the encryption burden of the server while enhancing security. In summary, RKGA-CET has certain advantages in terms of computational overhead and security.

6. Application in Medical System

In the “Introduction”, we introduced the idea that the equality test technology can be applied to the medical system to protect patients’ historical cases. In this section, the technology designed by our team is applied to the medical system. It is still assumed that Alice and Bob are patients with the same symptoms who belong to the same medical institution. Firstly, the key-generation center (KGC) initializes the system parameters, and generates a public–private key pair for each patient according to the key-generation algorithm. Secondly, each patient encrypts their own medical record with the public key according to the encryption algorithm, and then uploads the encrypted medical record to the medical record management system. Patients choose different granularity authorization according to the authorization algorithm, and then the medical institution performs equality tests on the ciphertexts according to the type of authorization. Figure 5 shows the specific application model of the RKGA-CET scheme, including four entities: a trusted KGC, patients, a medical record management system, and a medical institution.

7. Conclusions

With the rapid development and wide application of cloud computing and 5G communication, the research of public key encryption with equality test algorithms has become a hot topic. Based on the existing public key encryption with equality test schemes, RKGA-CET is proposed in this paper, where we first use the property of finite-field isomorphism to transform the keyword, and then encrypt the converted keyword vector. The function of the first encryption is that the adversary can only test the encrypted keyword, so that the adversary can only guess the encrypted keyword space or directly crack the first encrypted key, which will not reveal any keyword space information, so the adversary cannot use the weakness of the relatively small information entropy of the keyword space to perform KGAs. Meanwhile, the property of isomorphism of finite fields ensures that cracking the first encrypted key is equivalent to solving the discrete logarithm problem over a finite field. Security analysis shows that the RKGA-CET scheme achieves both OW-CCA security and IND-CCA security, thus resisting the offline KGAs caused by the collusion between the cloud server and the dishonest users. Furthermore, while ensuring data confidentiality, RKGA-CET also supports two different authorization modes. Finally, performance analysis shows that RKGA-CET is practical in terms of computational overhead and security. This paper only makes theoretical innovation on the basis of previous research. Later, we will further study how to reduce the overhead of the test algorithm while enhancing security, and design encryption schemes with better properties in combination with the needs of practical applications, so as to effectively strengthen the security and privacy of user data and promote the development of cloud computing.

Author Contributions

Conceptualization, P.Z. and J.L.; methodology, P.Z. and J.L.; software, J.L.; validation, P.Z. and J.L.; formal analysis, J.L.; investigation, J.L. and Z.F.; resources, P.Z.; data curation, Z.F.; writing—original draft preparation, J.L.; writing—review and editing, P.Z.; visualization, P.Z.; funding acquisition, P.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Science and Technology Project of Henan Educational Department, grant number 20A520012.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors acknowledge Alexander Wang from the Faculty of Engineering, Built Environment, and Information Technology, SEGi University, Malaysia, for his support and assistance with this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bao, G.; Wang, S.; Li, Y. Research on data security protection method based on privacy perception in cloud computing. Netinfo Secur. 2017, 17, 84–89. [Google Scholar]
  2. Wang, Y.; Zhang, J.; Cheng, S.; Xiaohui, T. An improved design of homomorphic encryption for Cloud Computing. Netinfo Secur. 2017, 17, 21–26. [Google Scholar]
  3. Li, Z.; Hu, X. Research on data security and privacy protection in the background of big data. Internet Things 2020, 10, 76–78. [Google Scholar]
  4. Wu, H. Research on privacy data security for Internet of things. Wirel. Internet Technol. 2020, 17, 21–22. [Google Scholar]
  5. Shao, Z.; Yang, B. On security against the server indesignated tester public key encryption with keyword search. Inf. Process. Lett. 2015, 115, 957–961. [Google Scholar] [CrossRef]
  6. Zhang, R.; Imai, H. Generic combination of public key encryption with keyword search and public key encryption. In Proceedings of the International Conference on Cryptology and Network Security, Singapore, 8–10 December 2007; pp. 159–174. [Google Scholar]
  7. Chen, Y.; Zhang, J.; Lin, D. Generic construction of integrated PHE and PEKS. J. Des. Codes Cryptogr. 2014, 78, 493–526. [Google Scholar] [CrossRef]
  8. Yang, N.; Zhou, Q.; Xu, S. Searchable encryption scheme with unpaired public key authentication. J. Comput. Res. Dev. 2020, 57, 2125–2135. [Google Scholar]
  9. Ming, Y.; Wang, E. Identity-Based Encryption with Filtered Equality Test for Smart City Applications. J. Sens. 2019, 19, 3046. [Google Scholar] [CrossRef] [Green Version]
  10. Dan, B.; Crescenzo, G.D.; Ostrovsky, R.; Persiano, G. Public key encryption with keyword search. In Proceedings of the International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, 2–6 May 2004. [Google Scholar]
  11. Baek, J.; Safavi-Nanin, R.; Susilo, W. Public key encryption with keyword search revisited. In Proceedings of the International Conference on Computational Science and Its Applications, Perugia, Italy, 30 June–3 July 2008; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
  12. Rhee, H.S.; Park, J.H.; Susilo, W.; Lee, D.H. Improved searchable public key encryption with designated tester. In Proceedings of the 4th International Symposium on Information, Computer, and Communications Security, Sydney, Australia, 10–12 March 2009. [Google Scholar]
  13. Fang, L.; Susilow, W.; Ge, C.; Wang, J. A secure channel free public key encryption with keyword search scheme without random oracle. In Proceedings of the International Conference on Cryptology and Network Security, Kanazawa, Japan, 12–14 December 2009; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  14. Fang, L.; Susilow, W.; Ge, C.; Wang, J. Public key encryption with keyword search secure against keyword guessing attacks without random oracle. Inf. Sci. 2013, 238, 221–241. [Google Scholar] [CrossRef] [Green Version]
  15. Zeng, Q.; Han, X.; Cao, Y. An encryption scheme combining public key encryption and keyword searchable encryption. Comput. Mod. 2019, 103–107. [Google Scholar] [CrossRef]
  16. Wang, S.H.; Zhang, Y.X.; Wang, H.Q.; Xiao, F.; Wang, R.C. Efficient public key searchable encryption scheme against internal keyword guessing attack. Comput. Sci. 2019, 46, 91–95. [Google Scholar]
  17. Du, R.; Tan, A.; Tian, J. Blockchain-based public key searchable encryption scheme. J. Commun. 2020, 41, 114–122. [Google Scholar]
  18. Zhang, Y.; Wen, L.; Wang, H. Searchable encryption scheme without certificate authentication in multi-user environment. J. Electron. Inf. Technol. 2020, 42, 1094–1101. [Google Scholar]
  19. Chen, N.; Liu, C.; Huang, R. Fast public key searchable encryption scheme against internal keyword guessing attack in cloud environment. J. Electron. Inf. Technol. 2021, 43, 467–474. [Google Scholar]
  20. Li, Z.; Wang, X.; Wang, Z. A dynamic asymmetric searchable encryption scheme resistant to keyword guessing attack. Comput. Mod. 2021, 100–106. [Google Scholar] [CrossRef]
  21. Yang, G.; Tan, C.H.; Huang, Q.; Wong, D.S. Probabilistic public key encryption with equality test. In Proceedings of the Cryptogapllers’ Track at the RSA Conference, San Francisco, CA, USA, 1–5 March 2010; Springer: Berlin/Heidelberg, Germany, 2010. [Google Scholar]
  22. Ma, S.; Huang, Q.; Zhang, M.; Yang, B. Efficient public key encryption with equality test supporting flexible authorization. IEEE Trans. Inf. Forensics Secur. 2015, 10, 458–470. [Google Scholar] [CrossRef]
  23. Lin, X.J.; Qu, H.; Zhang, X. Public Key Encryption Supporting Equality Test and Flexible Authorization without Bilinear Pairings. IACR Cryptol. Eprint Arch. 2016, 2016, 277. [Google Scholar] [CrossRef]
  24. Lee, H.T.; Ling, S.; Seo, J.H.; Wang, H. CCA2 Attack and Modification of Huang et al.’s Public Key Encryption with Authorized Equality Test. Comput. J. 2016, 59, 1689–1694. [Google Scholar] [CrossRef]
  25. Wu, L.; Zhang, Y.; Choo, K.R.; He, D. Efficient Identity-based Encryption Scheme with Equality Test for Smart City. IEEE Trans. Sustain. Comput. 2018, 3, 44–55. [Google Scholar] [CrossRef]
  26. Tang, Q. Towards Public Key Encryption Scheme Supporting Equality Test with Fine-grained Authorization. In Proceedings of the 16th Australasian Conference on Information Security and Privacy, Melbourne, Australia, 11–13 July 2011; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
  27. Tang, Q. Public Key Encryption Supporting Plaintext Equaliy Text and User-specified Authorization. Secur. Commun. Netw. 2012, 5, 1351–1362. [Google Scholar] [CrossRef] [Green Version]
  28. Huang, K.; Tso, R.; Chen, Y.C.; Rahman, S.; Almogren, A.; Alamri, A. PKE-AET: Public key Encryption with Authorized Equality Test. Comput. J. 2015, 58, 2686–2697. [Google Scholar] [CrossRef]
  29. Xu, Y.; Wang, M.; ZHong, H.; ZHong, S. IBEET-AOK: ID-based encryption with equality test against off-line KGAs for cloud medical services. Front. Comput. Sci. 2021, 15, 178–180. [Google Scholar] [CrossRef]
  30. Hu, L.; Li, X.; Lu, L. An identity-based cryptosystem and elliptic curve Tate pair. Inf. Netw. Secur. 2005, 64–66. [Google Scholar] [CrossRef]
  31. Roger, A.H.; Charles, R.J. Matrix Analysis, 2nd ed.; China Machine Press: Beijing, China, 2014; Volume 9, pp. 86–92. [Google Scholar]
  32. Li, K.; Liu, H. On the trace of k elements in a finite field. Pure Math. Appl. Math. 2019, 35, 394–407. [Google Scholar]
Figure 1. The process of the cloud server stealing Alice’s plaintext.
Figure 1. The process of the cloud server stealing Alice’s plaintext.
Information 13 00265 g001
Figure 2. The collusion process between the cloud server and Bob.
Figure 2. The collusion process between the cloud server and Bob.
Information 13 00265 g002
Figure 3. Time of encryption algorithm [5,6,7,15,29].
Figure 3. Time of encryption algorithm [5,6,7,15,29].
Information 13 00265 g003
Figure 4. Time of test algorithm [5,6,7,15,29].
Figure 4. Time of test algorithm [5,6,7,15,29].
Information 13 00265 g004
Figure 5. The process of equality testing.
Figure 5. The process of equality testing.
Information 13 00265 g005
Table 1. Computational overhead and security comparison.
Table 1. Computational overhead and security comparison.
SchemeEncryption CostDecryption CostTest CostResist KGAs
Scheme in [5]9m + 3e + 3h2m5m + 4e + hYes
Scheme in [6]4m + 6e + 2hhe + 2m + hNo
Scheme in [7]13m + 10e + 4h2m + e3m + 2eNo
Scheme in [15]4m + 8e + 5he + 2h2m + eYes
Scheme in [29]6m + 2e + 2hm + 2e + 2h4m + 6e + 4hYes
RKGA-CET8m + 3h2m + h6m + 6e + 3hYes
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zhang, P.; Li, J.; Fu, Z. Public Key Encryption with Equality Test in a Cloud Environment. Information 2022, 13, 265. https://doi.org/10.3390/info13060265

AMA Style

Zhang P, Li J, Fu Z. Public Key Encryption with Equality Test in a Cloud Environment. Information. 2022; 13(6):265. https://doi.org/10.3390/info13060265

Chicago/Turabian Style

Zhang, Ping, Jinbo Li, and Zhumu Fu. 2022. "Public Key Encryption with Equality Test in a Cloud Environment" Information 13, no. 6: 265. https://doi.org/10.3390/info13060265

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop