WO2021197037A1 - Method and apparatus for jointly performing data processing by two parties - Google Patents

Method and apparatus for jointly performing data processing by two parties Download PDF

Info

Publication number
WO2021197037A1
WO2021197037A1 PCT/CN2021/080753 CN2021080753W WO2021197037A1 WO 2021197037 A1 WO2021197037 A1 WO 2021197037A1 CN 2021080753 W CN2021080753 W CN 2021080753W WO 2021197037 A1 WO2021197037 A1 WO 2021197037A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
party
original
sharing
homomorphic
Prior art date
Application number
PCT/CN2021/080753
Other languages
French (fr)
Chinese (zh)
Inventor
陈超超
王力
周俊
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021197037A1 publication Critical patent/WO2021197037A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/008Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols involving homomorphic encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/085Secret sharing or secret splitting, e.g. threshold schemes

Definitions

  • One or more embodiments of this specification relate to the field of data security, and in particular, to methods and devices for joint data processing by both parties.
  • the electronic payment platform owns the merchant’s transaction flow data
  • the e-commerce platform stores the merchant’s sales data
  • the banking institution owns the merchant’s lending data
  • the model party owns the modeling parameter data.
  • the protection and security of data privacy have become issues worthy of attention.
  • Party A holds the user sample characteristic data to be processed
  • Party B holds the data processing model.
  • One or more embodiments of this specification describe methods and devices for joint data processing by both parties, so that secure matrix multiplication operations can be performed without revealing the privacy of the data of both parties, and collaborative data processing can be realized.
  • the second public key is a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix by using the homomorphic encryption algorithm;
  • the first party and the second party are the model owner and the data owner, respectively, and the first private data and the second private data are the model parameter data of the machine learning model and the feature data of the business object, respectively.
  • the above-mentioned product matrix is an original matrix multiplied by a second original matrix; in this case, the homomorphic sum operation between rows and columns includes: using the plaintext elements of each row in the first original matrix, Perform a homomorphic summation operation on the ciphertext elements of each column of the second encryption matrix to obtain the encryption synthesis matrix.
  • the above-mentioned product matrix is the second original matrix multiplied by the first original matrix; in this case, the homomorphic sum operation between rows and columns includes: using the plaintext of each column in the first original matrix Element, performing a homomorphic addition operation on the ciphertext elements of each row of the second encryption matrix to obtain the encryption synthesis matrix.
  • the homomorphic encryption algorithm adopts the Paillier algorithm; for n plaintext elements from one row or one column in the first original matrix, and n ciphertext elements included in the second encryption matrix, the corresponding homomorphic summation
  • the operation includes: using the i-th plaintext element to perform the power operation on the i-th ciphertext element to obtain n power operation results; based on the multiplication of the n power operation results, the n plaintext elements and the corresponding
  • the homomorphic sum result of n ciphertext elements is used as an element in the encryption synthesis matrix.
  • the first sharing matrix is sent to a third party different from the first party and the second party.
  • a method for two parties that protect data privacy to jointly perform data processing.
  • the two parties include a first party and a second party, and the first party has first private data recorded as a first original matrix.
  • the second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the method executed by the second party includes:
  • the homomorphic encryption algorithm encrypts a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix, and the first secret sharing matrix is the first party randomly generated by the first party using the second public key pair 1. Share the matrix obtained by matrix encryption;
  • a device for joint data processing by two parties that protect data privacy.
  • the two parties include a first party and a second party, and the first party has first privacy data recorded as a first original matrix.
  • the second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the deployment of the device in the first party includes:
  • the receiving unit is configured to receive a second encryption matrix from the second party, where the second encryption matrix encrypts the second original matrix using a homomorphic encryption algorithm by using a second public key corresponding to the second party And get
  • the homomorphic operation unit is configured to perform a homomorphic sum operation between rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain an encrypted comprehensive matrix, so that the encrypted
  • the comprehensive matrix corresponds to a matrix obtained by using the second public key and using the homomorphic encryption algorithm to encrypt the product matrix of the first original matrix and the second original matrix;
  • the sending unit is configured to calculate the difference matrix between the encryption synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party decrypts the difference matrix A second sharing matrix is obtained, and the sum of the second sharing matrix and the first sharing matrix is the product matrix.
  • an apparatus for joint data processing by two parties that protect data privacy.
  • the two parties include a first party and a second party, and the first party has first private data recorded as a first original matrix.
  • the second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than that of the first original matrix; the deployment of the device in the second party includes:
  • An encryption unit configured to use a second public key possessed by the second party to encrypt the second original matrix using a homomorphic encryption algorithm to obtain a second encryption matrix
  • a sending unit configured to send the second encryption matrix to the first party
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect or the second aspect.
  • the one of the two parties with the smaller matrix dimension homomorphically encrypts its matrix, and sends the encrypted matrix to the other party.
  • the other party uses its own original matrix to perform a homomorphic operation on the encrypted matrix to obtain an encrypted comprehensive matrix.
  • the encrypted synthesis matrix is equivalent to the matrix after the multiplication matrix is encrypted.
  • the two parties perform secret sharing under homomorphic encryption for the encrypted synthesis matrix, and finally each obtain a matrix fragment, so that the sum of the fragments is a multiplication matrix.
  • both parties will not leak the plaintext of their original matrix, thus achieving a safe matrix multiplication operation.
  • the above process only requires a matrix with a small communication dimension, and the communication volume and calculation volume are relatively small, so the secure private data calculation is efficiently guaranteed.
  • Figure 2 shows a schematic diagram of two parties performing matrix multiplication
  • FIG. 3 shows a schematic diagram of a process in which two parties jointly perform data processing in an embodiment
  • Fig. 4 shows a schematic block diagram of a data processing device deployed in a first party according to an embodiment
  • Fig. 5 shows a schematic block diagram of a data processing device deployed in a second party according to an embodiment.
  • the matrix multiplication operation between data matrices is a common operation in multi-party joint processing, and it is also a difficult point in privacy data protection.
  • the processing method provided in the embodiment of this specification is mainly designed for a scenario where two parties holding private data perform a security matrix multiplication operation.
  • FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification.
  • participants A and B are schematically shown.
  • Each participant can be embodied as a device, platform, server or device cluster with computing and processing capabilities.
  • participant A has a matrix X composed of party A's private data
  • participant B has a matrix Y composed of party B's private data.
  • Both parties hope to perform a secure matrix multiplication operation, that is, party A does not reveal the plaintext of its matrix X.
  • Participant B does not disclose the plaintext of its matrix Y, but finally calculates the result of matrix multiplication X*Y.
  • the participants A and B are the model owner and the data owner, respectively.
  • the private data in the matrix X and the matrix Y are the model parameter data of the machine learning model and the feature data of the business object, respectively.
  • business objects may include users, products, events, etc. to be analyzed.
  • the corresponding feature data can include user attribute feature data, such as age, gender, registration duration, occupation, purchase record, loan record, etc.; when the business object is a commodity, the corresponding feature data can be Including, product attribute feature data, such as product category, shelf time, number of reviews, etc.; when the business object is an event, the corresponding feature data can include related event features, such as the time, place, and participation of the event The trajectory of participants, the amount of (transaction) events, channels, etc.
  • the business object may also be a picture, audio, text, etc. to be analyzed, respectively corresponding to it.
  • the characteristic data may include picture pixel characteristics, audio frequency spectrum characteristics, text encoding characteristics, and so on.
  • the machine learning model owned by the other party may be a model used to perform business processing on the above-mentioned business objects.
  • the business processing can include business processing based on user classification, such as user group division, user service customization, etc.; when the business object is an event, the business processing can include an incident security assessment.
  • business processing may also include business processing based on audio recognition, business processing based on text analysis, and so on.
  • the above-mentioned machine learning model can be a classification model or a regression model, and the model involves a linear combination of model parameters and feature data. Therefore, the model parameter matrix X and the feature data matrix Y need to be multiplied.
  • the model may be a linear regression model, and its core algorithm is the above-mentioned linear combination operation.
  • the model may also be a logistic regression model, which further imposes a nonlinear function operation on the basis of the above linear combination operation.
  • the model can also be other models that require linear combination operations.
  • participant A and participant B in FIG. 1 may also be peers that jointly perform model joint training, each having a part of model parameters and feature data.
  • participant A and participant B may also be other private data holders, and in order to perform certain data processing, a secure matrix multiplication operation is required.
  • participant A cannot leak its original matrix X
  • participant B cannot leak its original matrix Y. Both parties hope to jointly calculate the matrix multiplication result X*Y.
  • the party with the smaller matrix dimension of the two parties is assumed to be participant B, and its matrix Y is homomorphically encrypted, and the encrypted matrix [Y] is sent to the other party A.
  • the other party A uses its own matrix X to perform a homomorphic operation on the encrypted matrix [Y] to obtain the encrypted comprehensive matrix [Z].
  • This encrypted synthesis matrix is equivalent to a matrix obtained by encrypting the multiplication matrix X*Y.
  • the two parties conduct a secret sharing under homomorphic encryption for the encrypted synthesis matrix [Z], and finally participant A and participant B each get a matrix segment Z 1 and Z 2 , making the sum of Z 1 and Z 2 a multiplication matrix X*Y.
  • Figure 2 shows a schematic diagram of matrix multiplication performed by both parties.
  • Figure 2 shows participant A and participant B.
  • Participant A maintains a private data matrix X, which is an m*n-dimensional matrix;
  • participant B maintains a private data matrix Y, which The matrix is an n*k-dimensional matrix.
  • Both parties hope to safely calculate the X*Y multiplication matrix (m*k dimension).
  • the matrix Y is a matrix with a smaller dimension, that is, k ⁇ m, which corresponds to the scene (A) in FIG. 2.
  • the matrix X is a matrix with a smaller dimension, that is, m ⁇ k, which corresponds to the scene (B) in FIG. 2.
  • Fig. 3 shows a schematic diagram of a process in which both parties jointly perform data processing in an embodiment. This schematic diagram shows the process of safe matrix multiplication by both parties in the case of the above scenario (A).
  • step 301 the second party uses its own public key and uses a homomorphic encryption algorithm to encrypt the second original matrix it owns to obtain a second encryption matrix.
  • the second party is participant B.
  • Participant B can choose the homomorphic encryption algorithm E, and generate the public key PK-b and the private key SK-b under the encryption algorithm. Then, using its public key PK-b, homomorphic encryption algorithm E is used to perform homomorphic encryption on the second original matrix, namely matrix Y, to obtain the second encryption matrix [Y] b .
  • the second encryption matrix [Y] b contains ciphertext elements at various positions, and each ciphertext element is obtained by performing the above-mentioned homomorphic encryption on the original elements at the corresponding positions of the original matrix Y.
  • step 302 the second party B sends the second encryption matrix [Y] b to the first party A. Since the matrix has been encrypted, the communication in this step will not reveal the private data of participant B.
  • the above-mentioned homomorphic addition operation is a homomorphic operation operation between the plaintext and the ciphertext corresponding to the aforementioned homomorphic encryption algorithm E. Its function can make the homomorphism between the rows and columns of the plaintext matrix X and the ciphertext matrix [Y] b
  • a homomorphic encryption algorithm is an encryption function that performs operations on plaintext and then encrypts it, and performs corresponding operations on ciphertext after encryption, and the result is equivalent. For example, using the same public key PK to encrypt v 1 and v 2 to obtain E PK (v 1 ) and E PK (v 2 ), if it satisfies:
  • the Paillier encryption algorithm also satisfies:
  • the homomorphic sum operation between the plaintext elements and the ciphertext elements can be implemented as follows:
  • the result can be used as the jth row in the encrypted synthesis matrix.
  • the element z jk in the k-th column, and as shown in formula (4), the element z jk is actually equal to the encrypted value of the corresponding element in the product matrix X*Y of the original matrix X and the original matrix Y.
  • homomorphic addition operation combined with the Paillier algorithm is described above. It can be understood that a variety of homomorphic encryption algorithms already exist, and all encryption algorithms with additive homomorphic properties can be used in this solution. For example, some other algorithms based on elliptic curve encryption similar to Paillier also satisfy additive homomorphism. In addition, the Gentry algorithm, as a quasi-fully homomorphic encryption algorithm, satisfies both additive homomorphism and multiplication homomorphism. Correspondingly, different homomorphic encryption algorithms have different forms of homomorphic addition operations.
  • step 304 the first party A randomly generates a first sharing matrix, denoted as ⁇ Z> 1 . Then, the first party A uses the public key PK-b of the second party B and the aforementioned homomorphic encryption algorithm E to encrypt the first sharing matrix to obtain the first secret sharing matrix [ ⁇ Z> 1 ] b .
  • the first party gets the first sharing matrix ⁇ Z> 1
  • the second party gets the second sharing matrix ⁇ Z> 2
  • the sum of the first sharing matrix and the second sharing matrix is equal to the expected product matrix X* Y.
  • scenario (A) in FIG. 2 that is, the case where the original matrix Y has a smaller dimension. If it is the case of scenario (B), that is, the original matrix X in party A has a smaller dimension, then party A can be used as the second party, and party B can be the first party. In this way, the second party is still the matrix dimension For the smaller one, calculate similarly with reference to the method shown in FIG. 3.
  • the homomorphic operation unit 42 is configured to perform a homomorphic sum operation between rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain an encrypted comprehensive matrix, so that the The encrypted synthesis matrix corresponds to a matrix obtained by using the second public key and using the homomorphic encryption algorithm to encrypt the product matrix of the first original matrix and the second original matrix;
  • the sharing matrix generating unit 43 is configured to randomly generate a first sharing matrix, and encrypt it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
  • the sending unit 44 is configured to calculate the difference matrix between the encryption synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party has the difference matrix
  • the second sharing matrix is obtained by decryption, and the sum of the second sharing matrix and the first sharing matrix is the product matrix.
  • the above-mentioned first party and the second party are the model owner and the data owner, respectively, and the first private data and the second private data are model parameter data of the machine learning model and feature data of the business object, respectively .
  • the above-mentioned machine learning model includes a logistic regression model or a linear regression model;
  • the business object may include one of the following: users, commodities, and events.
  • the product matrix is the first original matrix multiplied by the second original matrix; the homomorphic operation unit 42 is configured to: use the plaintext elements in each row of the first original matrix to perform The ciphertext elements of each column of the second encryption matrix are subjected to a homomorphic addition operation to obtain the encryption synthesis matrix.
  • the product matrix is the second original matrix multiplied by the first original matrix; the homomorphic operation unit 42 is configured to: use the plaintext elements of each column in the first original matrix to The ciphertext elements of each row of the second encryption matrix are subjected to a homomorphic addition operation to obtain the encryption synthesis matrix.
  • the first original matrix includes n plaintext elements from one row or one column
  • the second encryption matrix includes corresponding n ciphertext elements
  • the homomorphic encryption algorithm is Paillier's algorithm
  • the transceiver unit is configured to send the first sharing matrix to a third party different from the first party and the second party.
  • a device for two parties to jointly perform data processing wherein the two parties include a first party and a second party, the first party has first private data recorded as a first original matrix, and the first party has first privacy data recorded as a first original matrix.
  • the two parties have the second privacy data recorded as the second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the above-mentioned device is deployed in the second party, and the second party can use any equipment with computing and processing capabilities , Platform or equipment cluster.
  • Fig. 5 shows a schematic block diagram of a data processing device deployed in a second party according to an embodiment. As shown in FIG. 5, the processing device 500 includes:
  • the sending unit 52 is configured to send the second encryption matrix to the first party
  • the receiving unit 53 is configured to receive a difference matrix from the first party, the difference matrix being the difference between the encrypted synthesis matrix and the first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to using the first Two public keys, a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix using the homomorphic encryption algorithm, the first secret sharing matrix is the first party using the second public key The matrix obtained by encrypting the first shared matrix randomly generated by the key;
  • a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method described in conjunction with FIG. 3.
  • the functions described in the present invention can be implemented by hardware, software, firmware, or any combination thereof.
  • these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.

