Batch ciphertext equivalence testing method and device

Through the batch ciphertext equivalence test method, trapdoors and commitments are used to construct Lagrange polynomials to verify the validity of ciphertexts, solve the problem of heavy calculation in the existing technology, improve efficiency and protect data confidentiality, and resist attacked.

CN117640082BActive Publication Date: 2024-10-22CHANGDE BINZHUO TECHNOLOGY DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311664794.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-10-22
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

The batch ciphertext equivalence test in the existing technology requires a large amount of calculation, is difficult to apply to massive ciphertext comparisons, and does not support ciphertext verification and resist keyword guessing attacks.

Method used

The batch ciphertext equivalence test method is used to obtain the trapdoors and commitments of the ciphertext, construct Lagrange polynomials, verify the validity of the ciphertext, and perform ciphertext equality tests on the basis of calculations without bilinear pairings to reduce the calculation cost. cost, supports ciphertext verification and resists attacks.

Benefits of technology

It significantly reduces the computational cost of ciphertext equality testing in a multi-user multi-ciphertext environment, improves retrieval and comparison efficiency, protects data confidentiality, and prevents malicious users from tampering with the test ciphertext module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640082B_ABST
    Figure CN117640082B_ABST
Patent Text Reader

Abstract

The present invention provides a batch ciphertext equivalence test method and device. The method comprises: obtaining batch ciphertexts and all trapdoors corresponding to the batch ciphertexts; using the trapdoor of each ciphertext to test the ciphertext corresponding to it, and obtaining the commitment of the corresponding ciphertext; determining whether the ciphertext sent by the sender is an invalid ciphertext according to the commitment of all ciphertexts, thereby completing the verification of the ciphertext; when the sender's ciphertext is a valid ciphertext, the tester constructs a new Lagrangian polynomial according to the polynomial random points corresponding to each ciphertext in the batch ciphertext, and determines the secret value of the new Lagrangian polynomial; judging whether the secret value is equal to the secret value of the Lagrangian polynomial corresponding to all ciphertexts, if they are equal, the plaintexts corresponding to the batch ciphertexts are equal. The method provided by the present invention improves the efficiency of batch ciphertext equivalence test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a batch ciphertext equivalence testing method and device. Background Art

[0002] As cloud services have strong flexibility, scalability and low-cost storage, more and more users choose to store data in cloud servers. The most notable feature of cloud servers is "honesty and curiosity (cloud servers will strictly execute commands but will also try to guess the underlying plaintext information of stored data)", which has also caused users to worry about the confidentiality of their own data. In order to protect the confidentiality of their data, users often choose to encrypt their data before outsourcing it to cloud servers. However, since the encrypted data is not identifiable, traditional plaintext keyword search technology is difficult to apply to secure data outsourcing scenarios. Cloud-based keyword searchable encryption technology can effectively solve this kind of problem. This technology can not only protect the confidentiality of uploaded user data but also allow other users to search and query in encrypted data. However, the data object of this technology can only be data encrypted with the same key. In actual application scenarios, different users may use different keys to encrypt plaintext data, so cloud-based keyword searchable encryption technology is difficult to achieve cross-user secret data search.

[0003] In order to make up for the shortcomings of cloud-based keyword searchable encryption technology, cloud-based ciphertext equivalence test public key encryption technology was proposed to solve the difficult comparison problem of multi-public key encrypted data across users. That is, users can compare whether the plaintexts corresponding to two ciphertexts encrypted by different public keys are the same without decrypting the data. This technology is widely used in the management of cloud encrypted data and encrypted email classification. The current equivalence test algorithm mainly adopts an inefficient one-to-one comparison form, and the computational complexity of this form increases with the growth of ciphertext data. Especially when comparing massive ciphertexts, the traditional ciphertext equivalence test scheme has a large amount of computation and takes a lot of time. Summary of the invention

[0004] The present invention provides a batch ciphertext equivalence test method and device, which are used to solve the defect of large amount of calculation in batch equivalence test in the prior art.

[0005] A batch ciphertext equivalence test method, comprising:

