A ciphertext equivalence testing method in cloud environment
By using finite domain and asymmetric bilinear mapping in the cloud computing environment to generate keys and introduce user authorization mechanisms, the security risks of ciphertext equivalent testing and search problems in multi-user environments are solved, and high security is achieved ciphertext matching prevents offline attacks.
Patent Information
- Application Number
- CN202110697281.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-23
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-06-23
AI Technical Summary
In the cloud computing environment, ciphertext equivalent value tests have security risks and do not support searches for different public key encrypted data in multi-user environments, and there is a potential KGA threat with keyword space smaller than the key space, resulting in overall security. Poor.
A ciphertext equivalent test method in a cloud environment is adopted to generate public keys and private keys based on n-order irreducible polynomials and asymmetric bilinear mapping on finite domain Fp, so as to realize the user authorization mechanism and support user-level and cryptographic Text-level authorization uses bilinear mapping and polynomial time complexity to perform ciphertext equal value matching to prevent offline keyword guessing attacks.
It improves the security of ciphertext equivalent test, reduces the probability that the opponent in polynomial time guesses keywords through the exhaustive method, enhances the security of ciphertext matching in a multi-user environment, and avoids offline attacks.
Smart Images

Figure CN114338025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ciphertext equivalence testing, and in particular to a ciphertext equivalence testing method in a cloud environment. Background Art
[0002] In recent years, the rapid development of the Internet and information technology has laid a solid foundation for cloud computing applications. With the widespread application of cloud computing technology, more and more enterprises, organizations and individuals prefer to outsource data to cloud servers for storage to reduce the storage space of local computers. However, there is no free lunch in the world. While enjoying the convenient services provided by cloud servers, users have to pay attention to the security and privacy of user data and user identity information security brought by cloud servers. User data stored in the cloud may be leaked due to access by untrusted cloud server providers, so data owners need to encrypt sensitive data before uploading or sharing private files, and then send them to the cloud server. Although traditional encryption technology can protect data privacy, it does not support retrieval on encrypted data, and files in ciphertext form make file operations more difficult. When users search for the required files, they can only download all 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.
[0003] In order to solve the problem of users realizing searchable operations on ciphertext, et al. proposed a public key searchable encryption scheme. The scheme enables users to search for the data they want and decrypt the shared data by only generating the corresponding query trapdoor with their own private key without decrypting the ciphertext. After the proposal, it aroused widespread interest among researchers. Baek et al. removed the secure channel between the server and the user assumed in the PEKS scheme by Boneh et al. and proposed the SCF-PEKS scheme. However, the users of this scheme had to expose their private keys to third parties, which posed a security risk. Later, Rhee et al. improved the scheme proposed by Baek et al., using a more complex public key structure, which did not require the user's private key to be exposed, thereby enhancing security. However, PEKS does not support searching for data encrypted by different public keys in a multi-user environment, and has certain limitations. Therefore, Yang et al. first proposed a public key encryption equal matching scheme in a multi-user environment. This scheme can test whether two ciphertexts encrypted with different public keys are generated by the same plaintext by using the properties of bilinear pairings without decryption. However, this scheme lacks an authorization mechanism, which means that anyone can perform equal matching on ciphertexts, which poses certain security risks. Subsequent research focused on providing an authorization mechanism, and researchers have proposed different PKEET schemes. Tang proposed the FG-PKEET scheme that supports user-level authorization, that is, only when two designated users send authorization to the tester, the tester has the authority to perform equal matching on the ciphertexts of the two users. Subsequently, Huang et al. proposed the PKE-AET scheme that supports ciphertext-level authorization. After the tester receives the designated authorization from the two users, he can perform equal matching on the ciphertexts specified by the two users. However, since the keyword space is much smaller than the key space, most of the existing keyword search schemes have potential KGA threats. After the internal server and the user collude to obtain the trapdoor, when the auxiliary server is offline, the information of the trapdoor and keyword can be guessed by exhaustively guessing the keyword, so the overall security is poor. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a ciphertext equivalence testing method in a cloud environment with better security.
[0005] In order to achieve the above object, the specific scheme adopted by the present invention is: a ciphertext equivalence testing method in a cloud environment, comprising the following steps:
[0006] S1. Generate public parameter pp based on existing security parameter λ;
[0007] S2. Generate a public key pk based on the public parameter pp. i and private key sk i , where the public key pk iUsed to encrypt plaintext messages to obtain ciphertext messages, private key sk i Used to decrypt ciphertext messages to obtain plaintext messages;
[0008] S3. The user determines the authorization method;
[0009] S4. Perform an equivalence match on the ciphertext according to the user's equivalence test request and authorization method, and return the result to the user.
[0010] As a further optimization of the ciphertext equivalence test method in the above cloud environment: In S1, the specific method for generating the public parameter pp is:
[0011] Where e is a bilinear map, G, G 1 , G T are three multiplicative cyclic groups of order p, g, g 1 They are G, G 1 A generator of , and e: G×G 1 →G T is a bilinear map, F p is a finite field, g α , g 1 α For any Time g, g 1 The calculation results are: is a residue class ring Z modulo p p The result after removing class [0], l 1 Represents Z p The length of the elements in, H 1 : H 2 : {0, 1} * →{0,1}l,H 3 : H 4 : H 5 :Z p * →G 1 .
[0012] As a further optimization of the ciphertext equivalence test method in the above cloud environment: In S2, the public key pk is generated i and private key sk i The specific method is:
[0013] S21, randomly select F p An irreducible polynomial f of degree n on i (x) and positive integer a i , a i <p n-1;
[0014] S22. Calculation Where x is a pure variable symbol;
[0015] S23, Random Selection And calculate
[0016] S24. Generate public key pk i ={X i , Y i , f i (x), g i (x), p} and the private key sk i ={x i ,y i , a i}.
[0017] As a further optimization of the ciphertext equivalence test method in the above cloud environment: based on the public key pk i The specific method for encrypting plaintext messages is:
[0018] S2E1, the plaintext message to be encrypted Represented as a matrix The element q in Q i,j ∈F p , Q∈F p n×n , there is a plaintext matrix Q i ∈F p n×n ;
[0019] S2E2, User U i Randomly select a positive integer b i (b i <p n -1), in F p Calculate separately
[0020] and
[0021] S2E3, let B be f i The friend matrix of (x) is
[0022] S2E4. Calculate C′ i =R i +Q i , get the primary ciphertext C″ i =(v i , C′ i ), v i v iThe n-dimensional vector of coefficients of (x), C′ i is an n×n matrix, C′ i Every element of F p , primary ciphertext C″ i The ciphertext space is (F p n , F p n×n );
[0023] S2E5, will v i =(a i0 , a i1 , …, a i,n-1 ) T Convert to
[0024] S2E6, Random Selection Get the secondary ciphertext C i =(C i,1 , C i,2 , C i,3 , C i,4 , C i,5 ):
[0025]
[0026] S2E7, output the final ciphertext C″′ i =(C i , C′ i ).
[0027] As a further optimization of the ciphertext equivalence test method in the above cloud environment: based on the private key sk i The specific method to decrypt the ciphertext message is:
[0028] S2D1, input user U i The private key sk i C i =(C i,1 , C i,2 , C i,3 , C i,4 , C i,5 ) to process and calculate if and C i,5 =H 2 (C i,1 PC i,2 PC i,3 PC i,4 Pv′ i ||r i,1 ) are all true, then return v′ i ; Otherwise, return the error symbol ⊥;
[0029] S2D2, v i ′=a i0 ||a i1 ||...||a i,n-1 Convert to v i =(a i0 , a i1 , …, a i,n-1 ) T ;
[0030] S2D3, by vector v i Construct v i (x) = a i,n-1 x n-1 +…+a i1 x+a i0 modf i (x), and evaluate the polynomial
[0031] S2D4, by f i (x)'s friend matrix B, calculate the matrix
[0032] S2D5, restore the plaintext Q i =C′ i -R i .
[0033] As a further optimization of the ciphertext equivalence test method in the above cloud environment: In S3, users can choose user-level authorization or ciphertext-level authorization;
[0034] In user-level authorization, all ciphertexts of the user can be tested. The authorization method is to enter the user U i The private key sk i , output a trapdoor td i =y i ;
[0035] The ciphertext specified by the user in the ciphertext-level authorization can be tested. The authorization method is to enter the user U i The private key sk i and the specified ciphertext C″′ i , output a trapdoor Where C″′ i =(C i , C′ i ).
[0036] As a further optimization of the ciphertext equivalence test method in the cloud environment, in S4, for the user U requesting the equivalence test i and user U j , select the corresponding equal value matching method according to the user's authorization method;
[0037] S4A1, when user U i and user U j When user-level authorization is selected, based on the trapdoor td i =y i and td j =y j calculate S4A2, judge e(K i , C j,1 )=e(K j , C i,1 ) is true, if not, output the result 0, if true, output the result 1 and execute S4A3;
[0038] S4A3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0;
[0039] S4B1、When user U i and user U j When ciphertext-level authorization is selected, based on trapdoor and calculate and
[0040] S4B2, judgment Is it true? If not, output result 0. If true, output result 1 and execute S4B3.
[0041] S4B3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0;
[0042] S4C1, if user U i The submitted content is user-level authorization, user U j The submitted authorization is ciphertext-level, based on trapdoor td i =y i and calculate
[0043] S4C2, judgment Is it true? If not, output result 0. If true, output result 1 and execute S4C3.
[0044] S4C3, Judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0.
[0045] Beneficial effect: The present invention firstly utilizes the finite field F p The finite field F generated by an irreducible polynomial f(x) of degree n p [x]modf(x) is isomorphic to the finite field formed by the friend matrix derived from f(x) as the generator, and the user's message is encrypted, which is equivalent to converting the keyword; then based on the DLP assumption on the asymmetric bilinear map, the encrypted message is re-encrypted, and finally equal matching is performed. This scheme makes the probability of a polynomial time adversary guessing the keyword by exhaustive method negligible. This is because when the auxiliary server is offline, even if the adversary obtains the legitimate ciphertext, that is, the converted keyword, it is necessary to solve the finite field F to decrypt the corresponding plaintext message from the ciphertext. p Therefore, attackers cannot carry out offline keyword guessing attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] To facilitate discussion, three existing theories are first introduced.
[0049] Theory 1: Assume that there are three multiplicative cyclic groups G with prime numbers p as their order, G 1 and G T , g and g 1 G and G respectively 1 Generator of bilinear map e: G×G 1 →G T The following conditions must be met:
[0050] (1) Bilinear: e(S u , T v ) = e(S, T) uv ,in
[0051] (2) Non-degeneracy: There exists S∈G, T∈G 1, so that e(S, T)≠1;
[0052] (3) Computability: For any S∈G, T∈G 1 , there exists an efficient algorithm to compute e(S, T).
[0053] Theory 2: Assume If the characteristic polynomial of A is a finite field F p The irreducible polynomial on B is friend matrix, then ord(B)=p n -1, and the finite field F p (B) With finite fields Isomorphism.
[0054] Theory 3: Given a prime number p and a primitive element α on GF(p), for y∈GF(p)\{0}, find a unique integer x, 0≤x≤p-2, such that y=α x modP holds. In general, if p is chosen carefully, the problem is considered to be hard, i.e., computationally infeasible.
[0055] See also Figure 1 ,A ciphertext equivalence testing method in a cloud environment, including S1 to S4.
[0056] S1. Generate public parameter pp based on the existing security parameter λ.
[0057] In S1, the specific method for generating the public parameter pp is: Where e is a bilinear map, G, G 1 , G T are three multiplication cyclic groups with prime number p as the order, where the prime number p is generated based on the security parameter λ. The specific generation method belongs to the conventional technology in this field and will not be repeated here. g, g 1 They are G, G 1 A generator of , and e: G×G 1 →G T is a bilinear map, F p is a finite field, g α , g 1 α For any Time g, g 1 The calculation results are: is a residue class ring Z modulo p p The result after removing class [0], l 1 Represents Z p The length of the elements in, H 1 : H 2 : {0, 1}* →{0, 1} l , H 3 : H 4 : H 5 :Z p * →G 1 .
[0058] S2. Generate a public key pk based on the public parameter pp. i and private key sk i , where the public key pk i Used to encrypt plaintext messages to obtain ciphertext messages, private key sk i Used to decrypt ciphertext messages to obtain plaintext messages.
[0059] In S2, a public key pk is generated i and private key sk i The specific method is S21 to S24.
[0060] S21, randomly select F p An irreducible polynomial f of degree n on i (x) and positive integer a i , a i <p n -1.
[0061] S22. Calculation Where x is a pure variable symbol.
[0062] S23, Random Selection And calculate
[0063] S24. Generate public key pk i ={X i , Y i , f i (x), g i (x), p} and the private key sk i ={x i ,y i , a i}.
[0064] Based on the public key pk i The specific methods for encrypting plaintext messages are S2E1 to S2E7.
[0065] S2E1, the plaintext message to be encrypted Represented as a matrix The element q in Q i,j ∈F p , Q∈Fp n×n , there is a plaintext matrix Q i ∈F p n×n .
[0066] S2E2, User U i Randomly select a positive integer b i (b i <p n -1), in F p Calculate separately
[0067] and
[0068] S2E3, let B be f i The friend matrix of (x) is
[0069] S2E4. Calculate C′ i =R i +Q i , get the primary ciphertext C″ i =(v i , C′ i ), v i v i The n-dimensional vector of coefficients of (x), C′ i is an n×n matrix, C′ i Every element of F p , primary ciphertext C i The ciphertext space of ″ is (F p n , F p n×n ).
[0070] S2E5, will v i =(a i0 , a i1 , …, a i,n-1 ) T Convert to
[0071] S2E6, Random Selection Get the secondary ciphertext C i =(C i,1 , C i,2 , C i,3 , C i,4 , C i,5 ):
[0072]
[0073] S2E7, output the final ciphertext C″′ i=(C i , C′ i ).
[0074] Based on the private key sk i The specific method for decrypting the ciphertext message is S2D1 to S2D5.
[0075] S2D1, input user U i The private key sk i C i =(c i,1 , C i,2 , C i,3 , C i,4 , C i,5 ) to process and calculate if and C i,5 =H 2 (C i,1 PC i,2 PC i,3 PC i,4 Pv′ i ||r i,1 ) are all true, then return v′ i , otherwise it returns the error symbol ⊥.
[0076] S2D2, v′ i =a i0 ||a i1 ||…||a i,n-1 Convert to v i =(a i0 , a i1 , …, a i,n-1 ) T .
[0077] S2D3, by vector v i Construct v i (x) = a i,n-1 x n-1 +…+a i1 x+a i0 modf i (x), and evaluate the polynomial
[0078] S2D4, by f i (x)'s friend matrix B, calculate the matrix
[0079] S2D5, restore the plaintext Q i =C′ i -R i .
[0080] S3: The user determines the authorization method. In S3, the user can choose user-level authorization or ciphertext-level authorization.
[0081] In user-level authorization, all ciphertexts of the user can be tested. The authorization method is to enter the user U i The private key sk i , output a trapdoor td i =y i .
[0082] The ciphertext specified by the user in the ciphertext-level authorization can be tested. The authorization method is to enter the user U i The private key sk i and the specified ciphertext C″′ i , output a trapdoor Where C″′ i =(C i , C′ i ).
[0083] S4. Perform an equivalence match on the ciphertext according to the user's equivalence test request and authorization method, and return the result to the user.
[0084] In S4, for user U who requests an equivalence test, i and user U j , select the corresponding equal value matching method according to the user's authorization method.
[0085] S4A1, when user U i and user U j When user-level authorization is selected, based on the trapdoor td i =y i and td j =y j calculate
[0086] S4A2, judge e(K i , C j,1 )=e(K j , C i,1 ) is true, if not, output the result 0, if yes, output the result 1 and execute S4A3.
[0087] S4A3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0.
[0088] S4B1、When user U i and user U j When ciphertext-level authorization is selected, based on trapdoor and calculate and
[0089] S4B2, judgment Is it true? If not, output the result 0. If true, output the result 1 and execute S4B3.
[0090] S4B3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0.
[0091] S4C1, if user U i The submitted content is user-level authorization, user U j The submitted authorization is ciphertext-level, based on trapdoor td i =y i and calculate
[0092] S4C2, judgment Is it true? If not, output the result 0. If true, output the result 1 and execute S4C3.
[0093] S4C3, Judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0.
[0094] The present invention can be implemented based on an existing cloud computing system. The cloud computing system includes a cloud server and a user terminal, wherein the user terminal can be a computer, a smart phone, a tablet computer or other device, all of which are mature existing technologies and will not be described in detail here.
[0095] The correctness of the present invention is verified as follows.
[0096] Decryption correctness: for any plaintext message There is Dec(Enc(Q i , pk i ), sk i )=Q i .
[0097] Test consistency: for any If Q i =Q j , and td i ,←Aut(sk i ,·),td j ,←Aut(sk j , ·), then Pr[Test(Enc(Q i, pk i ), td i ,,Enc(Q j , pk j ), td j ,)=1]=1.
[0098] Test reliability: for any If Q i ≠Q j , and td i ,j←Aut(sk i ,·),td j ,←Aut(sk j , ·), then Pr[Test(Enc(Q i , pk i ), td i ,,Enc(Q j , pk j ), td j ,)=1]≤negl(λ).
[0099] For any ciphertext C i =(C i,1 , C i,2 , C i,3 , C i,4 , C i,5 ), v′ i Can be restored:
[0100]
[0101] A logically equivalent expression can be derived from the construction process of the solution: Given a ciphertext C″′ i =(C i , C′ i ), C″′ j =(C j , C′ j ), calculated in three cases.
[0102] In the first case, for the user-level authorization trapdoor td i =y i , td j =y j ,calculate:
[0103]
[0104]
[0105]
[0106]
[0107] If e(K i , C j,1 )=e(K j , C i,1 ),So Then calculate:
[0108]
[0109]
[0110] if Then C′ i =C′ j Therefore, C′ i -R i =C′ j -R j Get Q i =Q j , that is, Test(C i , td i , C j , td j )=1 holds.
[0111] In the second case, for the ciphertext-level authorization trapdoor calculate:
[0112]
[0113]
[0114] if So Then calculate:
[0115]
[0116]
[0117] if Then C′ i =C′ j Therefore, C′ i -R i =C′ j -R j Get Q i =Q j ,Right now Established.
[0118] In the third case, for two different types of authorization, one is user-level authorization and the other is ciphertext-level authorization (assuming user U iSubmit user-level authorization trapdoor td i =y i , user U j Submit ciphertext-level authorization trapdoor ),calculate:
[0119]
[0120]
[0121]
[0122] if So Then calculate:
[0123]
[0124]
[0125] if Then C′ i =C′ j Therefore, C′ i -R i =C′ j -R j Get Q i =Q j ,Right now Established.
[0126] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A ciphertext equivalence testing method in a cloud environment, characterized by: The steps include: S1. Generate a public parameter pp based on the existing security parameter λ. In S1, the specific method for generating the public parameter pp is: Where e is a bilinear map, G,G1,G T are three multiplicative cyclic groups with prime number p as order, g, g1 are generators of G, G1 respectively, and e:G×G1→G T is a bilinear map, F p is a finite field, g α ,g1 α For any The calculation results of g and g1 are: is a residue class ring Z modulo p p The result after removing class [0], l1 represents Z p The length of the elements in , H2:{0,1} * →{0,1} l , H5:Z p * →G1; S2. Generate a public key pk based on the public parameter pp. i and private key sk i , where the public key pk i Used to encrypt plaintext messages to obtain ciphertext messages, private key sk i Used to decrypt ciphertext messages to obtain plaintext messages; S3, the user determines the authorization method; in S3, the user can choose user-level authorization or ciphertext-level authorization; In user-level authorization, all ciphertexts of the user can be tested. The authorization method is to enter the user U i The private key sk i , output a trapdoor td i =y i ; The ciphertext specified by the user in the ciphertext-level authorization can be tested. The authorization method is to enter the user U i The private key sk i and the specified ciphertext C i ″′, output a trapdoor Among them C i ″′=(C i ,C i ′), C i ′ is an n×n matrix whose elements all belong to the finite field F p , For i Related secondary ciphertext; S4: Perform an equivalence match on the ciphertext according to the user's equivalence test request and authorization method, and return the result to the user. In S4, for the user U who requested the equivalence test, i and user U j , select the corresponding equal value matching method according to the user's authorization method; S4A1, when user U i and user U j When user-level authorization is selected, based on the trapdoor td i =y i and td j =y j calculate S4A2, judge e(K i ,C j,1 )=e(K j ,C i,1 ) is true, if not, output the result 0, if true, output the result 1 and execute S4A3; S4A3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0; S4B1、When user U i and user U j When ciphertext-level authorization is selected, based on trapdoor and calculate and Among them C i,2 and C i,4 All are secondary ciphertexts; S4B2, judgment Is it true? If not, output result 0. If true, output result 1 and execute S4B3. S4B3, judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0; S4C1, if user U i The submitted content is user-level authorization, user U j The submitted authorization is ciphertext-level, based on trapdoor td i =y i and S4C2, judgment Is it true? If not, output result 0. If true, output result 1 and execute S4C3. S4C3, Judgment Is it true? If it is true, it means that the plaintext messages corresponding to the two ciphertexts are equal, and the output result is 1; if it is not true, it means that the plaintext messages corresponding to the two ciphertexts are not equal, and the output result is 0.
2. A ciphertext equivalence testing method in a cloud environment as claimed in claim 1, characterized in that: In S2, a public key pk is generated i and private key sk i The specific method is: S21, randomly select F p An irreducible polynomial f of degree n on i (x) and positive integer a i ,a i <p n -1; S22. Calculation Where x is a pure variable symbol; S23, Random Selection And calculate S24. Generate public key pk i ={X i ,Y i ,f i (x),g i (x),p} and the private key sk i ={x i ,y i ,a i }.
3. A ciphertext equivalence testing method in a cloud environment as claimed in claim 2, characterized in that: Based on the public key pk i The specific method for encrypting plaintext messages is: S2E1, the plaintext message to be encrypted Represented as a matrix The element q in Q i,j ∈F p , Q∈F p n×n , there is a plaintext matrix Q i ∈F p n×n ; S2E2, User U i Randomly select a positive integer b i , and b i <p n -1, at F p Calculate separately and S2E3, let B be f i The friend matrix of (x) is S2E4. Calculation C i ′=R i +Q i , get the primary ciphertext C i ″=(v i ,C i ′), v i v i The n-dimensional vector of coefficients of (x), C i ′ is an n×n matrix, C i Each element of ′ belongs to F p , primary ciphertext C i The ciphertext space of ″ is (F p n ,F p n×n ); S2E5, will v i =(a i0 ,a i1 ,…,a i,n-1 ) T Convert to S2E6, Random Selection Get the secondary ciphertext C i =(C i,1, C i,2, C i,3, C i,4 ,C i,5 ): S2E7, output final ciphertext C i ″′=(C i ,C i ′).
4. A ciphertext equivalence testing method in a cloud environment as claimed in claim 3, characterized in that: Based on the private key sk i The specific method to decrypt the ciphertext message is: S2D1, input user U i The private key sk i C i =(C i,1, C i,2 ,C i,3 ,C i,4, C i,5 ) to process and calculate if and C i,5 =H2(C i,1 ||C i,2 ||C i,3 ||C i,4 ||v i ′||r i,1 ) are all true, then return v i '; otherwise, return the error symbol ⊥; S2D2, v i ′=a i0 ||a i1 ||…||a i,n-1 Convert to v i =(a i0 ,a i1 ,…,a i,n-1 ) T ; S2D3, by vector v i Construct v i (x) = a i,n-1 x n-1 +…+a i1 x+a i0 mod f i (x), and evaluate the polynomial S2D4, by f i (x)'s friend matrix B, calculate the matrix S2D5, restore the plaintext Q i =C i ′-R i .