Abstract

The embodiments of the present specification provide a data privacy protection based method and apparatus for jointly performing data processing by two parties, wherein each of the two parties maintains an original matrix formed by private data. The method comprises that: one party, of which the matrix dimension is smaller, of the two parties carries out homomorphic encryption on its own matrix, and sends the encrypted matrix to the other party; the other party uses its own original matrix to carry out homomorphic summation operation on the encrypted matrix to obtain an encrypted comprehensive matrix, the encrypted comprehensive matrix being equivalent to a matrix obtained by encrypting a multiplication matrix; and then, the two parties carry out secret sharing under homomorphic encryption on the encrypted comprehensive matrix, and finally each obtains a matrix fragment, the sum of the fragments being the multiplication matrix, thereby realizing a secure matrix operation of the two parties.

Description

双方联合进行数据处理的方法及装置Method and device for joint data processing by both parties 技术领域Technical field
本说明书一个或多个实施例涉及数据安全领域,尤其涉及双方联合进行数据处理的方法和装置。One or more embodiments of this specification relate to the field of data security, and in particular, to methods and devices for joint data processing by both parties.
背景技术Background technique
在大数据背景下,常常需要将不同数据方的业务数据进行综合处理。例如,在基于机器学习的商户分类分析场景中,电子支付平台拥有商户的交易流水数据,电子商务平台存储有商户的销售数据,银行机构拥有商户的借贷数据,而模型方拥有建模的参数数据。在对多方数据进行联合处理的过程中,数据隐私的保护和安全性成为值得关注的问题。例如,在一个多方计算的场景下,A方持有待处理的用户样本特征数据,B方持有数据处理模型。在通过该数据处理模型对样本特征数据实施处理时,如果A方将样本数据直接发送至B方,会导致用户样本的特征取值被暴露,泄露用户隐私;如果B方将数据处理模型提供至A方进行使用,会导致数据处理模型的模型参数被暴露。In the context of big data, it is often necessary to comprehensively process the business data of different data parties. For example, in a business classification analysis scenario based on machine learning, the electronic payment platform owns the merchant’s transaction flow data, the e-commerce platform stores the merchant’s sales data, the banking institution owns the merchant’s lending data, and the model party owns the modeling parameter data. . In the process of joint processing of multi-party data, the protection and security of data privacy have become issues worthy of attention. For example, in a multi-party computing scenario, Party A holds the user sample characteristic data to be processed, and Party B holds the data processing model. When processing sample feature data through this data processing model, if Party A sends the sample data directly to Party B, it will cause the feature value of the user sample to be exposed, leaking user privacy; if Party B provides the data processing model to The use by Party A will cause the model parameters of the data processing model to be exposed.
因此,希望提供改进的方案,在多方联合进行数据处理的过程中,保护各方隐私数据的安全。Therefore, it is hoped to provide an improved solution to protect the security of the private data of all parties in the process of joint data processing by multiple parties.
发明内容Summary of the invention
本说明书一个或多个实施例描述了双方联合进行数据处理的方法和装置,从而在不泄露双方数据隐私的情况下,进行安全的矩阵乘法运算,实现协同数据处理。One or more embodiments of this specification describe methods and devices for joint data processing by both parties, so that secure matrix multiplication operations can be performed without revealing the privacy of the data of both parties, and collaborative data processing can be realized.
根据第一方面,提供了一种保护数据隐私的双方联合进行数据处理的方法,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述方法通过所述第一方执行,包括:According to a first aspect, there is provided a method for two parties that protect data privacy to jointly perform data processing. The two parties include a first party and a second party, and the first party has first private data recorded as a first original matrix. The second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the method executed by the first party includes:
从所述第二方接收第二加密矩阵,所述第二加密矩阵通过使用所述第二方对应的第二公钥,利用同态加密算法对所述第二原始矩阵加密而得到;Receiving a second encryption matrix from the second party, where the second encryption matrix is obtained by encrypting the second original matrix by using a homomorphic encryption algorithm using a second public key corresponding to the second party;
对所述第一原始矩阵中的明文元素与所述第二加密矩阵中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵,使得所述加密综合矩阵对应于,使用所述第二公 钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵;Perform homomorphic summation between the rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain the encrypted comprehensive matrix, so that the encrypted comprehensive matrix corresponds to the The second public key is a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix by using the homomorphic encryption algorithm;
随机生成第一分享矩阵,并利用所述第二公钥和所述同态加密算法对其加密,得到第一秘密分享矩阵;Randomly generating a first sharing matrix, and encrypting it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
计算所述加密综合矩阵和所述第一秘密分享矩阵的差值矩阵,将该差值矩阵发送给所述第二方,以使得所述第二方对该差值矩阵解密得到第二分享矩阵,该第二分享矩阵与所述第一分享矩阵之和为所述乘积矩阵。Calculate the difference matrix between the encrypted synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party decrypts the difference matrix to obtain a second sharing matrix , The sum of the second sharing matrix and the first sharing matrix is the product matrix.
根据一种实施方式,第一方和第二方分别为模型拥有方和数据拥有方,其中的第一隐私数据和第二隐私数据分别为机器学习模型的模型参数数据和业务对象的特征数据。According to an embodiment, the first party and the second party are the model owner and the data owner, respectively, and the first private data and the second private data are the model parameter data of the machine learning model and the feature data of the business object, respectively.
进一步的,在不同实施例中,机器学习模型可以是逻辑回归模型或线性回归模型;业务对象可以包括以下之一:用户,商品,事件。Further, in different embodiments, the machine learning model may be a logistic regression model or a linear regression model; the business object may include one of the following: users, commodities, and events.
在一个实施例中,上述乘积矩阵为一原始矩阵乘以第二原始矩阵;在这样的情况下,行列间的同态加和运算包括:用所述第一原始矩阵中各个行的明文元素,对所述第二加密矩阵的各个列的密文元素进行同态加和运算,得到所述加密综合矩阵。In an embodiment, the above-mentioned product matrix is an original matrix multiplied by a second original matrix; in this case, the homomorphic sum operation between rows and columns includes: using the plaintext elements of each row in the first original matrix, Perform a homomorphic summation operation on the ciphertext elements of each column of the second encryption matrix to obtain the encryption synthesis matrix.
在另一实施例中,上述乘积矩阵为第二原始矩阵乘以第一原始矩阵;在这样的情况下,行列间的同态加和运算包括:用所述第一原始矩阵中各个列的明文元素,对所述第二加密矩阵的各个行的密文元素进行同态加和运算,得到所述加密综合矩阵。In another embodiment, the above-mentioned product matrix is the second original matrix multiplied by the first original matrix; in this case, the homomorphic sum operation between rows and columns includes: using the plaintext of each column in the first original matrix Element, performing a homomorphic addition operation on the ciphertext elements of each row of the second encryption matrix to obtain the encryption synthesis matrix.
根据一种实施方式,同态加密算法采用Paillier算法;对于第一原始矩阵中来自一行或一列的n个明文元素,以及第二加密矩阵中包括的n个密文元素,相应的同态加和运算包括:分别使用第i个明文元素对第i个密文元素进行幂操作,得到n个幂操作结果;基于所述n个幂操作结果的连乘,得到所述n个明文元素和对应的n个密文元素的同态加和结果,作为所述加密综合矩阵中的一个元素。According to one embodiment, the homomorphic encryption algorithm adopts the Paillier algorithm; for n plaintext elements from one row or one column in the first original matrix, and n ciphertext elements included in the second encryption matrix, the corresponding homomorphic summation The operation includes: using the i-th plaintext element to perform the power operation on the i-th ciphertext element to obtain n power operation results; based on the multiplication of the n power operation results, the n plaintext elements and the corresponding The homomorphic sum result of n ciphertext elements is used as an element in the encryption synthesis matrix.
在一个实施例中,在发送上述差值矩阵之后,还执行:将第一分享矩阵发送给所述第二方,和/或;从第二方接收所述第二分享矩阵。In an embodiment, after sending the above-mentioned difference matrix, it is further executed: sending the first sharing matrix to the second party, and/or; receiving the second sharing matrix from the second party.
在另一实施例中,在发送上述差值矩阵之后,将所述第一分享矩阵发送给不同于所述第一方和第二方的第三方。In another embodiment, after sending the above-mentioned difference matrix, the first sharing matrix is sent to a third party different from the first party and the second party.
根据第二方面,提供了一种保护数据隐私的双方联合进行数据处理的方法,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第 二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述方法通过所述第二方执行,包括:According to a second aspect, there is provided a method for two parties that protect data privacy to jointly perform data processing. The two parties include a first party and a second party, and the first party has first private data recorded as a first original matrix. The second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the method executed by the second party includes:
使用所述第二方具有的第二公钥,利用同态加密算法对所述第二原始矩阵进行加密,得到第二加密矩阵;Encrypt the second original matrix by using a homomorphic encryption algorithm using the second public key possessed by the second party to obtain a second encryption matrix;
将所述第二加密矩阵发送到所述第一方;Sending the second encryption matrix to the first party;
从所述第一方接收差值矩阵,所述差值矩阵为加密综合矩阵和第一秘密分享矩阵的差值,其中,所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵,所述第一秘密分享矩阵是所述第一方使用所述第二公钥对随机生成的第一分享矩阵加密得到的矩阵;Receive a difference matrix from the first party, the difference matrix being the difference between the encrypted synthesis matrix and the first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to using the second public key and using the The homomorphic encryption algorithm encrypts a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix, and the first secret sharing matrix is the first party randomly generated by the first party using the second public key pair 1. Share the matrix obtained by matrix encryption;
使用与所述第二公钥对应的第二私钥,对所述差值矩阵进行解密,得到第二分享矩阵,使得所述第二分享矩阵和所述第一分享矩阵之和为所述乘积矩阵。Use the second private key corresponding to the second public key to decrypt the difference matrix to obtain a second sharing matrix, so that the sum of the second sharing matrix and the first sharing matrix is the product matrix.
根据第三方面,提供了一种保护数据隐私的双方联合进行数据处理的装置,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述装置部署在所述第一方中,包括:According to a third aspect, there is provided a device for joint data processing by two parties that protect data privacy. The two parties include a first party and a second party, and the first party has first privacy data recorded as a first original matrix. The second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the deployment of the device in the first party includes:
接收单元,配置为从所述第二方接收第二加密矩阵,所述第二加密矩阵通过使用所述第二方对应的第二公钥,利用同态加密算法对所述第二原始矩阵加密而得到;The receiving unit is configured to receive a second encryption matrix from the second party, where the second encryption matrix encrypts the second original matrix using a homomorphic encryption algorithm by using a second public key corresponding to the second party And get
同态运算单元,配置为对所述第一原始矩阵中的明文元素与所述第二加密矩阵中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵,使得所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵;The homomorphic operation unit is configured to perform a homomorphic sum operation between rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain an encrypted comprehensive matrix, so that the encrypted The comprehensive matrix corresponds to a matrix obtained by using the second public key and using the homomorphic encryption algorithm to encrypt the product matrix of the first original matrix and the second original matrix;
分享矩阵生成单元,配置为随机生成第一分享矩阵,并利用所述第二公钥和所述同态加密算法对其加密,得到第一秘密分享矩阵;The sharing matrix generating unit is configured to randomly generate a first sharing matrix, and encrypt it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
发送单元,配置为计算所述加密综合矩阵和所述第一秘密分享矩阵的差值矩阵,将该差值矩阵发送给所述第二方,以使得所述第二方对该差值矩阵解密得到第二分享矩阵,该第二分享矩阵与所述第一分享矩阵之和为所述乘积矩阵。The sending unit is configured to calculate the difference matrix between the encryption synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party decrypts the difference matrix A second sharing matrix is obtained, and the sum of the second sharing matrix and the first sharing matrix is the product matrix.
根据第四方面,提供了一种保护数据隐私的双方联合进行数据处理的装置,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第 二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述装置部署在所述第二方中,包括:According to a fourth aspect, there is provided an apparatus for joint data processing by two parties that protect data privacy. The two parties include a first party and a second party, and the first party has first private data recorded as a first original matrix. The second party has second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than that of the first original matrix; the deployment of the device in the second party includes:
加密单元,配置为使用所述第二方具有的第二公钥,利用同态加密算法对所述第二原始矩阵进行加密,得到第二加密矩阵;An encryption unit configured to use a second public key possessed by the second party to encrypt the second original matrix using a homomorphic encryption algorithm to obtain a second encryption matrix;
发送单元,配置为将所述第二加密矩阵发送到所述第一方;A sending unit, configured to send the second encryption matrix to the first party;
接收单元,配置为从所述第一方接收差值矩阵,所述差值矩阵为加密综合矩阵和第一秘密分享矩阵的差值,其中,所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵,所述第一秘密分享矩阵是所述第一方使用所述第二公钥对随机生成的第一分享矩阵加密得到的矩阵;The receiving unit is configured to receive a difference matrix from the first party, the difference matrix being the difference between an encrypted synthesis matrix and a first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to using the second The public key is a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix using the homomorphic encryption algorithm, and the first secret sharing matrix is the first party using the second public key The matrix obtained by encrypting the randomly generated first shared matrix;
解密单元,配置为使用与所述第二公钥对应的第二私钥,对所述差值矩阵进行解密,得到第二分享矩阵,使得所述第二分享矩阵和所述第一分享矩阵之和为所述乘积矩阵。The decryption unit is configured to use a second private key corresponding to the second public key to decrypt the difference matrix to obtain a second sharing matrix, such that the second sharing matrix is between the second sharing matrix and the first sharing matrix And is the product matrix.
根据第五方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面或第二方面的方法。According to a fifth aspect, there is provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect or the second aspect.
根据第六方面,提供了一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面或第二方面的方法。According to a sixth aspect, there is provided a computing device, including a memory and a processor, characterized in that executable code is stored in the memory, and when the processor executes the executable code, the first aspect or the first aspect is implemented. Two-sided approach.
根据本说明书实施例提供的方法和装置,由两方中矩阵维度较小的一方对其矩阵进行同态加密,将加密后的矩阵发送给另一方。另一方用其自身的原始矩阵,对该加密矩阵进行同态运算,得到加密综合矩阵。该加密综合矩阵相当于对乘法矩阵加密后的矩阵。然后,双方针对加密综合矩阵进行同态加密下的秘密分享,最终各自得到一个矩阵分片,使得分片之和为乘法矩阵。在以上过程中,双方都不会泄露其原始矩阵明文,因而实现了安全的矩阵乘法运算。并且,以上过程仅需要通信维度较小的矩阵,通信量和计算量都比较小,因此高效地保障了安全的隐私数据计算。According to the method and device provided in the embodiments of this specification, the one of the two parties with the smaller matrix dimension homomorphically encrypts its matrix, and sends the encrypted matrix to the other party. The other party uses its own original matrix to perform a homomorphic operation on the encrypted matrix to obtain an encrypted comprehensive matrix. The encrypted synthesis matrix is equivalent to the matrix after the multiplication matrix is encrypted. Then, the two parties perform secret sharing under homomorphic encryption for the encrypted synthesis matrix, and finally each obtain a matrix fragment, so that the sum of the fragments is a multiplication matrix. In the above process, both parties will not leak the plaintext of their original matrix, thus achieving a safe matrix multiplication operation. In addition, the above process only requires a matrix with a small communication dimension, and the communication volume and calculation volume are relatively small, so the secure private data calculation is efficiently guaranteed.
附图说明Description of the drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其 它的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. A person of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为本说明书披露的一个实施例的实施场景示意图;Fig. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification;
图2示出双方进行矩阵相乘的示意图;Figure 2 shows a schematic diagram of two parties performing matrix multiplication;
图3示出在一个实施例中双方联合进行数据处理的过程示意图;FIG. 3 shows a schematic diagram of a process in which two parties jointly perform data processing in an embodiment;
图4示出根据一个实施例的部署在第一方中的数据处理装置的示意性框图;Fig. 4 shows a schematic block diagram of a data processing device deployed in a first party according to an embodiment;
图5示出根据一个实施例的部署在第二方中的数据处理装置的示意性框图。Fig. 5 shows a schematic block diagram of a data processing device deployed in a second party according to an embodiment.
具体实施方式Detailed ways
下面结合附图,对本说明书提供的方案进行描述。The following describes the solutions provided in this specification with reference to the accompanying drawings.
如前所述,在多方联合进行数据处理过程中,数据隐私安全成为目前备受关注的问题。而在多种具体的数据处理运算中,数据矩阵之间的矩阵相乘运算,是多方联合处理中的常用运算,同时也是隐私数据保护的一个难点。例如,当一方持有某些业务对象的特征数据构成的特征矩阵,另一方持有对这些特征数据进行处理的参数矩阵,此时,为了进行联合业务处理,就需要对上述特征矩阵和参数矩阵进行安全的矩阵运算。为此,本说明书实施例提供的处理方法,主要针对持有隐私数据的双方之间进行安全矩阵相乘运算的场景而设计。As mentioned earlier, in the process of multi-party joint data processing, data privacy security has become an issue of concern. In a variety of specific data processing operations, the matrix multiplication operation between data matrices is a common operation in multi-party joint processing, and it is also a difficult point in privacy data protection. For example, when one party holds a feature matrix composed of feature data of certain business objects, and the other party holds a parameter matrix for processing these feature data, in this case, in order to perform joint business processing, the above feature matrix and parameter matrix Perform safe matrix operations. For this reason, the processing method provided in the embodiment of this specification is mainly designed for a scenario where two parties holding private data perform a security matrix multiplication operation.
图1为本说明书披露的一个实施例的实施场景示意图。在该实施场景中,示意性示出了参与方A和B。各个参与方具体可以体现为具有计算、处理能力的设备、平台、服务器或设备集群。其中,参与方A拥有A方隐私数据构成的矩阵X,参与方B拥有B方隐私数据构成的矩阵Y,双方希望进行安全的矩阵相乘运算,也就是参与方A不泄露其矩阵X明文,参与方B不泄露其矩阵Y明文,但是最终计算得到矩阵相乘的结果X*Y。Figure 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in this specification. In this implementation scenario, participants A and B are schematically shown. Each participant can be embodied as a device, platform, server or device cluster with computing and processing capabilities. Among them, participant A has a matrix X composed of party A's private data, and participant B has a matrix Y composed of party B's private data. Both parties hope to perform a secure matrix multiplication operation, that is, party A does not reveal the plaintext of its matrix X. Participant B does not disclose the plaintext of its matrix Y, but finally calculates the result of matrix multiplication X*Y.
在一个实施例中,参与方A和B分别为模型拥有方和数据拥有方,相应的,矩阵X和矩阵Y中的隐私数据,分别为机器学习模型的模型参数数据和业务对象的特征数据。In one embodiment, the participants A and B are the model owner and the data owner, respectively. Correspondingly, the private data in the matrix X and the matrix Y are the model parameter data of the machine learning model and the feature data of the business object, respectively.
更具体的,业务对象可以包括,有待分析的用户,商品,事件等等。当业务对象为用户时,对应的特征数据可以包括,用户属性特征数据,例如,年龄,性别,注册时长,职业,购买记录,借贷记录等等;当业务对象为商品时,对应的特征数据可以包括,商品属性特征数据,例如,商品类别,上架时间,评论数量,等等;当业务对象为事件时,对应的特征数据可以包括,相关的事件特征,例如,事件发生的时间,地点,参与者, 参与者行为轨迹,(交易)事件的金额,渠道,等等。此外,在其他例子中,业务对象还可以是有待分析的图片,音频,文本等等,与之分别对应的,特征数据可以包括,图片像素特征,音频频谱特征,文本编码特征等等。More specifically, business objects may include users, products, events, etc. to be analyzed. When the business object is a user, the corresponding feature data can include user attribute feature data, such as age, gender, registration duration, occupation, purchase record, loan record, etc.; when the business object is a commodity, the corresponding feature data can be Including, product attribute feature data, such as product category, shelf time, number of reviews, etc.; when the business object is an event, the corresponding feature data can include related event features, such as the time, place, and participation of the event The trajectory of participants, the amount of (transaction) events, channels, etc. In addition, in other examples, the business object may also be a picture, audio, text, etc. to be analyzed, respectively corresponding to it. The characteristic data may include picture pixel characteristics, audio frequency spectrum characteristics, text encoding characteristics, and so on.
另一方拥有的机器学习模型可以是用于对上述业务对象进行业务处理的模型。例如,当业务对象是用户时,业务处理可以包括,基于用户分类的业务处理,例如用户人群划分,用户服务定制等;当业务对象是事件时,业务处理可以包括,对事件的安全性评估。在其他业务对象的情况下,业务处理还可以包括,基于音频识别的业务处理,基于文本分析的业务处理,等等。The machine learning model owned by the other party may be a model used to perform business processing on the above-mentioned business objects. For example, when the business object is a user, the business processing can include business processing based on user classification, such as user group division, user service customization, etc.; when the business object is an event, the business processing can include an incident security assessment. In the case of other business objects, business processing may also include business processing based on audio recognition, business processing based on text analysis, and so on.
根据业务处理的需要,上述机器学习模型可以是分类模型或回归模型,并且,该模型中涉及模型参数与特征数据的线性组合,因此,需要进行模型参数矩阵X和特征数据矩阵Y的乘法运算。典型的,该模型可以是线性回归模型,其核心算法即为上述线性组合运算。或者,该模型也可以是逻辑回归模型,其在上述线性组合运算的基础上,进一步施加非线性函数运算。或者,该模型也可以是其他需要线性组合运算的模型。According to the needs of business processing, the above-mentioned machine learning model can be a classification model or a regression model, and the model involves a linear combination of model parameters and feature data. Therefore, the model parameter matrix X and the feature data matrix Y need to be multiplied. Typically, the model may be a linear regression model, and its core algorithm is the above-mentioned linear combination operation. Alternatively, the model may also be a logistic regression model, which further imposes a nonlinear function operation on the basis of the above linear combination operation. Or, the model can also be other models that require linear combination operations.
在其他实施例中,图1中的参与方A和参与方B也可以是共同进行模型联合训练的对等方,各自拥有一部分模型参数和特征数据。或者,参与方A和参与方B也可以是其他隐私数据持有方,为了进行某种数据处理,而需要进行安全的矩阵乘法运算。In other embodiments, participant A and participant B in FIG. 1 may also be peers that jointly perform model joint training, each having a part of model parameters and feature data. Alternatively, participant A and participant B may also be other private data holders, and in order to perform certain data processing, a secure matrix multiplication operation is required.
在以上各种场景中,出于隐私数据保护的目的,参与方A不能泄露其原始矩阵X,参与方B不能泄露其原始矩阵Y,双方希望共同计算矩阵乘法结果X*Y。In the above various scenarios, for the purpose of privacy data protection, participant A cannot leak its original matrix X, and participant B cannot leak its original matrix Y. Both parties hope to jointly calculate the matrix multiplication result X*Y.
为此,根据本说明书的实施例,由两方中矩阵维度较小的一方,假定为参与方B,对其矩阵Y进行同态加密,将加密后的矩阵[Y]发送给另一方A。另一方A用其自身的矩阵X,对该加密矩阵[Y]进行同态运算,得到加密综合矩阵[Z]。该加密综合矩阵相当于对乘法矩阵X*Y加密后的矩阵。然后,双方针对加密综合矩阵[Z]进行同态加密下的秘密分享,最终参与方A和参与方B各自得到一个矩阵分片Z 1和Z 2,使得Z 1与Z 2之和为乘法矩阵X*Y。 To this end, according to the embodiment of the present specification, the party with the smaller matrix dimension of the two parties is assumed to be participant B, and its matrix Y is homomorphically encrypted, and the encrypted matrix [Y] is sent to the other party A. The other party A uses its own matrix X to perform a homomorphic operation on the encrypted matrix [Y] to obtain the encrypted comprehensive matrix [Z]. This encrypted synthesis matrix is equivalent to a matrix obtained by encrypting the multiplication matrix X*Y. Then, the two parties conduct a secret sharing under homomorphic encryption for the encrypted synthesis matrix [Z], and finally participant A and participant B each get a matrix segment Z 1 and Z 2 , making the sum of Z 1 and Z 2 a multiplication matrix X*Y.
在以上过程中,双方都不会泄露其原始矩阵明文,而是可以通过将其矩阵分片组合在一起,得到最终的乘法矩阵。并且,以上过程仅需要通信维度较小的矩阵,通信量和计算量都比较小,因此高效地保障了安全的隐私数据计算。In the above process, both parties will not leak the plaintext of their original matrix, but can obtain the final multiplication matrix by combining their matrix slices together. In addition, the above process only requires a matrix with a small communication dimension, and the communication volume and calculation volume are relatively small, so the secure private data calculation is efficiently guaranteed.
下面描述以上方案的具体实现过程。The specific implementation process of the above scheme is described below.
图2示出双方进行矩阵相乘的示意图。延续图1的示例,图2示出了参与方A和参 与方B,参与方A维护有隐私数据矩阵X,该矩阵X为m*n维矩阵;参与方B维护有隐私数据矩阵Y,该矩阵为n*k维矩阵。双方希望安全地计算X*Y的乘法矩阵(m*k维)。Figure 2 shows a schematic diagram of matrix multiplication performed by both parties. Continuing the example in Figure 1, Figure 2 shows participant A and participant B. Participant A maintains a private data matrix X, which is an m*n-dimensional matrix; participant B maintains a private data matrix Y, which The matrix is an n*k-dimensional matrix. Both parties hope to safely calculate the X*Y multiplication matrix (m*k dimension).
在一种情况下,矩阵Y是维度更小的矩阵,也就是k<m,此情况对应于图2中的场景(A)。在另一种情况下,矩阵X是维度更小的矩阵,也就是,m<k,此情况对应于图2中的场景(B)。In one case, the matrix Y is a matrix with a smaller dimension, that is, k<m, which corresponds to the scene (A) in FIG. 2. In another case, the matrix X is a matrix with a smaller dimension, that is, m<k, which corresponds to the scene (B) in FIG. 2.
首先,对场景(A)的情况进行描述。为了描述的简单和清楚,我们将矩阵维度更大的一方称为第一方,将矩阵维度更小的一方称为第二方,则在场景(A)的情况中,第一方为参与方A,第二方为参与方B。First, the situation of scene (A) will be described. For simplicity and clarity of description, we call the party with the larger dimension of the matrix as the first party, and the party with the smaller dimension of the matrix as the second party. In the case of scenario (A), the first party is the participant. A, the second party is participant B.
图3示出在一个实施例中双方联合进行数据处理的过程示意图。该示意图示出在以上场景(A)的情况下,双方进行安全矩阵乘法运算的过程。Fig. 3 shows a schematic diagram of a process in which both parties jointly perform data processing in an embodiment. This schematic diagram shows the process of safe matrix multiplication by both parties in the case of the above scenario (A).
为了进行安全矩阵乘法,首先,在步骤301,第二方使用其具有的公钥,利用同态加密算法,对其拥有的第二原始矩阵进行加密,得到第二加密矩阵。In order to perform a secure matrix multiplication, first, in step 301, the second party uses its own public key and uses a homomorphic encryption algorithm to encrypt the second original matrix it owns to obtain a second encryption matrix.
在图3的例子中,第二方为参与方B。参与方B可以选用同态加密算法E,并生成该加密算法下的公钥PK-b和私钥SK-b。然后,使用其公钥PK-b,利用同态加密算法E,对第二原始矩阵,即矩阵Y进行同态加密,得到第二加密矩阵[Y] bIn the example of FIG. 3, the second party is participant B. Participant B can choose the homomorphic encryption algorithm E, and generate the public key PK-b and the private key SK-b under the encryption algorithm. Then, using its public key PK-b, homomorphic encryption algorithm E is used to perform homomorphic encryption on the second original matrix, namely matrix Y, to obtain the second encryption matrix [Y] b .
在本文中,用[]表示加密,角标表示加密采用的公钥标识。可以理解,第二加密矩阵[Y] b中包含各个位置的密文元素,各个密文元素是对原始矩阵Y的对应位置的原始元素进行上述同态加密得到的。 In this article, use [] to represent encryption, and the subscript represents the public key identification used in encryption. It can be understood that the second encryption matrix [Y] b contains ciphertext elements at various positions, and each ciphertext element is obtained by performing the above-mentioned homomorphic encryption on the original elements at the corresponding positions of the original matrix Y.
接着,在步骤302,第二方B将第二加密矩阵[Y] b发送给第一方A。由于该矩阵已经经过加密,因此,该步骤中的通信不会泄露参与方B中的隐私数据。 Next, in step 302, the second party B sends the second encryption matrix [Y] b to the first party A. Since the matrix has been encrypted, the communication in this step will not reveal the private data of participant B.
然后,在步骤303,第一方A对其拥有的第一原始矩阵X中的明文元素与第二加密矩阵[Y] b中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵[Z] b。在希望计算X*Y的乘积矩阵的情况下,上述行列间的同态加和运算为:用原始矩阵X中各个行的明文元素,对第二加密矩阵[Y] b的各个列的密文元素进行同态加和运算,得到上述加密综合矩阵。 Then, in step 303, the first party A performs a homomorphic summation between the rows and columns of the plaintext elements in the first original matrix X and the ciphertext elements in the second encrypted matrix [Y] b to obtain the encryption Comprehensive matrix [Z] b . In the case of wishing to calculate the product matrix of X*Y, the above-mentioned homomorphic addition operation between rows and columns is: using the plaintext elements of each row in the original matrix X, and the ciphertext of each column of the second encrypted matrix [Y] b The elements are subjected to a homomorphic addition operation to obtain the above-mentioned encrypted synthesis matrix.
上述同态加和运算,是前述同态加密算法E对应的明文与密文之间的同态操作运算,其作用可以使得,通过明文矩阵X和密文矩阵[Y] b的行列间同态加和运算得到的加密综合矩阵[Z] b对应于,使用同样的公钥PK-b,利用同态加密算法E对乘积矩阵X*Y加密 得到的矩阵,也就是,[Z] b=[X*Y] b。这是同态加密算法的“同态性”所决定的。下面具体描述该过程。 The above-mentioned homomorphic addition operation is a homomorphic operation operation between the plaintext and the ciphertext corresponding to the aforementioned homomorphic encryption algorithm E. Its function can make the homomorphism between the rows and columns of the plaintext matrix X and the ciphertext matrix [Y] b The encrypted synthesis matrix [Z] b obtained by the addition operation corresponds to the matrix obtained by using the same public key PK-b to encrypt the product matrix X*Y using the homomorphic encryption algorithm E, that is, [Z] b =[ X*Y] b . This is determined by the "homomorphism" of the homomorphic encryption algorithm. The process is described in detail below.
需要理解,同态加密算法是这样一种加密函数,对明文进行运算后再加密,与加密后对密文进行相应的运算,结果是等价的。例如,用同样的公钥PK加密v 1和v 2得到E PK(v 1)和E PK(v 2),如果满足: It needs to be understood that a homomorphic encryption algorithm is an encryption function that performs operations on plaintext and then encrypts it, and performs corresponding operations on ciphertext after encryption, and the result is equivalent. For example, using the same public key PK to encrypt v 1 and v 2 to obtain E PK (v 1 ) and E PK (v 2 ), if it satisfies:
Figure PCTCN2021080753-appb-000001
Figure PCTCN2021080753-appb-000001
那么则认为,该加密算法满足加法同态,其中
Figure PCTCN2021080753-appb-000002
为对应的同态加操作。
Then it is considered that the encryption algorithm satisfies the additive homomorphism, where
Figure PCTCN2021080753-appb-000002
Add operation for the corresponding homomorphism.
例如,Paillier算法是一种常用的满足加法同态的加密算法。Paillier算法满足:E PK(v 1+v 2)=E PK(v 1)·E PK(v 2),则密文的相乘E PK(v 1)·E PK(v 2)对应于同态加法操作。 For example, Paillier's algorithm is a commonly used encryption algorithm that satisfies additive homomorphism. Paillier algorithm satisfies: E PK (v 1 +v 2 )=E PK (v 1 )·E PK (v 2 ), then the multiplication of ciphertext E PK (v 1 )·E PK (v 2 ) corresponds to the same State addition operation.
容易验证,Paillier加密算法还满足:Easy to verify, the Paillier encryption algorithm also satisfies:
Figure PCTCN2021080753-appb-000003
Figure PCTCN2021080753-appb-000003
上式(2)可以作为Paillier算法下,明文与密文之间的同态加和运算的基础。The above formula (2) can be used as the basis of the homomorphic sum operation between plaintext and ciphertext under Paillier's algorithm.
例如,假定原始矩阵X包含某一行n个明文元素(x 1,x 2,...,x n),加密矩阵[Y] b包含某一列n个密文元素(c 1,c 2,...,c n),其中任意密文c i是对原始矩阵Y中对应的元素y i加密得到,即c i=E PK-b(y i)。那么,上述明文元素和密文元素之间的同态加和运算可以如下实现: For example, assuming that the original matrix X contains n plaintext elements in a certain row (x 1 , x 2 ,..., x n ), the encryption matrix [Y] b contains n ciphertext elements in a certain column (c 1 , c 2,. .., c n ), where any ciphertext c i is obtained by encrypting the corresponding element y i in the original matrix Y, that is, c i =E PK-b (y i ). Then, the homomorphic sum operation between the plaintext elements and the ciphertext elements can be implemented as follows:
Figure PCTCN2021080753-appb-000004
Figure PCTCN2021080753-appb-000004
即,分别使用第i个明文元素x i对第i个密文元素c i进行幂操作,得到n个幂操作结果;基于n个幂操作结果的连乘,得到同态加和结果z,作为加密综合矩阵中的一个元素。 That is, the i-th plaintext element x i is used to power the i-th ciphertext element c i to obtain the result of the n power operation; based on the multiplication of the results of the n power operation, the homomorphic addition result z is obtained as Encrypt an element in the synthesis matrix.
结合上述公式(2)可以看到,上述公式(3)又可以写为:Combined with the above formula (2), it can be seen that the above formula (3) can be written as:
z=E PK-b(x 1*y 1+x 2*y 2+…+x n*y n)          (4) z=E PK-b (x 1 *y 1 +x 2 *y 2 +…+x n *y n ) (4)
如此,利用原始矩阵X中第j行的明文元素,与加密矩阵[Y] b中的第k列密文元素进行上述同态加和运算后得到的结果,可以作为加密综合矩阵中第j行第k列的元素z jk,并且如公式(4)所示,该元素z jk实际上等于,原始矩阵X和原始矩阵Y的乘积矩阵X*Y中对应元素的加密值。 In this way, using the plaintext element in the jth row of the original matrix X and the ciphertext element in the kth column of the encrypted matrix [Y] b to perform the above homomorphic summation, the result can be used as the jth row in the encrypted synthesis matrix. The element z jk in the k-th column, and as shown in formula (4), the element z jk is actually equal to the encrypted value of the corresponding element in the product matrix X*Y of the original matrix X and the original matrix Y.
因此,通过明文矩阵X和密文矩阵[Y] b的行列间同态加和运算得到的加密综合矩阵[Z] b对应于,使用同样的公钥PK-b,利用同态加密算法E对乘积矩阵X*Y加密得到的 矩阵,也就是,[Z] b=[X*Y] b Therefore, the encrypted synthesis matrix [Z] b obtained by the homomorphic summation between the rows and columns of the plaintext matrix X and the ciphertext matrix [Y] b corresponds to, using the same public key PK-b, using the homomorphic encryption algorithm E to The matrix obtained by encrypting the product matrix X*Y, that is, [Z] b =[X*Y] b .
以上结合Paillier算法进行了同态加和运算的描述。可以理解,已经存在多种同态加密算法,其中具有加法同态性质的加密算法均可以用于本方案中。例如,与Paillier类似的其他一些基于椭圆曲线加密的算法,也满足加法同态性。此外,Gentry算法作为一种准全同态加密算法,既满足加法同态还满足乘法同态。相应的,不同的同态加密算法具有不同的同态加和运算形式。例如,如果有同态加密算法的同态加操作对应于常规加法,上述明文元素和密文元素的同态加和运算可以对应于,明文元素与密文元素的线性组合。The description of the homomorphic addition operation combined with the Paillier algorithm is described above. It can be understood that a variety of homomorphic encryption algorithms already exist, and all encryption algorithms with additive homomorphic properties can be used in this solution. For example, some other algorithms based on elliptic curve encryption similar to Paillier also satisfy additive homomorphism. In addition, the Gentry algorithm, as a quasi-fully homomorphic encryption algorithm, satisfies both additive homomorphism and multiplication homomorphism. Correspondingly, different homomorphic encryption algorithms have different forms of homomorphic addition operations. For example, if there is a homomorphic encryption algorithm whose homomorphic addition operation corresponds to conventional addition, the above-mentioned homomorphic addition operation of plaintext elements and ciphertext elements may correspond to a linear combination of plaintext elements and ciphertext elements.
如此,在以上的步骤303,第一方A计算得到加密综合矩阵[Z] b。接下来,对于该加密综合矩阵,第一方A进行同态加密下的秘密分享,使得双方各自得到安全的矩阵分片。 In this way, in the above step 303, the first party A calculates the encrypted synthesis matrix [Z] b . Next, for the encrypted synthesis matrix, the first party A performs secret sharing under homomorphic encryption, so that both parties obtain secure matrix fragments.
为进行秘密分享,在步骤304,第一方A随机生成第一分享矩阵,记为<Z> 1。然后,第一方A利用第二方B的公钥PK-b和前述同态加密算法E,对该第一分享矩阵进行加密,得到第一秘密分享矩阵[<Z> 1] bTo perform secret sharing, in step 304, the first party A randomly generates a first sharing matrix, denoted as <Z> 1 . Then, the first party A uses the public key PK-b of the second party B and the aforementioned homomorphic encryption algorithm E to encrypt the first sharing matrix to obtain the first secret sharing matrix [<Z> 1 ] b .
接着,在步骤305,第一方A计算加密综合矩阵[Z] b和第一秘密分享矩阵[<Z> 1] b的差值矩阵,该差值矩阵记为[<Z> 2] b,且: Next, in step 305, the first party A calculates the difference matrix between the encrypted synthesis matrix [Z] b and the first secret sharing matrix [<Z> 1 ] b , and the difference matrix is denoted as [<Z> 2 ] b , and:
[<Z> 2] b=[Z] b-[<Z> 1] b               (5) [<Z> 2 ] b = [Z] b -[<Z> 1 ] b (5)
其中,计算差值矩阵时,对两个密文矩阵之间的减法操作是与同态加操作对应的同态减法操作。Among them, when calculating the difference matrix, the subtraction operation between the two ciphertext matrices is a homomorphic subtraction operation corresponding to the homomorphic addition operation.
然后在步骤306,第一方A将该差值矩阵[<Z> 2] b发送给第二方B。 Then in step 306, the first party A sends the difference matrix [<Z> 2 ] b to the second party B.
在步骤307,第二方B接收到上述差值矩阵之后,使用其私钥SK-b对该差值矩阵进行解密,得到第二分享矩阵<Z> 2In step 307, after receiving the above-mentioned difference matrix, the second party B uses its private key SK-b to decrypt the difference matrix to obtain a second sharing matrix <Z> 2 .
根据结合步骤303的描述,加密综合矩阵[Z] b对应于,使用公钥PK-b利用同态加密算法E对乘积矩阵X*Y加密得到的矩阵,也就是,[Z] b=[X*Y] b,而根据步骤304,第一秘密分享矩阵是用公钥PK-b和算法E对第一分享矩阵加密的矩阵。结合以上公式(5)可以看到,当使用该公钥PK-b对应的私钥SK-b对差值矩阵[<Z> 2] b解密时,得到的第二分享矩阵<Z> 2满足: According to the description in conjunction with step 303, the encrypted synthesis matrix [Z] b corresponds to the matrix obtained by encrypting the product matrix X*Y using the public key PK-b using the homomorphic encryption algorithm E, that is, [Z] b = [X *Y] b , and according to step 304, the first secret sharing matrix is a matrix encrypted with the public key PK-b and the algorithm E to the first sharing matrix. Combining the above formula (5), it can be seen that when using the private key SK-b corresponding to the public key PK-b to decrypt the difference matrix [<Z> 2 ] b , the second shared matrix <Z> 2 obtained satisfies :
<Z> 2=X*Y-<Z> 1             (6) <Z> 2 =X*Y-<Z> 1 (6)
也就是说,第一方得到了第一分享矩阵<Z> 1,第二方得到了第二分享矩阵<Z> 2,第一分享矩阵和第二分享矩阵之和等于期望的乘积矩阵X*Y。 In other words, the first party gets the first sharing matrix <Z> 1 , the second party gets the second sharing matrix <Z> 2 , and the sum of the first sharing matrix and the second sharing matrix is equal to the expected product matrix X* Y.
在一个实施例中,在以上步骤307之后,可选的,第一方A将其第一分享矩阵<Z> 1发送给第二方B,于是,第二方B通过两个分享矩阵的加和<Z> 1+<Z> 2得到乘积矩阵的结果。该第一分享矩阵<Z> 1为第一方A随机生成的矩阵,因此不会泄露A方隐私数据。或者,第二方B将其第二分享矩阵<Z> 2发送给第一方A,第一方A通过两个分享矩阵的加和得到乘积矩阵的结果。第二分享矩阵<Z> 2也不会泄露B方隐私数据。当然,以上两者也可以同时执行,于是双方均得到乘积矩阵的结果。 In one embodiment, after the above step 307, optionally, the first party A sends its first sharing matrix <Z> 1 to the second party B, so the second party B adds the two sharing matrices And <Z> 1 +<Z> 2 to get the result of the product matrix. The first sharing matrix <Z> 1 is a matrix randomly generated by the first party A, so party A's private data will not be leaked. Or, the second party B sends its second sharing matrix <Z> 2 to the first party A, and the first party A obtains the result of the product matrix by adding the two sharing matrices. The second sharing matrix <Z> 2 will not reveal party B's private data. Of course, the above two can also be executed at the same time, so both sides get the result of the product matrix.
在另一实施例中,第一方A将其第一分享矩阵<Z> 1发送给不同于第一方和第二方的第三方,第二方B将其第二分享矩阵<Z> 2也发送给该第三方,由该第三方对第一分享矩阵和第二分享矩阵进行加和,得到乘积矩阵。该第三方可以将该乘积矩阵通知给第一方A和/或第二方B,也可以基于该乘积矩阵进行后续运算。 In another embodiment, the first party A sends its first sharing matrix <Z> 1 to a third party different from the first party and the second party, and the second party B sends its second sharing matrix <Z> 2 It is also sent to the third party, and the third party adds the first sharing matrix and the second sharing matrix to obtain the product matrix. The third party can notify the first party A and/or the second party B of the product matrix, or perform subsequent operations based on the product matrix.
以上针对图2中的场景(A),即原始矩阵Y维度更小的情况进行了描述。如果是场景(B)的情况,即参与方A中的原始矩阵X维度更小,那么可以将参与方A作为第二方,参与方B作为第一方,如此,第二方仍然是矩阵维度较小的一方,参照图3方式类似地进行计算。The above description is directed to the scenario (A) in FIG. 2, that is, the case where the original matrix Y has a smaller dimension. If it is the case of scenario (B), that is, the original matrix X in party A has a smaller dimension, then party A can be used as the second party, and party B can be the first party. In this way, the second party is still the matrix dimension For the smaller one, calculate similarly with reference to the method shown in FIG. 3.
具体地,在场景(B)的情况下,第一方为参与方B,第一原始矩阵为Y;第二方为参与方A,第二原始矩阵为X。首先,仍然由第二方(A方)利用其公钥(PK-a)对第二原始矩阵X进行加密,得到第二加密矩阵[X] a,然后将该第二加密矩阵发送给第一方(B方)。第一方B对第一原始矩阵Y中的明文元素与第二加密矩阵[X] a中的密文元素,进行行列间的同态加和运算。此处与图2示例不同的是,由于待计算的乘积矩阵为X*Y,第一方B用第一原始矩阵Y中各个列的明文元素,与第二加密矩阵[X] a中各个行的密文元素,进行同态加和运算,得到加密综合矩阵[Z] a。然后,第一方B针对该加密综合矩阵[Z] a进行秘密分享,生成第一分享矩阵<Z> 1和差值矩阵[<Z> 2] a,其中差值矩阵[<Z> 2] a=[Z] a-[<Z> 1] a。然后,第二方利用其私钥SK-a,对差值矩阵解密,得到第二分享矩阵<Z> 2,同样地,<Z> 1+<Z> 2=X*Y。如此,实现了在A方的原始矩阵X维度更小的情况下,双方的安全矩阵乘法运算。 Specifically, in the case of scenario (B), the first party is participant B, and the first original matrix is Y; the second party is participant A, and the second original matrix is X. First, the second party (party A) still uses its public key (PK-a) to encrypt the second original matrix X to obtain the second encryption matrix [X] a , and then send the second encryption matrix to the first Party (Party B). The first party B performs a homomorphic sum operation between the rows and columns of the plaintext elements in the first original matrix Y and the ciphertext elements in the second encrypted matrix [X] a. The difference here with the example in Figure 2 is that since the product matrix to be calculated is X*Y, the first party B uses the plaintext elements of each column in the first original matrix Y, and each row in the second encrypted matrix [X] a For the ciphertext elements of, perform homomorphic summation to obtain the encrypted synthesis matrix [Z] a . Then, the first party B secretly shares the encrypted comprehensive matrix [Z] a to generate the first sharing matrix <Z> 1 and the difference matrix [<Z> 2 ] a , where the difference matrix [<Z> 2 ] a =[Z] a -[<Z> 1 ] a . Then, the second party uses its private key SK-a to decrypt the difference matrix to obtain the second sharing matrix <Z> 2. Similarly, <Z> 1 +<Z> 2 =X*Y. In this way, the safe matrix multiplication operation of both parties is realized when the original matrix X dimension of party A is smaller.
回顾以上过程可以看到,第一方和第二方双方没有传输任何原始矩阵的明文信息,因此也不会泄露其隐私数据,而最终双方各自得到了乘积矩阵的一个矩阵分片,这两个分片的加和即为乘积矩阵,从而实现了安全的矩阵乘法运算。并且,计算过程中的通信 量,仅包含维度较小的矩阵的加密矩阵,相对于已有的一些安全矩阵乘法,极大地减少了通信量,使得计算效率更高。Looking back at the above process, it can be seen that the first party and the second party did not transmit any plaintext information of the original matrix, so their private data will not be leaked. In the end, both parties obtain a matrix fragment of the product matrix. The sum of the slices is the product matrix, which realizes the safe matrix multiplication operation. In addition, the communication volume in the calculation process only contains the encryption matrix of the matrix with a smaller dimension. Compared with some existing secure matrix multiplications, the communication volume is greatly reduced and the calculation efficiency is higher.
根据另一方面的实施例,提供了一种用于双方联合进行数据处理的装置,其中双方包括第一方和第二方,第一方具有记录为第一原始矩阵的第一隐私数据,第二方具有记录为第二原始矩阵的第二隐私数据,第二原始矩阵的维度小于第一原始矩阵;上述装置部署在第一方中,该第一方可以通过任何具有计算、处理能力的设备、平台或设备集群来实现。图4示出根据一个实施例的部署在第一方中的数据处理装置的示意性框图。如图4所示,该处理装置400包括:According to another embodiment, there is provided a device for two parties to jointly perform data processing, wherein the two parties include a first party and a second party, the first party has first private data recorded as a first original matrix, and the first party The two parties have the second private data recorded as the second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the above-mentioned device is deployed in the first party, and the first party can use any equipment with computing and processing capabilities , Platform or equipment cluster. Fig. 4 shows a schematic block diagram of a data processing apparatus deployed in a first party according to an embodiment. As shown in FIG. 4, the processing device 400 includes:
接收单元41,配置为从所述第二方接收第二加密矩阵,所述第二加密矩阵通过使用所述第二方对应的第二公钥,利用同态加密算法对所述第二原始矩阵加密而得到;The receiving unit 41 is configured to receive a second encryption matrix from the second party, where the second encryption matrix uses a second public key corresponding to the second party to perform a homomorphic encryption algorithm on the second original matrix. Obtained by encryption;
同态运算单元42,配置为对所述第一原始矩阵中的明文元素与所述第二加密矩阵中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵,使得所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵;The homomorphic operation unit 42 is configured to perform a homomorphic sum operation between rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain an encrypted comprehensive matrix, so that the The encrypted synthesis matrix corresponds to a matrix obtained by using the second public key and using the homomorphic encryption algorithm to encrypt the product matrix of the first original matrix and the second original matrix;
分享矩阵生成单元43,配置为随机生成第一分享矩阵,并利用所述第二公钥和所述同态加密算法对其加密,得到第一秘密分享矩阵;The sharing matrix generating unit 43 is configured to randomly generate a first sharing matrix, and encrypt it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
发送单元44,配置为计算所述加密综合矩阵和所述第一秘密分享矩阵的差值矩阵,将该差值矩阵发送给所述第二方,以使得所述第二方对该差值矩阵解密得到第二分享矩阵,该第二分享矩阵与所述第一分享矩阵之和为所述乘积矩阵。The sending unit 44 is configured to calculate the difference matrix between the encryption synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party has the difference matrix The second sharing matrix is obtained by decryption, and the sum of the second sharing matrix and the first sharing matrix is the product matrix.
在一个实施例中,上述第一方和第二方分别为模型拥有方和数据拥有方,所述第一隐私数据和第二隐私数据分别为机器学习模型的模型参数数据和业务对象的特征数据。In one embodiment, the above-mentioned first party and the second party are the model owner and the data owner, respectively, and the first private data and the second private data are model parameter data of the machine learning model and feature data of the business object, respectively .
进一步的,在不同实施例中,上述机器学习模型包括逻辑回归模型或线性回归模型;所述业务对象可以包括以下之一:用户,商品,事件。Further, in different embodiments, the above-mentioned machine learning model includes a logistic regression model or a linear regression model; the business object may include one of the following: users, commodities, and events.
在一个实施例中,所述乘积矩阵为所述第一原始矩阵乘以第二原始矩阵;所述同态运算单元42配置为:用所述第一原始矩阵中各个行的明文元素,对所述第二加密矩阵的各个列的密文元素进行同态加和运算,得到所述加密综合矩阵。In an embodiment, the product matrix is the first original matrix multiplied by the second original matrix; the homomorphic operation unit 42 is configured to: use the plaintext elements in each row of the first original matrix to perform The ciphertext elements of each column of the second encryption matrix are subjected to a homomorphic addition operation to obtain the encryption synthesis matrix.
在另一实施例中,所述乘积矩阵为所述第二原始矩阵乘以第一原始矩阵;所述同态运算单元42配置为:用所述第一原始矩阵中各个列的明文元素,对所述第二加密矩阵的各个行的密文元素进行同态加和运算,得到所述加密综合矩阵。In another embodiment, the product matrix is the second original matrix multiplied by the first original matrix; the homomorphic operation unit 42 is configured to: use the plaintext elements of each column in the first original matrix to The ciphertext elements of each row of the second encryption matrix are subjected to a homomorphic addition operation to obtain the encryption synthesis matrix.
根据一个实施例,所述第一原始矩阵包括来自一行或一列的n个明文元素,所述第二加密矩阵包括对应的n个密文元素;所述同态加密算法为Paillier算法,所述同态运算单元42配置为:According to an embodiment, the first original matrix includes n plaintext elements from one row or one column, the second encryption matrix includes corresponding n ciphertext elements; the homomorphic encryption algorithm is Paillier's algorithm, and the same The state operation unit 42 is configured as:
分别使用第i个明文元素对第i个密文元素进行幂操作,得到n个幂操作结果;Use the i-th plaintext element to perform power operation on the i-th ciphertext element to obtain n power operation results;
基于所述n个幂操作结果的连乘,得到所述n个明文元素和对应的n个密文元素的同态加和结果,作为所述加密综合矩阵中的一个元素。Based on the continuous multiplication of the n power operation results, a homomorphic sum result of the n plaintext elements and the corresponding n ciphertext elements is obtained as an element in the encryption synthesis matrix.
根据一种实施方式,所述装置400还包括收发单元(未示出),配置为:将所述第一分享矩阵发送给所述第二方,和/或;从所述第二方接收所述第二分享矩阵。According to an embodiment, the device 400 further includes a transceiving unit (not shown) configured to: send the first sharing matrix to the second party, and/or; receive the received data from the second party The second sharing matrix.
根据另一实施方式,收发单元配置为:将所述第一分享矩阵发送给不同于所述第一方和第二方的第三方。According to another embodiment, the transceiver unit is configured to send the first sharing matrix to a third party different from the first party and the second party.
根据又一方面的实施例,提供了一种用于双方联合进行数据处理的装置,其中双方包括第一方和第二方,第一方具有记录为第一原始矩阵的第一隐私数据,第二方具有记录为第二原始矩阵的第二隐私数据,第二原始矩阵的维度小于第一原始矩阵;上述装置部署在第二方中,该第二方可以通过任何具有计算、处理能力的设备、平台或设备集群来实现。图5示出根据一个实施例的部署在第二方中的数据处理装置的示意性框图。如图5所示,该处理装置500包括:According to another embodiment, there is provided a device for two parties to jointly perform data processing, wherein the two parties include a first party and a second party, the first party has first private data recorded as a first original matrix, and the first party has first privacy data recorded as a first original matrix. The two parties have the second privacy data recorded as the second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the above-mentioned device is deployed in the second party, and the second party can use any equipment with computing and processing capabilities , Platform or equipment cluster. Fig. 5 shows a schematic block diagram of a data processing device deployed in a second party according to an embodiment. As shown in FIG. 5, the processing device 500 includes:
加密单元51,配置为使用所述第二方具有的第二公钥,利用同态加密算法对所述第二原始矩阵进行加密,得到第二加密矩阵;The encryption unit 51 is configured to use a second public key possessed by the second party to encrypt the second original matrix by using a homomorphic encryption algorithm to obtain a second encryption matrix;
发送单元52,配置为将所述第二加密矩阵发送到所述第一方;The sending unit 52 is configured to send the second encryption matrix to the first party;
接收单元53,配置为从所述第一方接收差值矩阵,所述差值矩阵为加密综合矩阵和第一秘密分享矩阵的差值,其中,所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵,所述第一秘密分享矩阵是所述第一方使用所述第二公钥对随机生成的第一分享矩阵加密得到的矩阵;The receiving unit 53 is configured to receive a difference matrix from the first party, the difference matrix being the difference between the encrypted synthesis matrix and the first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to using the first Two public keys, a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix using the homomorphic encryption algorithm, the first secret sharing matrix is the first party using the second public key The matrix obtained by encrypting the first shared matrix randomly generated by the key;
解密单元54,配置为使用与所述第二公钥对应的第二私钥,对所述差值矩阵进行解密,得到第二分享矩阵,使得所述第二分享矩阵和所述第一分享矩阵之和为所述乘积矩阵。The decryption unit 54 is configured to use a second private key corresponding to the second public key to decrypt the difference matrix to obtain a second sharing matrix, such that the second sharing matrix and the first sharing matrix The sum is the product matrix.
在一个实施例中,上述装置500还包括收发单元(未示出),配置为:将所述 第二分享矩阵发送给所述第一方,和/或;从所述第一方接收所述第一分享矩阵。In one embodiment, the above-mentioned apparatus 500 further includes a transceiving unit (not shown) configured to: send the second sharing matrix to the first party, and/or; receive the second sharing matrix from the first party The first sharing matrix.
根据另一实施方式,收发单元配置为:将所述第二分享矩阵发送给不同于所述第一方和第二方的第三方。According to another embodiment, the transceiver unit is configured to send the second sharing matrix to a third party different from the first party and the second party.
通过以上的装置400和装置500,在保护隐私数据安全的同时实现双方联合进行涉及矩阵相乘的数据处理。Through the above device 400 and device 500, both parties can jointly perform data processing involving matrix multiplication while protecting the security of private data.
根据另一方面的实施例,还提供一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行结合图3所描述的方法。According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method described in conjunction with FIG. 3.
根据再一方面的实施例,还提供一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现结合图3所述的方法。According to an embodiment of still another aspect, there is also provided a computing device, including a memory and a processor, the memory is stored with executable code, and when the processor executes the executable code, it implements the method described in conjunction with FIG. 3 method.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。Those skilled in the art should be aware that, in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware, or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention. The protection scope, any modification, equivalent replacement, improvement, etc. made on the basis of the technical solution of the present invention shall be included in the protection scope of the present invention.