[0006] Get batch ciphertext CT1, CT2…CT t And all the trapdoors tk1, tk2…tk corresponding to the batch ciphertext t CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CTi =(C i,1 ,C i,2 ,C i,3 ,C i,4 )i∈{1,2…t},C i,4 represents the 4th cipher segment of the i-th ciphertext;

[0007] Use the trapdoor of each ciphertext to test the corresponding ciphertext and obtain the commitment B of the corresponding ciphertext j , j∈{0,1,…t-1} and batch ciphertext CT1,CT2…CT t A polynomial random point corresponding to each ciphertext in;

[0008] According to the commitment B of all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext, thereby completing the verification of the ciphertext; when the sender's ciphertext is a valid ciphertext, construct a Lagrangian polynomial using the polynomial random points of all ciphertexts, and determine the secret value of the Lagrangian polynomial;

[0009] Determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to each ciphertext. If they are equal, then the ciphertext CT1, CT2…CT t The corresponding plaintext M1=M2=…M t Established, where M t Represents the tth plaintext.

[0010] Furthermore, in the batch ciphertext equivalence test method as described above, the batch ciphertexts CT1, CT2 ... CT t In , each ciphertext CT = (C1, C2, C3, C4) is determined as follows:

[0011] Get the system parameter pp, pp = (p, G, g, H1, H2, SH); where G is a cyclic group constructed using the security parameter λ, p is the prime order of the cyclic group G, g is a generator of the cyclic group G, H1 and H2 are two hash functions respectively; SH is a short hash function; H1:G→{0,1} λ+l , H2:G 3 ×{0,1} λ+l →G t-1 ×{0,1} 3l , SH:{0,1} λ →Z p , l is a finite field Z p The number of elements in

[0012] According to the system parameter pp, a public-private key pair (pk, sk) is generated, (pk, sk) = ((X = g α ,Y=g β),(α,β)); where α,β are random numbers, α,β∈Z p ;

[0013] According to the system parameter pp and 2t mutually different numbers ω1, ω2…ω broadcasted on the safety channel t ,ω t+1 …ω 2t ∈{0,1} λ , determine t different points P t ;

[0014] According to the t different points P t , using Lagrange interpolation method to construct a t-1 order Lagrange polynomial f(x), f(x) = a t-1 x t-1 +…+a2x 2 +a1x+a0∈Z p ;

[0015] According to the Lagrangian polynomial f(x), its secret value a'0 is determined, and a point q(x) is randomly selected on the Lagrangian polynomial f(x). * ,y * ), and broadcast x * , to ensure that other senders do not choose the same x * ;

[0016] According to the Lagrange polynomial f(x), determine the commitment B corresponding to each ciphertext j ,

[0017] According to the commitment B j , and the secret value a0 encrypts the corresponding plaintext M to obtain the ciphertext CT = (C1, C2, C3, C4),

[0018]

[0019] Furthermore, in the batch ciphertext equivalence test method described above, the t different points P t Determined according to the following formula:

[0020]

[0021] Furthermore, in the batch ciphertext equivalence test method described above, the trapdoor tk corresponding to each ciphertext is determined according to the private key corresponding to the ciphertext, tk=β.

[0022] Furthermore, the batch ciphertext equivalence test method described above determines the commitment B corresponding to each ciphertext according to the following formula: j

[0023]

[0024] Among them, a i,0 represents the secret value of the Lagrange polynomial corresponding to the i-th ciphertext, B i,0 ||B i,1 …||B i,t-1 represents the commitment corresponding to the i-th ciphertext, x i,* ,y i,* represents a point randomly selected from the Lagrange polynomial corresponding to the i-th ciphertext.

[0025] Furthermore, the batch ciphertext equivalence test method described above determines whether the ciphertext sent by the sender is invalid ciphertext according to the following formula:

[0026]

[0027] in, y i,* represents the horizontal and vertical coordinates of a point randomly selected from the Lagrange polynomial corresponding to the i-th ciphertext; B i,j Denotes the commitment B corresponding to the i-th ciphertext j .

[0028] Furthermore, in the batch ciphertext equivalence test method as described above, the step of constructing a Lagrangian polynomial using polynomial random points of all ciphertexts and determining the secret value of the Lagrangian polynomial includes:

