A dynamic multi-party signature encryption and decryption method and system
By deploying dynamic signature contracts on the blockchain, the problem of uncomfortable transaction information in the existing technology has been solved, and the flexible decryption of multiple users of the same transaction information has been realized, and the security and reliability of privacy protection have been improved. sex.
Patent Information
- Application Number
- CN202110348845.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2041-03-31
AI Technical Summary
In the prior art, the method of encrypting and decrypting transaction information is not flexible, and it is limited to the encryption and decrypting of individual transaction information by individual users. It is impossible to encrypt and decrypt the same transaction information by multiple users, and the security and reliability of privacy protection are low.
By deploying a dynamic signature contract in advance on the blockchain, the contract is called to verify the signature of the multi -party encryption request, and the chain public key on multiple users can establish a multi -party signature function to generate multi -party encryption string to jointly decrypt the transaction information.
A number of users have achieved flexible decryption of the same transaction information, the scope of applications is wide, the privacy protection is flexible, and the flexibility and security of adding decryption have been improved.
Smart Images

Figure CN112906041B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain, and in particular relates to a dynamic multi-party signature encryption and decryption method and system. Background Art
[0002] Blockchain technology has been applied to many scenarios in real life. In terms of information technology, based on blockchain technology, many functions in real life have been realized by utilizing its characteristics such as non-forgeability, full traceability, traceability, openness and transparency, and collective maintenance. It not only provides safe and reliable guarantees, but also greatly facilitates all aspects of real life. However, in real life, transaction information often carries private information. Therefore, there is a need to encrypt and decrypt transaction information in different scenarios to protect privacy.
[0003] However, in the prior art, the encryption and decryption methods of transaction information have the following defects: limited privacy protection and usage scenarios. Only a single user can encrypt and decrypt a single transaction information, and multiple users cannot encrypt and decrypt the same transaction information, and privacy protection cannot be performed in a limited manner; the encryption and decryption method is unique, the privacy protection scope is fixed, cannot be changed or adjusted, cannot be changed dynamically, and is limited to adapting to scenarios; for transaction information with audit requirements, once the information is encrypted, it is very inconvenient for the audit operation, causing unnecessary trouble; the security and reliability of privacy protection are low, and there are risks of leakage, malicious acts, and tampering. Summary of the invention
[0004] The present invention provides a dynamic multi-party signature encryption and decryption method and system to solve the technical problems of inflexibility and limitation of transaction information encryption and decryption.
[0005] To solve the above problems, the technical solution of the present invention is:
[0006] A dynamic multi-party signature encryption and decryption method comprises the following steps:
[0007] Receiving a multi-party encryption request, where the multi-party encryption request is a request from multiple users to jointly encrypt the same transaction information;
[0008] Call the dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string;
[0009] Among them, any one or multiple on-chain private keys or all on-chain private keys of multiple users are input into the multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information.
[0010] According to an embodiment of the present invention, decrypting the transaction information further includes:
[0011] Receive multi-party decryption requests, which include any one or more on-chain private keys or all on-chain private keys;
[0012] Call the dynamic multi-party signature contract to verify the signature of the multi-party decryption request. After the verification is passed, the dynamic multi-party signature contract will input any one chain private key or multiple chain private keys or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypt the transaction information through the multi-party encrypted string.
[0013] According to an embodiment of the present invention, decrypting the transaction information further includes:
[0014] Receive a super decryption request signed by the super private key of the audit subject;
[0015] Call the super contract pre-deployed on the blockchain to verify the signature of the super decryption request. After the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string.
[0016] According to one embodiment of the present invention, each user who jointly encrypts transaction information includes at least an audit subject with audit qualifications, wherein a multi-party signature function is established to generate a multi-party encrypted string by obtaining the on-chain public keys of multiple users and the on-chain public keys of the audit subject through a dynamic multi-party signature contract.
[0017] According to an embodiment of the present invention, the following steps are also included:
[0018] Receiving an encryption change request, which is a request to add or delete a common encryption user for the same transaction information;
[0019] The dynamic multi-party signature contract is called to verify the signature of the encryption change request. After the verification is passed, the dynamic multi-party signature contract re-acquires the user's on-chain public key after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-encrypts the transaction information through the new multi-party encryption string.
[0020] According to one embodiment of the present invention, the on-chain private key is generated by the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the user's off-chain private key, and the on-chain public key and on-chain address of the user in the blockchain are generated by the user's on-chain private key to realize the identity binding of the user on and off the chain.
[0021] According to one embodiment of the present invention, a user applies to a CA organization and undergoes identity authentication. After the authentication is passed, an off-chain public key is allocated, and the off-chain public key is bound to the user's identity information, and a CA certificate and an off-chain private key are generated through an off-chain digital signature.
[0022] A dynamic multi-party signature encryption and decryption system, comprising:
[0023] A receiving module, used to receive a multi-party encryption request, where the multi-party encryption request is a request from multiple users to jointly encrypt the same transaction information;
[0024] The encryption module is used to call the dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string;
[0025] The decryption module is used to input any one or multiple or all of the on-chain private keys of multiple users into the multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information.
[0026] According to an embodiment of the present invention, the decryption module includes a multi-party decryption submodule;
[0027] The receiving module is further used to receive a multi-party decryption request, where the multi-party decryption request includes any one chain private key or multiple chain private keys or all chain private keys;
[0028] The multi-party decryption submodule is used to call the dynamic multi-party signature contract and verify the signature of the multi-party decryption request. After the verification is passed, the dynamic multi-party signature contract inputs any one chain private key or multiple chain private keys or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string.
[0029] According to an embodiment of the present invention, the decryption module includes a super decryption submodule;
[0030] The receiving module is also used to receive a super decryption request signed by the super private key of the audit subject;
[0031] The super decryption submodule is used to call the super contract pre-deployed on the blockchain and verify the signature of the super decryption request. After the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string.
[0032] According to one embodiment of the present invention, each user who jointly encrypts transaction information includes at least an audit subject with audit qualifications, wherein the encryption module is used to obtain the on-chain public keys of multiple users and the on-chain public keys of the audit subject through a dynamic multi-party signature contract to establish a multi-party signature function to generate a multi-party encrypted string.
[0033] According to an embodiment of the present invention, it also includes a change module;
[0034] The receiving module is also used to receive an encryption change request, which is a request to add or delete a common encryption user of the same transaction information;
[0035] The change module is used to call the dynamic multi-party signature contract to verify the signature of the change encryption request. After the verification is passed, the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-encrypts the transaction information through the new multi-party encryption string.
[0036] According to an embodiment of the present invention, it also includes an on-chain and off-chain binding module and an off-chain identity module;
[0037] The on-chain binding module is used to generate an on-chain private key through the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the off-chain private key of the user, and the on-chain public key and on-chain address of the user in the blockchain are generated through the on-chain private key of the user, so as to realize the identity binding between the user on the chain and the off-chain;
[0038] The off-chain identity module is used by users to apply to the CA organization and undergo identity authentication. After the authentication is passed, an off-chain public key is assigned, and the off-chain public key is bound to the user's identity information. The CA certificate and off-chain private key are generated through the off-chain digital signature.
[0039] A computer device includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the above-mentioned dynamic multi-party signature encryption and decryption method.
[0040] A storage medium storing computer-readable instructions, when the computer-readable instructions are executed by one or more processors, enables the one or more processors to execute the above-mentioned dynamic multi-party signature encryption and decryption method.
[0041] Compared with the prior art, the present invention has the following advantages and positive effects:
[0042] 1) The present invention pre-deploys a dynamic multi-party signature contract on the blockchain, and calls the dynamic multi-party signature contract through a multi-party encryption request to jointly encrypt the same transaction information, wherein a multi-party signature function is established based on the on-chain public keys of multiple common users to generate a multi-party encrypted string to encrypt the transaction information, so as to realize the common privacy protection of the same transaction information by multiple users, and external users cannot read it directly; during decryption, there are multiple ways to restore the multi-party encrypted string through the multi-party signature function, and the decryption can be restored based on any on-chain private key of multiple users, that is, any user can unilaterally perform the decryption, and the decryption can be restored based on multiple on-chain private keys of multiple users, that is, the decryption requires multiple users to perform it together, and the decryption can also be restored based on all on-chain private keys of multiple users, that is, the decryption requires all users to perform it together, thus solving the technical problems of inflexibility and limitation of encryption and decryption of transaction information, and achieving the technical effect of wide application range and flexible privacy protection;
[0043] 2) The present invention pre-deploys a super contract on the blockchain, and calls the super contract through a super decryption request to decrypt any multi-party encrypted transaction information. The super contract is configured on the basis of a dynamic multi-party signature contract. In this way, decryption can be performed as long as the super private key of the audit subject is used, which can ensure that the super private key of the audit subject can see all information. Similarly, for each user with common transaction information, the on-chain public key of the audit subject can be added to the on-chain public keys of multiple users to establish a multi-party signature function. In this way, the audit subject can realize the decryption of each transaction information. The above two implementation methods are convenient for the disclosure of information of audit operations, and achieve the technical effect of wide application range and flexible privacy protection.
[0044] 3) The present invention can re-encrypt the already jointly encrypted transaction information by calling the dynamic multi-party signature contract through the change encryption request, wherein the change encryption request contains the information of the added or deleted jointly encrypted users, and the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encrypted string, and re-encrypts the transaction information. In this way, the dynamic adjustment of multi-party signature encryption and decryption is realized, that is, the user scope of privacy protection is adjusted, which greatly improves the flexibility of encryption and decryption;
[0045] 4) The on-chain private key in the dynamic multi-party signature encryption and decryption of the present invention is generated by the off-chain private key issued by the user's CA certificate, which realizes the identity binding of the user on the chain and off the chain, ensures the credibility of the on-chain transaction information, reduces the risk of tampering, malicious or leakage, and further improves the security and reliability of the privacy protection of multi-party signature encryption and decryption. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the following detailed description of the preferred embodiment.The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting the invention.
[0047] Figure 1 This is an overall flow chart of a dynamic multi-party signature encryption and decryption method in one embodiment of the present invention;
[0048] Figure 2 The following is an encryption flow chart of a dynamic multi-party signature encryption and decryption method according to an embodiment of the present invention;
[0049] Figure 3a ~c is a decryption flow chart of a dynamic multi-party signature encryption and decryption method in one embodiment of the present invention;
[0050] Figure 4 A super private key decryption flow chart of a dynamic multi-party signature encryption and decryption method in one embodiment of the present invention;
[0051] Figure 5 This is a flowchart of on-chain and off-chain identity binding of a dynamic multi-party signature encryption and decryption method in one embodiment of the present invention;
[0052] Figure 6 The figure is an overall structural block diagram of a dynamic multi-party signature encryption and decryption system in one embodiment of the present invention.
[0053] Description of reference numerals:
[0054] 1-receiving module; 2-encryption module; 3-decryption module; 31-multi-party decryption submodule; 32-super decryption submodule; 4-change module; 5-on-chain and off-chain binding module; 6-off-chain identity module. DETAILED DESCRIPTION
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.
[0056] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0057] Simply put, blockchain is a decentralized distributed ledger database. Blockchain technology is essentially a database technology. Each block is like a hard drive, which stores all the information and encrypts it through cryptography. The stored information cannot be tampered with. Blockchain has the characteristics of decentralization, openness, independence, security, and anonymity, and can be applied to many aspects of life. In response to the needs of different scenarios, some transaction data in the blockchain needs to be protected for privacy. It is necessary to protect the privacy of both single users and user groups. At the same time, privacy protection must be flexible and scalable to meet the needs of privacy protection in different scenarios.
[0058] First embodiment
[0059] See also Figure 1 , the present application provides a dynamic multi-party signature encryption and decryption method, comprising the following steps:
[0060] Receiving a multi-party encryption request, where the multi-party encryption request is a request from multiple users to jointly encrypt the same transaction information;
[0061] Call the dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string;
[0062] Among them, any one or multiple on-chain private keys or all on-chain private keys of multiple users are input into the multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information.
[0063] This embodiment is now described in detail, but is not limited thereto.
[0064] This embodiment implements dynamic multi-party signature encryption and decryption on the blockchain through a dynamic multi-party signature contract, and is applied to blockchain nodes. A node refers to a terminal in the blockchain network that is responsible for maintaining the operation of the network. It can be a mobile phone, a mining machine, a server, a computer, etc. These terminals can use the method of this application to implement encryption and decryption of transaction information on the chain.
[0065] The dynamic multi-party signature contract of this embodiment is a smart contract pre-deployed on the blockchain. The dynamic multi-party signature contract pre-declares the logic of the specific steps of dynamic multi-party signature encryption and decryption corresponding to the method of this embodiment. Calling the dynamic multi-party signature contract is to call the step logic declared in the dynamic multi-party signature contract to perform specific information encryption and decryption. Among them, the smart contract is a special protocol designed to provide, verify and execute contracts. Specifically, smart contracts are an important reason why blockchain is called "decentralized". It allows us to perform traceable, irreversible and secure transactions without the need for a third party. Smart contracts contain all information about the transaction and will only execute the result operation after the requirements are met. The difference between smart contracts and traditional paper contracts is that smart contracts are generated by computers. Smart contracts are written and operated according to the logic of the function. Smart contracts used by blockchain networks, as long as the input requirements are met, that is, as long as the requirements for code writing are met, the obligations in the contract will be executed in a secure and trusted network.
[0066] 1) This embodiment receives a multi-party encryption request, which is a request from multiple users to jointly encrypt the same transaction information.
[0067] The multi-party encryption request received in this embodiment is a request generated and sent by multiple users with joint signatures. Multiple users can initiate multi-party encryption requests through the application provided by the client connected to their respective blockchain nodes. The multi-party encryption request is a request for multiple users to jointly encrypt the same transaction information. Among them, the signature of the multi-party encryption request is signed by the on-chain private key of each user. Specifically, a hash value can be calculated for the multi-party encryption request, and then the signature of the information is realized by encrypting it through the on-chain private key of each user. The multi-party encryption request may include the object to be encrypted, the jointly encrypted user information, and the encryption and decryption method. The specific encryption and decryption method, for example, can be any one of the jointly encrypted users can decrypt separately, or the jointly encrypted users can only decrypt with the consent of at least two or more users, or the jointly encrypted users can only decrypt with the consent of all users, so that the subsequent steps are performed according to different encryption and decryption methods, presenting different privacy protection methods.
[0068] 2) See Figure 2 In this embodiment, a dynamic multi-party signature contract pre-deployed on the blockchain is called to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string.
[0069] The dynamic multi-party signature contract deployed on the blockchain in this embodiment declares the encryption logic steps corresponding to the multi-party encryption request. Among them, the dynamic multi-party signature contract first performs signature verification to verify whether the on-chain private key in the multi-party encryption request matches the on-chain public key on the blockchain. Specifically, after receiving the sent multi-party encryption request, the dynamic multi-party signature contract uses the user's on-chain public key to decrypt the corresponding hash value encrypted by the above-mentioned on-chain private key, and compares the result of the on-chain public key decryption with the initial hash value. If the two match, the verification is passed and the encryption step is performed through the dynamic multi-party signature contract.
[0070] After the signature verification of the multi-party encryption request is passed, the dynamic multi-party signature contract of this embodiment obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string. In some embodiments, a point R and a scalar s are used instead of two scalars (r, s). R is a random point on the elliptic curve (R=K×G). s=k+hash(P,R,m)·pk. Here, pk is the private key, P=pk×G is the public key, and m is the message. The signature can be verified by checking s×G=R+hash(P,R,m)×P. Since the equation is linear, the equations can be added and subtracted from each other and still valid. By using a multi-party signature function, all signature verification equations can be added together. Since the verification equation is linear, as long as all signatures are valid, the sum of several equations is valid. For example, assuming that 10 signatures are required, it is necessary to verify:
[0071] (s1+s2+…+s10)×G=(R1+…+R10)+(hash(P1,R1,m1)×P1+hash(P2,R2,m2)×P2+…+hash(P10,R10,m10)×P10)
[0072] According to the above principle, it is possible to jointly encrypt transaction information through a multi-party encrypted string. There are multiple implementations of the multi-party signature function based on the on-chain public keys of multiple users. In the first implementation, see Figure 3a , just input any one of the multiple users' on-chain private keys, and the multi-party signature function can restore the multi-party encrypted string, so that separate decryption can be achieved. In the second implementation, see Figure 3b , the on-chain private keys of at least two of the multiple users need to be input, and the multi-party signature function can restore the multi-party encrypted string. The decryption requirements are higher and the reliability of privacy protection is better. In the third implementation method, see Figure 3c, it is necessary to input all the on-chain private keys of the multiple users, and the multi-party signature function can restore the multi-party encrypted string. The decryption requirement is relatively high, and the reliability of privacy protection is relatively good. This embodiment establishes the input-output relationship between the user's on-chain private key and the multi-party encrypted string through the multi-party signature function, and realizes the joint encryption of the same transaction information by multiple users through the multi-party encrypted string, which meets the needs of different scenarios and has a wider range of applications.
[0073] 3) Based on the above different input and output methods, it is possible to input any one or multiple or all of the on-chain private keys of multiple users into a multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information.
[0074] See also Figures 3a to 3c In this embodiment, decrypting the transaction information further includes: receiving a multi-party decryption request, the multi-party decryption request includes any one chain private key or multiple chain private keys or all chain private keys; calling a dynamic multi-party signature contract to verify the signature of the multi-party decryption request, and after the verification is passed, the dynamic multi-party signature contract inputs any one chain private key or multiple chain private keys or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string.
[0075] The multi-party decryption request received in this embodiment can be a request generated and sent by a single or multiple user signatures. Users can initiate multi-party decryption requests through the application provided by the client connected to their respective blockchain nodes. The multi-party decryption request is a request for a single or multiple users to decrypt a transaction information. Among them, the multi-party encryption request can include any one chain private key, multiple chain private keys, or all chain private keys, which correspond to the above-mentioned different decryption methods to achieve different degrees of privacy protection.
[0076] The dynamic multi-party signature contract deployed on the blockchain in this embodiment declares the decryption logic steps corresponding to the multi-party decryption request. Specifically, the dynamic multi-party signature contract first performs signature verification to verify whether the on-chain private key in the multi-party encryption request matches the on-chain public key on the blockchain. The specific verification method is referred to the previous text and will not be repeated here. After the signature verification of the multi-party decryption request is passed, the dynamic multi-party signature contract of this embodiment inputs any one on-chain private key or multiple on-chain private keys or all on-chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string. Among them, there are also multiple decryption methods corresponding to the above-mentioned multi-party signature function. Therefore, the dynamic multi-party signature contract decrypts specifically according to the input requirements of the multi-party signature function corresponding to the encrypted transaction information. Specifically, refer to Figure 3a , input any one of the multiple users' on-chain private keys to perform unilateral decryption, see Figure 3b , multiple private keys on the chain from multiple users can be input for multi-party decryption, see Figure 3c , inputting all the on-chain private keys of multiple users can perform overall decryption, meet the needs of different scenarios, and have a wider range of applications.
[0077] In this embodiment, a dynamic multi-party signature contract is pre-deployed on the blockchain, and the dynamic multi-party signature contract is called through a multi-party encryption request to jointly encrypt the same transaction information. Specifically, a multi-party signature function is established based on the on-chain public keys of multiple common users to generate a multi-party encrypted string to encrypt the transaction information, so as to realize the common privacy protection of the same transaction information by multiple users, and external users cannot read it directly. During decryption, there are multiple ways to restore the multi-party encrypted string through the multi-party signature function. The decryption can be restored based on any on-chain private key of multiple users, that is, any user can unilaterally perform the decryption, and the decryption can be restored based on multiple on-chain private keys of multiple users, that is, the decryption requires multiple users to perform it together, and the decryption can also be restored based on all on-chain private keys of multiple users, that is, the decryption requires all users to perform it together. In this way, the technical problems of inflexibility and limitation of encryption and decryption of transaction information are solved, and the technical effect of wide application range and flexible privacy protection is achieved.
[0078] 4) Preferably, this embodiment can also realize the adjustment of specific users and decryption methods for the joint encryption of transaction information through a multi-party signature function, wherein this embodiment also includes: receiving an encryption change request, the encryption change request is a request to add or delete a joint encryption user of the same transaction information; calling a dynamic multi-party signature contract to verify the signature of the encryption change request, and after the verification is passed, the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-jointly encrypts the transaction information through the new multi-party encryption string.
[0079] The encryption change request received in this embodiment may be a request generated and sent for a single or multiple user signatures. The user may initiate an encryption change request through an application provided by a client connected to each blockchain node. The encryption change request is a request to add or delete common encryption users for the same transaction information, or to adjust a multi-party signature function.
[0080] The dynamic multi-party signature contract deployed on the blockchain in this embodiment declares that there is a re-encryption logic step corresponding to the encryption change request. Specifically, the dynamic multi-party signature contract first performs signature verification to verify whether the on-chain private key in the encryption change request matches the on-chain public key on the blockchain. The specific verification method is referred to the previous text and will not be repeated here. After the signature verification of the encryption change request is passed, the dynamic multi-party signature contract of this embodiment re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, or establishes a new multi-party signature function based on the on-chain public keys of the original multiple users to generate a new multi-party encryption string, so as to realize the re-encryption of the transaction information, thereby changing the specific user adjustment of the common encryption, or changing the multi-party signature function to adjust the decryption method.
[0081] The above encryption change request process is explained with some specific cases:
[0082] For example, the transaction information was originally encrypted by users A and B, and any user can use their on-chain private key to decrypt it. Now user C needs to be added to realize dynamic adjustment of transaction information encryption. Specifically, by sending an encryption change request to call the dynamic multi-party signature contract to re-establish a new multi-party signature function of the same type based on the on-chain public keys of users A, B, and C, and generate a new multi-party encrypted string to re-encrypt the transaction information. In this way, user C can also use his on-chain private key to decrypt it, which realizes the dynamic adjustment of the co-encrypted users of the transaction information. The on-chain address can authorize other addresses to view their private content according to business needs, which can not only protect their own privacy, but also meet the business needs of the scenario.
[0083] Preferably, the encryption change request also includes a change time limit, that is, the dynamic adjustment of the encryption and decryption of the transaction information is time-limited, and the transaction information will be restored to its original encryption and decryption state after the specified time is exceeded. Specifically, based on the above example of dynamically adjusting the co-encryption user of the transaction information, it is now necessary to add user C so that it can decrypt the transaction information within a specified period of time. The dynamic multi-party signature contract will add a time limit to the re-encryption operation, and after the predetermined time period has passed, the encryption and decryption state of the original transaction information will be restored.
[0084] For another example, the transaction information was originally encrypted by users A and B, and any user can use their on-chain private key to decrypt it. Now the decryption method needs to be adjusted so that it can only be decrypted based on the on-chain private keys of both A and B. Specifically, by sending an encryption change request to call the dynamic multi-party signature contract to re-establish another type of multi-party signature function based on the on-chain public keys of users A and B, and generate a new multi-party encrypted string to re-encrypt the transaction information. It is worth noting that the input and output relationship of the new multi-party signature function has been adjusted to require the input of the on-chain private keys of both users A and B to restore the multi-party encrypted string. In this way, the decryption method of the transaction information is dynamically adjusted, and the on-chain address can change the way to view private content according to business needs, thereby greatly improving the security of privacy protection.
[0085] In this embodiment, the already jointly encrypted transaction information can be re-encrypted by calling the dynamic multi-party signature contract through the encryption request change, wherein the encryption request change contains information of the added or deleted jointly encrypted users, and the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encrypted string, and re-encrypts the transaction information. In this way, dynamic adjustment of multi-party signature encryption and decryption is achieved, that is, the user scope of privacy protection is adjusted, which greatly improves the flexibility of encryption and decryption.
[0086] 5) To facilitate the audit subject's review of transaction information in an audit scenario, two implementation methods are proposed in this embodiment:
[0087] In one embodiment, see Figure 4 In this embodiment, a super contract is pre-deployed on the basis of a dynamic multi-party signature contract. The super contract is a smart contract pre-deployed on the blockchain. The super contract pre-declares the logic of the specific decryption steps of the audit subject corresponding to the method of this embodiment. Calling the super contract is to call the step logic declared in the super contract to perform a specific decryption operation. Among them, decrypting the transaction information further includes: receiving a super decryption request signed by the super private key of the audit subject; calling the super contract pre-deployed on the blockchain, verifying the signature of the super decryption request, and after the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string.
[0088] This embodiment uses a super contract to force all information on the chain to be confidential to the audit subject. In this way, any information can be read without authorization from anyone. For example, the original dynamic multi-party signature contract stipulates that three users need the on-chain private keys of two of them to decrypt. The audit subject calls the super contract through a super unlock request signed by a super private key, and directly obtains the multi-party encrypted string that encrypts the transaction information in the dynamic multi-party signature contract to realize the decryption of the transaction information. That is, as long as the super private key of the audit subject is used, it can be decrypted, which can ensure that the super private key of the audit subject can see all the information.
[0089] In this embodiment, a super contract is pre-deployed on the blockchain, and the super contract is called through a super decryption request to decrypt any multi-party encrypted transaction information. The super contract is configured on the basis of a dynamic multi-party signature contract. In this way, decryption can be performed as long as the super private key of the audit subject is used, which can ensure that the super private key of the audit subject can see all information. Similarly, for each user with common transaction information, the on-chain public key of the audit subject can be added to the on-chain public keys of multiple users to establish a multi-party signature function. In this way, the audit subject can realize the decryption of each transaction information. The above two implementation methods are convenient for the disclosure of information of audit operations, and achieve the technical effect of wide application range and flexible privacy protection.
[0090] In another embodiment, each user who jointly encrypts the transaction information of this embodiment includes at least an audit subject with audit qualifications, wherein the on-chain public keys of multiple users and the on-chain public keys of the audit subject are obtained through a dynamic multi-party signature contract to establish a multi-party signature function to generate a multi-party encrypted string. Specifically, the audit subject with audit qualifications is added to the jointly encrypted users, so that the multi-party signature function is established based on the on-chain public keys of multiple users and the on-chain public keys of the audit subject. In this way, the encrypted transaction information can be input into the multi-party signature function by its own on-chain private key to restore the multi-party encrypted string, thereby decrypting the transaction information.
[0091] In the above two methods of this embodiment, the audit subject does not need to provide a private key. As long as the public key is provided and then signed with its own private key, all transaction information on the chain can be decrypted.
[0092] 6) Preferably, see Figure 5In this embodiment, the on-chain private key is generated by the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the off-chain private key of the user, and the on-chain public key and on-chain address of the user in the blockchain are generated by the on-chain private key of the user to realize the identity binding between the user on the chain and the off-chain. Among them, the user applies to the CA organization and passes the identity authentication, and after the authentication is passed, an off-chain public key is allocated, and the off-chain public key is bound to the user's identity information, and the CA certificate and off-chain private key are generated by the off-chain digital signature.
[0093] Specifically, see Figure 5 , the user applies to the trusted CA institution, and the CA determines the identity of the user, for example, through face recognition, mobile phone number recognition, business information recognition and other methods to authenticate the user's identity, and then assigns an off-chain public key to the user, and binds the off-chain public key with the user's identity information, and uses digital signature technology off-chain to generate a CA certificate for the user. The trusted CA institution also generates an off-chain private key for the user, and the off-chain public key is stored on the CA institution side. The user uses the off-chain private key to sign the file, and can query the off-chain public key from the CA institution, and use the off-chain public key to verify the file to confirm whether it is issued by the user himself. In this embodiment, according to the off-chain private key issued by the CA certificate, an irreversible mapping method is used, such as one or more hash operations, or a combination of different hash operations, or other irreversible mathematical calculation methods, to map the CA off-chain private key to the on-chain private key, and then the on-chain private key is used to generate the on-chain public key through an irreversible mathematical calculation method, and then the on-chain address is generated according to the on-chain public key, so as to realize the on-chain and off-chain binding of the user's blockchain identity. In this way, the off-chain private key and on-chain private key of the CA certificate are only kept by the user himself, and the actions occurring at the on-chain address, such as transactions generated by the on-chain address and information sent and received, are all considered to be actions occurring at the user himself.
[0094] Through the above steps, the on-chain private key does not need to be generated by the chain, but is irreversibly generated based on the private key of the trusted CA certificate, realizing the binding of the user identity on and off the chain. In addition, due to the use of the CA certificate, the user's real-name information can be hidden from the chain, and the authenticity of the transaction can be verified without exposing the identity of the transaction party. Only by querying the CA organization or through the highest authority audit method can the user's information be known. Since the CA organization is trustworthy, there is no risk of tampering, malicious or leakage, ensuring the credibility of the on-chain address transaction.
[0095] In this embodiment, the on-chain private key in the dynamic multi-party signature encryption and decryption is generated through the off-chain private key issued by the user's CA certificate, which realizes the identity binding of the user on the chain and off the chain, ensures the credibility of the on-chain transaction information, reduces the risk of tampering, malicious or leakage, and further improves the security and reliability of the privacy protection of multi-party signature encryption and decryption.
[0096] Second embodiment
[0097] See also Figure 6 The present invention proposes a dynamic multi-party signature encryption and decryption system based on the first embodiment, including:
[0098] Receiving module 1, used to receive a multi-party encryption request, where the multi-party encryption request is a request from multiple users to jointly encrypt the same transaction information;
[0099] Encryption module 2 is used to call the dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string;
[0100] Decryption module 3 is used to input any one or multiple or all of the on-chain private keys of multiple users into a multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information.
[0101] This embodiment will now be described in detail, but is not limited thereto.
[0102] The multi-party encryption request received by the receiving module of this embodiment is a request generated and sent by multiple users with joint signatures. Multiple users can initiate multi-party encryption requests through the application provided by the client connected to their respective blockchain nodes. The multi-party encryption request is a request for multiple users to jointly encrypt the same transaction information. Among them, the signature of the multi-party encryption request is signed by the on-chain private key of each user. Specifically, a hash value can be calculated for the multi-party encryption request, and then the signature of the information is realized by encrypting it through the on-chain private key of each user. The multi-party encryption request may include the object to be encrypted, the jointly encrypted user information, and the encryption and decryption method. For example, any user of the jointly encrypted users can decrypt individually, or the jointly encrypted users need the consent of at least two or more users to decrypt, or the jointly encrypted users need the consent of all users to decrypt, so that the subsequent steps are performed according to different encryption and decryption methods, presenting different privacy protection methods.
[0103] The encryption module of this embodiment calls the dynamic multi-party signature contract to first perform signature verification to verify whether the on-chain private key in the multi-party encryption request matches the on-chain public key on the blockchain. Specifically, after receiving the sent multi-party encryption request, the dynamic multi-party signature contract uses the user's on-chain public key to decrypt the corresponding hash value encrypted by the on-chain private key, and compares the result of the on-chain public key decryption with the initial hash value. If the two match, the verification is passed and the encryption step is performed through the dynamic multi-party signature contract. After the signature verification of the multi-party encryption request is passed, the dynamic multi-party signature contract of this embodiment obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encrypted string, and jointly encrypts the transaction information through the multi-party encrypted string. In some embodiments, a point R and a scalar s are used to replace the two scalars (r, s). R is a random point on the elliptic curve (R = K × G). s = k + hash (P, R, m) pk. Here, pk is the private key, P = pk × G is the public key, and m is the message. This signature can be verified by checking s×G=R+hash(P,R,m)×P. Since the equation is linear, equations can be added and subtracted from each other and still be valid. By using a multi-signature function, all signature verification equations can be added together. Since the verification equation is linear, the sum of several equations is valid as long as all signatures are valid. For example, assuming 10 signatures are required, you need to verify:
[0104] (s1+s2+…+s10)×G=(R1+…+R10)+(hash(P1,R1,m1)×P1+hash(P2,R2,m2)×P2+…+hash(P10,R10,m10)×P10)
[0105] According to the above principle, it is possible to realize the joint encryption of transaction information through a multi-party encrypted string. Among them, there are multiple implementation methods of the multi-party signature function established based on the on-chain public keys of multiple users. In the first implementation method, only one on-chain private key of the multiple users needs to be input, and the multi-party signature function can restore the multi-party encrypted string, so that separate decryption can be achieved. In the second implementation method, the on-chain private keys of at least two users among the multiple users need to be input, and the multi-party signature function can restore the multi-party encrypted string. The decryption requirements are higher and the reliability of privacy protection is better. In the third implementation method, all on-chain private keys of the multiple users need to be input, and the multi-party signature function can restore the multi-party encrypted string. The decryption requirements are relatively the highest, and the reliability of privacy protection is relatively the best. This embodiment establishes the input-output relationship between the user's on-chain private key and the multi-party encrypted string through the multi-party signature function, and realizes the joint encryption of the same transaction information by multiple users through the multi-party encrypted string, which meets the needs of different scenarios and has a wider range of applications.
[0106] See also Figure 6 The decryption module 3 of this embodiment includes a multi-party decryption submodule 31. The receiving module 1 is also used to receive a multi-party decryption request, which includes any one chain private key or multiple chain private keys or all chain private keys; the multi-party decryption submodule 31 is used to call the dynamic multi-party signature contract to verify the signature of the multi-party decryption request. After the verification, the dynamic multi-party signature contract inputs any one chain private key or multiple chain private keys or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string.
[0107] Specifically, the multi-party decryption request received by the receiving module of this embodiment can be a request generated and sent by a single or multiple user signatures. Users can initiate multi-party decryption requests through the application provided by the client connected to their respective blockchain nodes. The multi-party decryption request is a request for a single or multiple users to decrypt a transaction information. Among them, the multi-party encryption request can include any one chain private key or multiple chain private keys or all chain private keys, which correspond to the above-mentioned different decryption methods to achieve different degrees of privacy protection. The multi-party decryption submodule of this embodiment calls the dynamic multi-party signature contract to first perform signature verification to verify whether the chain private key in the multi-party encryption request matches the chain public key on the blockchain. The specific verification method is referred to the previous text and will not be repeated here. After the signature verification of the multi-party decryption request is passed, the multi-party decryption submodule of this embodiment calls the dynamic multi-party signature contract to input any one chain private key or multiple chain private keys or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypt the transaction information through the multi-party encrypted string. There are also multiple decryption methods corresponding to the above multi-party signature function. Therefore, the dynamic multi-party signature contract specifically decrypts according to the input requirements of the multi-party signature function corresponding to the encrypted transaction information. Specifically, see Figure 3a , input any one of the multiple users' on-chain private keys to perform unilateral decryption, see Figure 3b , multiple private keys on the chain from multiple users can be input for multi-party decryption, see Figure 3c , inputting all the on-chain private keys of multiple users can perform overall decryption, meet the needs of different scenarios, and have a wider range of applications.
[0108] In this embodiment, a dynamic multi-party signature contract is pre-deployed on the blockchain, and the dynamic multi-party signature contract is called through a multi-party encryption request to jointly encrypt the same transaction information. Specifically, a multi-party signature function is established based on the on-chain public keys of multiple common users to generate a multi-party encrypted string to encrypt the transaction information, so as to realize the common privacy protection of the same transaction information by multiple users, and external users cannot read it directly. During decryption, there are multiple ways to restore the multi-party encrypted string through the multi-party signature function. The decryption can be restored based on any on-chain private key of multiple users, that is, any user can unilaterally perform the decryption, and the decryption can be restored based on multiple on-chain private keys of multiple users, that is, the decryption requires multiple users to perform it together, and the decryption can also be restored based on all on-chain private keys of multiple users, that is, the decryption requires all users to perform it together. In this way, the technical problems of inflexibility and limitation of encryption and decryption of transaction information are solved, and the technical effect of wide application range and flexible privacy protection is achieved.
[0109] Specifically, in order to facilitate the audit subject's review of transaction information in an audit scenario, two implementation methods are proposed in this embodiment:
[0110] In one embodiment, see Figure 6 The decryption module 3 of this embodiment includes a super decryption submodule 32. The receiving module 1 is also used to receive a super decryption request signed by the super private key of the audited subject. The super decryption submodule 32 is used to call the super contract pre-deployed on the blockchain and verify the signature of the super decryption request. After the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string.
[0111] Specifically, the super decryption submodule of this embodiment pre-deploys a super contract on the basis of the dynamic multi-party signature contract. The super contract is a smart contract pre-deployed on the blockchain. The super contract pre-declares the logic of the specific steps of decryption of the audit subject corresponding to the method of this embodiment. Calling the super contract is to call the step logic declared in the super contract to perform a specific decryption operation. The super decryption submodule of this embodiment forces all information on the chain to be confidential to the audit subject through the super contract. In this way, any information can be read without authorization from anyone. For example, the original dynamic multi-party signature contract stipulates that 3 users need the chain private keys of 2 users to decrypt. The audit subject calls the super contract through the super unlock request signed by the super private key, and directly obtains the multi-party encrypted string encrypted by the dynamic multi-party signature contract to encrypt the transaction information, so as to realize the decryption of the transaction information, that is, as long as the super private key of the audit subject can be decrypted, it can ensure that the super private key of the audit subject can see all the information.
[0112] In this embodiment, a super contract is pre-deployed on the blockchain. The super decryption submodule calls the super contract through a super decryption request to decrypt any multi-party encrypted transaction information. The super contract is configured on the basis of a dynamic multi-party signature contract. In this way, decryption can be performed as long as the super private key of the audit subject is used, which can ensure that the super private key of the audit subject can see all information. Similarly, for each user with common transaction information, the on-chain public key of the audit subject can be added to the on-chain public keys of multiple users to establish a multi-party signature function. In this way, the audit subject can realize the decryption of each transaction information. The above two implementation methods are convenient for the disclosure of information of audit operations, and achieve the technical effect of wide application range and flexible privacy protection.
[0113] In another embodiment, each user who jointly encrypts transaction information in this embodiment includes at least an audit subject with audit qualifications, wherein the encryption module obtains the on-chain public keys of multiple users and the on-chain public keys of the audit subject through a dynamic multi-party signature contract to establish a multi-party signature function to generate a multi-party encrypted string. Specifically, the audit subject with audit qualifications is added to the jointly encrypted users, so that the multi-party signature function is established based on the on-chain public keys of multiple users and the on-chain public keys of the audit subject. In this way, the encrypted transaction information can be input into the multi-party signature function by its own on-chain private key to restore the multi-party encrypted string, thereby decrypting the transaction information.
[0114] In the above two methods of this embodiment, the audit subject does not need to provide a private key. As long as the public key is provided and then signed with its own private key, all transaction information on the chain can be decrypted.
[0115] See also Figure 6 This embodiment also includes a change module 4. The change module of this embodiment can also realize the specific user adjustment and decryption method adjustment of the co-encrypted transaction information through a multi-party signature function. Among them, the receiving module 1 is also used to receive a change encryption request. The change encryption request is a request to add or delete a co-encrypted user of the same transaction information. The change module 4 is used to call the dynamic multi-party signature contract and verify the signature of the change encryption request. After the verification is passed, the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-encrypts the transaction information through the new multi-party encryption string.
[0116] Specifically, the encryption change request received by the receiving module of this embodiment can be a request generated and sent by a single or multiple user signatures. The user can initiate an encryption change request through an application provided by the client connected to each blockchain node. The encryption change request is a request to add or delete common encryption users of the same transaction information, or to adjust the multi-party signature function.
[0117] Specifically, the dynamic multi-party signature contract deployed on the blockchain in this embodiment declares that there is a re-encryption logic step corresponding to the encryption change request. Specifically, the change module first performs signature verification through the dynamic multi-party signature contract to verify whether the on-chain private key in the encryption change request matches the on-chain public key on the blockchain. The specific verification method is referred to the previous text and will not be repeated here. After the signature verification of the encryption change request is passed, the change module of this embodiment re-acquires the on-chain public key of the user after the addition or deletion through the dynamic multi-party signature contract to establish a new multi-party signature function to generate a new multi-party encryption string, or establishes a new multi-party signature function based on the on-chain public keys of the original multiple users to generate a new multi-party encryption string, so as to realize the re-encryption of the transaction information, thereby changing the specific user adjustment of the common encryption, or changing the multi-party signature function to adjust the decryption method.
[0118] The above encryption change request process is explained with some specific cases:
[0119] For example, the transaction information was originally encrypted by users A and B, and any user can use their on-chain private key to decrypt it. Now user C needs to be added to realize dynamic adjustment of transaction information encryption. Specifically, by sending an encryption change request to call the dynamic multi-party signature contract to re-establish a new multi-party signature function of the same type based on the on-chain public keys of users A, B, and C, and generate a new multi-party encrypted string to re-encrypt the transaction information. In this way, user C can also use his on-chain private key to decrypt it, which realizes the dynamic adjustment of the co-encrypted users of the transaction information. The on-chain address can authorize other addresses to view their private content according to business needs, which can not only protect their own privacy, but also meet the business needs of the scenario.
[0120] Preferably, the encryption change request also includes a change time limit, that is, the dynamic adjustment of the encryption and decryption of the transaction information is time-limited, and the transaction information will be restored to its original encryption and decryption state after the specified time is exceeded. Specifically, based on the above example of dynamic adjustment of the co-encryption user of the transaction information, if user C needs to be added so that he can decrypt the transaction information within a specified period of time, the dynamic multi-party signature contract will add a time limit to the re-encryption operation, and after the predetermined time period, the encryption and decryption state of the original transaction information will be restored.
[0121] For another example, the transaction information was originally encrypted by users A and B, and any user can use their on-chain private key to decrypt it. Now the decryption method needs to be adjusted so that it can only be decrypted based on the on-chain private keys of A and B. Specifically, by sending an encryption change request to call the dynamic multi-party signature contract to re-establish another type of multi-party signature function based on the on-chain public keys of users A and B, and generate a new multi-party encrypted string to re-encrypt the transaction information. It is worth noting that the input and output relationship of the new multi-party signature function has been adjusted to require the input of the on-chain private keys of users A and B to restore the multi-party encrypted string. In this way, the dynamic adjustment of the decryption method of the transaction information is realized, and the on-chain address can change the way to view private content according to business needs, thereby greatly improving the security of privacy protection.
[0122] The change module of this embodiment calls the dynamic multi-party signature contract through the change encryption request to re-encrypt the already jointly encrypted transaction information. The change encryption request contains information about the added or deleted jointly encrypted users. The dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encrypted string, and re-encrypts the transaction information. In this way, dynamic adjustment of multi-party signature encryption and decryption is achieved, that is, the user range of privacy protection is adjusted, which greatly improves the flexibility of encryption and decryption.
[0123] See also Figure 6 This embodiment also includes an on-chain and off-chain binding module 5 and an off-chain identity module 6. The on-chain and off-chain binding module 5 is used to generate an on-chain private key through the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the user's off-chain private key, and the on-chain public key and on-chain address of the user in the blockchain are generated through the user's on-chain private key to realize the user's on-chain and off-chain identity binding. The off-chain identity module 6 is used to apply to the CA organization through the user and pass the identity authentication, allocate an off-chain public key after the authentication is passed, and bind the off-chain public key to the user's identity information, and generate a CA certificate and an off-chain private key through an off-chain digital signature.
[0124] Specifically, in this embodiment, through the on-chain and off-chain binding modules and the off-chain identity modules, the user applies to the trusted CA institution, and the CA determines the identity of the user, for example, through face recognition, mobile phone number recognition, business information recognition, etc., to authenticate the user's identity, and then assigns an off-chain public key to the user, and binds the off-chain public key to the user's identity information, and uses digital signature technology off-chain to generate a CA certificate for the user. The trusted CA institution also generates an off-chain private key for the user, and the off-chain public key is stored on the CA institution side. The user uses the off-chain private key to sign the file, and can query the off-chain public key from the CA institution, and use the off-chain public key to verify the file to confirm whether it is issued by the user himself. This embodiment uses an irreversible mapping method, such as one or more hash operations, or a combination of different hash operations, or other irreversible mathematical calculation methods, based on the off-chain private key issued by the CA certificate to map the CA off-chain private key to an on-chain private key, and then uses the on-chain private key to generate an on-chain public key through an irreversible mathematical calculation method, and then generates an on-chain address based on the on-chain public key, thereby realizing the on-chain and off-chain binding of the user's blockchain identity. In this way, the off-chain private key and on-chain private key of the CA certificate are only kept by the user himself, and the actions occurring at the on-chain address, such as transactions generated by the on-chain address, information sent and received, etc., are all considered to be actions occurring by the user himself.
[0125] The above-mentioned on-chain private key does not need to be generated by the chain, but is irreversibly generated based on the private key of the trusted CA certificate, realizing the binding of the user's identity on and off the chain. In addition, due to the use of the CA certificate, the user's real-name information can be hidden from the chain, and the authenticity of the transaction can be verified without exposing the identity of the transaction party. Only by querying the CA organization or through the highest authority audit method can the user's information be known. Since the CA organization is trustworthy, there is no risk of tampering, malicious or leakage, ensuring the credibility of the on-chain address transaction.
[0126] In this embodiment, the on-chain private key in the dynamic multi-party signature encryption and decryption is generated through the off-chain private key issued by the user's CA certificate, which realizes the identity binding of the user on the chain and off the chain, ensures the credibility of the on-chain transaction information, reduces the risk of tampering, malicious or leakage, and further improves the security and reliability of the privacy protection of multi-party signature encryption and decryption.
[0127] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0128] Third embodiment
[0129] The present invention also proposes a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the dynamic multi-party signature encryption and decryption method mentioned in the first embodiment above.
[0130] Fourth embodiment
[0131] The present invention proposes a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the dynamic multi-party signature encryption and decryption method mentioned in the first embodiment.
[0132] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0133] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A dynamic multi-party signature encryption and decryption method, characterized in that: The following steps are involved: receiving a multi-party encryption request, wherein the multi-party encryption request is a request for multiple users to jointly encrypt the same transaction information; Calling a dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encryption string, and jointly encrypts the transaction information through the multi-party encryption string; The step of jointly encrypting the transaction information by means of the multi-party encryption string comprises: Use a point R and a scalar s instead of two scalars (r, s); R is a random point on the elliptic curve R = K × G; s = k + hash (P, R, m) pk, pk is the private key, and P = pk × G is the public key, m is the message; Verify the signature by checking the signature verification equation s×G=R+hash(P,R,m)×P; By using a multi-party signature function, all signature verification equations are added together for verification; Among them, any one on-chain private key, multiple on-chain private keys, or all on-chain private keys of multiple users are input into the multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information; The decrypting the transaction information further comprises: Receive a super decryption request signed by the super private key of the audit subject; Calling a super contract pre-deployed on the blockchain to verify the signature of the super decryption request. After the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string; Method 1: Each user who jointly encrypts transaction information includes at least an audit subject with audit qualifications, wherein the on-chain public keys of multiple users and the on-chain public keys of the audit subject are obtained through the dynamic multi-party signature contract to establish the multi-party signature function to generate the multi-party encrypted string; A super contract is pre-deployed on the basis of the dynamic multi-party signature contract. The super contract is a smart contract pre-deployed on the blockchain. The super contract pre-has the logic of the corresponding audit subject decryption steps. Calling the super contract is to call the step logic declared in the super contract to perform a specific decryption operation. Decrypting the transaction information further includes: receiving a super decryption request signed by the super private key of the audit subject; calling the super contract pre-deployed on the blockchain, verifying the signature of the super decryption request, and after the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string; the audit subject calls the super contract through the super unlock request signed by the super private key, and directly obtains the multi-party encrypted string that encrypts the transaction information in the dynamic multi-party signature contract to realize the decryption of the transaction information, that is, as long as the super private key of the audit subject can decrypt, it can ensure that the super private key of the audit subject can see all the information; Similarly, when each transaction information is shared by a common user, the audit subject’s on-chain public key is added to the on-chain public keys of multiple users to establish a multi-party signature function, and the audit subject can decrypt each transaction information; Method 2: Each user who jointly encrypts transaction information includes at least an audit subject with audit qualifications, wherein a multi-party signature function is established to generate a multi-party encrypted string by obtaining the on-chain public keys of multiple users and the on-chain public keys of the audit subject through a dynamic multi-party signature contract; the audit subject with audit qualifications is added to the jointly encrypted users, so that the multi-party signature function is established based on the on-chain public keys of multiple users and the on-chain public keys of the audit subject. For the encrypted transaction information, the audit subject uses its own on-chain private key to input the multi-party signature function to restore the multi-party encrypted string, thereby decrypting the transaction information; In the above methods, the auditing entity does not need to provide a private key. As long as the public key is provided and then signed with its own private key, all transaction information on the chain can be decrypted.
2. The dynamic multi-party signature encryption and decryption method according to claim 1, characterized in that: The decrypting the transaction information further comprises: Receiving a multi-party decryption request, wherein the multi-party decryption request includes any one or more on-chain private keys or all on-chain private keys; The dynamic multi-party signature contract is called to verify the signature of the multi-party decryption request. After the verification is passed, the dynamic multi-party signature contract inputs any one chain private key, multiple chain private keys, or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string.
3. The dynamic multi-party signature encryption and decryption method according to claim 1, characterized in that: The following steps are also included: receiving an encryption change request, wherein the encryption change request is a request to add or delete a common encryption user of the same transaction information; The dynamic multi-party signature contract is called to verify the signature of the encryption change request. After the verification is passed, the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-encrypts the transaction information through the new multi-party encryption string.
4. The dynamic multi-party signature encryption and decryption method according to claim 1, characterized in that: The on-chain private key is generated by the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the off-chain private key of the user, and the on-chain public key and on-chain address of the user in the blockchain are generated by the on-chain private key of the user to realize the identity binding between the user's on-chain and off-chain.
5. The dynamic multi-party signature encryption and decryption method according to claim 4 is characterized in that: The user applies to the CA organization and undergoes identity authentication. After the authentication is passed, an off-chain public key is allocated, and the off-chain public key is bound to the user's identity information. The CA certificate and the off-chain private key are generated through an off-chain digital signature.
6. A dynamic multi-party signature encryption and decryption system, characterized in that: include: A receiving module, used to receive a multi-party encryption request, wherein the multi-party encryption request is a request for multiple users to jointly encrypt the same transaction information; An encryption module is used to call a dynamic multi-party signature contract pre-deployed on the blockchain to verify the signature of the multi-party encryption request. After the verification is passed, the dynamic multi-party signature contract obtains the on-chain public keys of multiple users to establish a multi-party signature function to generate a multi-party encryption string, and jointly encrypts the transaction information through the multi-party encryption string; The step of jointly encrypting the transaction information by means of the multi-party encryption string comprises: Use a point R and a scalar s instead of two scalars (r, s); R is a random point on the elliptic curve R = K × G; s = k + hash (P, R, m) pk, pk is the private key, and P = pk × G is the public key, m is the message; Verify the signature by checking the signature verification equation s×G=R+hash(P,R,m)×P; By using a multi-party signature function, all signature verification equations are added together for verification; A decryption module, used to input any one or multiple or all of the on-chain private keys of multiple users into the multi-party signature function to restore the multi-party encrypted string to decrypt the transaction information; The decryption module includes a super decryption submodule; The receiving module is also used to receive a super decryption request signed by the super private key of the audit subject; The super decryption submodule is used to call the super contract pre-deployed on the blockchain, verify the signature of the super decryption request, and after the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string; Method 1: The users who jointly encrypt each transaction information include at least an audit subject with audit qualifications, wherein the encryption module is used to obtain the on-chain public keys of multiple users through the dynamic multi-party signature contract, and the on-chain public keys of the audit subject to establish the multi-party signature function to generate the multi-party encrypted string; A super contract is pre-deployed on the basis of the dynamic multi-party signature contract. The super contract is a smart contract pre-deployed on the blockchain. The super contract pre-has the logic of the corresponding audit subject decryption steps. Calling the super contract is to call the step logic declared in the super contract to perform a specific decryption operation. Decrypting the transaction information further includes: receiving a super decryption request signed by the super private key of the audit subject; calling the super contract pre-deployed on the blockchain, verifying the signature of the super decryption request, and after the verification is passed, the super contract directly obtains and decrypts the transaction information through the multi-party encrypted string; the audit subject calls the super contract through the super unlock request signed by the super private key, and directly obtains the multi-party encrypted string that encrypts the transaction information in the dynamic multi-party signature contract to realize the decryption of the transaction information, that is, as long as the super private key of the audit subject can decrypt, it can ensure that the super private key of the audit subject can see all the information; Similarly, when each transaction information is shared by a common user, the audit subject’s on-chain public key is added to the on-chain public keys of multiple users to establish a multi-party signature function, and the audit subject can decrypt each transaction information; Method 2: Each user who jointly encrypts transaction information includes at least an audit subject with audit qualifications, wherein a multi-party signature function is established to generate a multi-party encrypted string by obtaining the on-chain public keys of multiple users and the on-chain public keys of the audit subject through a dynamic multi-party signature contract; the audit subject with audit qualifications is added to the jointly encrypted users, so that the multi-party signature function is established based on the on-chain public keys of multiple users and the on-chain public keys of the audit subject. For the encrypted transaction information, the audit subject uses its own on-chain private key to input the multi-party signature function to restore the multi-party encrypted string, thereby decrypting the transaction information; In the above methods, the auditing entity does not need to provide a private key. As long as the public key is provided and then signed with its own private key, all transaction information on the chain can be decrypted.
7. The dynamic multi-party signature encryption and decryption system according to claim 6, characterized in that: The decryption module includes a multi-party decryption submodule; The receiving module is further used to receive a multi-party decryption request, wherein the multi-party decryption request includes any one chain private key or multiple chain private keys or all chain private keys; The multi-party decryption submodule is used to call the dynamic multi-party signature contract and verify the signature of the multi-party decryption request. After the verification, the dynamic multi-party signature contract inputs any one chain private key, multiple chain private keys, or all chain private keys into the multi-party signature function to restore the multi-party encrypted string, and decrypts the transaction information through the multi-party encrypted string.
8. The dynamic multi-party signature encryption and decryption system according to claim 6, characterized in that: Also includes the change module; The receiving module is further used to receive a request for changing encryption, wherein the request for changing encryption is a request for adding or deleting a common encryption user of the same transaction information; The change module is used to call the dynamic multi-party signature contract and verify the signature of the change encryption request. After the verification is passed, the dynamic multi-party signature contract re-acquires the on-chain public key of the user after the addition or deletion to establish a new multi-party signature function to generate a new multi-party encryption string, and re-encrypts the transaction information through the new multi-party encryption string.
9. The dynamic multi-party signature encryption and decryption system according to claim 6, characterized in that: It also includes on-chain and off-chain binding modules and off-chain identity modules; The on-chain and off-chain binding module is used to generate the on-chain private key through the off-chain private key issued by the user's CA certificate, wherein the on-chain private key of the user in the blockchain is obtained by mapping the off-chain private key of the user, and the on-chain public key and on-chain address of the user in the blockchain are generated through the on-chain private key of the user, so as to realize the identity binding between the user on the chain and the off-chain; The off-chain identity module is used to apply to the CA organization through the user and undergo identity authentication. After the authentication is passed, an off-chain public key is allocated, and the off-chain public key is bound to the user's identity information, and the CA certificate and the off-chain private key are generated through an off-chain digital signature.
10. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the dynamic multi-party signature encryption and decryption method according to any one of claims 1 to 5.
11. A storage medium storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the dynamic multi-party signature encryption and decryption method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Blockchain key management method, multi-person common signature method and electronic device
CN111639361A