Claims (22)

  1. 一种保护数据隐私的双方联合进行数据处理的方法,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述方法通过所述第一方执行,包括:A method for two parties that protect data privacy to jointly perform data processing. The two parties include a first party and a second party. The first party has first privacy data recorded as a first original matrix, and the second party has The second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the method is executed by the first party, and includes:
    从所述第二方接收第二加密矩阵,所述第二加密矩阵通过使用所述第二方对应的第二公钥,利用同态加密算法对所述第二原始矩阵加密而得到;Receiving a second encryption matrix from the second party, where the second encryption matrix is obtained by encrypting the second original matrix by using a homomorphic encryption algorithm using a second public key corresponding to the second party;
    对所述第一原始矩阵中的明文元素与所述第二加密矩阵中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵,使得所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵;Perform homomorphic summation between the rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain the encrypted comprehensive matrix, so that the encrypted comprehensive matrix corresponds to the The second public key is a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix by using the homomorphic encryption algorithm;
    随机生成第一分享矩阵,并利用所述第二公钥和所述同态加密算法对其加密,得到第一秘密分享矩阵;Randomly generating a first sharing matrix, and encrypting it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
    计算所述加密综合矩阵和所述第一秘密分享矩阵的差值矩阵,将该差值矩阵发送给所述第二方,以使得所述第二方对该差值矩阵解密得到第二分享矩阵,该第二分享矩阵与所述第一分享矩阵之和为所述乘积矩阵。Calculate the difference matrix between the encrypted synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party decrypts the difference matrix to obtain a second sharing matrix , The sum of the second sharing matrix and the first sharing matrix is the product matrix.
  2. 根据权利要求1所述的方法,其中,所述第一方和第二方分别为模型拥有方和数据拥有方,所述第一隐私数据和第二隐私数据分别为机器学习模型的模型参数数据和业务对象的特征数据。The method according to claim 1, wherein the first party and the second party are the model owner and the data owner, respectively, and the first private data and the second private data are model parameter data of the machine learning model, respectively And the characteristic data of the business object.
  3. 根据权利要求2所述的方法,其中,所述机器学习模型包括逻辑回归模型或线性回归模型;所述业务对象包括以下之一:用户,商品,事件。The method according to claim 2, wherein the machine learning model includes a logistic regression model or a linear regression model; and the business object includes one of the following: users, commodities, and events.
  4. 根据权利要求1所述的方法,其中,所述乘积矩阵为所述第一原始矩阵乘以第二原始矩阵;所述行列间的同态加和运算,包括:用所述第一原始矩阵中各个行的明文元素,对所述第二加密矩阵的各个列的密文元素进行同态加和运算,得到所述加密综合矩阵。The method according to claim 1, wherein the product matrix is the first original matrix multiplied by the second original matrix; the homomorphic sum operation between rows and columns includes: using the first original matrix For the plaintext elements of each row, homomorphic addition operations are performed on the ciphertext elements of each column of the second encryption matrix to obtain the encryption synthesis matrix.
  5. 根据权利要求1所述的方法,其中,所述乘积矩阵为所述第二原始矩阵乘以第一原始矩阵;所述行列间的同态加和运算,包括:用所述第一原始矩阵中各个列的明文元素,对所述第二加密矩阵的各个行的密文元素进行同态加和运算,得到所述加密综合矩阵。The method according to claim 1, wherein the product matrix is the second original matrix multiplied by the first original matrix; the homomorphic sum operation between rows and columns includes: using the first original matrix For the plaintext elements of each column, homomorphic addition operations are performed on the ciphertext elements of each row of the second encryption matrix to obtain the encryption synthesis matrix.
  6. 根据权利要求1所述的方法,其中,所述第一原始矩阵包括来自一行或一列的n个明文元素,所述第二加密矩阵包括对应的n个密文元素;所述同态加密算法为Paillier 算法,所述同态加和运算包括:The method according to claim 1, wherein the first original matrix includes n plaintext elements from one row or one column, and the second encryption matrix includes corresponding n ciphertext elements; and the homomorphic encryption algorithm is In Paillier algorithm, the homomorphic addition operation includes:
    分别使用第i个明文元素对第i个密文元素进行幂操作,得到n个幂操作结果;Use the i-th plaintext element to perform power operation on the i-th ciphertext element to obtain n power operation results;
    基于所述n个幂操作结果的连乘,得到所述n个明文元素和对应的n个密文元素的同态加和结果,作为所述加密综合矩阵中的一个元素。Based on the continuous multiplication of the n power operation results, a homomorphic sum result of the n plaintext elements and the corresponding n ciphertext elements is obtained as an element in the encryption synthesis matrix.
  7. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    将所述第一分享矩阵发送给所述第二方,和/或;Sending the first sharing matrix to the second party, and/or;
    从所述第二方接收所述第二分享矩阵。Receiving the second sharing matrix from the second party.
  8. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    将所述第一分享矩阵发送给不同于所述第一方和第二方的第三方。The first sharing matrix is sent to a third party different from the first party and the second party.
  9. 一种保护数据隐私的双方联合进行数据处理的方法,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述方法通过所述第二方执行,包括:A method for two parties that protect data privacy to jointly perform data processing. The two parties include a first party and a second party. The first party has first privacy data recorded as a first original matrix, and the second party has The second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the method is executed by the second party, and includes:
    使用所述第二方具有的第二公钥,利用同态加密算法对所述第二原始矩阵进行加密,得到第二加密矩阵;Encrypt the second original matrix by using a homomorphic encryption algorithm using the second public key possessed by the second party to obtain a second encryption matrix;
    将所述第二加密矩阵发送到所述第一方;Sending the second encryption matrix to the first party;
    从所述第一方接收差值矩阵,所述差值矩阵为加密综合矩阵和第一秘密分享矩阵的差值,其中,所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵,所述第一秘密分享矩阵是所述第一方使用所述第二公钥和所述同态加密算法对随机生成的第一分享矩阵加密得到的矩阵;Receive a difference matrix from the first party, the difference matrix being the difference between the encrypted synthesis matrix and the first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to using the second public key and using the The homomorphic encryption algorithm encrypts a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix, and the first secret sharing matrix is that the first party uses the second public key and the homomorphic The matrix obtained by encrypting the randomly generated first shared matrix by the encryption algorithm;
    使用与所述第二公钥对应的第二私钥,对所述差值矩阵进行解密,得到第二分享矩阵,使得所述第二分享矩阵和所述第一分享矩阵之和为所述乘积矩阵。Use the second private key corresponding to the second public key to decrypt the difference matrix to obtain a second sharing matrix, so that the sum of the second sharing matrix and the first sharing matrix is the product matrix.
  10. 根据权利要求9所述的方法,还包括:The method according to claim 9, further comprising:
    将所述第二分享矩阵发送给所述第一方,和/或;Sending the second sharing matrix to the first party, and/or;
    从所述第一方接收所述第一分享矩阵。Receiving the first sharing matrix from the first party.
  11. 一种保护数据隐私的双方联合进行数据处理的装置,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述装置部署在所述第一方中,包括:A device for joint data processing by two parties that protect data privacy. The two parties include a first party and a second party. The first party has first privacy data recorded as a first original matrix, and the second party has The second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the deployment of the device in the first party includes:
    接收单元,配置为从所述第二方接收第二加密矩阵,所述第二加密矩阵通过使用所 述第二方对应的第二公钥,利用同态加密算法对所述第二原始矩阵加密而得到;The receiving unit is configured to receive a second encryption matrix from the second party, where the second encryption matrix encrypts the second original matrix using a homomorphic encryption algorithm by using a second public key corresponding to the second party And get
    同态运算单元,配置为对所述第一原始矩阵中的明文元素与所述第二加密矩阵中的密文元素,进行行列间的同态加和运算,得到加密综合矩阵,使得所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵;The homomorphic operation unit is configured to perform a homomorphic sum operation between rows and columns of the plaintext elements in the first original matrix and the ciphertext elements in the second encrypted matrix to obtain an encrypted comprehensive matrix, so that the encrypted The comprehensive matrix corresponds to a matrix obtained by using the second public key and using the homomorphic encryption algorithm to encrypt the product matrix of the first original matrix and the second original matrix;
    分享矩阵生成单元,配置为随机生成第一分享矩阵,并利用所述第二公钥和所述同态加密算法对其加密,得到第一秘密分享矩阵;The sharing matrix generating unit is configured to randomly generate a first sharing matrix, and encrypt it by using the second public key and the homomorphic encryption algorithm to obtain a first secret sharing matrix;
    发送单元,配置为计算所述加密综合矩阵和所述第一秘密分享矩阵的差值矩阵,将该差值矩阵发送给所述第二方,以使得所述第二方对该差值矩阵解密得到第二分享矩阵,该第二分享矩阵与所述第一分享矩阵之和为所述乘积矩阵。The sending unit is configured to calculate the difference matrix between the encryption synthesis matrix and the first secret sharing matrix, and send the difference matrix to the second party, so that the second party decrypts the difference matrix A second sharing matrix is obtained, and the sum of the second sharing matrix and the first sharing matrix is the product matrix.
  12. 根据权利要求11所述的装置,其中,所述第一方和第二方分别为模型拥有方和数据拥有方,所述第一隐私数据和第二隐私数据分别为机器学习模型的模型参数数据和业务对象的特征数据。The apparatus according to claim 11, wherein the first party and the second party are model owners and data owners, respectively, and the first private data and the second private data are model parameter data of a machine learning model, respectively And the characteristic data of the business object.
  13. 根据权利要求12所述的装置,其中,所述机器学习模型包括逻辑回归模型或线性回归模型;所述业务对象包括以下之一:用户,商品,事件。The device according to claim 12, wherein the machine learning model includes a logistic regression model or a linear regression model; and the business object includes one of the following: users, commodities, and events.
  14. 根据权利要求11所述的装置,其中,所述乘积矩阵为所述第一原始矩阵乘以第二原始矩阵;所述同态运算单元配置为:用所述第一原始矩阵中各个行的明文元素,对所述第二加密矩阵的各个列的密文元素进行同态加和运算,得到所述加密综合矩阵。11. The device according to claim 11, wherein the product matrix is the first original matrix multiplied by the second original matrix; the homomorphic operation unit is configured to use the plaintext of each row in the first original matrix Element, performing a homomorphic addition operation on the ciphertext elements of each column of the second encryption matrix to obtain the encryption synthesis matrix.
  15. 根据权利要求11所述的装置,其中,所述乘积矩阵为所述第二原始矩阵乘以第一原始矩阵;所述同态运算单元配置为:用所述第一原始矩阵中各个列的明文元素,对所述第二加密矩阵的各个行的密文元素进行同态加和运算,得到所述加密综合矩阵。The device according to claim 11, wherein the product matrix is the second original matrix multiplied by the first original matrix; the homomorphic operation unit is configured to use the plaintext of each column in the first original matrix Element, performing a homomorphic addition operation on the ciphertext elements of each row of the second encryption matrix to obtain the encryption synthesis matrix.
  16. 根据权利要求11所述的装置,其中,所述第一原始矩阵包括来自一行或一列的n个明文元素,所述第二加密矩阵包括对应的n个密文元素;所述同态加密算法为Paillier算法,所述同态运算单元配置为:The apparatus according to claim 11, wherein the first original matrix includes n plaintext elements from one row or one column, and the second encryption matrix includes corresponding n ciphertext elements; and the homomorphic encryption algorithm is In the Paillier algorithm, the homomorphic operation unit is configured as:
    分别使用第i个明文元素对第i个密文元素进行幂操作,得到n个幂操作结果;Use the i-th plaintext element to perform power operation on the i-th ciphertext element to obtain n power operation results;
    基于所述n个幂操作结果的连乘,得到所述n个明文元素和对应的n个密文元素的同态加和结果,作为所述加密综合矩阵中的一个元素。Based on the continuous multiplication of the n power operation results, a homomorphic sum result of the n plaintext elements and the corresponding n ciphertext elements is obtained as an element in the encryption synthesis matrix.
  17. 根据权利要求11所述的装置,还包括收发单元,配置为:The device according to claim 11, further comprising a transceiving unit configured to:
    将所述第一分享矩阵发送给所述第二方,和/或;Sending the first sharing matrix to the second party, and/or;
    从所述第二方接收所述第二分享矩阵。Receiving the second sharing matrix from the second party.
  18. 根据权利要求11所述的装置,还包括收发单元,配置为:The device according to claim 11, further comprising a transceiving unit configured to:
    将所述第一分享矩阵发送给不同于所述第一方和第二方的第三方。The first sharing matrix is sent to a third party different from the first party and the second party.
  19. 一种保护数据隐私的双方联合进行数据处理的装置,所述双方包括第一方和第二方,所述第一方具有记录为第一原始矩阵的第一隐私数据,所述第二方具有记录为第二原始矩阵的第二隐私数据,所述第二原始矩阵的维度小于所述第一原始矩阵;所述装置部署在所述第二方中,包括:A device for joint data processing by two parties that protect data privacy. The two parties include a first party and a second party. The first party has first privacy data recorded as a first original matrix, and the second party has The second privacy data recorded as a second original matrix, the dimension of the second original matrix is smaller than the first original matrix; the deployment of the device in the second party includes:
    加密单元,配置为使用所述第二方具有的第二公钥,利用同态加密算法对所述第二原始矩阵进行加密,得到第二加密矩阵;An encryption unit configured to use a second public key possessed by the second party to encrypt the second original matrix using a homomorphic encryption algorithm to obtain a second encryption matrix;
    发送单元,配置为将所述第二加密矩阵发送到所述第一方;A sending unit, configured to send the second encryption matrix to the first party;
    接收单元,配置为从所述第一方接收差值矩阵,所述差值矩阵为加密综合矩阵和第一秘密分享矩阵的差值,其中,所述加密综合矩阵对应于,使用所述第二公钥,利用所述同态加密算法对所述第一原始矩阵和第二原始矩阵的乘积矩阵加密得到的矩阵,所述第一秘密分享矩阵是所述第一方使用所述第二公钥和所述同态加密算法对随机生成的第一分享矩阵加密得到的矩阵;The receiving unit is configured to receive a difference matrix from the first party, the difference matrix being the difference between an encrypted synthesis matrix and a first secret sharing matrix, wherein the encrypted synthesis matrix corresponds to the use of the second The public key is a matrix obtained by encrypting the product matrix of the first original matrix and the second original matrix using the homomorphic encryption algorithm, and the first secret sharing matrix is the first party using the second public key A matrix obtained by encrypting a randomly generated first shared matrix with the homomorphic encryption algorithm;
    解密单元,配置为使用与所述第二公钥对应的第二私钥,对所述差值矩阵进行解密,得到第二分享矩阵,使得所述第二分享矩阵和所述第一分享矩阵之和为所述乘积矩阵。The decryption unit is configured to use a second private key corresponding to the second public key to decrypt the difference matrix to obtain a second sharing matrix, such that the second sharing matrix is between the second sharing matrix and the first sharing matrix And is the product matrix.
  20. 根据权利要求19所述的装置,还包括收发单元,配置为:The device according to claim 19, further comprising a transceiving unit configured to:
    将所述第二分享矩阵发送给所述第一方,和/或;Sending the second sharing matrix to the first party, and/or;
    从所述第一方接收所述第一分享矩阵。Receiving the first sharing matrix from the first party.
  21. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行权利要求1-10中任一项的所述的方法。A computer-readable storage medium having a computer program stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1-10.
  22. 一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-10中任一项所述的方法。A computing device, comprising a memory and a processor, characterized in that executable code is stored in the memory, and when the processor executes the executable code, the method described in any one of claims 1-10 is implemented. method.