[0029] Get the polynomial random points corresponding to all ciphertexts, then for t different ciphertexts CT1, CT2…CT t , get t polynomial random points (x 1,* ,y 1,* )(x 2,* ,y 2,* )…(x t,* ,y t,* );

[0030] For these t random polynomial points, a Lagrange interpolation method is used to construct a Lagrange polynomial of order t-1:

[0031] f'(x)=a' t-1 x t-1 +…+a'2x 2 +a'1x+a'0∈Z p

[0032] According to the Lagrange polynomial, the corresponding secret value a0 is determined, a'0=f'(0).

[0033] Furthermore, the batch ciphertext equivalence test method described above determines whether the secret value is equal to the Lagrange polynomial secret values ​​corresponding to all ciphertexts according to the following formula:

[0034] a′0=a 1,0 =a 2,0 =…=a t,0

[0035] Among them, a t,0 represents the secret value of the Lagrange polynomial corresponding to the tth ciphertext in the batch ciphertext, a 1,0 、a 2,0 , …at ,0 is the secret value of the Lagrange polynomial corresponding to t different ciphertexts.

[0036] A batch ciphertext equivalence test device, comprising:

[0037] Acquisition unit, used to obtain batch ciphertext CT1, CT2…CT t And all the trapdoors th1, tk2…tk corresponding to the batch ciphertext t CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CT i =(C i,1 ,C i,2 ,C i,3 ,C i,4 )i∈{1,2,…,t},C i,4 represents the 4th cipher segment of the i-th ciphertext;

[0038] A testing unit, used for testing the ciphertext corresponding to each ciphertext by using the trapdoor of each ciphertext;

[0039] The acquisition unit is also used to obtain the commitment B corresponding to the ciphertext j , j∈{0,1,…t-1}, and batch ciphertext CT1,CT2…CT t A polynomial random point corresponding to each ciphertext in;

[0040] Determine the unit for the commitment B based on all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext, and if the ciphertext of the sender is a valid ciphertext, construct a Lagrangian polynomial using polynomial random points of all ciphertexts, and determine the secret value of the Lagrangian polynomial;

[0041] The determining unit is further used to determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to each ciphertext. If they are equal, the ciphertext CT1, CT2 ... CT tThe corresponding plaintext M1=M2=…M t Established, where M t Represents the tth plaintext.

[0042] The present invention solves the limitation of ciphertext equality test in one-to-one mode and reduces the computational cost required for ciphertext equality test in multi-user and multi-ciphertext environment. Moreover, the method provided by the present invention significantly reduces the computational cost and improves the efficiency of retrieval and comparison based on the calculation without bilinear pairing. In addition, the verification of ciphertext by the server or tester is supported to prevent malicious users from tampering with the test ciphertext module. Moreover, the confidentiality of user data is protected and keyword guessing attacks are resisted. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 It is a flowchart of the ciphertext equivalence test of the prior art;

[0045] Figure 2 The batch ciphertext equivalence test system model provided by the present invention;

[0046] Figure 3 One of the flow charts of the batch ciphertext equivalence test method provided by the present invention;

[0047] Figure 4 The second flow chart of the batch ciphertext equivalence testing method provided by the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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.

[0049] Ciphertext equivalence testing is a technology that compares ciphertexts while protecting data confidentiality. Two ciphertexts are compared without exposing the plaintext. It mainly constructs a specific algorithm based on the characteristics of bilinear pairings, so that it is possible to determine whether the plaintexts corresponding to two ciphertexts encrypted with different keys are equal without decryption. The ciphertext equivalence test process is as follows: Figure 1In this paper, the user uploads the encrypted file data and related keyword ciphertext to the cloud server, and then uses his own private key to generate a trapdoor and sends it to the tester for authorization. The tester receives the ciphertext sent by the server and uses the corresponding authorization trapdoor to perform an equality test, and finally returns the test result to the user. However, this test method can only perform pairwise comparisons, and the number of comparisons increases with the number of ciphertexts. Therefore, it is difficult to apply to the equality test of massive ciphertexts, and it is based on bilinear pairing operations, which has a large amount of calculations. In addition, it does not support the verification of ciphertexts. The scheme is based on a single server structure and cannot resist internal keyword guessing attacks.

