Privacy protection matrix multiplication calculation method based on threshold Paillier cryptosystem

By adopting a privacy protection method based on the threshold Paillier cryptographic system in matrix multiplication, and using blocked matrix multiplication and secure matrix multiplication protocols, the problem of data privacy leakage in traditional matrix multiplication is solved, and efficient and secure matrix multiplication calculation is achieved.

CN119652534APending Publication Date: 2025-03-18XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411755549.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Traditional matrix multiplication technology poses a risk of data privacy leakage when processing sensitive data, especially during data transmission and storage.

Method used

The privacy protection matrix multiplication calculation method based on the threshold Paillier cryptography system is adopted, and the blocked matrix multiplication and secure matrix multiplication protocols are used to ensure that the original data is not leaked during the matrix multiplication process. The method includes the participants P1 and P2 encrypting and processing matrix data respectively, and improving computational efficiency through multi-threaded parallel computing.

Benefits of technology

It realizes safe matrix multiplication calculation without leaking data privacy, reducing the risk of data leakage and improving computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652534A_ABST
    Figure CN119652534A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy protection matrix multiplication calculation method based on a threshold Paillier cryptosystem. According to the method, the two participants can safely calculate the multiplication of the matrix under the condition that the data of the participants are not leaked. And the participant P1 divides the matrix into a plurality of sub-matrixes based on each element in the Paillier encryption matrix, and cooperatively executes the security matrix multiplication protocol with the participant P2 by using the block matrix. According to the method, a security matrix multiplication protocol based on a threshold Paillier cryptosystem is designed, a plurality of ciphertexts are packaged into one ciphertext, the communication traffic is reduced, parallel execution of matrix block multiplication is supported, and the calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of matrix multiplication, and in particular to a privacy-preserving matrix multiplication calculation method based on a threshold Paillier cryptographic system. Background Art

[0002] Privacy-preserving matrix multiplication computing technology aims to achieve efficient matrix operations while protecting data privacy, and is particularly suitable for scenarios involving large-scale data and sensitive information processing. The core of this technology is to perform calculations without leaking the original data. However, traditional matrix multiplication technology usually requires the plaintext data to be transmitted to the server for processing, which not only increases privacy risks, but also brings the possibility of data leakage.

[0003] In traditional matrix multiplication systems, client devices are usually responsible for providing matrix data and sending it to the server. The server relies on its powerful computing power to perform the multiplication task and return the result to the client. This architecture relieves the client device from having to bear a large computing burden, but the data may be at risk of being intercepted or leaked during transmission and storage, especially when sensitive data is involved.

[0004] In order to solve the above privacy issues, privacy-preserving matrix multiplication technology came into being. This technology uses a variety of encryption methods to ensure that the server cannot directly access the original data during the matrix multiplication process, thereby greatly reducing the risk of data leakage. The core of privacy-preserving matrix multiplication technology is to protect the privacy of matrix data through encryption methods such as homomorphic encryption, secret sharing or differential privacy. Summary of the invention