PCT/CN2021/080753 2020-04-01 2021-03-15 Method and apparatus for jointly performing data processing by two parties WO2021197037A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010252277.9A CN111162896B (en) 2020-04-01 2020-04-01 Method and device for data processing by combining two parties
CN202010252277.9 2020-04-01

Publications (1)

Publication Number Publication Date
WO2021197037A1 true WO2021197037A1 (en) 2021-10-07

Family

ID=70567722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/080753 WO2021197037A1 (en) 2020-04-01 2021-03-15 Method and apparatus for jointly performing data processing by two parties

Country Status (2)

Country Link
CN (1) CN111162896B (en)
WO (1) WO2021197037A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901501A (en) * 2021-10-20 2022-01-07 苏州斐波那契信息技术有限公司 Private domain user image expansion method based on federal learning
CN114039767A (en) * 2021-11-05 2022-02-11 美林数据技术股份有限公司 Tax and power combined analysis method based on privacy calculation
CN114153854A (en) * 2022-02-09 2022-03-08 支付宝(杭州)信息技术有限公司 Secret sharing-based multi-key grouping information acquisition method and system
CN114172631A (en) * 2022-02-14 2022-03-11 支付宝(杭州)信息技术有限公司 Sorting method and system based on secret sharing
CN114465708A (en) * 2022-03-17 2022-05-10 北京绪方科技有限公司 Private data processing method, device, system, electronic equipment and storage medium
CN114614983A (en) * 2022-02-28 2022-06-10 北京理工大学 Feature fusion privacy protection method based on secure multi-party computation
CN114915455A (en) * 2022-04-24 2022-08-16 华控清交信息科技(北京)有限公司 Ciphertext data transmission method and device for ciphertext data transmission
CN115037442A (en) * 2022-08-11 2022-09-09 平安银行股份有限公司 Model effect detection method and device, storage medium and equipment
CN115204320A (en) * 2022-09-15 2022-10-18 北京数牍科技有限公司 Naive Bayes model training method, device, equipment and computer storage medium
CN116341684A (en) * 2023-05-26 2023-06-27 蓝象智联(杭州)科技有限公司 Regular penalty applying method, device and storage medium for improving model generalization performance

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162896B (en) * 2020-04-01 2020-06-26 支付宝(杭州)信息技术有限公司 Method and device for data processing by combining two parties
WO2021237437A1 (en) * 2020-05-26 2021-12-02 云图技术有限公司 Data processing method and apparatus employing secure multi-party computation, and electronic device
CN111475854B (en) * 2020-06-24 2020-10-20 支付宝(杭州)信息技术有限公司 Collaborative computing method and system for protecting data privacy of two parties
CN111783129A (en) * 2020-07-24 2020-10-16 支付宝(杭州)信息技术有限公司 Data processing method and system for protecting privacy
CN111783130B (en) * 2020-09-04 2021-01-29 支付宝(杭州)信息技术有限公司 Data processing method and device for privacy protection and server
CN112231561A (en) * 2020-10-14 2021-01-15 深圳前海微众银行股份有限公司 Data processing method, device, equipment and storage medium
CN112380404B (en) * 2020-12-14 2021-05-11 支付宝(杭州)信息技术有限公司 Data filtering method, device and system
CN112800466B (en) * 2021-02-10 2022-04-22 支付宝(杭州)信息技术有限公司 Data processing method and device based on privacy protection and server
CN113240045B (en) * 2021-06-01 2024-03-08 平安科技(深圳)有限公司 Data dimension reduction method and device and related equipment
CN113761469A (en) * 2021-08-10 2021-12-07 支付宝(杭州)信息技术有限公司 Highest bit carry calculation method for protecting data privacy
CN113779500B (en) * 2021-08-23 2024-01-30 华控清交信息科技(北京)有限公司 Data processing method and device for data processing
CN114092140B (en) * 2021-11-16 2023-06-27 抖音视界有限公司 Data processing method, device, computer equipment and storage medium
CN113987559B (en) * 2021-12-24 2022-04-08 支付宝(杭州)信息技术有限公司 Method and device for jointly processing data by two parties for protecting data privacy

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138923A (en) * 2015-08-11 2015-12-09 苏州大学 Privacy protection time sequence similarity calculation method
US20190007196A1 (en) * 2017-06-28 2019-01-03 Qatar University Method and system for privacy preserving computation in cloud using fully homomorphic encryption
CN110546642A (en) * 2018-10-17 2019-12-06 阿里巴巴集团控股有限公司 secure multi-party computing without using trusted initializer
CN110912713A (en) * 2019-12-20 2020-03-24 支付宝(杭州)信息技术有限公司 Method and device for processing model data by combining multiple parties
CN111160573A (en) * 2020-04-01 2020-05-15 支付宝(杭州)信息技术有限公司 Method and device for protecting business prediction model of data privacy joint training by two parties
CN111162896A (en) * 2020-04-01 2020-05-15 支付宝(杭州)信息技术有限公司 Method and device for data processing by combining two parties

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2696513T3 (en) * 2009-09-04 2019-01-16 Gradiant Centro Tecnoloxico De Telecomunicacions De Galicia Cryptographic system for calculating and processing secure signals directly in encrypted data in untrustworthy environments
CN103259643B (en) * 2012-08-14 2016-06-15 苏州大学 A kind of full homomorphic cryptography method of matrix
US10075288B1 (en) * 2014-02-28 2018-09-11 The Governing Council Of The University Of Toronto Systems, devices, and processes for homomorphic encryption
CN110324135B (en) * 2019-07-04 2022-05-31 浙江理工大学 Homomorphic encryption matrix determinant security outsourcing method based on cloud computing
CN110889139B (en) * 2019-11-26 2021-03-23 支付宝(杭州)信息技术有限公司 Method and device for multi-party combined dimensionality reduction processing aiming at user privacy data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138923A (en) * 2015-08-11 2015-12-09 苏州大学 Privacy protection time sequence similarity calculation method
US20190007196A1 (en) * 2017-06-28 2019-01-03 Qatar University Method and system for privacy preserving computation in cloud using fully homomorphic encryption
CN110546642A (en) * 2018-10-17 2019-12-06 阿里巴巴集团控股有限公司 secure multi-party computing without using trusted initializer
CN110912713A (en) * 2019-12-20 2020-03-24 支付宝(杭州)信息技术有限公司 Method and device for processing model data by combining multiple parties
CN111160573A (en) * 2020-04-01 2020-05-15 支付宝(杭州)信息技术有限公司 Method and device for protecting business prediction model of data privacy joint training by two parties
CN111162896A (en) * 2020-04-01 2020-05-15 支付宝(杭州)信息技术有限公司 Method and device for data processing by combining two parties

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113901501A (en) * 2021-10-20 2022-01-07 苏州斐波那契信息技术有限公司 Private domain user image expansion method based on federal learning
CN113901501B (en) * 2021-10-20 2022-11-08 苏州斐波那契信息技术有限公司 Private domain user image expansion method based on federal learning
CN114039767A (en) * 2021-11-05 2022-02-11 美林数据技术股份有限公司 Tax and power combined analysis method based on privacy calculation
CN114153854A (en) * 2022-02-09 2022-03-08 支付宝(杭州)信息技术有限公司 Secret sharing-based multi-key grouping information acquisition method and system
CN114153854B (en) * 2022-02-09 2022-05-10 支付宝(杭州)信息技术有限公司 Secret sharing-based multi-key grouping information acquisition method and system
CN114172631A (en) * 2022-02-14 2022-03-11 支付宝(杭州)信息技术有限公司 Sorting method and system based on secret sharing
CN114614983A (en) * 2022-02-28 2022-06-10 北京理工大学 Feature fusion privacy protection method based on secure multi-party computation
CN114614983B (en) * 2022-02-28 2024-03-22 北京理工大学 Feature fusion privacy protection method based on secure multiparty calculation
CN114465708A (en) * 2022-03-17 2022-05-10 北京绪方科技有限公司 Private data processing method, device, system, electronic equipment and storage medium
CN114915455A (en) * 2022-04-24 2022-08-16 华控清交信息科技(北京)有限公司 Ciphertext data transmission method and device for ciphertext data transmission
CN115037442A (en) * 2022-08-11 2022-09-09 平安银行股份有限公司 Model effect detection method and device, storage medium and equipment
CN115204320A (en) * 2022-09-15 2022-10-18 北京数牍科技有限公司 Naive Bayes model training method, device, equipment and computer storage medium
CN115204320B (en) * 2022-09-15 2022-11-15 北京数牍科技有限公司 Naive Bayes model training method, device, equipment and computer storage medium
CN116341684A (en) * 2023-05-26 2023-06-27 蓝象智联(杭州)科技有限公司 Regular penalty applying method, device and storage medium for improving model generalization performance