[0050] The present invention uses the idea of ​​secret sharing to encrypt the test part of the ciphertext. Before the tester conducts the test, the received ciphertext is first verified. If the test ciphertext module is legal, an equality test is performed. Otherwise, it is determined to be an invalid ciphertext and the test is terminated, thereby saving computing resources. For batches of plaintexts, each encryptor of the plaintext uses its own plaintext to generate the same number of points, and each uses these points to construct a linear polynomial, and takes one of the points in the linear polynomial and its secret value to encrypt and generate the test module ciphertext. The tester receives the batch of ciphertexts and uses the trapdoor to conduct the test. It only needs to restore a linear polynomial to conduct the equality test of the batch ciphertext. Obviously, the scheme is more efficient in the computational cost of the test process, and the amount of calculation is constant and will not increase with the number of ciphertexts. At the same time, the test ciphertext encryption process uses a short hash algorithm, which effectively resists the server or malicious adversary from guessing the encryption keyword.

[0051] Before introducing the solution, some terms involved in the present invention are explained:

[0052] Cloud Server (CS): Cloud servers mainly store the sender's private data, where the data may be ciphertext encrypted by different public keys. Cloud servers are not completely trustworthy (i.e. honest and curious) and may perform keyword guessing attacks on uploaded ciphertexts.

[0053] Key Generation Center (KGC): Generates and distributes public and private key pairs for users to ensure the security and reliability of the public key cryptographic system. It also generates and distributes encrypted random numbers for the sender.

[0054] Sender: Uses the encrypted random number and the recipient's public key to encrypt the local plaintext and sends it to the cloud server.

[0055] Receiver: Receives the ciphertext from the cloud server, decrypts it with its own private key, and sends the trapdoor to the tester, authorizing the tester to perform the equivalent test.

[0056] Tester: Perform batch equivalence tests on the ciphertexts corresponding to the trapdoors and output the comparison results. If the ciphertext C 1、 C 2、 …C t If the corresponding plaintext is the same, output 1; otherwise, output 0.

[0057] The solution of the present invention is described in detail below. The system model of the solution is as follows: Figure 2 As shown, it mainly includes the following 7 algorithms: initialization algorithm (SetUp), key generation algorithm (KeyGen), random number generation algorithm (RandomNumberGen), encryption algorithm (Enc), decryption algorithm (Dec), authorization algorithm (Aut) and test algorithm (Test).

[0058] Figure 3 One of the flow charts of the batch ciphertext equivalence test method provided by the present invention is as follows: Figure 3 As shown, the method comprises the following steps:

[0059] Step 301: Get batch ciphertext CT1, CT2...CT t And all the trapdoors tk1, tk2…tk corresponding to the batch ciphertext t CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CT i =(C i,1 ,C i,2 ,C i,3 ,C i,4 )i∈{1,2…t},C i,4 Represents the 4th cipher segment of the i-th ciphertext.

[0060] Among them, the batch ciphertext CT1, CT2...CT t In , each ciphertext CT = (C1, C2, C3, C4) is determined as follows:

[0061] Get the system parameter pp, pp = (p, G, g, H1, H2, SH); where G is a cyclic group constructed using the security parameter λ, p is the prime order of the cyclic group G, g is a generator of the cyclic group G, H1 and H2 are two hash functions respectively; SH is a short hash function; H1:G→{0,1} λ+l , H2:G 3 ×{0,1} λ+l →G t-1 ×{0,1} 3l , SH:{0,1} λ →Z p, l is a finite field Z p The number of elements in

[0062] According to the system parameter pp, a public-private key pair (pk, sk) is generated, (pk, xk) = ((X = g α ,Y=g β ),(α,β)); where α,β are random numbers, α,β∈Z p ;

[0063] According to the system parameter pp and 2t mutually different numbers ω1, ω2…ω broadcasted on the safety channel t ,ω t+1 …ω 2t ∈{0,1} λ , determine t different points P t ;