[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a privacy-preserving matrix multiplication calculation method based on a threshold Paillier cryptographic system, which can safely complete the privacy-preserving matrix multiplication calculation with high reliability.

[0006] To achieve the above object, the technical solution provided by the present invention is: a privacy-preserving matrix multiplication calculation method based on a threshold Paillier cryptographic system, comprising the following steps:

[0007] It is stipulated that the party that does not need matrix multiplication or the party with a smaller matrix size is participant P1, and the other party is participant P2;

[0008] Participant P1 uses the Paillier encryption matrix Q to divide the matrix into M×N sub-matrices. The size of each submatrix does not exceed slots, where slots refers to the maximum number of ciphertexts that can be supported using Paillier packed ciphertext.

[0009] Participant P2 divides the matrix V into N×P sub-matrices The two parties use the block matrix to execute the secure matrix multiplication protocol to calculate the ciphertext matrix R, where the matrix block of R The secure matrix multiplication protocol can use multi-threaded parallel computing, and the final participant P2 obtains the ciphertext result of the matrix multiplication.

[0010] Further, the secure matrix multiplication protocol comprises the following steps:

[0011] Participant P1 generates a random number r←{0, 1} σ , where σ is a security parameter. P1 traverses the m×n dimensional matrix A and calculates a for each element in A i,j =a i,j +r, i∈[1,m], j∈[1,n], mask each element. P1 encrypts all elements in the matrix A based on the Paillier cryptosystem, as well as the negative value of the random number r, · represents the ciphertext. The masking and encryption process can be parallelized using multi-threading;

[0012] Participant P1 traverses the m×n dimensional encryption matrix A and calculates based on Paillier homomorphic encryption i∈[1,m],j∈[1,n], where the constant L≥2 σ+2 , pack the matrix A into a ciphertext, then perform partial decryption to obtain the partially decrypted ciphertext D1, P1 sends the ciphertext D, D1 and -r to the participant P2;

[0013] After receiving D, D1 and -r, participant P2 uses D and D1 to perform partial decryption and threshold decryption to obtain plaintext D. Then calculate u∈[1, m×n] is unpacked to obtain each plaintext. Participant P2 encrypts all plaintexts x based on the Paillier cryptosystem u , then based on Paillier homomorphic encryption, calculate q u =x u -r to remove the mask. The unpacking and demasking process can be parallelized using multiple threads;

[0014] Participant P2 has an m×p dimensional matrix B. Based on Paillier homomorphic encryption, each element in the ciphertext result matrix C is calculated i∈[1,m], j∈[1,n], k∈[1,p], and participant P2 obtains the m×p dimensional ciphertext result matrix C. This process can use multi-threaded parallel computing.

[0015] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0016] 1. Based on the threshold Paillier cryptosystem, the present invention proposes a secure privacy-preserving matrix multiplication calculation method, which supports two parties to securely calculate matrix multiplication without disclosing their own privacy data.

[0017] 2. The present invention designs a secure matrix multiplication protocol, which packages the ciphertext matrix into one ciphertext, reduces the communication volume, and supports multi-threaded parallel computing to improve computing efficiency.

[0018] 3. The present invention utilizes block matrix multiplication to divide a large matrix into multiple sub-matrices. The sub-matrix multiplication supports multi-threaded parallel calls to the secure matrix multiplication protocol, thereby reducing the required storage space and improving computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a system model diagram of the method of the present invention. DETAILED DESCRIPTION

[0020] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0021] See also Figure 1 As shown, this embodiment discloses a privacy-preserving matrix multiplication calculation method based on a threshold Paillier cryptographic system, comprising the following steps:

[0022] It is stipulated that the party that does not need to obtain matrix multiplication or the party with a smaller matrix size is participant P1, and the other party is participant P2. The key service provider generates the public key pk and private key sk of the threshold Paillier cryptosystem and partial private keys sk1 and sk2, and sends pk and sk1 to participant P1, and pk and sk2 to participant Px;

[0023] Participant P1 uses the Paillier encryption matrix Q to divide the matrix into M×N sub-matrices. The size of each submatrix does not exceed slots, where slots refers to the maximum number of ciphertexts that can be supported using Paillier packed ciphertexts;

[0024] Participant P2 divides the matrix V into N×P sub-matrices The two parties use the block matrix to execute the secure matrix multiplication protocol to calculate the ciphertext matrix R, where the matrix block of R I∈[1,M],J∈[1,P]. The secure matrix multiplication protocol can use multi-threaded parallel computing, and the final participant P2 obtains the ciphertext result of the matrix multiplication.

[0025] Specifically, the secure matrix multiplication protocol comprises the following steps:

[0026] Participant P1 generates a random number r←{0, 1} σ , where σ is a security parameter. P1 traverses the m×n dimensional matrix A and calculates a for each element in A i,j =a i,j +r, i∈[1,m], j∈[1,n], mask each element. P1 encrypts all elements in the matrix A based on the Paillier cryptosystem, as well as the negative value of the random number r, · represents the ciphertext. The masking and encryption process can be parallelized using multi-threading;