Also Published As

Publication number Publication date
CN111162896A (en) 2020-05-15
CN111162896B (en) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2021197037A1 (en) Method and apparatus for jointly performing data processing by two parties
CN110912713B (en) Method and device for processing model data by multi-party combination
CN112989368B (en) Method and device for processing private data by combining multiple parties
WO2020034754A1 (en) Secure multi-party computation method and apparatus, and electronic device
TWI762776B (en) Input acquisition method and device for secure multi-party computation agreement
CN110991655B (en) Method and device for processing model data by combining multiple parties
EP3075098B1 (en) Server-aided private set intersection (psi) with data transfer
WO2020015478A1 (en) Model-based prediction method and device
CN112199702A (en) Privacy protection method, storage medium and system based on federal learning
WO2022247576A1 (en) Data processing method and apparatus, device, and computer-readable storage medium
US11451527B2 (en) System and method for secure two-party evaluation of utility of sharing data
CN114936650A (en) Method and device for jointly training business model based on privacy protection
US20230328043A1 (en) Privacy protection method and system for financial data sharing based on federated learning
CN114039785A (en) Data encryption, decryption and processing method, device, equipment and storage medium
CN116596658A (en) Computation-controllable multiparty security credit assessment method and device
CN114611131B (en) Method, device and system for determining shared data for protecting privacy
Shin et al. Securing a local training dataset size in federated learning
US20230027010A1 (en) Secret code verification protocol
US10356056B2 (en) Method and system for privacy-preserving order statistics in a star network
CN115913537A (en) Data intersection method and system based on privacy protection and related equipment
CN114726549A (en) Data security query method and system based on bidirectional RSA three-time transmission protocol
CN114629620A (en) Homomorphic encryption calculation method and system, homomorphic request, calculation and key system
CN117151349B (en) Tax and electric power data joint analysis system with privacy protection function
CN113965310B (en) Method for realizing mixed privacy calculation processing based on label capable of being controlled to be de-identified
US20230385446A1 (en) Privacy-preserving clustering methods and apparatuses

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21782124

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21782124

Country of ref document: EP

Kind code of ref document: A1