[0064]

[0065]

[0066] According to the t different points P t , using Lagrange interpolation method to construct a t-1 order Lagrange polynomial f(x), f(x) = a t-1 x t-1 +…+a2x 2 +a1x+a0∈Z p ;

[0067] According to the Lagrangian polynomial f(x), its secret value a0 is determined, and a point q(x) is randomly selected on the Lagrangian polynomial f(x). * ,y * ), and broadcast x * , to ensure that other senders do not choose the same x * ;

[0068] According to the Lagrange polynomial f(x), determine the commitment B corresponding to each ciphertext j ,

[0069] According to the commitment B j , and the secret value a0 encrypts the corresponding plaintext M to obtain the ciphertext CT = (C1, C2, C3, C4),

[0070]

[0071] Step 302: Use the trapdoor of each ciphertext to test the corresponding ciphertext and obtain the commitment B of the corresponding ciphertext j, j∈{0,1,…t-1} and batch ciphertext CT1,CT2…CT t A polynomial random point corresponding to each ciphertext in;

[0072]

[0073] Among them, a i,0 represents the secret value of the Lagrange polynomial corresponding to the i-th ciphertext, B i,t-1 represents the commitment corresponding to the i-th ciphertext, x i,* ,y i,* represents a point randomly selected from the Lagrange polynomial corresponding to the i ciphertexts.

[0074] Step 303: Based on the commitment B of all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext. If the ciphertext of the sender is a valid ciphertext, construct a Lagrangian polynomial using polynomial random points of all ciphertexts, and determine the secret value of the Lagrangian polynomial.

[0075] Specifically, the following formula is used to determine whether the ciphertext sent by the sender is invalid ciphertext:

[0076]

[0077] in, y i,* represents a point randomly selected from the Lagrange polynomial corresponding to the i-th ciphertext; B i,j Denotes the commitment B corresponding to the i-th ciphertext j If not, output 0, indicating that the ciphertext sent by the sender is invalid.

[0078] Determination of the secret value of the Lagrangian polynomial includes the following steps:

[0079] Get the polynomial random points corresponding to all ciphertexts, then for t different ciphertexts CT1, CT2…CT t , get t polynomial random points (x 1,* ,y 1,* )(x 2,* ,y 2,* )…(x t,* ,y t,* );

[0080] For these t random polynomial points, a Lagrange interpolation method is used to construct a Lagrange polynomial of order t-1:

[0081] f'(x)=a' t-1 x t-1 +…+a'2x 2 +a'1x+a'0∈Zp

[0082] According to the Lagrange polynomial, the corresponding secret value a'0 is determined, a'0=f'(0).

[0083] Step 304: Determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to each ciphertext. If they are equal, the ciphertexts CT1, CT2…CT t The corresponding plaintext M1=M2=…M t Established, where M t Represents the tth plaintext.

[0084] Specifically, determine whether the secret value is equal to the Lagrange polynomial secret values ​​corresponding to all ciphertexts according to the following formula:

[0085] a′0=a 1,0 =a 2,0 =…=a t,0

[0086] Among them, a t,0 Represents the secret value of the Lagrange polynomial corresponding to the t-th ciphertext. a 1,0 、a 2,0 , …a t,0 is the secret value of the Lagrange polynomial corresponding to t different ciphertexts. If these t+1 values ​​are the same, then output 1, indicating the ciphertext CT1, CT2…CT t The corresponding plaintext M1=M2=…=M t If it is true, then output 0, indicating that the corresponding plaintext M1=M2=…=M t Not true.

[0087] The present invention provides 1, the initialization algorithm (SetUp), the key generation algorithm (KeyGen), the random number generation algorithm (RandomNumberGen), the encryption algorithm (Enc), the decryption algorithm (Dec), the authorization algorithm (Aut) and the test algorithm (Test) are described in detail as follows:

[0088] (I) Initialization algorithm

[0089] Setup(λ):

[0090] 1. Input security parameter λ, select a multiplicative cyclic group G with prime order p and a generator g in the group, where g∈G.

