Collaborative encryption method, collaborative decryption method, system and client
By using two different asymmetric encryption algorithms in the collaborative encryption system to collaboratively encrypt plaintext data and perform encapsulation processing, the problem of traditional encryption algorithms being easily cracked in the post-quantum era is solved, and secure data transmission in the post-quantum era is achieved.
Patent Information
- Application Number
- CN202411049006.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Existing collaborative encryption mechanisms face huge security risks in the post-quantum era. Traditional asymmetric cryptographic algorithms are easily cracked by quantum algorithms, and the security of a single encryption algorithm is insufficient.
Two different asymmetric encryption algorithms are used to collaboratively encrypt plaintext data, namely the first encryption algorithm and the second encryption algorithm, and the encrypted ciphertext is encapsulated. The first encryption algorithm is a traditional asymmetric encryption algorithm, and the second encryption algorithm is a post-quantum encryption algorithm.
It enhances the security of encryption algorithms, effectively prevents quantum algorithm attacks, and ensures the secure transmission of plaintext data in the post-quantum era.
Smart Images

Figure CN119011145B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cryptographic application technology, and in particular to a collaborative encryption method, a collaborative decryption method, a system and a client. Background Art
[0002] Collaborative encryption is a method for protecting data confidentiality, enabling secure data transmission through multi-party collaboration. Collaborative encryption algorithms typically have a public key that is publicly available, and multiple members possess their own private keys. Encryption uses the public key to perform operations on data, while decryption requires the collaboration of multiple members to decrypt the plaintext data.
[0003] However, with the advancement of computing power and mathematics, classical encryption systems that rely on computational complexity are facing a significant threat. The quantum algorithm Shor's algorithm can solve problems such as integer factorization and discrete logarithms. Collaborative encryption mechanisms based on traditional asymmetric cryptographic algorithms face significant security risks in the post-quantum era. Summary of the Invention
[0004] The purpose of the present invention is to provide a collaborative encryption method, a collaborative decryption method, a system and a client to address the deficiencies in the above-mentioned prior art, so as to add another asymmetric encryption algorithm on the basis of the first encryption algorithm, thereby enhancing the security of the single encryption algorithm and effectively ensuring the secure transmission of the plaintext data to be encrypted.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a collaborative encryption method, applied to a first client in a collaborative encryption and decryption system, the method comprising:
[0007] Get the plaintext data to be encrypted;
[0008] Performing encryption splitting processing on the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component;
[0009] collaboratively encrypting the first ciphertext component using a first encryption algorithm according to the first public key of the first client and the first public key of at least one second client to obtain a first collaboratively encrypted ciphertext;
[0010] collaboratively encrypting the second ciphertext component using a second encryption algorithm based on the second public key of the first client and the second public key of the at least one second client to obtain a second collaboratively encrypted ciphertext, wherein the first encryption algorithm and the second encryption algorithm are respectively two different asymmetric encryption algorithms;
[0011] The first collaborative encryption ciphertext and the second collaborative encryption ciphertext are encapsulated to obtain a hybrid collaborative encryption ciphertext corresponding to the to-be-encrypted plaintext data.
[0012] In an optional implementation, the collaborative encryption of the first ciphertext component according to the first public key of the first client and the first public key of at least one second client, to obtain a first collaborative encryption ciphertext, includes:
[0013] The first ciphertext component is collaboratively encrypted according to the first public key of the first client and the first public key of the at least one second client, respectively, to obtain a plurality of first collaborative encryption ciphertext components by using the first encryption algorithm.
[0014] The plurality of first collaborative encryption ciphertext components are spliced to obtain the first collaborative encryption ciphertext.
[0015] In an optional implementation, the encryption algorithm is a post-quantum encryption algorithm, and the collaborative encryption of the second ciphertext component according to the second public key of the first client and the second public key of the at least one second client, to obtain a second collaborative encryption ciphertext, includes:
[0016] The second public key of the first client and the second public key of the at least one second client are obtained from a server.
[0017] The second ciphertext component is data segmented to obtain first data of the first client and second data of the at least one second client.
[0018] The first data is encrypted according to the second public key of the first client by using the post-quantum encryption algorithm to obtain a first collaborative ciphertext component.
[0019] The second data of the at least one second client is respectively encrypted according to the second public key of the at least one second client by using the post-quantum encryption algorithm to obtain at least one second collaborative ciphertext component.
[0020] The username of the first client, the username of the at least one second client, the first collaborative ciphertext component, and the at least one second collaborative ciphertext component are spliced to obtain the second collaborative encryption ciphertext.
[0021] In an optional implementation, the encryption and splitting of the to-be-encrypted plaintext data to obtain a first ciphertext component and a second ciphertext component includes:
[0022] The preset threshold encryption algorithm is used to perform encryption splitting processing on the plaintext data to be encrypted to obtain the first ciphertext component and the second ciphertext component.
[0023] In a second aspect, an embodiment of the present application further provides a collaborative decryption method, which is applied to a first client in a collaborative encryption and decryption system. The method includes:
[0024] Obtain the ciphertext data to be decrypted;
[0025] Decapsulating the ciphertext data to be decrypted to obtain a first collaboratively encrypted ciphertext to be decrypted and a second collaboratively encrypted ciphertext to be decrypted;
[0026] Decrypting the first collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of the first encryption algorithm with at least one second client based on their respective first private keys to obtain first collaboratively decrypted data;
[0027] Decrypting the second collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of a second encryption algorithm with the at least one second client based on their respective second private keys to obtain second collaboratively decrypted data; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms;
[0028] The first collaborative decryption data and the second collaborative decryption data are merged to generate target plaintext data.
[0029] In an optional embodiment, the at least one second client decrypts the first collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of the first encryption algorithm based on their respective first private keys to obtain first collaboratively decrypted data, including:
[0030] Decrypting the first collaborative encrypted ciphertext to be decrypted using the decryption algorithm of the first encryption algorithm according to the first private key of the first client to obtain first first decrypted intermediate data;
[0031] Sending the first first decrypted intermediate data to a first second client among the at least one second client, so that the first second client decrypts the first first decrypted intermediate data using a decryption algorithm of the first encryption algorithm based on the first private key of the first second client to obtain second first decrypted intermediate data, and sending the second first decrypted intermediate data to a next second client to continue processing using the decryption algorithm of the first encryption algorithm, until obtaining the first decrypted intermediate data of the last second client;
[0032] The first collaborative decryption data is generated based on the first decrypted intermediate data of the last second client.
[0033] In an optional embodiment, the at least one second client decrypts the second collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of a second encryption algorithm based on their respective second private keys to obtain second collaboratively decrypted data, including:
[0034] Parsing the second collaborative encrypted ciphertext to be decrypted to obtain a first collaborative ciphertext component to be decrypted by the first client, a second collaborative ciphertext component to be decrypted by the at least one second client, a user name of the first client, and a user name of the at least one second client;
[0035] Sending the first collaborative ciphertext component to be decrypted, at least one second collaborative ciphertext component to be decrypted, the user name of the first client, and the user name of the at least one second client to the server, so that the server sends the collaborative ciphertext component to be decrypted of each client and the random salt value ciphertext of each client to each client;
[0036] Obtaining the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted, which are sent by the server;
[0037] Decrypt the first client's second private key, the random salt ciphertext, and the first collaborative ciphertext component to be decrypted using the decryption algorithm of the second encryption algorithm to obtain first second decrypted intermediate data;
[0038] Sending the first second decrypted intermediate data to a first second client among the at least one second client, so that the first second client decrypts its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data using a decryption algorithm of the second encryption algorithm based on the second private key of the first second client, to obtain second second decrypted intermediate data, and sending the second second decrypted intermediate data to a next second client to continue processing using the decryption algorithm of the second encryption algorithm, until the second decrypted intermediate data of the last second client is obtained;
[0039] The second collaborative decryption data is generated based on the second decryption intermediate data of the last second client.
[0040] In an optional embodiment, the decryption algorithm of the second encryption algorithm is used to decrypt the first client's second private key, the random salt ciphertext, and the first collaborative ciphertext component to be decrypted, to obtain the first second decrypted intermediate data, including:
[0041] Decrypting the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted respectively using the decryption algorithm of the second encryption algorithm according to the second private key of the first client to obtain a first random salt value and first decrypted data of the first client;
[0042] Performing an obfuscation operation on the first random salt value and the first decrypted data to obtain first decrypted obfuscated data of the first client;
[0043] Encrypting the first decrypted obfuscated data according to the second public key of the first second client to obtain the first second decrypted intermediate data;
[0044] The first second client is specifically used to: based on the second private key of the first second client, use the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data to obtain the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption; perform an obfuscation operation on the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption to obtain the second decrypted obfuscated data of the first second client; encrypt the second decrypted obfuscated data of the first second client according to the second public key of the next second client to obtain the next second decrypted intermediate data, and send it to the next second client until the second decrypted intermediate data of the last second client is obtained.
[0045] In the third aspect, an embodiment of the present application also provides a collaborative encryption and decryption system, which includes: multiple clients and servers, wherein the multiple clients are respectively communicated with the servers, and the multiple clients are communicated with each other, and each client is used to execute the steps of the collaborative encryption method as described in any one of the first aspects, or execute the steps of the collaborative signature and decryption method as described in any one of the second aspects.
[0046] In the fourth aspect, an embodiment of the present application also provides a client, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the client is running, the processor communicates with the storage medium through the bus, and the processor executes the steps of the collaborative encryption method as described in any one of the first aspects, or executes the steps of the collaborative decryption method as described in any one of the second aspects.
[0047] The beneficial effects of this application are:
[0048] An embodiment of the present application provides a collaborative encryption method, a collaborative decryption method, a system and a client. The collaborative encryption method is applied to the first client in the collaborative encryption and decryption system. The method includes: obtaining plaintext data to be encrypted, encrypting and splitting the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component, collaboratively encrypting the first ciphertext component using a first encryption algorithm based on the first public key of the first client and the first public key of at least one second client to obtain a first collaborative encrypted ciphertext, and collaboratively encrypting the second ciphertext component using a second encryption algorithm based on the second public key of the first client and the second public key of at least one second client to obtain a second collaborative encrypted ciphertext; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms respectively, and finally, the first collaborative encrypted ciphertext and the second collaborative ciphertext are encapsulated to obtain a mixed collaborative encrypted ciphertext corresponding to the plaintext data to be encrypted.
[0049] The method of the present application adopts two different asymmetric encryption algorithms to collaboratively encrypt the plaintext data to be encrypted, and finally encapsulates the two collaboratively encrypted ciphertexts obtained to obtain a mixed collaboratively encrypted ciphertext corresponding to the plaintext data to be encrypted. On the basis of the first encryption algorithm that meets the security and compliance requirements of the cryptographic algorithm, another asymmetric encryption algorithm is added, which can enhance the security of the single encryption algorithm and effectively ensure the secure transmission of the plaintext data to be encrypted. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 One of the flowcharts of a collaborative encryption method provided in an embodiment of the present application;
[0052] Figure 2 The second flowchart of a collaborative encryption method provided in an embodiment of the present application;
[0053] Figure 3 The third flowchart of a collaborative encryption method provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of determining a second collaborative encryption ciphertext provided in an embodiment of the present application;
[0055] Figure 5 One of the flowcharts of a collaborative decryption method provided in an embodiment of the present application;
[0056] Figure 6 The second flowchart of a collaborative decryption method provided in an embodiment of the present application;
[0057] Figure 7 The third flowchart of a collaborative decryption method provided in an embodiment of the present application;
[0058] Figure 8 A fourth flowchart of a collaborative decryption method provided in an embodiment of the present application;
[0059] Figure 9 A schematic diagram of determining second collaborative decryption data provided in an embodiment of the present application;
[0060] Figure 10 A schematic diagram of the functional modules of a collaborative encryption device provided in an embodiment of the present application;
[0061] Figure 11 A schematic diagram of the functional modules of a collaborative decryption device provided in an embodiment of the present application;
[0062] Figure 12 This is one of the schematic diagrams of a collaborative encryption and decryption system provided in an embodiment of the present application;
[0063] Figure 13 This is a second schematic diagram of a collaborative encryption and decryption system provided in an embodiment of the present application;
[0064] Figure 14 A schematic diagram of a client provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0066] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0067] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, or is the orientation or position relationship in which the product of the application is usually placed when in use. It is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on this application.
[0068] In addition, the terms "first," "second," and the like in the description and claims of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0069] It should be noted that, in the absence of conflict, the features in the embodiments of this application can be combined with each other.
[0070] During data transmission, to ensure the security of plaintext data being transmitted, the sender will collaboratively encrypt the plaintext data through multi-party collaboration. Based on the public keys of multiple users, the sender uses an encryption algorithm to collaboratively encrypt the plaintext data to obtain encrypted ciphertext. The sender then sends the encrypted ciphertext to the receiver. Collaborative encryption is used to ensure the security of plaintext data transmission. After receiving the encrypted ciphertext, the receiver uses the inverse algorithm of the encryption algorithm based on its own private key to decrypt the encrypted ciphertext to obtain the plaintext data. Collaborative decryption is also used to ensure the security of plaintext data transmission.
[0071] Encryption and decryption can ensure the security of plaintext data during transmission. However, currently, a single encryption algorithm is mostly used to encrypt plaintext data to be transmitted, which is vulnerable to attacks by quantum algorithms and will face huge security risks in the post-quantum era. Therefore, an embodiment of the present application provides a collaborative encryption method, which is applied to the first client in the collaborative encryption and decryption system. Specifically, the first client obtains encrypted plaintext data, encrypts and splits the encrypted plaintext data to obtain a first ciphertext component and a second ciphertext component. According to the first public key of the first client and the first public key of at least one second client, the first ciphertext component is collaboratively encrypted using a first encryption algorithm to obtain a first collaborative encrypted ciphertext; according to the second public key of the first client and the second public key of at least one second client, the second ciphertext component is collaboratively encrypted using a second encryption algorithm to obtain a second collaborative encrypted ciphertext; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms respectively. Finally, the first collaborative encrypted ciphertext and the second collaborative ciphertext are encapsulated to obtain a mixed collaborative encrypted ciphertext corresponding to the plaintext data to be encrypted. On the basis of the first encryption algorithm, another asymmetric second encryption algorithm is added to enhance the security of the first encryption algorithm and effectively prevent attacks by quantum algorithms.
[0072] The collaborative encryption method provided in the embodiment of the present application is explained in detail below through specific examples in conjunction with the accompanying drawings. Figure 1 This is one of the flow charts of a collaborative encryption method provided in the embodiment of the present application. Figure 1 As shown, the method includes:
[0073] S101. Obtain plaintext data to be encrypted.
[0074] In this embodiment, the first client is a client in the collaborative encryption and decryption system that needs to send plaintext data to be encrypted. As the sender, the plaintext data to be encrypted is data output by the business system in the first client.
[0075] S102: Perform encryption splitting processing on the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component.
[0076] Specifically, the plaintext data to be encrypted is encrypted and split to obtain two ciphertexts, namely the first ciphertext component f1 and the second ciphertext component f2.
[0077] Optionally, a preset threshold encryption algorithm is used to perform encryption splitting processing on the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component.
[0078] Among them, the preset threshold encryption algorithm can be a threshold key sharing scheme (Shamir's Threshold Scheme), which is specifically used to distribute the plaintext data to be encrypted into several parts according to a certain algorithm, and set threshold conditions to ensure the security of the data. Each part is encrypted and stored in multiple different security media so that they cannot be decrypted by a single medium.
[0079] The first client uses a preset threshold encryption algorithm to perform encryption splitting processing on the plaintext data to be encrypted, and obtains a first ciphertext component f1 and a second ciphertext component f2.
[0080] S103 : Collaboratively encrypt the first ciphertext component using a first encryption algorithm according to the first public key of the first client and the first public key of at least one second client to obtain a first collaboratively encrypted ciphertext.
[0081] Among them, at least one second client is a client in the collaborative encryption and decryption system used to collaborate with the first client for encryption, and the first encryption algorithm is a traditional asymmetric encryption algorithm that meets the security and compliance requirements of the cryptographic algorithm, such as the RSA cryptographic algorithm (Rivest-Shamir-Adleman algorithm), elliptic curve cryptography (ECC), elliptic curve algorithm SM2, quantum-resistant algorithm, etc.
[0082] The first client collaboratively encrypts the first ciphertext component using a first encryption algorithm according to the first public key of the first client and the first public key of at least one second client to obtain a first collaboratively encrypted ciphertext cc.
[0083] S104 : Collaboratively encrypt the second ciphertext component using a second encryption algorithm according to the second public key of the first client and the second public key of at least one second client to obtain a second collaboratively encrypted ciphertext.
[0084] The first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms. For example, if the first encryption algorithm is the elliptic curve algorithm SM2, the second encryption algorithm can be the RSA encryption algorithm, the ECC algorithm, the quantum-resistant algorithm, the post-quantum algorithm, etc.
[0085] The first client collaboratively encrypts the second ciphertext component using a second encryption algorithm based on the second public key of the first client and the second public key of at least one second client to obtain a second collaboratively encrypted ciphertext qcc. The second collaboratively encrypted data qcc and the first collaboratively encrypted data cc are the collaboratively encrypted ciphertexts obtained by the first client collaboratively encrypting the first ciphertext component and the second ciphertext component respectively using different encryption algorithms based on the public keys of the first client and at least one second client.
[0086] S105 : Encapsulate the first collaborative encryption ciphertext and the second collaborative encryption ciphertext to obtain a hybrid collaborative encryption ciphertext corresponding to the plaintext data to be encrypted.
[0087] Specifically, the first collaborative encryption ciphertext cc and the second collaborative encryption ciphertext qcc are ciphertext concatenated and then encapsulated to obtain a mixed collaborative encryption ciphertext cc||qcc.
[0088] To summarize, an embodiment of the present application provides a collaborative encryption method, which is applied to a first client in a collaborative encryption and decryption system. The method includes: obtaining plaintext data to be encrypted, performing encryption and splitting processing on the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component, and collaboratively encrypting the first ciphertext component using a first encryption algorithm based on a first public key of the first client and a first public key of at least one second client to obtain a first collaboratively encrypted ciphertext, and collaboratively encrypting the second ciphertext component using a second encryption algorithm based on a second public key of the first client and a second public key of at least one second client to obtain a second collaboratively encrypted ciphertext; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms, respectively; finally, the first collaboratively encrypted ciphertext and the second collaborative ciphertext are encapsulated to obtain a mixed collaboratively encrypted ciphertext corresponding to the plaintext data to be encrypted.
[0089] The method of the present application adopts two different asymmetric encryption algorithms to collaboratively encrypt the plaintext data to be encrypted, and finally encapsulates the two collaboratively encrypted ciphertexts obtained to obtain a mixed collaboratively encrypted ciphertext corresponding to the plaintext data to be encrypted. On the basis of the first encryption algorithm that meets the security and compliance requirements of the cryptographic algorithm, another asymmetric encryption algorithm is added, which can enhance the security of the single encryption algorithm and effectively ensure the secure transmission of the plaintext data to be encrypted.
[0090] Based on the collaborative encryption method provided in the above embodiment, the embodiment of the present application further provides another possible implementation of the collaborative encryption method through a method for determining a first collaborative encryption ciphertext. Figure 2 This is a second flow chart of a collaborative encryption method provided in an embodiment of the present application. Figure 2 As shown, according to the first public key of the first client and the first public key of at least one second client, the first ciphertext component is collaboratively encrypted using a first encryption algorithm to obtain a first collaboratively encrypted ciphertext, including:
[0091] S201. According to a first public key of a first client and a first public key of at least one second client, collaboratively encrypt first ciphertext components using a first encryption algorithm to obtain multiple first collaboratively encrypted ciphertext components.
[0092] S202: Assemble multiple first collaboratively encrypted ciphertext components to obtain a first collaboratively encrypted ciphertext.
[0093] In this embodiment, the first client uses the first encryption algorithm to collaboratively encrypt the first ciphertext component according to the first public key of the first client and the first public key of at least one second client to obtain the first collaboratively encrypted ciphertext component corresponding to each first public key, and then assembles multiple first collaboratively encrypted ciphertext components to obtain the first collaboratively encrypted ciphertext.
[0094] In the method provided in the embodiments of the present application, a first encryption algorithm is used to collaboratively encrypt the first ciphertext components based on the first public key of the first client and the first public key of at least one second client, thereby obtaining multiple first collaboratively encrypted ciphertext components. These multiple first collaboratively encrypted ciphertext components are then assembled to obtain a first collaboratively encrypted ciphertext. This enables the first client to collaboratively encrypt the first ciphertext components using the first encryption algorithm to obtain the first collaboratively encrypted ciphertext.
[0095] Because quantum algorithms can solve problems such as integer factorization and discrete logarithms, traditional asymmetric cryptographic algorithms are vulnerable to attacks, especially in the post-quantum era. Post-quantum algorithms can effectively resist attacks from quantum algorithms and meet the security requirements of the post-quantum era. However, post-quantum algorithms lack effective security proofs and cannot meet existing security assessment standards. Therefore, in a collaborative encryption method provided in an embodiment of the present application, the first encryption algorithm used is a traditional asymmetric encryption algorithm that meets the security and compliance requirements of cryptographic algorithms, and the second encryption algorithm used is a post-quantum encryption algorithm, such as the digital encryption algorithm based on algebraic lattices (Kyber). The security of the first encryption algorithm is enhanced by the post-quantum encryption algorithm, which not only meets the requirements of the security system but also adapts to the security of the post-quantum era.
[0096] The embodiment of the present application also provides another possible implementation of the collaborative encryption method through a method for determining a second collaborative encryption ciphertext. Figure 3 The third flowchart of a collaborative encryption method provided in an embodiment of the present application. Figure 4 A schematic diagram of determining a second collaborative encryption ciphertext provided in an embodiment of the present application. Figure 3 As shown, according to the second public key of the first client and the second public key of at least one second client, the second ciphertext component is collaboratively encrypted using a second encryption algorithm to obtain a second collaboratively encrypted ciphertext, including:
[0097] S301: Obtain a second public key of a first client and a second public key of at least one second client from a server.
[0098] In this embodiment, if Figure 4As shown, the first client user1 will register all the client user names (user1, user3, ..., user n ) is sent to the collaborative encryption center of the server, so that the server determines the second public keys of all clients according to the user names of all clients, that is, the second public key pk1 of the first client and the second public key of at least one second client (pk2, pk3, ..., pk n ).
[0099] The server determines the second public key pk1 of the first client and the second public key (pk2, pk3, ..., pk n ) is sent to the first client.
[0100] S302: Perform data segmentation on the second ciphertext component to obtain first data of the first client and second data of at least one second client.
[0101] Specifically, the first client performs data segmentation on the second ciphertext component f2 to obtain multiple data, the multiple data including: first data d1 of the first client, and second data (d2, d3, ..., d n ), where the second ciphertext component f2 is expressed as:
[0102] S303: Encrypt the first data using a post-quantum encryption algorithm according to the second public key of the first client to obtain a first collaborative ciphertext component.
[0103] The first client encrypts the first data d1 using a post-quantum encryption algorithm based on the second public key pk1 of the first client to obtain a first collaborative ciphertext component c1. The first collaborative ciphertext component c1 is expressed as: c1=enc(pk1,d1).
[0104] S304: Encrypt the second data of the at least one second client using a post-quantum encryption algorithm according to the second public key of the at least one second client to obtain at least one second collaborative ciphertext component.
[0105] Specifically, at least one second public key of a second client (pk2, pk3, ..., pk n ), and encrypt the corresponding second data (d2, d3, ..., d n ), obtain at least one second collaborative ciphertext component (c2, c3, ..., c n ).
[0106] S305 : Assemble the user name of the first client, the user name of at least one second client, the first collaborative ciphertext component, and the at least one second collaborative ciphertext component to obtain a second collaborative encrypted ciphertext.
[0107] Specifically, the first client has a username of user1 for the first client and a username of at least one second client (user2, user3, ..., user n ), a first collaborative ciphertext component c1 and at least one second collaborative ciphertext component (c2, c3, ..., c n ) to assemble and obtain the second collaborative encryption ciphertext qcc, which is expressed as: qcc=pack(user1,c1,…user n ,c n ).
[0108] In the method provided by the embodiment of the present application, the second public key of the first client and the second public key of at least one second client are obtained from the server, the second ciphertext component is split to obtain the first data of the first client and the second data of at least one second client, the first data is encrypted using a post-quantum encryption algorithm based on the second public key of the first client to obtain a first collaborative ciphertext component, the second data of at least one second client is encrypted using a post-quantum encryption algorithm based on the second public key of at least one second client to obtain at least one second collaborative ciphertext component, the user name of the first client, the user name of at least one second client, the first collaborative ciphertext component and the at least one second collaborative ciphertext component are assembled to obtain a second collaborative encrypted ciphertext. In this way, the second ciphertext component is collaboratively encrypted using a second encryption algorithm based on the second public key of the first client and the second public key of at least one second client to obtain a second collaborative encrypted ciphertext.
[0109] After the recipient receives the encrypted ciphertext sent by the sender, it also needs to decrypt the encrypted ciphertext. Therefore, an embodiment of the present application also provides a collaborative decryption method, which is applied to the first client in the collaborative encryption and decryption system. The collaborative decryption method provided by the embodiment of the present application is explained in detail below with specific examples in combination with the accompanying drawings. Figure 5 This is one of the flow charts of a collaborative decryption method provided in an embodiment of the present application; Figure 5 As shown, the method includes:
[0110] S401: Obtain ciphertext data to be decrypted.
[0111] In this embodiment, the first client is a client that receives ciphertext data to be decrypted in the collaborative encryption and decryption system. In this case, the first client serves as a receiver.
[0112] S402 : Decapsulate the ciphertext data to be decrypted to obtain a first collaboratively encrypted ciphertext to be decrypted and a second collaboratively encrypted ciphertext to be decrypted.
[0113] Since the ciphertext data to be decrypted is the ciphertext data obtained by concatenating and encapsulating the first collaboratively encrypted ciphertext to be decrypted and the second collaboratively encrypted ciphertext to be decrypted, after the first client receives the ciphertext data to be decrypted, it needs to decapsulate the ciphertext data to be decrypted to obtain the first collaboratively encrypted ciphertext to be decrypted cc' and the second collaboratively encrypted ciphertext to be decrypted qcc'.
[0114] S403 . Decrypt the first collaboratively encrypted ciphertext to be decrypted with at least one second client using a decryption algorithm of the first encryption algorithm based on their respective first private keys to obtain first collaboratively decrypted data.
[0115] Specifically, at least one second client is a client in the collaborative encryption and decryption system for collaborating with the first client to perform decryption, and the first encryption algorithm is a traditional asymmetric encryption algorithm that meets the security and compliance requirements of the cryptographic algorithm.
[0116] The first client and at least one second client decrypt the first collaborative encrypted ciphertext cc' to be decrypted using a decryption algorithm of the first encryption algorithm based on their respective first private keys to obtain first collaborative decrypted data f1'.
[0117] S404 : Decrypt the second collaboratively encrypted ciphertext to be decrypted with at least one second client using a decryption algorithm of the second encryption algorithm based on their respective second private keys to obtain second collaboratively decrypted data.
[0118] The first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms. The first client and at least one second client decrypt the second collaborative encrypted ciphertext qcc' to be decrypted using the decryption algorithm of the second encryption algorithm based on their respective second private keys to obtain second collaborative decrypted data f2'.
[0119] S405: Merge the first collaborative decryption data and the second collaborative decryption data to generate target plaintext data.
[0120] Specifically, the first client decrypts the first collaborative decryption data and the second collaborative decryption data using a threshold password and combines them to obtain target plaintext data.
[0121] In summary, an embodiment of the present application provides a collaborative decryption method, which is applied to a first client in a collaborative encryption and decryption system. The method includes: obtaining ciphertext data to be decrypted, decapsulating the ciphertext data to be decrypted, obtaining a first collaborative encrypted ciphertext to be decrypted and a second collaborative encrypted ciphertext to be decrypted, and decrypting the first collaborative encrypted ciphertext to be decrypted with at least one second client based on their respective first private keys using a decryption algorithm of a first encryption algorithm to obtain first collaborative decrypted data, and decrypting the second collaborative encrypted ciphertext to be decrypted with at least one second client based on their respective second private keys using a decryption algorithm of a second encryption algorithm to obtain second collaborative decrypted data; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms, respectively, and finally the first collaborative decrypted data and the second collaborative decrypted data are merged to generate target plaintext data. If an attacker needs to obtain the target plaintext data, he needs to obtain the first collaborative decrypted data and the second collaborative decrypted data at the same time, that is, he needs to crack the encryption mechanism of the first encryption algorithm and the second encryption algorithm at the same time. The method of the present application increases the difficulty of cracking and effectively ensures the security of plaintext data transmission.
[0122] Based on the collaborative decryption method provided in the above embodiment, the embodiment of the present application further provides another possible implementation of the collaborative decryption method by determining the method of the first collaborative decryption data. Figure 6 This is a second flow chart of a collaborative decryption method provided in an embodiment of the present application. Figure 6 As shown, with at least one second client, based on their respective first private keys, a decryption algorithm of the first encryption algorithm is used to decrypt the first collaborative encrypted ciphertext to be decrypted to obtain first collaborative decrypted data, including:
[0123] S501: Decrypt a first collaborative encrypted ciphertext to be decrypted using a decryption algorithm of a first encryption algorithm according to a first private key of a first client to obtain first decrypted intermediate data.
[0124] S502. Send the first first decrypted intermediate data to the first second client among the at least one second client, so that the first second client decrypts the first first decrypted intermediate data based on the first private key of the first second client using the decryption algorithm of the first encryption algorithm to obtain the second first decrypted intermediate data, and sends it to the next second client to continue processing using the decryption algorithm of the first encryption algorithm until the first decrypted intermediate data of the last second client is obtained.
[0125] S503: Generate first collaborative decryption data based on the first decrypted intermediate data of the last second client.
[0126] In this embodiment, the first client decrypts the first collaborative encrypted ciphertext to be decrypted according to the first private key of the first client using the decryption algorithm of the first encryption algorithm to obtain the first first decrypted intermediate data, and then sends the first first decrypted intermediate data to the first second client. The first second client continues to decrypt the first first decrypted intermediate data according to the first private key of the first second client using the decryption algorithm of the first encryption algorithm to obtain the second first decrypted intermediate data, until the first decrypted intermediate data of the last second client is obtained.
[0127] The first collaborative decryption data is determined according to the first decryption intermediate data of the last second client.
[0128] In the method provided in the embodiment of the present application, based on the first private key of the first client, the decryption algorithm of the first encryption algorithm is used to decrypt the first collaborative encrypted ciphertext to be decrypted to obtain the first first decrypted intermediate data, and the first first decrypted intermediate data is sent to the first second client among at least one second client, so that the first second client decrypts the first first decrypted intermediate data based on the first private key of the first second client using the decryption algorithm of the first encryption algorithm to obtain the second first decrypted intermediate data, and sends it to the next second client to continue to use the decryption algorithm of the first encryption algorithm for processing until the first decrypted intermediate data of the last second client is obtained, and finally, based on the first decrypted intermediate data of the last second client, the first collaborative decrypted data is generated. The first client and at least one second client realize that, based on their respective first private keys, the decryption algorithm of the first encryption algorithm is used to decrypt the first collaborative encrypted ciphertext to be decrypted to obtain the first collaborative decrypted data.
[0129] The embodiment of the present application also provides another possible implementation of the collaborative decryption method by determining the method of the second collaborative decryption data. Figure 7 This is a flowchart of a collaborative decryption method provided in an embodiment of the present application. Figure 7 As shown, with at least one second client, based on their respective second private keys, a decryption algorithm of the second encryption algorithm is used to decrypt the second collaborative encrypted ciphertext to be decrypted to obtain second collaborative decrypted data, including:
[0130] S601: Parse the second collaborative encrypted ciphertext to be decrypted to obtain a first collaborative ciphertext component to be decrypted of a first client, a second collaborative ciphertext component to be decrypted of at least one second client, a user name of the first client, and a user name of at least one second client.
[0131] In this embodiment, since the second decrypted collaborative encrypted ciphertext is pre-processed using the second encryption algorithm, and the first collaborative ciphertext component to be decrypted of the first client, the second collaborative ciphertext component to be decrypted of at least one second client, the user name of the first client, and the user name of at least one second client are spliced and encapsulated to obtain the collaborative encrypted ciphertext, the first client needs to parse the second collaborative encrypted ciphertext to be decrypted qcc' to obtain the first collaborative ciphertext component to be decrypted c1' of the first client, the second collaborative ciphertext component to be decrypted of at least one second client (c'2, c'3, ..., c' n ), the user name of the first client user1 'and at least one second client user name (user2 ', user3 ', ..., user n ').
[0132] S602. Send a first collaborative ciphertext component to be decrypted, at least one second collaborative ciphertext component to be decrypted, a user name of a first client, and a user name of at least one second client to the server, so that the server sends each client's collaborative ciphertext component to be decrypted and each client's random salt value ciphertext to each client.
[0133] The first client sends the first collaborative ciphertext component to be decrypted c1' of the first client, the second collaborative ciphertext component to be decrypted (c'2, c'3, ..., c' n ), the user name of the first client user1 'and at least one second client user name (user2 ', user3 ', ..., user n ') is sent to the collaborative encryption center of the server, so that the server can use the username of the first client user1' and the username of at least one second client (user2', user3', ..., user n ') Determine the random salt value ciphertext of each client, and send the collaborative ciphertext component to be decrypted of each client and the random salt value ciphertext of each client to each client.
[0134] Specifically, the collaborative encryption center on the server generates a random array (r1, r2, ..., r n ),and And use the public key of each client to encrypt the random number corresponding to each client, and obtain the random salt value ciphertext of each client (cr1, cr2, ..., cr n ).
[0135] S603: Obtain the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted, which are sent by the server.
[0136] S604 : Decrypt the first client's second private key, the random salt ciphertext, and the first collaborative ciphertext component to be decrypted using the decryption algorithm of the second encryption algorithm to obtain first second decrypted intermediate data.
[0137] Specifically, the first client decrypts the first second decrypted intermediate data e1 using the decryption algorithm of the second encryption algorithm according to the second private key sk1 of the first client, the random salt value ciphertext cr1 and the first collaborative ciphertext component to be decrypted c1'.
[0138] S605. Send the first second decrypted intermediate data to the first second client among at least one second client, so that the first second client decrypts its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data based on the second private key of the first second client using the decryption algorithm of the second encryption algorithm to obtain the second second decrypted intermediate data, and sends it to the next second client to continue processing using the decryption algorithm of the second encryption algorithm until the second decrypted intermediate data of the last second client is obtained.
[0139] Specifically, the first second client decrypts its own random salt value ciphertext cr2, its own second collaborative ciphertext component to be decrypted c'2 and the first second decrypted intermediate data e1 based on the second private key sk2 of the first second client, and obtains the second second decrypted intermediate data e2.
[0140] The next second client, i.e., the second second client, continues to use the decryption algorithm of the second encryption algorithm to process, that is, based on the second private key sk3 of the second second client, uses the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext cr3, its own second collaborative ciphertext component to be decrypted c'3 and the second second decrypted intermediate data e2, to obtain the third second decrypted intermediate data e3, until the second decrypted intermediate data e3 of the last second client is obtained. n .
[0141] S606: Generate second collaborative decryption data based on the second decryption intermediate data of the last second client.
[0142] Specifically, the last second client is based on the second private key sk of the last second client n , using the second encryption algorithm to decrypt its own random salt value ciphertext cr n , its own second collaborative ciphertext component to be decrypted c' n And the previous second decryption intermediate data e n-1 Decrypt and get the last second decryption intermediate data e n, that is, the second collaborative decrypted data f′2.
[0143] In the method provided in the embodiment of the present application, the second collaborative encrypted ciphertext to be decrypted is parsed to obtain the first collaborative ciphertext component to be decrypted of the first client, the second collaborative ciphertext component to be decrypted of at least one second client, the user name of the first client and the user name of at least one second client, and the first collaborative ciphertext component to be decrypted, at least one second collaborative ciphertext component to be decrypted, the user name of the first client and the user name of at least one second client are sent to the server, so that the server sends the collaborative ciphertext component to be decrypted of each client and the random salt value ciphertext of each client to each client, obtains the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted sent by the server, and according to the second private key of the first client, the random salt value ciphertext and the first collaborative ciphertext component to be decrypted are obtained. The first second decrypted intermediate data is sent to the first second client among at least one second client, so that the first second client decrypts its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted and the first second decrypted intermediate data based on the second private key of the first second client using the decryption algorithm of the second encryption algorithm to obtain the second second decrypted intermediate data, and sends it to the next second client to continue processing using the decryption algorithm of the second encryption algorithm until the second decrypted intermediate data of the last second client is obtained, and the second collaborative decrypted data is generated based on the second decrypted intermediate data of the last second client. The first client and at least one second client decrypt the second collaborative encrypted ciphertext to be decrypted using the decryption algorithm of the second encryption algorithm based on their respective second private keys to obtain the second collaborative decrypted data.
[0144] The embodiment of the present application also provides another possible implementation of the collaborative decryption method, wherein the second encryption algorithm is: a post-quantum encryption algorithm. Figure 8 This is a fourth flow chart of a collaborative decryption method provided in an embodiment of the present application. Figure 9 This is a schematic diagram of determining the second collaborative decryption data provided by an embodiment of the present application. Figure 8 As shown, according to the second private key of the first client, the random salt value ciphertext and the first collaborative ciphertext component to be decrypted, the decryption algorithm of the second encryption algorithm is used to decrypt to obtain the first second decrypted intermediate data, including:
[0145] S701. Decrypt the random salt value ciphertext and the first collaborative ciphertext component to be decrypted of the first client using the decryption algorithm of the second encryption algorithm according to the second private key of the first client to obtain the first random salt value and the first decrypted data of the first client.
[0146] In this embodiment, if Figure 9 As shown, the first client user1' decrypts the random salt value ciphertext cr1 and the first collaborative ciphertext component to be decrypted c′1 of the first client according to the second private key sk1 of the first client using the second encryption algorithm, that is, the decryption algorithm of the post-quantum encryption algorithm, to obtain the first random salt value r1' and the first decrypted data d1' of the first client, wherein the first random salt value r1' is expressed as: r1'=dec(sk1,cr1), and the first decrypted data d′1 of the first client is expressed as: d′1=dec(sk1,c′1).
[0147] S702: Perform an obfuscation operation on the first random salt value and the first decrypted data to obtain first decrypted obfuscated data of the first client.
[0148] Specifically, an XOR obfuscation operation is performed on the first random salt value r1' and the first decrypted data d1' to obtain the first decrypted obfuscated data m1 of the first client, wherein the first decrypted obfuscated data m1 is expressed as: m1=d1'⊕r1'.
[0149] S703: Encrypt the first decrypted obfuscated data according to the second public key of the first second client to obtain first second decrypted intermediate data.
[0150] Specifically, the first decrypted obfuscated data m1 is encrypted according to the second public key pk'2 of the first second client to obtain the first second decrypted intermediate data e1, wherein the first second decrypted intermediate data e1 is expressed as: e1 = enc(pk'2, m1).
[0151] The first second client is specifically used to: based on the second private key of the first second client, use the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data to obtain the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption; perform obfuscation operation on the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption to obtain the second decrypted obfuscated data of the first second client; encrypt the second decrypted obfuscated data of the first second client according to the second public key of the next second client to obtain the next second decrypted intermediate data, and send it to the next second client until the second decrypted intermediate data of the last second client is obtained.
[0152] Among them, the first second client uses the same method based on the second private key sk2 of the first second client, and uses the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext cr2, its own second collaborative ciphertext component to be decrypted c'2 and the first second decrypted intermediate data e1, to obtain the first second random salt value r2', the first second decrypted data d'2 and the decrypted first second intermediate data m1'.
[0153] An XOR obfuscation operation is performed on the first second random salt value r2', the first second decrypted data d'2 and the decrypted first second intermediate data m1' to obtain the second decrypted obfuscated data m2 of the first second client, wherein the second decrypted obfuscated data m2 is expressed as: m2 = m'1⊕d'2⊕r'2.
[0154] According to the second public key pk3' of the next second client, the second decrypted obfuscated data m2 of the first second client is encrypted to obtain the next second decrypted intermediate data e2, wherein the first second decrypted intermediate data e2 is expressed as: e2 = enc(pk′3, m2), and is sent to the next second client until the second decrypted intermediate data of the last second client is obtained.
[0155] Specifically, the last second client is based on the second private key sk of the last second client n , using the second encryption algorithm to decrypt its own random salt value ciphertext cr n , its own second collaborative ciphertext component to be decrypted c' n And the previous second decryption intermediate data e n-1 Decrypt and get the last second random salt value r n ', the last second decrypted data d' n And the second intermediate data m' before decryption n-1 , the second decrypted intermediate data of the last second client, namely the second collaborative decrypted data f2', is obtained. The second collaborative decrypted data f2' is expressed as:
[0156] If the decryption process is correct, then d1=d1',…d n =d' n ,r1=r1',…r n =r n ',Depend on It can be seen that f2'=f2.
[0157] In the method provided in the embodiment of the present application, according to the second private key of the first client, the decryption algorithm of the second encryption algorithm is used to decrypt the random salt value ciphertext and the first collaborative ciphertext component to be decrypted of the first client respectively to obtain the first random salt value and the first decrypted data of the first client, and the first random salt value and the first decrypted data are obfuscated to obtain the first decrypted obfuscated data of the first client. According to the second public key of the first second client, the first decrypted obfuscated data is encrypted to obtain the first second decrypted intermediate data; the first second client is specifically used to: based on the second private key of the first second client, use the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted and the first second decrypted intermediate data to obtain the first second random salt value, the first second decrypted data and the decrypted first second intermediate data; perform an obfuscation operation on the first second random salt value, the first second decrypted data and the decrypted first second intermediate data to obtain the second decrypted obfuscated data of the first second client; according to the second public key of the next second client, the second decrypted obfuscated data of the first second client is encrypted to obtain the next second decrypted intermediate data, and send it to the next second client until the second decrypted intermediate data of the last second client is obtained. Adding a random salt value during the decryption process can protect the security of each collaborative ciphertext component to be decrypted and prevent the collaborative ciphertext component from being leaked.
[0158] The following continues to explain the collaborative encryption device, collaborative decryption device, collaborative encryption and decryption system, and client provided for executing any of the above embodiments of this application. The specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, for the parts not mentioned in this embodiment, please refer to the corresponding content in the method embodiment.
[0159] Figure 10 A schematic diagram of the functional modules of a collaborative encryption device provided in an embodiment of the present application. A first client applied to a collaborative encryption and decryption system, such as Figure 10 As shown, the collaborative encryption device 100 includes:
[0160] An acquisition module 110 is used to obtain the plaintext data to be encrypted;
[0161] The splitting module 120 is used to perform encryption splitting processing on the encrypted plaintext data to obtain a first ciphertext component and a second ciphertext component;
[0162] An encryption module 130 is configured to collaboratively encrypt the first ciphertext component using a first encryption algorithm based on a first public key of the first client and a first public key of at least one second client to obtain a first collaboratively encrypted ciphertext;
[0163] The encryption module 130 is further configured to collaboratively encrypt the second ciphertext component using a second encryption algorithm based on the second public key of the first client and the second public key of at least one second client to obtain a second collaboratively encrypted ciphertext; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms;
[0164] The encapsulation module 140 is configured to encapsulate the first collaborative encryption ciphertext and the second collaborative encryption ciphertext to obtain a hybrid collaborative encryption ciphertext corresponding to the plaintext data to be encrypted.
[0165] Optionally, the encryption module 130 is also used to collaboratively encrypt the first ciphertext components according to the first public key of the first client and the first public key of at least one second client using the first encryption algorithm to obtain multiple first collaboratively encrypted ciphertext components; and assemble the multiple first collaboratively encrypted ciphertext components to obtain a first collaboratively encrypted ciphertext.
[0166] The encryption algorithm is a post-quantum encryption algorithm. Optionally, the encryption module 130 is also used to obtain the second public key of the first client and the second public key of at least one second client from the server; perform data segmentation on the second ciphertext component to obtain the first data of the first client and the second data of at least one second client; encrypt the first data using the post-quantum encryption algorithm according to the second public key of the first client to obtain a first collaborative ciphertext component; encrypt the second data of at least one second client using the post-quantum encryption algorithm according to the second public key of at least one second client to obtain at least one second collaborative ciphertext component; assemble the user name of the first client, the user name of at least one second client, the first collaborative ciphertext component and the at least one second collaborative ciphertext component to obtain a second collaborative encrypted ciphertext.
[0167] Optionally, the splitting module 120 is further configured to adopt a preset threshold encryption algorithm to perform encryption splitting processing on the encrypted plaintext data to obtain a first ciphertext component and a second ciphertext component.
[0168] Figure 11 A schematic diagram of the functional modules of a collaborative decryption device provided in an embodiment of the present application. A first client applied to a collaborative encryption and decryption system, such as Figure 11 As shown, the collaborative decryption device 200 includes:
[0169] An acquisition module 210 is used to obtain ciphertext data to be decrypted;
[0170] The decapsulation module 220 is configured to decapsulate the ciphertext data to be decrypted to obtain a first collaboratively encrypted ciphertext to be decrypted and a second collaboratively encrypted ciphertext to be decrypted;
[0171] The decryption module 230 is configured to decrypt the first collaborative encrypted ciphertext to be decrypted with at least one second client using a decryption algorithm of the first encryption algorithm based on the respective first private keys to obtain first collaborative decrypted data;
[0172] The decryption module 230 is further configured to decrypt the second collaborative encrypted ciphertext to be decrypted using a decryption algorithm of the second encryption algorithm based on the respective second private keys of the at least one second client to obtain second collaborative decrypted data; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms;
[0173] The merging module 240 is configured to merge the first collaborative decryption data and the second collaborative decryption data to generate target plaintext data.
[0174] Optionally, the decryption module 230 is also used to decrypt the first collaborative encrypted ciphertext to be decrypted based on the first private key of the first client using the decryption algorithm of the first encryption algorithm to obtain the first first decrypted intermediate data; send the first decrypted intermediate data to the first second client among at least one second client, so that the first second client decrypts the first first decrypted intermediate data based on the first private key of the first second client using the decryption algorithm of the first encryption algorithm to obtain the second first decrypted intermediate data, and sends it to the next second client to continue processing using the decryption algorithm of the first encryption algorithm until the first decrypted intermediate data of the last second client is obtained; generate the first collaborative decryption data based on the first decrypted intermediate data of the last second client.
[0175] Optionally, the decryption module 230 is further configured to parse the second to-be-decrypted collaborative encryption cipher text to obtain the first to-be-decrypted collaborative cipher text component of the first client, the second to-be-decrypted collaborative cipher text component of at least one second client, the username of the first client, and the username of at least one second client; send the first to-be-decrypted collaborative cipher text component, the second to-be-decrypted collaborative cipher text component, the username of the first client, and the username of at least one second client to the server, so that the server distributes the to-be-decrypted collaborative cipher text component of each client and the random salt value cipher text of each client to each client; obtain the random salt value cipher text of the first client and the first to-be-decrypted collaborative cipher text component distributed by the server; decrypt the first to-be-decrypted collaborative cipher text component and the random salt value cipher text of the first client according to the second private key of the first client, the random salt value cipher text, and the first to-be-decrypted collaborative cipher text component, to obtain the first second decryption intermediate data by using the decryption algorithm of the second encryption algorithm; send the first second decryption intermediate data to the first second client in the at least one second client, so that the first second client decrypts the random salt value cipher text of the first second client, the second to-be-decrypted collaborative cipher text component of the first second client, and the first second decryption intermediate data according to the second private key of the first second client by using the decryption algorithm of the second encryption algorithm, to obtain the second second decryption intermediate data, and send the second second decryption intermediate data to the next second client for further processing by using the decryption algorithm of the second encryption algorithm, until the second decryption intermediate data of the last second client is obtained; and generate the second collaborative decryption data based on the second decryption intermediate data of the last second client.
[0176] Optionally, the decryption module 230 is further configured to decrypt the random salt value cipher text of the first client and the first to-be-decrypted collaborative cipher text component according to the second private key of the first client by using the decryption algorithm of the second encryption algorithm, to obtain the first random salt value and the first decryption data of the first client; perform confusion operation on the first random salt value and the first decryption data, to obtain the first decryption confusion data of the first client; encrypt the first decryption confusion data according to the second public key of the first second client, to obtain the first second decryption intermediate data; and the first second client is specifically configured to decrypt the random salt value cipher text of the first second client, the second to-be-decrypted collaborative cipher text component of the first second client, and the first second decryption intermediate data according to the second private key of the first second client by using the decryption algorithm of the second encryption algorithm, to obtain the first second random salt value, the first second decryption data, and the decrypted first second intermediate data; perform confusion operation on the first second random salt value, the first second decryption data, and the decrypted first second intermediate data, to obtain the second decryption confusion data of the first second client; encrypt the second decryption confusion data of the first second client according to the second public key of the next second client, to obtain the next second decryption intermediate data, and send the next second decryption intermediate data to the next second client, until the second decryption intermediate data of the last second client is obtained.
[0177] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0178] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0179] The present application also provides a collaborative encryption and decryption system. The collaborative encryption and decryption system includes: multiple clients and a server, each of which is in communication with the server. Each of the multiple clients is in communication with the server, and each of the clients in the collaborative encryption and decryption system can execute a collaborative encryption method or a collaborative decryption method.
[0180] Figure 12 This is one of the schematic diagrams of a collaborative encryption and decryption system provided in an embodiment of the present application, such as Figure 12 As shown, the first client among multiple clients, at least one second client and the server jointly encrypt the plaintext data to be encrypted to obtain the mixed collaborative encryption ciphertext corresponding to the plaintext data to be encrypted. The specific encryption processing steps are recorded in detail in the above steps S101-S305 and will not be repeated here.
[0181] Figure 13 This is a second schematic diagram of a collaborative encryption and decryption system provided in an embodiment of the present application, as shown in FIG. Figure 13 As shown, the first client among the multiple clients, at least one second client and the server jointly decrypt the ciphertext data to be decrypted to obtain the target plaintext data. The specific processing steps are recorded in detail in the above steps S401-S703 and will not be repeated here.
[0182] Figure 14 This is a schematic diagram of a client provided in an embodiment of the present application, which can be used for collaborative encryption or collaborative decryption. Figure 14 As shown, the client includes: a processor 310 , a storage medium 320 , and a bus 330 .
[0183] Storage medium 320 stores machine-readable instructions executable by processor 310. When the client is running, processor 310 communicates with storage medium 320 via bus 330, and processor 310 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0184] Optionally, the present application further provides a storage medium 320 on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method embodiment are executed. The specific implementation and technical effects are similar and will not be repeated here.
[0185] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0186] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0187] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.
[0188] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0189] The above are only specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A collaborative encryption method, characterized in that: Applied to a first client in a collaborative encryption and decryption system, the method includes: Get the plaintext data to be encrypted; Performing encryption splitting processing on the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component; collaboratively encrypting the first ciphertext component using a first encryption algorithm according to the first public key of the first client and the first public key of at least one second client to obtain a first collaboratively encrypted ciphertext; collaboratively encrypting the second ciphertext component using a second encryption algorithm based on the second public key of the first client and the second public key of the at least one second client to obtain a second collaboratively encrypted ciphertext, wherein the first encryption algorithm and the second encryption algorithm are respectively two different asymmetric encryption algorithms; The first collaborative encryption ciphertext and the second collaborative encryption ciphertext are encapsulated to obtain a hybrid collaborative encryption ciphertext corresponding to the plaintext data to be encrypted.
2. The method according to claim 1, characterized in that The collaboratively encrypting the first ciphertext component using a first encryption algorithm according to the first public key of the first client and the first public key of at least one second client to obtain a first collaboratively encrypted ciphertext includes: collaboratively encrypting the first ciphertext components respectively using the first encryption algorithm according to the first public key of the first client and the first public key of the at least one second client to obtain a plurality of first collaboratively encrypted ciphertext components; The multiple first collaboratively encrypted ciphertext components are assembled to obtain the first collaboratively encrypted ciphertext.
3. The method according to claim 1, characterized in that The encryption algorithm is a post-quantum encryption algorithm, and the collaborative encryption of the second ciphertext component using a second encryption algorithm according to the second public key of the first client and the second public key of the at least one second client to obtain a second collaboratively encrypted ciphertext includes: Obtaining from the server the second public key of the first client and the second public key of the at least one second client; Performing data segmentation on the second ciphertext component to obtain first data of the first client and second data of the at least one second client; Encrypting the first data using the post-quantum encryption algorithm according to the second public key of the first client to obtain a first collaborative ciphertext component; Encrypting the second data of the at least one second client using the post-quantum encryption algorithm according to the second public key of the at least one second client to obtain at least one second collaborative ciphertext component; The user name of the first client, the user name of the at least one second client, the first collaborative ciphertext component, and the at least one second collaborative ciphertext component are assembled to obtain the second collaborative encrypted ciphertext.
4. The method according to claim 1, wherein The encryption splitting process of the plaintext data to be encrypted to obtain a first ciphertext component and a second ciphertext component includes: The preset threshold encryption algorithm is used to perform encryption splitting processing on the plaintext data to be encrypted to obtain the first ciphertext component and the second ciphertext component.
5. A collaborative decryption method, characterized in that: Applied to a first client in a collaborative encryption and decryption system, the method includes: Obtain the ciphertext data to be decrypted; Decapsulating the ciphertext data to be decrypted to obtain a first collaboratively encrypted ciphertext to be decrypted and a second collaboratively encrypted ciphertext to be decrypted; Decrypting the first collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of the first encryption algorithm with at least one second client based on their respective first private keys to obtain first collaboratively decrypted data; Decrypting the second collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of a second encryption algorithm with the at least one second client based on their respective second private keys to obtain second collaboratively decrypted data; the first encryption algorithm and the second encryption algorithm are two different asymmetric encryption algorithms; The first collaborative decryption data and the second collaborative decryption data are merged to generate target plaintext data.
6. The method according to claim 5, characterized in that The step of decrypting the first collaboratively encrypted ciphertext to be decrypted using a decryption algorithm of the first encryption algorithm based on the respective first private keys and at least one second client to obtain first collaboratively decrypted data includes: Decrypting the first collaborative encrypted ciphertext to be decrypted using the decryption algorithm of the first encryption algorithm according to the first private key of the first client to obtain first first decrypted intermediate data; Sending the first first decrypted intermediate data to a first second client among the at least one second client, so that the first second client decrypts the first first decrypted intermediate data using a decryption algorithm of the first encryption algorithm based on the first private key of the first second client to obtain second first decrypted intermediate data, and sending the second first decrypted intermediate data to a next second client to continue processing using the decryption algorithm of the first encryption algorithm, until obtaining the first decrypted intermediate data of the last second client; The first collaborative decryption data is generated based on the first decrypted intermediate data of the last second client.
7. The method according to claim 5, characterized in that The step of decrypting the second collaboratively encrypted ciphertext to be decrypted by the at least one second client using a decryption algorithm of a second encryption algorithm based on their respective second private keys to obtain second collaboratively decrypted data includes: Parsing the second collaborative encrypted ciphertext to be decrypted to obtain a first collaborative ciphertext component to be decrypted by the first client, a second collaborative ciphertext component to be decrypted by the at least one second client, a user name of the first client, and a user name of the at least one second client; Sending the first collaborative ciphertext component to be decrypted, at least one second collaborative ciphertext component to be decrypted, the user name of the first client, and the user name of the at least one second client to the server, so that the server sends the collaborative ciphertext component to be decrypted of each client and the random salt value ciphertext of each client to each client; Obtaining the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted, which are sent by the server; Decrypt the first client's second private key, the random salt ciphertext, and the first collaborative ciphertext component to be decrypted using the decryption algorithm of the second encryption algorithm to obtain first second decrypted intermediate data; Sending the first second decrypted intermediate data to a first second client among the at least one second client, so that the first second client decrypts its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data using a decryption algorithm of the second encryption algorithm based on the second private key of the first second client, to obtain second second decrypted intermediate data, and sending the second second decrypted intermediate data to a next second client to continue processing using the decryption algorithm of the second encryption algorithm, until the second decrypted intermediate data of the last second client is obtained; The second collaborative decryption data is generated based on the second decryption intermediate data of the last second client.
8. The method according to claim 7, characterized in that The method of decrypting the first client's second private key, the random salt ciphertext, and the first collaborative ciphertext component to be decrypted using the decryption algorithm of the second encryption algorithm to obtain first second decrypted intermediate data includes: Decrypting the random salt value ciphertext of the first client and the first collaborative ciphertext component to be decrypted respectively using the decryption algorithm of the second encryption algorithm according to the second private key of the first client to obtain a first random salt value and first decrypted data of the first client; Performing an obfuscation operation on the first random salt value and the first decrypted data to obtain first decrypted obfuscated data of the first client; Encrypting the first decrypted obfuscated data according to the second public key of the first second client to obtain the first second decrypted intermediate data; The first second client is specifically used to: based on the second private key of the first second client, use the decryption algorithm of the second encryption algorithm to decrypt its own random salt value ciphertext, its own second collaborative ciphertext component to be decrypted, and the first second decrypted intermediate data to obtain the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption; perform an obfuscation operation on the first second random salt value, the first second decrypted data, and the first second intermediate data after decryption to obtain the second decrypted obfuscated data of the first second client; encrypt the second decrypted obfuscated data of the first second client according to the second public key of the next second client to obtain the next second decrypted intermediate data, and send it to the next second client until the second decrypted intermediate data of the last second client is obtained.
9. A collaborative encryption and decryption system, characterized in that: The collaborative encryption and decryption system includes: multiple clients and servers, the multiple clients are respectively communicated with the servers, the multiple clients are communicated, and each client is used to execute the steps of the collaborative encryption method as described in any one of claims 1 to 4, or execute the steps of the collaborative decryption method as described in any one of claims 5 to 8.
10. A client, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the client runs, the processor and the storage medium communicate through the bus, and the processor executes the steps of the collaborative encryption method as described in any one of claims 1 to 4, or executes the steps of the collaborative decryption method as described in any one of claims 5 to 8.
Citation Information
Patent Citations
SM2 algorithm collaborative signature and decryption method, device and system
CN109672539A
Data processing method and device, equipment and medium
CN116980116A