Blockchain-based electronic contract solidification method, device, equipment and storage medium
By performing hashing operations and digital signature processing on the terminal side, the electronic contract is directly solidified to the blockchain node of the terminal, solving the data leakage and loss caused by data interaction in the existing technology, and realizing the integrity of the electronic contract and Security.
Patent Information
- Application Number
- CN202310251298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-03-10
AI Technical Summary
In the process of electronic contract solidification, the data leakage and loss cannot be guaranteed due to frequent data interactions between the terminal and the server side during the electronic contract solidification process.
By performing hashing operations on the terminal side to obtain the hash value of the summary information, write it to the digital certificate provided by the blockchain, obtain the digital certificate, and solidify the electronic contract to the corresponding area of the terminal based on the time and space stamp and digital signature signed by the user. Blockchain nodes to avoid interaction with the server.
Reduces the possibility of electronic contract data leakage and loss, ensuring the integrity and security of electronic contracts.
Smart Images

Figure CN116244758B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based electronic contract solidification method, device, equipment and storage medium. Background Art
[0002] With the rapid development of informatization, electronic evidence has become the most common form of evidence for transactions and voucher interactions in the Internet era, and the use of electronic evidence for evidence storage has been increasingly used. As a form of electronic evidence, electronic contracts are the vouchers and responsibilities of both parties, so it is extremely important to ensure the integrity of their content.
[0003] At present, the method to ensure the integrity of electronic contracts is mainly to solidify the electronic contracts. In the existing technology, a blockchain node is built on the server side, and the electronic contract is solidified by using the blockchain. However, during the solidification process, data interaction between the terminal side and the server side is required to solidify the electronic contract to the blockchain node. Frequent data interaction leads to data leakage and data loss during the interaction process, so the integrity of the electronic contract cannot be guaranteed. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a blockchain-based electronic contract solidification method, device, equipment and storage medium, aiming to ensure the integrity of the electronic contract.
[0005] In a first aspect, an embodiment of the present application provides a blockchain-based electronic contract solidification method, which is executed by a terminal side, and the method includes:
[0006] Performing a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information;
[0007] Writing the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract;
[0008] Encrypting the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature;
[0009] According to the time stamp of the user signing the electronic contract, the digital signature and the digital certificate of the electronic contract, the electronic contract is solidified on the blockchain node corresponding to the terminal.
[0010] Optionally, the summary information includes identity summary information, behavior summary information and contract content summary information.
[0011] Optionally, the user includes an electronic contract initiator and an electronic contract recipient, and before performing a hash operation on the summary information in the electronic contract to obtain the hash value of the summary information, the method further includes:
[0012] According to the electronic contract signed by the initiator of the electronic contract, a request for verifying the signature of the initiator of the electronic contract is sent to the blockchain node;
[0013] Receiving the digital certificate of the electronic contract initiator sent by the blockchain node, where the digital certificate of the electronic contract initiator is obtained by the blockchain certificate authority CA after the blockchain node responds to a request to verify the signature of the electronic contract initiator;
[0014] If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, the electronic signature of the electronic contract recipient is obtained to complete the signing of the electronic contract.
[0015] Optionally, the electronic signature includes an electronic seal, and if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, the electronic signature of the electronic contract recipient is obtained to complete the signing of the electronic contract, including:
[0016] If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, a request for obtaining the electronic signature of the electronic contract recipient is sent to the blockchain node;
[0017] After receiving the blockchain node's response to the request for obtaining the electronic signature of the electronic contract recipient, the electronic signature of the electronic contract recipient is sent to complete the signing of the electronic contract. The electronic signature of the electronic contract recipient is obtained when the blockchain node successfully verifies the hash value of the electronic signature of the electronic contract recipient through the smart contract.
[0018] Optionally, the method further comprises:
[0019] Extract the corresponding digital certificate according to the evidence collection request and obtain the requester information of the digital certificate;
[0020] The requester information of the digital certificate and the requester information in the evidence collection request are verified according to the certificate verification function to obtain a verification result of the evidence collection request.
[0021] Optionally, obtaining a verification result of the evidence collection request includes:
[0022] If the requester information of the digital certificate is consistent with the requester information in the evidence collection request, the electronic contract for the evidence collection request is obtained through the blockchain node;
[0023] If the requester information of the digital certificate is inconsistent with the requester information in the evidence collection request, the verification fails.
[0024] In a second aspect, an embodiment of the present application provides a blockchain-based electronic contract solidification device, which is applied to a terminal side, and the device includes:
[0025] A calculation module, used to perform a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information;
[0026] A writing module, used to write the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract;
[0027] An encryption module, used to encrypt the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature;
[0028] The curing module is used to cure the electronic contract to the blockchain node corresponding to the terminal according to the time stamp of the user signing the electronic contract, the digital signature and the digital certificate of the electronic contract.
[0029] Optionally, the summary information includes identity summary information, behavior summary information and contract content summary information.
[0030] Optionally, the users include an electronic contract initiator and an electronic contract recipient, and the device further includes:
[0031] A first sending unit, configured to send a request to the blockchain node to verify the signature of the electronic contract initiator according to the electronic contract signed by the electronic contract initiator;
[0032] A first receiving unit is used to receive the digital certificate of the electronic contract initiator sent by the blockchain node, where the digital certificate of the electronic contract initiator is obtained by the blockchain node through a certificate authority CA after responding to a request to verify the signature of the electronic contract initiator;
[0033] The acquiring unit is used to acquire the electronic signature of the electronic contract recipient if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, so as to complete the signing of the electronic contract.
[0034] Optionally, the electronic signature includes an electronic seal, and the acquiring unit includes:
[0035] A second sending unit is used to send a request to the blockchain node to obtain the electronic signature of the electronic contract recipient if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator;
[0036] The second receiving unit is used to receive the electronic signature of the electronic contract recipient sent by the blockchain node in response to the request for obtaining the electronic signature of the electronic contract recipient, so as to complete the signing of the electronic contract. The electronic signature of the electronic contract recipient is obtained when the blockchain node successfully verifies the hash value of the electronic signature of the electronic contract recipient through the smart contract.
[0037] Optionally, the device further comprises:
[0038] An extraction unit, used to extract the corresponding digital certificate according to the evidence collection request and obtain the requester information of the digital certificate;
[0039] The verification unit is used to verify the requester information of the digital certificate and the requester information in the evidence collection request according to the certificate verification function to obtain the verification result of the evidence collection request.
[0040] Optionally, the verification unit is specifically used to:
[0041] If the requester information of the digital certificate is consistent with the requester information in the evidence collection request, the electronic contract for the evidence collection request is obtained through the blockchain node;
[0042] If the requester information of the digital certificate is inconsistent with the requester information in the evidence collection request, the verification fails.
[0043] In a third aspect, an embodiment of the present application provides a blockchain-based electronic contract solidification device, the device comprising:
[0044] Memory for storing computer programs;
[0045] A processor is used to execute the computer program so that the device executes the blockchain-based electronic contract solidification method described in the first aspect above.
[0046] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed, the device running the computer program implements the blockchain-based electronic contract solidification method described in the first aspect above.
[0047] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0048] The embodiment of the present application provides a method, device, equipment and storage medium for solidifying electronic contracts based on blockchain, which is executed by the terminal side. First, a hash operation is performed on the summary information in the electronic contract to obtain the hash value of the summary information, and the hash value of the summary information is written into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract. Then, the hash value of the summary information is encrypted according to the digital certificate of the electronic contract to obtain a digital signature. Finally, according to the time stamp, digital signature and digital certificate of the electronic contract signed by the user, the electronic contract is solidified to the blockchain node corresponding to the terminal. It can be seen that this method is executed by the terminal side. Through the above method, the electronic contract can be solidified to the blockchain node corresponding to the terminal. There is no need to interact with the server, and the electronic contract can be solidified to the blockchain node corresponding to the terminal, which reduces the possibility of leakage and loss of electronic contract data and ensures the integrity of the electronic contract. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 An application scenario of a blockchain-based electronic contract solidification method provided in an embodiment of the present application;
[0051] Figure 2 A flowchart of a blockchain-based electronic contract solidification method provided in an embodiment of the present application;
[0052] Figure 3 A flowchart of a blockchain-based electronic contract signing method provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of the structure of a blockchain-based electronic contract solidification device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] At present, the method to ensure the integrity of electronic contracts is mainly to solidify the electronic contracts. In the existing technology, a blockchain node is built on the server side, and the electronic contract is solidified by using the blockchain. However, during the solidification process, data interaction between the terminal side and the server side is required to solidify the electronic contract to the blockchain node. Frequent data interaction leads to data leakage and data loss during the interaction process, so the integrity of the electronic contract cannot be guaranteed.
[0056] Based on this, in order to solve the above problems, in an embodiment of the present application, the terminal side executes, first, a hash operation is performed on the summary information in the electronic contract to obtain the hash value of the summary information, and the hash value of the summary information is written into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract. Then, the hash value of the summary information is encrypted according to the digital certificate of the electronic contract to obtain a digital signature. Finally, according to the time stamp, digital signature and digital certificate of the electronic contract signed by the user, the electronic contract is solidified to the blockchain node corresponding to the terminal. It can be seen that this method is executed by the terminal side, and the electronic contract can be solidified to the blockchain node corresponding to the terminal through the above method. There is no need to interact with the server, and the electronic contract can be solidified to the blockchain node corresponding to the terminal, which reduces the possibility of leakage and loss of electronic contract data and ensures the integrity of the electronic contract.
[0057] For example, one of the scenarios of the embodiments of the present application may be applied to Figure 1 The scenario includes a terminal side 101 and a blockchain node 102, wherein the terminal side 101 adopts the implementation method provided in the embodiment of the present application to solidify the electronic contract on the blockchain node 102 corresponding to the terminal side 101. Figure 1 , Figure 1 An application scenario provided by an embodiment of the present application, each terminal side 101 has a corresponding blockchain node 102, terminal side 1 corresponds to blockchain node 1, terminal side 2 corresponds to blockchain node 2, terminal side 3 corresponds to blockchain node 3, and so on, terminal side n-1 corresponds to blockchain node n-1, terminal side n corresponds to blockchain node n, and the details of the electronic contract signing each time collected and solidified are stored on the blockchain node 102 corresponding to the terminal side 101 through the terminal side 101 to realize the solidification of the electronic contract.
[0058] First, in the above application scenario, although the action description of the implementation method provided in the embodiment of the present application is executed by the terminal side 101; however, the embodiment of the present application is not limited in terms of the execution subject, as long as the actions disclosed in the implementation method provided in the embodiment of the present application are executed.
[0059] Secondly, the above scenario is only an example scenario provided by the embodiment of the present application, and the embodiment of the present application is not limited to this scenario.
[0060] The specific implementation of the electronic contract solidification method and device based on blockchain in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0061] See also Figure 2 , which is a flowchart of a blockchain-based electronic contract solidification method provided in an embodiment of the present application, combined with Figure 2 As shown, it is executed by the terminal side, and specifically may include:
[0062] S201: Perform a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information.
[0063] In a possible implementation, the summary information of the electronic contract may include identity summary information, behavior summary information and contract content summary information. The identity summary information may be the identity information of the two parties to the contract, the behavior summary information may be the specific behavior information such as the identity, time and place of the two parties when signing the contract, and the contract content summary information may be the summary information about the content of the electronic contract. Of course, the present application does not specifically limit the summary information in the electronic contract, and does not affect the implementation of the embodiment of the present application. The hash operation is capable of mapping a binary value of any length to a shorter binary value of a fixed length. Generally, the shorter binary value becomes a summary value, and the relevant information of the electronic contract collected by the terminal is compressed into a fixed-length character summary value (128-bit or 256-bit byte value) by hash operation technology, that is, the summary information in the electronic contract. As an example, the identity summary value, behavior summary value and contract content summary value are obtained by hash operation. In a possible implementation, the summary information in the electronic contract can be hashed to package the identity summary value, behavior summary value and contract content summary value, and then the hash value of the packaged summary information is obtained by hash operation technology. Since the main characteristics of the hash algorithm are irreversibility and the encryption process does not require a key, the encrypted data cannot be decrypted. Only by inputting the same plaintext data and passing it through the same hash algorithm can the same ciphertext be obtained. Therefore, the hash value of the summary information obtained by the hash operation ensures the security of the electronic contract data.
[0064] S202: Write the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract.
[0065] In one possible implementation, the blockchain's certificate authority (CA), that is, the institution that issues digital certificates, is an authority responsible for issuing and managing digital certificates. CA can serve as a trusted third party in the signing of electronic contracts and assume the responsibility for verifying the legitimacy of public keys. The blockchain's CA service issues a digital certificate for this event only to the signer, writes the hash value of the packaged summary information into the digital certificate, and obtains a digital certificate for this electronic contract.
[0066] S203: Encrypt the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature.
[0067] In one possible implementation, the hash value of the packaged summary information is encrypted according to the digital certificate for the electronic contract provided by the blockchain CA to obtain a digital signature.
[0068] S204: Based on the time stamp, digital signature and digital certificate of the electronic contract signed by the user, the electronic contract is solidified on the blockchain node corresponding to the terminal.
[0069] In one possible implementation, the time-space stamp may be obtained through authorization by an authority, and may specifically include the time information and space information when the electronic contract is signed. In one possible implementation, it may be an intelligent acquisition terminal, and the lightweight blockchain node corresponding to the intelligent acquisition terminal. The electronic contract may be solidified to the lightweight blockchain node corresponding to the intelligent acquisition terminal according to the time-space stamp, digital signature, and digital certificate for the electronic contract signed by the user, thereby realizing the solidified storage and chain of the electronic contract. By solidifying the electronic contract to the corresponding lightweight blockchain node through the terminal, the contract content can be effectively and securely saved, ensuring the integrity and authenticity of the contract signing data. Of course, this application does not specifically limit the terminal and the blockchain node corresponding to the terminal, and does not affect the implementation of the embodiments of this application.
[0070] In addition, after the electronic contract is solidified, the electronic contract can also be verified for evidence, which includes extracting the corresponding digital certificate according to the evidence request and obtaining the requester information of the digital certificate; verifying the requester information of the digital certificate and the requester information in the evidence request according to the certificate verification function, and obtaining the verification result of the evidence request. In a possible implementation, after the terminal side submits the evidence query request, the terminal side verifies the authority of the evidence request side, and the system extracts the corresponding digital certificate VerCert from the blockchain node according to the electronic contract requested to be retrieved in the evidence request. Specifically, it can be VerCert = VerCAQuery (id), and the identity information id of the requester is obtained from the digital certificate. Then, according to the certificate verification function appendVal, the identity information id of the requester in the extracted digital certificate is verified with the requester information gId in the evidence request. Specifically, it can be f = VerCert.appendVal (gId), and the verification result of the evidence request is obtained according to the return value f.
[0071] The verification result of the evidence request includes: if the requester information of the digital certificate is consistent with the requester information in the evidence request, the electronic contract requested for evidence is obtained through the blockchain node; if the requester information of the digital certificate is inconsistent with the requester information in the evidence request, the verification fails. In a possible implementation, when the return value f is true, it means that the identity information id of the requester in the digital certificate is the same as the identity information gId of the requester in the evidence request, then the electronic contract requested for retrieval is obtained through the blockchain node; when the return value f is false, it means that the identity information id of the requester in the digital certificate is different from the identity information gId of the requester in the evidence request, then the feedback result is verification failure.
[0072] The above is a blockchain-based electronic contract solidification method provided in an embodiment of the present application, which is executed by the terminal side. First, a hash operation is performed on the summary information in the electronic contract to obtain the hash value of the summary information, and the hash value of the summary information is written into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract. Then, the hash value of the summary information is encrypted according to the digital certificate of the electronic contract to obtain a digital signature. Finally, according to the time stamp, digital signature and digital certificate of the electronic contract signed by the user, the electronic contract is solidified to the blockchain node corresponding to the terminal. It can be seen that this method is executed by the terminal side. Through the above method, the electronic contract can be solidified to the blockchain node corresponding to the terminal. There is no need to interact with the server to solidify the electronic contract to the blockchain node corresponding to the terminal, which reduces the possibility of leakage and loss of electronic contract data and ensures the integrity of the electronic contract.
[0073] See also Figure 3, which is a flowchart of a blockchain-based electronic contract signing method provided in an embodiment of the present application, combined with Figure 3 As shown, it is executed by the terminal side, and specifically may include:
[0074] S301: Based on the electronic contract signed by the initiator of the electronic contract, a request for verifying the signature of the initiator of the electronic contract is sent to the blockchain node.
[0075] The signing part of the electronic contract mainly involves the two parties to the contract, namely the initiator of the electronic contract and the recipient of the electronic contract. In one possible implementation, when the two parties sign the contract, the initiator first enters the system, determines the specific details involved in the electronic contract, and enters the contract content and the blockchain account addresses of the two parties to the contract. Specifically, the initiator of the electronic contract can send the content of the contract and the blockchain account addresses of the two parties to the processing module with the electronic contract signing algorithm ECSC, and send a request to create a contract. After receiving the request, the ECSC module creates an electronic contract. The ECSC module returns the automatically generated electronic contract and its hash value Hash (EK) to the initiator, allowing the initiator to sign the contract. The initiator of the electronic contract verifies the electronic contract sent by the system and signs it electronically. The ECSC module sends the signed electronic contract to the recipient for signature invitation based on the blockchain account address of the recipient provided by the initiator.
[0076] In a possible implementation, the terminal side of the recipient sends a request to verify the signature of the electronic contract initiator to the identity authentication contract TIC of the blockchain node based on the electronic contract signed by the electronic contract initiator. The identity authentication contract TIC is used to complete the identity authentication of the party to be authenticated, and is sent to the demander after successful authentication.
[0077] S302: Receive the digital certificate of the electronic contract initiator sent by the blockchain node. The digital certificate of the electronic contract initiator is obtained through the blockchain's certificate authority CA after the blockchain node responds to the request to verify the signature of the electronic contract initiator.
[0078] In a possible implementation, the blockchain node's identity authentication contract TIC responds to the request to verify the electronic contract initiator's signature and sends the electronic contract initiator's digital certificate to the recipient, and the recipient receives the initiator's digital certificate, wherein the electronic contract initiator's digital certificate is issued by the blockchain CA, and the identity authentication contract TIC sends a request to the CA, which feeds back the initiator's digital certificate after receiving the request. The signing process is promoted through smart contracts, making the signing process more efficient and secure.
[0079] S303: If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, the electronic signature of the electronic contract recipient is obtained to complete the signing of the electronic contract.
[0080] In one possible implementation, when the recipient successfully verifies the signature of the initiator of the electronic contract through the initiator's digital certificate, the recipient confirms the content of the contract and the details of the signed contract, and electronically signs the electronic contract signed by the initiator. In addition, after the ECSC module creates the electronic contract, the generated electronic contract and the electronic contract signed by the initiator are stored in the data storage contract SDP of the blockchain node. After the signing is completed, the signed electronic contract is stored in the SDP of the blockchain node. SDP (data storage contract) is used to store the data of the electronic contract in real time after each signature to prevent tampering and denial of the contract, ensuring the real-time storage of data during the contract signing process, which is convenient for subsequent traceability.
[0081] In one possible implementation, the electronic signature may include an electronic seal. As a form of electronic signature, if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, a request for obtaining the electronic signature of the electronic contract recipient is sent to the blockchain node. After the blockchain node responds to the request for obtaining the electronic signature of the electronic contract recipient, the electronic signature of the electronic contract recipient is sent to complete the signing of the electronic contract. The electronic signature of the electronic contract recipient is obtained when the blockchain node successfully verifies the hash value of the electronic signature of the electronic contract recipient through the smart contract.
[0082] Among them, in order to ensure the security of electronic signatures and prevent the mis-signing of contracts due to the abuse of electronic signatures in enterprises, an electronic signature method based on blockchain is adopted. Individual users need to collect their names, mobile phone numbers, ID numbers and facial data for authentication, and can log in only after the user's real name. Enterprise users use distributed digital identity DID and detailed enterprise information for authentication. After successful login, the electronic signature is retrieved. If the corresponding electronic signature already exists in the system, it is approved. If it does not exist, it is uploaded. Specifically, the hash algorithm is used to calculate the hash value of the electronic signature based on the above identity authentication information and the content of the signature, and it is used as the summary information of the signature system, and an index is generated through the summary information to determine the mapping relationship between the electronic signature and the signature owner. Subsequently, the mapping relationship between the hash value of the index and the hash value of the electronic signature is stored in the blockchain through the blockchain smart contract, where the authority of the electronic signature is managed and maintained by the smart contract, forming a one-to-one secure mapping relationship. When a contract needs to be signed, identity authentication is required when querying user information. The smart contract can be called to verify the hash value of the electronic signature. When the verification is passed, the signature can be used. Otherwise, the electronic signature cannot be used, which protects the authority and validity of the electronic signature in the electronic contract.
[0083] After the recipient successfully verifies the signature of the initiator through the initiator's digital certificate, a request for obtaining the recipient's electronic signature can be sent to the blockchain node. In response to the request for obtaining the recipient's electronic signature, the blockchain node verifies the hash value of the recipient's electronic signature through the blockchain's smart contract. When the verification is successful, the recipient's electronic signature is sent to the recipient's terminal side to complete the signing of the electronic contract. As an example, the recipient's index hash value can be determined based on the recipient's identity information, and the hash value of the recipient's electronic signature can be determined based on the recipient's index hash value. If the hash value of the electronic signature is consistent with the hash value of the recipient's electronic signature provided by the recipient, the verification is successful and the recipient's electronic signature can be obtained.
[0084] In addition, during the initialization phase of the blockchain, users first need to register, complete the deployment of the identity authentication contract TIC, and obtain a blockchain digital certificate from the blockchain CA that associates the CA authentication public key with the Ethereum address. In the subsequent contract signing process, the system will complete the deployment of the electronic contract signing algorithm ECSC and the data storage contract SDP after successfully verifying the user's blockchain digital certificate, so that users can perform contract signing operations on the terminal side system. The identity authentication contract TIC obtains the digital certificate associated with the authentication public key and the Ethereum account from the CA, and completes the authentication of the private key through the digital certificate, thereby ensuring the authenticity of the user's identity.
[0085] The above is a blockchain-based electronic contract signing method provided in an embodiment of the present application, which is executed by the terminal side. First, according to the electronic contract signed by the initiator of the electronic contract, a request to verify the signature of the initiator of the electronic contract is sent to the blockchain node. Then, the digital certificate of the initiator of the electronic contract sent by the blockchain node is received. The digital certificate of the initiator of the electronic contract is obtained by the blockchain certificate authority CA after the blockchain node responds to the request to verify the signature of the initiator of the electronic contract. Finally, if the signature of the initiator of the electronic contract is successfully verified by the digital certificate of the initiator of the electronic contract, the electronic signature of the recipient of the electronic contract is obtained to complete the signing of the electronic contract. It can be seen that this method is executed by the terminal side. In the above method, the digital certificate issued by the CA of the blockchain is used to authenticate the identity of the participants of the signing, which gets rid of the constraints of the trusted third party and ensures the security of the electronic contract signing process. This method is implemented based on blockchain technology. The stored data has integrity and non-modifiability, providing effective evidence support for both parties to the signing.
[0086] The above are some specific implementations of the blockchain-based electronic contract solidification method provided in the embodiment of the present application. Based on this, the present application also provides a corresponding device. The device provided in the embodiment of the present application will be introduced from the perspective of functional modularization.
[0087] See also Figure 4 , which is a schematic diagram of the structure of a blockchain-based electronic contract solidification device 400 provided in an embodiment of the present application, applied to the terminal side, the device 400 may include:
[0088] The operation module 401 is used to perform a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information;
[0089] A writing module 402 is used to write the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract;
[0090] The encryption module 403 is used to encrypt the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature;
[0091] The curing module 404 is used to cure the electronic contract to the blockchain node corresponding to the terminal according to the time stamp, digital signature and digital certificate of the electronic contract signed by the user.
[0092] In the embodiment of the present application, through the cooperation of the operation module 401, the writing module 402, the encryption module 403 and the solidification module 404, it is applied to the terminal side. Through the above method, the electronic contract can be solidified to the blockchain node corresponding to the terminal. There is no need to interact with the server. The electronic contract can be solidified to the blockchain node corresponding to the terminal, which reduces the possibility of electronic contract data leakage and loss and ensures the integrity of the electronic contract.
[0093] As an implementation method, the summary information includes identity summary information, behavior summary information and contract content summary information.
[0094] As an implementation method, the users include an electronic contract initiator and an electronic contract recipient, and the electronic contract solidification device 400 based on blockchain further includes:
[0095] A first sending unit, configured to send a request for verifying the signature of the electronic contract initiator to a blockchain node according to the electronic contract signed by the electronic contract initiator;
[0096] A first receiving unit is used to receive a digital certificate of an electronic contract initiator sent by a blockchain node. The digital certificate of the electronic contract initiator is obtained by a blockchain certificate authority CA after the blockchain node responds to a request to verify the signature of the electronic contract initiator;
[0097] The acquisition unit is used to acquire the electronic signature of the electronic contract recipient if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, so as to complete the signing of the electronic contract.
[0098] As an implementation method, the electronic signature includes an electronic seal, and the acquisition unit includes:
[0099] A second sending unit is used to send a request to the blockchain node to obtain the electronic signature of the electronic contract recipient if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator;
[0100] The second receiving unit is used to receive the electronic signature of the electronic contract recipient sent by the blockchain node in response to the request for obtaining the electronic signature of the electronic contract recipient, so as to complete the signing of the electronic contract. The electronic signature of the electronic contract recipient is obtained when the blockchain node successfully verifies the hash value of the electronic signature of the electronic contract recipient through the smart contract.
[0101] As an implementation method, the electronic contract solidification device 400 based on blockchain further includes:
[0102] An extraction unit, used to extract the corresponding digital certificate according to the evidence collection request and obtain the requester information of the digital certificate;
[0103] The verification unit is used to verify the requester information of the digital certificate and the requester information in the evidence collection request according to the certificate verification function, and obtain the verification result of the evidence collection request.
[0104] As an implementation manner, the verification unit is specifically used to:
[0105] If the requester information of the digital certificate is consistent with the requester information in the evidence collection request, the electronic contract for the evidence collection request is obtained through the blockchain node;
[0106] If the requester information of the digital certificate is inconsistent with the requester information in the evidence collection request, the verification fails.
[0107] The embodiments of the present application also provide corresponding devices and computer storage media for implementing the solutions provided by the embodiments of the present application.
[0108] Among them, the device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program, so that the device executes the blockchain-based electronic contract solidification method described in any embodiment of the present application.
[0109] The computer storage medium stores a computer program. When the code is executed, the device running the computer program implements the blockchain-based electronic contract solidification method described in any embodiment of the present application.
[0110] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.
[0111] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.
[0112] It should be noted that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, in which the unit described as a separate component may or may not be physically separated, and the component prompted as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0113] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for solidifying electronic contracts based on blockchain. It is characterized in that Executed by the terminal side, the method includes: Performing a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information; Writing the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract; Encrypting the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature; According to the time and space stamp of the electronic contract signed by the user, the digital signature and the digital certificate of the electronic contract, the electronic contract is solidified on the blockchain node corresponding to the terminal; the time and space stamp includes the time information and space information when the electronic contract is signed; The users include an electronic contract initiator and an electronic contract recipient. Before performing a hash operation on the summary information in the electronic contract to obtain the hash value of the summary information, the method further includes: According to the electronic contract signed by the initiator of the electronic contract, a request for verifying the signature of the initiator of the electronic contract is sent to the blockchain node; Receiving the digital certificate of the electronic contract initiator sent by the blockchain node, where the digital certificate of the electronic contract initiator is obtained by the blockchain certificate authority CA after the blockchain node responds to a request to verify the signature of the electronic contract initiator; If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, the electronic signature of the electronic contract recipient is obtained to complete the signing of the electronic contract.
2. The method according to claim 1, It is characterized in that The summary information includes identity summary information, behavior summary information and contract content summary information.
3. The method according to claim 1, It is characterized in that The electronic signature includes an electronic seal. If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, the electronic signature of the electronic contract recipient is obtained to complete the signing of the electronic contract, including: If the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, a request for obtaining the electronic signature of the electronic contract recipient is sent to the blockchain node; After receiving the blockchain node's response to the request for obtaining the electronic signature of the electronic contract recipient, the electronic signature of the electronic contract recipient is sent to complete the signing of the electronic contract. The electronic signature of the electronic contract recipient is obtained when the blockchain node successfully verifies the hash value of the electronic signature of the electronic contract recipient through the smart contract.
4. The method according to claim 1, It is characterized in that The method further comprises: Extract the corresponding digital certificate according to the evidence collection request and obtain the requester information of the digital certificate; The requester information of the digital certificate and the requester information in the evidence collection request are verified according to the certificate verification function to obtain a verification result of the evidence collection request.
5. The method according to claim 4, It is characterized in that The obtaining of the verification result of the evidence collection request includes: If the requester information of the digital certificate is consistent with the requester information in the evidence collection request, the electronic contract for the evidence collection request is obtained through the blockchain node; If the requester information of the digital certificate is inconsistent with the requester information in the evidence collection request, the verification fails.
6. An electronic contract solidification device based on blockchain, It is characterized in that Applied to the terminal side, the device includes: A calculation module, used to perform a hash operation on the summary information in the electronic contract to obtain a hash value of the summary information; A writing module, used to write the hash value of the summary information into the digital certificate provided by the blockchain to obtain the digital certificate of the electronic contract; An encryption module, used to encrypt the hash value of the summary information according to the digital certificate of the electronic contract to obtain a digital signature; A curing module, used to curate the electronic contract to the blockchain node corresponding to the terminal according to the time stamp of the user signing the electronic contract, the digital signature and the digital certificate of the electronic contract; the time stamp includes the time information and space information when the electronic contract is signed; The users include an electronic contract initiator and an electronic contract recipient, and the device further includes: A first sending unit, configured to send a request for verifying the signature of the electronic contract initiator to a blockchain node according to the electronic contract signed by the electronic contract initiator; A first receiving unit is used to receive a digital certificate of an electronic contract initiator sent by a blockchain node. The digital certificate of the electronic contract initiator is obtained by a blockchain certificate authority CA after the blockchain node responds to a request to verify the signature of the electronic contract initiator; The acquisition unit is used to acquire the electronic signature of the electronic contract recipient if the signature of the electronic contract initiator is successfully verified through the digital certificate of the electronic contract initiator, so as to complete the signing of the electronic contract.
7. The device according to claim 6, It is characterized in that The summary information includes identity summary information, behavior summary information and contract content summary information.
8. An electronic contract solidification device based on blockchain, It is characterized in that The device comprises: Memory for storing computer programs; A processor, configured to execute the computer program so that the device performs the steps of the blockchain-based electronic contract solidification method as described in any one of claims 1 to 5.
9. A computer storage medium, It is characterized in that The computer storage medium stores a computer program, and when the computer program is executed by the processor, the blockchain-based electronic contract solidification method as described in any one of claims 1 to 5 is implemented.