[0091] 2. Choose two hash functions H1:G→{0,1} λ+l , H2:G 3 ×{0,1} λ+l →G t-1×{0,1} 3l and a short hash function SH:{0,1} λ →Z p , where l is a finite field Z p The number of elements in , where the strong collision property of short hash can resist keyword guessing attacks by servers or malicious adversaries.

[0092] 3. Output system parameters pp = (p, G, g, H1, H2, SH).

[0093] (II) Key Generation Algorithm

[0094] KeyGen(pp): Input system parameter pp, the key generation algorithm selects two random numbers α, β∈Z p , then generate public and private

[0095] Key pair (pk, sk), where:

[0096] (pk,sk)=((X=g α ,Y=g β ),(α,β))

[0097] (III) Random number generation algorithm

[0098] Input the number of ciphertexts to be tested t, and the key generation center generates 2t different numbers ω1, ω2…ω t ,ω t+1 …ω 2t ∈{0,1} λ , and broadcast these 2t different numbers on the secure channel at the same time.

[0099] (IV) Encryption Algorithm

[0100] Enc(pk, M): Input user's public key pk, plaintext message M∈{0,1} λ , the encryption algorithm calculates the ciphertext CT = (C1, C2, C3, C4), as follows:

[0101] 1. Use 2t different numbers ω1, ω2…ω broadcast on a secure channel t ,ω t+1 …ω 2t ∈{0,1} λ , calculate t different points, where:

[0102]

[0103] 2. Use these t points to construct a t-1 order polynomial f(x) using the Lagrange interpolation method, where:

[0104] f(x)=a t-1 x t-1 +…+a2x 2 +a1x+a0∈Z p

[0105] 3. Take a0 = f(0), and randomly select a point q(x) in the polynomial f(x). * ,y * ), and broadcast x * , ensuring that other senders do not choose the same x * .

[0106] 4. Calculate commitment where j∈{0,1,…t-1}.

[0107] 5. Randomly select two random numbers r1, r2∈Z p , the encryption algorithm calculates the ciphertext:

[0108]

[0109] Output ciphertext CT = (C1, C2, C3, C4).

[0110] (V) Decryption algorithm

[0111] Dec(C, sk): Input ciphertext CT = (C1, C2, C3, C4) and private key sk = (α, β), decryption algorithm calculation:

[0112] 1. Calculation

[0113] 2. Using M' in 1, calculate t different points, where:

[0114]

[0115] And construct a polynomial of order t-1 f(x) = a t-1 x t-1 +…+a2x 2 +a1x+a0∈Z p .

[0116] 3. Calculate y * =f(x * )(where x * broadcast by the sender), a0 = f(0),

[0117] 4. Finally, determine whether the following equation is true:

[0118]

[0119] If the above formula is true, output M, otherwise output Null.

[0120] (VI) Authorization Algorithm

[0121] Aut(sk): Input private key sk=(α,β), authorization algorithm output trapdoor tk=β

[0122] (VII) Test Algorithm

[0123] Test(CT1,CT2…CT t ,tk1,tk2…tk t ): Input t ciphertexts CT1, CT2…CT t , where CT i =(C i,1 ,C i,2 ,C i,3 ,C i,4 )i∈{1,2…t} and the corresponding trapdoors tk1,tk2…tk of t ciphertexts t The test process is as follows Figure 4 As shown, for each i∈{1,2…t}, the following calculation is performed:

[0124] 1. Calculation

[0125] 2. Through the calculation in 1, t ciphertexts can get t B j Among them, j∈{0,1,…t-1}, that is,

[0126] First verify whether the following equation holds:

[0127]

[0128] If not, output 0, indicating that the ciphertext sent by the sender is invalid.

[0129] 3. For t different ciphertexts CT1, CT2…CT t , we can get t points (x 1,* ,y 1,* )(x 2,* ,y 2,* )…(x t,* ,y t,* ), construct a t-1 order polynomial for these t points using the Lagrange interpolation method:

[0130] f'(x)=a' t-1 x t-1 +…+a'2x 2 +a'1x+a'0∈Z p

[0131] We obtain a'0=f'(0).

[0132] 4. Finally, determine whether the following equation is true