[0027] Participant P1 traverses the m×n dimensional encryption matrix A and calculates based on Paillier homomorphic encryption i∈[1,m],j∈[1,n], where the constant L≥2 σ+2 , pack the matrix A into a ciphertext, then perform partial decryption to obtain the partially decrypted ciphertext D1, P1 sends the ciphertext D, D1 and -r to the participant P2;

[0028] After receiving D, D1 and -r, participant P2 uses D and D1 to perform partial decryption and threshold decryption to obtain plaintext D. Then calculate u∈[1, m×n] is unpacked to obtain each plaintext. Participant P2 encrypts all plaintexts x based on the Paillier cryptosystem u , then based on Paillier homomorphic encryption, calculate q u =x u -r to remove the mask. The unpacking and demasking process can be parallelized using multiple threads;

[0029] Participant P2 has an m×p dimensional matrix B. Based on Paillier homomorphic encryption, each element in the ciphertext result matrix C is calculated i∈[1,m], j∈[1,n], k∈[1,p], and participant P2 obtains the m×p dimensional ciphertext result matrix C. This process can use multi-threaded parallel computing.

[0030] In summary, the present invention designs a series of secure matrix multiplication protocols, supports the calculation of privacy-preserving matrix multiplication, uses block matrix multiplication to reduce the computational complexity, uses ciphertext packing technology to reduce transmission communication volume, and uses multi-threaded parallel computing mechanism to improve computational efficiency.

[0031] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A privacy-preserving matrix multiplication calculation method based on a threshold Paillier cryptosystem, characterized in that: The following steps are involved: It is stipulated that the party that does not need matrix multiplication or the party that has a smaller matrix size is participant P1, and the other party is participant P2; Participant P1 uses the Paillier encryption matrix Q to divide the matrix into M×N sub-matrices. The size of each submatrix does not exceed slots, where slots refers to the maximum number of ciphertexts that can be supported using Paillier packed ciphertexts; Participant P2 divides the matrix V into N×P sub-matrices The two parties use the block matrix to execute the secure matrix multiplication protocol to calculate the ciphertext matrix R, where the matrix block of R The secure matrix multiplication protocol can use multi-threaded parallel computing, and the final participant P2 obtains the ciphertext result of the matrix multiplication.

2. The privacy-preserving matrix multiplication calculation method based on the threshold Paillier cryptographic system according to claim 1, characterized in that: The secure matrix multiplication protocol comprises the following steps: Participant P1 generates a random number r←{0, 1} σ , where σ is a security parameter. P1 traverses the m×n dimensional matrix A and calculates a for each element in A i,j =a i,j +r, i∈[1,m], j∈[1,n], mask each element. P1 encrypts all elements in the matrix A based on the Paillier cryptosystem, as well as the negative value of the random number r, · represents the ciphertext. The masking and encryption process can be parallelized using multi-threading; Participant P1 traverses the m×n dimensional encryption matrix A and calculates based on Paillier homomorphic encryption Where the constant L ≥ 2 σ+2 ,Pack the matrix A into a ciphertext, then perform partial decryption to obtain the partially decrypted ciphertext D1, P1 sends the ciphertext D, D1 and -r to the participant P2; After receiving D, D1 and -r, participant P2 uses D and D1 to perform partial decryption and threshold decryption to obtain plaintext D. Then calculate Unpack and get each plaintext. Participant P2 encrypts all plaintext x based on the Paillier cryptographic system u , then based on Paillier homomorphic encryption, calculate q u =x u -r to remove the mask. The unpacking and demasking process can be parallelized using multiple threads; Participant P2 has an m×p dimensional matrix B. Based on Paillier homomorphic encryption, each element in the ciphertext result matrix C is calculated Participant P2 obtains the m×p dimensional ciphertext result matrix C. This process can use multi-threaded parallel computing.