Generation method and system of multiplication triple for secret sharing
The method and system for generating multiplication triples in secure multi-party computing utilize TEE for secure and efficient triple generation, addressing inefficiencies and security issues by integrating hash tree operations for integrity verification.
Patent Information
- Application Number
- CN202411254117.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-12-31
AI Technical Summary
Existing methods for generating multiplication triples in secure multi-party computing are inefficient and lack security, particularly due to the need for complex interactions and reliance on centralized third parties or insecure seed generation.
A method and system utilizing a trusted execution environment (TEE) for secure and efficient generation of multiplication triples through partial secret sharing blocks, combined with hash tree operations for integrity verification, ensuring security and efficiency.
The method ensures secure and efficient generation of multiplication triples by leveraging TEE encryption and decryption functions, with Merkle tree-based integrity verification, reducing reliance on centralized systems and enhancing data integrity.
Smart Images

Figure CN119232369A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and more particularly to a method and system for generating multiplication triples for secret sharing. Background Art
[0002] The popularity of the Internet and the development of mobile Internet have led to the continuous generation of data in production, operation and daily life. Massive data has become an asset of enterprises. At the same time, since these data often contain sensitive information of users, protecting these data has also become the responsibility of enterprises. Some data mining projects need to be based on data from different enterprises. When enterprises participate in such data mining projects, they must ensure that their original data will not be leaked.
[0003] Secure multi-party computing (MPC) provides a solution to this data island phenomenon, allowing multiple data owners to perform collaborative computing without mutual trust, output computing results, and ensure that no party can obtain any information other than the computing results they deserve. MPC enables multiple data owners to obtain the use value of all data while protecting the privacy of their original data content. Therefore, secure multi-party computing plays an important role in scenarios such as electronic elections, electronic voting, secret sharing, and threshold signatures.
[0004] In the existing multiplication operation based on secret sharing, a common method is to operate through triples. The existing patent CN202110101403.5 requires two computing parties to interact to generate triples, which requires the two communicating parties to have a certain computing power and requires multiple interactions to generate multiplication triples. The calculation is complex. The CN202110808954.5 triple is directly generated by TEE, and its security depends on the selection of the original seed. When the original seed is relatively short, periodic repetitions will soon occur. Triples are completely generated by a reliable third party, which is too centralized.
[0005] Therefore, how to provide an efficient and secure method for generating multiplication triples for secret sharing is a problem that those skilled in the art urgently need to solve. Summary of the invention
[0006] In view of this, the present invention provides a method and system for generating multiplication triples for secret sharing, which is safe and efficient.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A method for generating a multiplication triplet for secret sharing, comprising:
[0009] S1: The first communication party randomly generates partial triplet secret sharing blocks [a]A, [b]A based on the first private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]A, [b]A through a secure channel and sends them to the trusted execution environment TEE;
[0010] The second communication party randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]B, [b]B through a secure channel and sends them to the trusted execution environment TEE;
[0011] S2: The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A and sends it to the first communication party, and encrypts block [c]B and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
[0012] Preferably, it also includes:
[0013] S3: The first communication party stores the hash values Hash([a]A) and Hash([b]A) obtained by performing hash operations on the partial triplet secret sharing blocks [a]A and [b]A in the hash tree, and sends Hash([a]A) and Hash([b]A) to the second communication party;
[0014] The second communication party stores the hash values Hash([a]B) and Hash([b]B) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and sends the hash values Hash([a]B) and Hash([b]B) to the first communication party;
[0015] The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and hash values Hash([c]B), and sends the hash values Hash([c]A) and hash values Hash([c]B) to the first communication party and the second communication party respectively;
[0016] The first communication party and the second communication party both perform the following steps:
[0017] After performing a hash operation on 0, the hash value Hash(0) is obtained;
[0018] The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5;
[0019] The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain a hash value Hash6.
[0020] The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
[0021] Preferably, the encrypted data is processed using a symmetric key generated by a trusted execution environment (TEE).
[0022] A system for generating multiplication triples for secret sharing, comprising: a first communication party, a second communication party and a trusted execution environment TEE;
[0023] The first communication party includes a first secret sharing block unit and a first communication unit;
[0024] The second communication party includes a second secret sharing block unit and a second communication unit;
[0025] The first secret sharing block unit randomly generates a partial triplet secret sharing block [a]A, [b]A based on the first private data and stores it locally;
[0026] The first communication unit is used to encrypt the partial triplet secret sharing blocks [a]A and [b]A through a secure channel and send them to the trusted execution environment TEE;
[0027] The second secret sharing block unit randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally;
[0028] The second communication unit is used to encrypt the partial triplet secret sharing blocks [a]B and [b]B through a secure channel and send them to the trusted execution environment TEE;
[0029] The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A through the first communication unit and sends it to the first communication party, and encrypts block [c]B through the second communication unit and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
[0030] Preferably, the first communication party further comprises a first hash tree calculation unit, configured to store the hash value Hash([a]A) and the hash value Hash([b]A) after performing a hash operation on the partial triplet secret sharing blocks [a]A and [b]A in a hash tree, and send the Hash([a]A) and the hash value Hash([b]A) to the second communication party;
[0031] The second communication party also includes a second hash tree calculation unit, which is used to store the hash value Hash([a]B) and the hash value Hash([b]B) after performing hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and send the hash value Hash([a]B) and the hash value Hash([b]B) to the first communication party;
[0032] The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and hash values Hash([c]B) and stores them in the hash tree, and sends the hash values Hash([c]A) and hash values Hash([c]B) to the first communication party and the second communication party through the first communication unit and the second communication unit respectively;
[0033] The first hash tree calculation unit and the second hash tree calculation unit are also used to calculate the following steps:
[0034] After performing a hash operation on 0, the hash value Hash(0) is obtained;
[0035] The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5;
[0036] The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain a hash value Hash6.
[0037] The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
[0038] Preferably, the encrypted data is processed using a symmetric key generated by a trusted execution environment (TEE).
[0039] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a method and system for generating multiplication triplets for secret sharing, which ensures the security and efficiency of the triplets through the encryption and secure computing functions of TEE, and uses the merkle tree for integrity verification to improve the security of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 The accompanying drawing is a flow chart of a method for generating multiplication triples for secret sharing provided by the present invention.
[0042] Figure 2 The accompanying drawing is a structural diagram of a system for generating multiplication triples for secret sharing provided by the present invention.
[0043] Figure 3 The accompanying drawing is a diagram of the hash tree structure provided by the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] The embodiment of the present invention discloses a method for generating a multiplication triplet for secret sharing, such as Figure 1 As shown, including:
[0046] S1: The first communication party randomly generates partial triplet secret sharing blocks [a]A, [b]A based on the first private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]A, [b]A through a secure channel and sends them to the trusted execution environment TEE;
[0047] The second communication party randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]B, [b]B through a secure channel and sends them to the trusted execution environment TEE;
[0048] S2: The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A and sends it to the first communication party, and encrypts block [c]B and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
[0049] In this embodiment, if Figure 3 As shown, it also includes S3: the first communication party stores the hash value Hash([a]A) and the hash value Hash([b]A) after performing hash operation on the partial triplet secret sharing blocks [a]A and [b]A in the hash tree, and sends Hash([a]A) and the hash value Hash([b]A) to the second communication party;
[0050] The second communication party stores the hash values Hash([a]B) and Hash([b]B) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and sends the hash values Hash([a]B) and Hash([b]B) to the first communication party;
[0051] The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and hash values Hash([c]B), and sends the hash values Hash([c]A) and hash values Hash([c]B) to the first communication party and the second communication party respectively;
[0052] The first communication party and the second communication party both perform the following steps:
[0053] After performing a hash operation on 0, the hash value Hash(0) is obtained;
[0054] The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5;
[0055] The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain a hash value Hash6.
[0056] The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
[0057] The first communication party and the second communication party of the present invention respectively calculate the root hash to maintain their own hash tree. After each update, the root hashes of both parties are compared to ensure the consistency of data and prevent participants from maliciously tampering with the value of the triplet, thereby ensuring the integrity and security of the triplet.
[0058] Among them, the encrypted data is processed through the symmetric key generated by the trusted execution environment TEE.
[0059] The generation of the multiplication triplet of the present invention does not completely rely on TEE, but relies on the encryption and decryption functions and trusted computing functions of TEE to ensure the security and efficiency of the triplet. At the same time, the Merkle tree is used for integrity verification to improve the security of the algorithm.
[0060] The embodiment of the present invention discloses a system for generating multiplication triples for secret sharing, such as Figure 2 As shown, including:
[0061] A first communication party, a second communication party and a trusted execution environment TEE;
[0062] The first communication party includes a first secret sharing block unit and a first communication unit;
[0063] The second communication party includes a second secret sharing block unit and a second communication unit;
[0064] The first secret sharing block unit randomly generates a partial triplet secret sharing block [a]A, [b]A based on the first private data and stores it locally;
[0065] The first communication unit is used to encrypt the partial triplet secret sharing blocks [a]A and [b]A through a secure channel and send them to the trusted execution environment TEE;
[0066] The second secret sharing block unit randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally;
[0067] The second communication unit is used to encrypt the partial triplet secret sharing blocks [a]B and [b]B through a secure channel and send them to the trusted execution environment TEE;
[0068] The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A through the first communication unit and sends it to the first communication party, and encrypts block [c]B through the second communication unit and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
[0069] In this embodiment, the first communication party further includes a first hash tree calculation unit, which is used to store the hash value Hash([a]A) and the hash value Hash([b]A) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]A and [b]A in a hash tree, and send the Hash([a]A) and the hash value Hash([b]A) to the second communication party through the first communication unit and the second communication unit;
[0070] The second communication party also includes a second hash tree calculation unit, which is used to store the hash value Hash([a]B) and the hash value Hash([b]B) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and send the hash value Hash([a]B) and the hash value Hash([b]B) to the first communication party through the second communication unit and the first communication unit;
[0071] The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and hash values Hash([c]B), and sends the hash values Hash([c]A) and hash values Hash([c]B) to the first communication party and the second communication party through the first communication unit and the second communication unit respectively;
[0072] The first hash tree calculation unit and the second hash tree calculation unit are also used to calculate the following steps:
[0073] After performing a hash operation on 0, the hash value Hash(0) is obtained;
[0074] The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5;
[0075] The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain a hash value Hash6.
[0076] The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
[0077] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0078] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating multiplication triples for secret sharing, characterized in that: include: S1: The first communication party randomly generates partial triplet secret sharing blocks [a]A, [b]A based on the first private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]A, [b]A through a secure channel and sends them to the trusted execution environment TEE; The second communication party randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally, and encrypts partial triplet secret sharing blocks [a]B, [b]B through a secure channel and sends them to the trusted execution environment TEE; S2: The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A and sends it to the first communication party, and encrypts block [c]B and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
2. A method for generating a multiplication triplet for secret sharing according to claim 1, characterized in that: Also includes: S3: The first communication party stores the hash values Hash([a]A) and Hash([b]A) obtained by performing hash operations on the partial triplet secret sharing blocks [a]A and [b]A in the hash tree, and sends Hash([a]A) and Hash([b]A) to the second communication party; The second communication party stores the hash values Hash([a]B) and Hash([b]B) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and sends the hash values Hash([a]B) and Hash([b]B) to the first communication party; The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and Hash values Hash([c]B), and sends the hash values Hash([c]A) and Hash([c]B) to the first communication party and the second communication party respectively; The first communication party and the second communication party both perform the following steps: After performing a hash operation on 0, the hash value Hash(0) is obtained; The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5; The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain the hash value Hash6; The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
3. The method for generating a multiplication triplet for secret sharing according to claim 1, characterized in that: All encrypted data is processed using the symmetric key generated by the Trusted Execution Environment (TEE).
4. A system for generating multiplication triplets for secret sharing, characterized in that: include: A first communication party, a second communication party and a trusted execution environment TEE; The first communication party includes a first secret sharing block unit and a first communication unit; The second communication party includes a second secret sharing block unit and a second communication unit; The first secret sharing block unit randomly generates a partial triplet secret sharing block [a]A, [b]A based on the first private data and stores it locally; The first communication unit is used to encrypt the partial triplet secret sharing blocks [a]A and [b]A through a secure channel and send them to the trusted execution environment TEE; The second secret sharing block unit randomly generates partial triplet secret sharing blocks [a]B, [b]B based on the second private data and stores them locally; The second communication unit is used to encrypt the partial triplet secret sharing blocks [a]B and [b]B through a secure channel and send them to the trusted execution environment TEE; The trusted execution environment TEE decrypts part of the triplet secret sharing blocks [a]A, [b]A and part of the triplet secret sharing blocks [a]B, [b]B, and performs addition operations a=[a]A+[a]B, b=[b]A+[b]B, calculates c=a*b, divides c into blocks to obtain block [c]A and block [c]B, encrypts block [c]A through the first communication unit and sends it to the first communication party, and encrypts block [c]B through the second communication unit and sends it to the second communication party. [a]A[b]A[c]A and [a]B[b]B[c]B are triplet secret sharing blocks.
5. A system for generating multiplication triples for secret sharing according to claim 4, characterized in that: The first communication party also includes a first hash tree calculation unit, which is used to store the hash value Hash([a]A) and the hash value Hash([b]A) obtained by performing a hash operation on the partial triplet secret sharing blocks [a]A and [b]A in the hash tree, and send the Hash([a]A) and the hash value Hash([b]A) to the second communication party; The second communication party also includes a second hash tree calculation unit, which is used to store the hash value Hash([a]B) and the hash value Hash([b]B) after performing hash operation on the partial triplet secret sharing blocks [a]B and [b]B in the hash tree, and send the hash value Hash([a]B) and the hash value Hash([b]B) to the first communication party; The trusted execution environment TEE performs hash operations on block [c]A and block [c]B to obtain hash values Hash([c]A) and hash values Hash([c]B), and sends the hash values Hash([c]A) and hash values Hash([c]B) to the first communication party and the second communication party through the first communication unit and the second communication unit respectively; The first hash tree calculation unit and the second hash tree calculation unit are also used to calculate the following steps: After performing a hash operation on 0, the hash value Hash(0) is obtained; The hash value Hash([a]A) and the hash value Hash([a]B) are concatenated and then hashed to obtain a hash value Hash1, and the hash value Hash([b]A) and the hash value Hash([b]B) are concatenated and then hashed to obtain a hash value Hash2; the hash value Hash1 and the hash value Hash2 are concatenated and then hashed to obtain a hash value Hash5; The hash value Hash([c]A) and the hash value Hash([c]B) are concatenated and then hashed to obtain a hash value Hash3. The two hash values Hash(0) are concatenated and then hashed to obtain a hash value Hash4. The hash value Hash3 and the hash value Hash4 are concatenated and then hashed to obtain the hash value Hash6; The hash value Hash5 and the hash value Hash6 are concatenated and then hashed to obtain the root hash.
6. A system for generating multiplication triples for secret sharing according to claim 4, characterized in that: All encrypted data is processed using the symmetric key generated by the Trusted Execution Environment (TEE).
Citation Information
Patent Citations
Method and system for improving security multi-party computing efficiency and storage medium
CN112953700A
Extensible secure multi-party computing method and system based on TEE
CN113541963A