[0133] a′0=a 1,0 =a 2,0 =…=a t,0

[0134] where a 1,0 、a 2,0 , …a t,0 There are t different ciphertexts. If the t+1 values ​​are the same, then output 1, indicating that the ciphertexts CT1, CT2…CT t The corresponding plaintext M1=M2=…=M t If it is true, then output 0, indicating that the corresponding plaintext M1=M2=…=M t Not true.

[0135] The present invention also provides a batch ciphertext equivalence test device, comprising:

[0136] Acquisition unit, used to obtain batch ciphertext CT1, CT2…CT t And all the trapdoors tk1, tk2…tk corresponding to the batch ciphertext t CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CT i =(C i,1 ,C i,2 ,C i,3 ,C i,4 )i∈{1,2…t},C i,4 represents the 4th cipher segment of the i-th ciphertext;

[0137] A testing unit, used for testing the ciphertext corresponding to each ciphertext by using the trapdoor of each ciphertext;

[0138] The acquisition unit is also used to obtain the commitment B corresponding to the ciphertext j , j∈{0,1,…t-1};

[0139] Determine the unit for the commitment B based on all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext, and if the ciphertext of the sender is a valid ciphertext, according to the batch ciphertext CT1, CT2…CT t Determine the polynomial random point corresponding to each ciphertext;

[0140] The determination unit is further used to construct a Lagrangian polynomial using polynomial random points of all ciphertexts, and determine a secret value of the Lagrangian polynomial;

[0141] The determining unit is further used to determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to all ciphertexts. If they are equal, the ciphertexts CT1, CT2…CT t The corresponding plaintext M1=M2=…M t Established, where M t Represents the tth plaintext.

[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A batch ciphertext equivalence test method, characterized in that: include: Get batch ciphertext CT1, CT2...CT t And all the trapdoors tk1, tk2...tk corresponding to the batch ciphertext t ; Among them, CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CT i =(C i,1 , C i,2 , C i,3 , C i,4 ) i∈{1,2…t},C i,4 represents the 4th cipher segment of the i-th ciphertext; Use the trapdoor of each ciphertext to test the corresponding ciphertext and obtain the commitment B of the corresponding ciphertext j , j∈{0, 1, …t-1} and batch ciphertext CT1, CT2, …CT t A polynomial random point corresponding to each ciphertext in; According to the commitment B of all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext, and if the ciphertext of the sender is a valid ciphertext, construct a Lagrangian polynomial using polynomial random points of all ciphertexts, and determine the secret value of the Lagrangian polynomial; Determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to each ciphertext. If they are equal, the ciphertexts CT1, CT2...CT t The corresponding plaintext M1=M2=...M t Established, where M t represents the tth plaintext; The batch ciphertexts CT1, CT2...CT t In , each ciphertext CT = (C1, C2, C3, C4) is determined as follows: Get system parameter pp, pp = (p, G, g, H1, H2, SH); where G is a cyclic group constructed using security parameter λ, p is the prime order of the cyclic group G, g is a generator of the cyclic group G, H1 and H2 are two hash functions respectively; SH is a short hash function; H1: G → {0, 1} λ+l , H2:G 3 ×{0, 1} λ+l →G t-1 ×{0, 1} 3l , SH: {0, 1} λ →Z p , l is a finite field Z p The number of elements in According to the system parameter pp, a public-private key pair (pk, sk) is generated, (pk, sk) = ((X = g α , Y = g β ), (α, β)); where α, β are random numbers, α, β∈Z p ; According to the system parameter pp and the 2t mutually different numbers ω1ω2…ω broadcast on the safety channel t ,ω t+1 …ω 2t ∈{0, 1} λ , determine t different points P t ; According to the t different points P t , using Lagrange interpolation method to construct a t-1 order Lagrange polynomial f(x), f(x) = a t-1 x t-1 +…+a2x 2 +a1x+a0∈Z p ; According to the Lagrangian polynomial f(x), its secret value a0 is determined, and a point q(x) is randomly selected on the Lagrangian polynomial f(x). * ,y * ), and broadcast x * , to ensure that other senders do not choose the same x * ; According to the Lagrange polynomial f(x), determine the commitment B corresponding to each ciphertext j , According to the commitment B j , and the secret value a0 encrypts the corresponding plaintext M to obtain the ciphertext CT = (C1, C2, C3, C4), 2. The batch ciphertext equivalence test method according to claim 1, characterized in that: The t different points P t Determined according to the following formula:

3. The batch ciphertext equivalence test method according to claim 1, characterized in that: The trapdoor tk corresponding to each ciphertext is determined according to the private key corresponding to the ciphertext, tk=β.

4. The batch ciphertext equivalence test method according to claim 1, characterized in that: Determine the commitment B corresponding to each ciphertext according to the following formula j Among them, a i,0 represents the secret value of the Lagrange polynomial corresponding to the i-th ciphertext, B i,0 ||B i,1 …||B i,t-1 represents the commitment corresponding to the i-th ciphertext, x i,* ,y i,* represents a point randomly selected from the Lagrange polynomial corresponding to the i-th ciphertext.

5. The batch ciphertext equivalence test method according to claim 4, characterized in that: Determine whether the ciphertext sent by the sender is invalid ciphertext according to the following formula: in, y i,* represents the horizontal and vertical coordinates of a point randomly selected from the Lagrange polynomial corresponding to the i-th ciphertext; B i,j Denotes the commitment B corresponding to the i-th ciphertext j .

6. The batch ciphertext equivalence test method according to claim 4, characterized in that: The step of constructing a Lagrangian polynomial using polynomial random points of all ciphertexts and determining a secret value of the Lagrangian polynomial comprises: Get the polynomial random points corresponding to all ciphertexts, then for t different ciphertexts CT1, CT2…CT t , get t polynomial random points (x 1,* ,y 1,* )(x 2,* ,y 2,* )…(x t,* ,y t,* ); For these t random polynomial points, a Lagrange interpolation method is used to construct a Lagrange polynomial of order t-1: f′(x)=a′ t-1 x t-1 +…+a′2x 2 +a′1x+a′0∈Z p According to the Lagrange polynomial, the corresponding secret value a′0 is determined, a′0=f′(0).

7. The batch ciphertext equivalence test method according to claim 6, characterized in that: Determine whether the secret value is equal to the Lagrange polynomial secret value corresponding to all ciphertexts according to the following formula: a’0=a 1,0 =a 2,0 =…=a t,0 Among them, a t,0 represents the secret value of the Lagrange polynomial corresponding to the tth ciphertext in the batch ciphertext, a 1,0 、a 2,0 , …a t,0 is the secret value of the Lagrange polynomial corresponding to t different ciphertexts.

8. A device for executing the batch ciphertext equivalence test method according to claim 1, characterized in that: include: Acquisition unit, used to obtain batch ciphertext CT1, CT2...CT t And all the trapdoors tk1, tk2...tk corresponding to the batch ciphertext t ; Among them, CT t represents the tth ciphertext, t is the total number of ciphertexts, tk t Indicates the trapdoor corresponding to the t-th ciphertext; CT i =(C i,1 , C i,2 , C i,3 , C i,4 ) i∈{1,2,…,t},C i ,4 represents the 4th cipher segment of the i-th ciphertext; A testing unit, used for testing the ciphertext corresponding to each ciphertext by using the trapdoor of each ciphertext; The acquisition unit is also used to obtain the commitment B corresponding to the ciphertext j , j∈{0, 1, ...t-1}, and batch ciphertext CT1, CT2...CT t A polynomial random point corresponding to each ciphertext in; Determine the unit for the commitment B based on all ciphertexts j , determine whether the ciphertext sent by the sender is an invalid ciphertext, and if the ciphertext of the sender is a valid ciphertext, construct a Lagrangian polynomial using polynomial random points of all ciphertexts, and determine the secret value of the Lagrangian polynomial; The determining unit is further used to determine whether the secret value is equal to the secret value of the Lagrange polynomial corresponding to each ciphertext. If they are equal, the ciphertexts CT1, CT2...CT t The corresponding plaintext M1=M2=...M t Established, where M t Represents the tth plaintext.