Blockchain-based document signing method and device

Through the blockchain-based file signing method, the storage of digital certificates and verification information is used to solve the problems of consistency and security of contract documents in online file signing, and the immutability and reliability of contract documents are realized.

CN115037478BActive Publication Date: 2025-01-03ZHEJIANG E COMMERCE BANK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210635208.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2025-01-03
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

Due to the isolation between multiple contracting parties, the existing online document signing methods have the possibility of tampering with the contracting documents during the delivery process, which lacks consistency and security.

Method used

The blockchain-based file signing method is adopted, and the contract is signed using the target digital certificate to be signed, and the verification information is stored in the blockchain to ensure the consistency and security of the contract documents.

Benefits of technology

Through the decentralized storage of blockchain and the verification of digital certificates, the immutability and reliability of the signing documents are realized, and the security and consistency of the signing process are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115037478B_ABST
    Figure CN115037478B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a file signing method and device based on blockchain, wherein the file signing method based on blockchain includes: obtaining the file to be signed, and obtaining the target digital certificate from the corresponding certificate issuing authority, obtaining the first verification information of the file to be signed from the blockchain, and verifying the file to be signed based on the first verification information, and if the verification is successful, signing the file to be signed based on the target digital certificate, obtaining the target signing file, determining the second verification information of the target signing file, and sending the second verification information to the blockchain for storage. The signing is performed based on the target digital certificate of the corresponding certificate issuing authority, making the signing operation more adaptable and reliable, and by setting the verification information and storing the verification information in the blockchain, the verification information cannot be easily tampered with, thereby ensuring the consistency and security of the generated target signing file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the technical field of online contract generation, and in particular to a document signing method based on blockchain. Background Art

[0002] With the development of Internet technology and for the sake of environmental protection and convenience, more and more document signing operations are being transferred online.

[0003] At present, online signing mainly involves multiple contracting parties receiving the generated documents to be signed, performing signing operations in sequence according to the documents to be signed, and then obtaining the target signing documents.

[0004] However, due to the isolation of the signing process between multiple contracting parties, the signed document obtained by the previous contracting party may be tampered with when it is passed to the next contracting party, and the generated target contract document is not consistent and secure. Therefore, a document signing method that can ensure the consistency and security of the target contract document is urgently needed. Summary of the invention

[0005] In view of this, an embodiment of this specification provides a file signing method based on blockchain. One or more embodiments of this specification also involve a file signing device based on blockchain, a computing device, a computer-readable storage medium and a computer program to solve the technical defects existing in the prior art.

[0006] According to a first aspect of an embodiment of this specification, a blockchain-based file signing method is provided, comprising:

[0007] Obtain the document to be signed and obtain the target digital certificate from the corresponding certificate authority;

[0008] Obtaining first verification information of the document to be signed from the blockchain, and verifying the document to be signed based on the first verification information;

[0009] If the verification is successful, the document to be signed is signed based on the target digital certificate to obtain the target signed document;

[0010] Determine the second verification information of the target contract document and send the second verification information to the blockchain for storage.

[0011] According to a second aspect of the embodiments of this specification, a blockchain-based file signing device is provided, including:

[0012] The acquisition module is configured to acquire the document to be signed and obtain the target digital certificate from the corresponding certificate authority;

[0013] A verification module is configured to obtain first verification information of the document to be signed from the blockchain, and verify the document to be signed based on the first verification information;

[0014] The signing module is configured to sign the document to be signed based on the target digital certificate to obtain the target signed document if the verification is successful;

[0015] The storage module is configured to determine the second verification information of the target contract file and send the second verification information to the blockchain storage.

[0016] According to a third aspect of an embodiment of this specification, a computing device is provided, including:

[0017] Memory and processor;

[0018] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned blockchain-based file signing method are implemented.

[0019] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned blockchain-based file signing method.

[0020] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned blockchain-based file signing method.

[0021] In one embodiment of the present specification, a document to be signed is obtained, and a target digital certificate is obtained from a corresponding certificate issuing authority, first verification information of the document to be signed is obtained from the blockchain, and the document to be signed is verified based on the first verification information. If the verification is successful, the document to be signed is signed based on the target digital certificate, the target signed document is obtained, the second verification information of the target signed document is determined, and the second verification information is sent to the blockchain for storage. The signing operation is more adaptable and reliable by signing based on the target digital certificate of the corresponding certificate issuing authority, and the verification information cannot be easily tampered with by setting the verification information and storing the verification information in the blockchain, thereby ensuring the consistency and security of the generated target signed document. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a schematic diagram of the structure of a file signing system based on a blockchain file signing method provided by an embodiment of this specification;

[0023] Figure 2This is a flowchart of a blockchain-based document signing method provided by an embodiment of this specification;

[0024] Figure 3 This is a flowchart of a processing process of a blockchain-based document signing method applied to multi-party contract document signing provided by an embodiment of this specification;

[0025] Figure 4 This is a schematic diagram of the structure of a blockchain-based document signing device provided by an embodiment of this specification;

[0026] Figure 5 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0027] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0028] The terms used in one or an embodiment of this specification are only for the purpose of describing a specific embodiment and are not intended to limit one or an embodiment of this specification. The singular forms of "a", "said" and "the" used in one or an embodiment of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or an embodiment of this specification refers to and includes any or all possible combinations of one or associated listed items.

[0029] It should be understood that although the terms first, second, etc. may be used to describe various information in one or embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0030] First, the terms and definitions used in one or more embodiments of the present specification are explained.

[0031] Digital Certificate (CA, Certification Authority): A digital certificate is a digital certificate that marks the identity information of the communicating parties in Internet communication. Users can use it to identify each other's identity in Internet communication. Digital certificates encrypt or decrypt information and data exchanged by users in Internet communication to ensure the integrity and security of information and data.

[0032] Blockchain: A data storage system that includes multiple servers. Each server stores the data of all servers on the blockchain network. Each server can be regarded as a node. Such a data storage system can ensure that if any node needs to change the data, the data stored on all nodes must be modified accordingly, making the data not easily tampered with and authentic and reliable.

[0033] Public key: An encryption or decryption key in asymmetric encryption and decryption methods. The public key is a key that is open to the outside world. Data encrypted by the public key must be decrypted by the private key, and data encrypted by the private key must be decrypted by the public key.

[0034] Private key: An encryption or decryption key in asymmetric encryption and decryption methods. A private key refers to a key that is open to the user. Data encrypted by a public key must be decrypted by a private key, or data encrypted by a private key must be decrypted by a public key.

[0035] Hash operation: A method of generating encryption keys and decryption keys by using a hash function to generate a code called a message digest from text information. Common hash operations include: MD5 operation, MD6 operation, MD5 operation, SHA1 operation and CRC32 budget, etc.

[0036] ASCII operation: is a standard single-byte character encoding and decoding method.

[0037] Unicode operation: a variable-length character encoding and decoding method. Including: UTF-8 operation, UTF-16 operation, UTF-32 operation.

[0038] In this specification, a blockchain-based file signing method is provided. This specification also involves a blockchain-based file signing device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0039] See also Figure 1 , Figure 1 A schematic diagram of the structure of a file signing system according to a blockchain-based file signing method provided according to an embodiment of the present specification is shown.

[0040] The file signing system includes multiple signing nodes, each of which is a terminal or server on the blockchain network that can transmit, process and store contracted file data. Multiple signing nodes are connected in sequence to transmit the contracted file and the data of the file to be signed. After the multiple signing nodes have signed the contracted file, they need to send the verification information of the contracted file to the blockchain jointly formed by the multiple signing nodes for storage. Such a file signing system stores the verification information in each signing node, which realizes the decentralization of file data transmission and storage, ensures the consistency of the contracted file data, and at the same time, the characteristic of not being easy to tamper with makes the contracted file data safer and more reliable.

[0041] like Figure 1 As shown, the initial node obtains the initial file to be signed, and after signing the initial file to be signed, obtains the first signing file, generates the first verification information, sends the first verification information to the blockchain for storage, and transmits the first signing file to the next signing node, that is, the first node. On the first node, the first node obtains the digital certificate A generated by the certificate issuing authority A, and the first node verifies based on the first verification information. If the verification is satisfied, the digital certificate A and the first signing file are signed to obtain the second signing file, and the second verification information is generated, and the second verification information is sent to the blockchain for storage, and the second signing file is transmitted to the next signing node, that is, the second node. On the second node, the second node obtains the digital certificate B generated by the certificate issuing authority B, and the second node verifies based on the second verification information. If the verification is satisfied, the digital certificate B and the second signing file are signed to obtain the third signing file, and the third verification information is generated, and the third verification information is sent to the blockchain for storage, and the third signing file is transmitted to the next signing node, that is, the third node. On the third node, the third node obtains the digital certificate C generated by the certificate authority C, and the third node performs verification based on the third verification information. When the verification is satisfied, the third node signs the document based on the digital certificate C and the third signing document to obtain the target signing document, generates target verification information, and sends the target verification information to the blockchain for storage.

[0042] The specific blockchain-based file signing method will be described in detail in subsequent embodiments.

[0043] See also Figure 2 , Figure 2 A flowchart of a blockchain-based file signing method provided according to an embodiment of the present specification is shown. The method is applied to a signing node in a blockchain network and specifically includes the following steps.

[0044] Step 202: Obtain the document to be signed, and obtain the target digital certificate from the corresponding certificate authority.

[0045] The signing node is a terminal or server in the blockchain network that can transmit, process and store data. Correspondingly, the signing node can be considered to represent the individual or organization corresponding to the terminal or server.

[0046] The document to be signed is a document that needs to be signed at the current signing node. For example, the document to be signed may be an electronic contract, an electronic notice, an electronic announcement, etc.

[0047] The certificate authority is a third-party digital certificate certification management center. The certificate authority will receive the certification request from the organization or individual, generate the corresponding digital certificate, and issue it to the organization or individual who sent the certification request. The target digital certificate is the digital certificate issued by the certificate authority to the corresponding organization or user based on the certification request of the organization or individual.

[0048] Acquiring the document to be signed is to obtain the document to be signed sent by the generator of the document to be signed. The method for generating the document to be signed may be to obtain the document to be signed generated by the system for generating the document to be signed, or may be the document to be signed after the real document to be signed is recognized by the text recognition system. The system for generating the document to be signed may be a system that can automatically generate the document to be signed based on the information of the contracting party, that is, the information on the contracting node, using a pre-trained neural network model. The text recognition system may be the document to be signed obtained by performing text recognition on the image of the real document to be signed using a pre-trained text recognition model. This is not limited here.

[0049] Specifically, the file to be signed sent by the generator of the file to be signed is obtained, and the target digital certificate is obtained from the corresponding certificate issuing authority, wherein the file to be signed is the file that needs to be signed by the current signing node.

[0050] Exemplarily, the current node is the terminal used by user U1, the generator of the file to be signed is the server of organization C2, and the target digital certificate A is obtained from the corresponding certificate issuing authority A. User U1 obtains the file to be signed D1 sent by the server of organization 1 through the terminal, and user A needs to sign the file to be signed D1.

[0051] The foundation is laid by obtaining the documents to be signed for verification, and the information basis is provided for subsequent signing by obtaining the target digital certificate from the corresponding certificate authority.

[0052] Step 204: Obtain first verification information of the document to be signed from the blockchain, and verify the document to be signed based on the first verification information.

[0053] The first verification information is verification information for whether the signing node is qualified to sign the document to be signed. The first verification information is encoding information generated by pre-encoding the document to be signed. The encoding of the document to be signed can be a hash operation based on the file information of the document to be signed, or an ASCII operation or Unicode operation based on the document to be signed, or encoding based on the file features of the document to be signed using a pre-trained encoding model. The file information of the document to be signed can be one or more of the generator information of the document to be signed, the signatory information of the document to be signed, the file name of the document to be signed, the storage address of the document to be signed, and the keywords of the document to be signed.

[0054] The first verification information of the document to be signed is obtained from the blockchain, specifically, the first verification information of the document to be signed is obtained from the blockchain according to the file information of the document to be signed.

[0055] The document to be signed is verified based on the first verification information, specifically, the document to be signed is encoded, the first verification information is generated, and the first verification information is compared with the first verification information to determine whether the document to be signed is changed and whether the signing node is qualified to sign the document to be signed.

[0056] Specifically, first verification information of the document to be signed is obtained from the blockchain, the document to be signed is encoded, and first verification information is generated. The first verification information and the first verification information are compared to determine whether the document to be signed has been changed and whether the signing node is qualified to sign the document to be signed, wherein the first verification information is the coded information generated by pre-encoding the document to be signed.

[0057] Exemplarily, the first verification information 9175cfa of the file to be signed D1 is obtained from the blockchain, the file to be signed is MD5 encoded to generate the first verification information 9175cfa, and the first verification information 9175cfa is compared with the first verification information 9175cfa to determine that the file to be signed D1 has not been changed and that the signing node user U1 is qualified to sign the file to be signed D1.

[0058] By obtaining the first verification information of the file to be signed and verifying the file to be signed based on the first verification information, the security of signing the file to be signed at the signing node is guaranteed, and the consistency of the file to be signed is guaranteed.

[0059] Step 206: When the verification is successful, the document to be signed is signed based on the target digital certificate to obtain the target signed document.

[0060] Successful verification of the document to be signed means that it is confirmed that the document to be signed has not been changed and the signing node is qualified to sign the document to be signed.

[0061] The target digital certificate contains the node information of the corresponding signing node. The node information is fair and adaptable, that is, the node information is sent by a third-party certificate authority and is generated for the signing node. The target digital certificate can be a string code, a QR code, or a communication verification code. While the target digital certificate is used to authenticate the current signing node, the signing document can be signed directly based on the node information used for identity authentication.

[0062] Specifically, based on the node information of the target digital certificate, the signing node is verified, and the target digital certificate is used to sign the document to be signed to obtain the target signed document.

[0063] Exemplarily, the node information of the target digital certificate A is the string code HF03_6234, the signing node user U1 is verified based on the string code 6234, the document to be signed D1 is signed based on the string code HF03, and the target signing document D2 is obtained.

[0064] When the verification is successful, the document to be signed is signed based on the target digital certificate, which further ensures the security of the contract. In addition, the efficiency of the contract can be improved by signing the document to be signed using the target digital certificate.

[0065] Step 208: Determine the second verification information of the target contract document, and send the second verification information to the blockchain for storage.

[0066] The second verification information of the target contract file is verification information for whether other contract nodes are qualified to further sign the target contract file. The second verification information is encoding information generated by encoding the target contract file. The encoding of the target contract file can be a hash operation based on the file information of the target contract file, or an ASCII operation or Unicode operation based on the target contract file, or encoding based on the file features of the target contract file using a pre-trained encoding model. The file information of the target contract file can be one or more of the generator information of the target contract file, the contracting party information of the target contract file, the file name of the target contract file, the storage address of the target contract file, and the keywords of the target contract file.

[0067] Specifically, the target signing document is encoded to obtain second verification information of the target signing document, and the second verification information is sent to the blockchain for storage.

[0068] Exemplarily, the target signing file D2 is MD5 encoded to obtain the second verification information 9196cfa of the target signing file D2, and the second verification information 9196cfa is sent to the blockchain for storage.

[0069] In the embodiment of this specification, the document to be signed is obtained, and the target digital certificate is obtained from the corresponding certificate issuing authority, the first verification information of the document to be signed is obtained from the blockchain, and the document to be signed is verified based on the first verification information. If the verification is successful, the document to be signed is signed based on the target digital certificate, the target signed document is obtained, the second verification information of the target signed document is determined, and the second verification information is sent to the blockchain for storage. The signing operation is more adaptable and reliable by signing based on the target digital certificate of the corresponding certificate issuing authority, and the verification information cannot be easily tampered with by setting the verification information and storing the verification information in the blockchain, thereby ensuring the consistency and security of the generated target signed document.

[0070] Optionally, before step 208, the following specific steps are also included:

[0071] Back up the target contract file, obtain the target contract backup file, and send the target contract backup file to the blockchain for storage.

[0072] The target contract file is backed up to obtain the target contract backup file, and stored on the blockchain, that is, stored in each contract node on the blockchain network, so that the target contract files of all contract nodes can be obtained on any contract node later. For example, if the target contract file has an error or is changed, the target contract backup contract file can be obtained for restoration, further ensuring the consistency of the target contract file.

[0073] Optionally, step 202 includes the following specific steps:

[0074] Receive the file to be signed sent by the previous signing node, where the previous signing node is the signing node that completed the signing of the previous file, and the file to be signed is the file that has been signed by the previous signing node of the target signing file.

[0075] In the embodiments of this specification, the blockchain network includes multiple signing nodes. The multiple signing nodes may be connected in no fixed order, and the multiple signing nodes may also be connected in a sequential order to transmit the target signing file and the data of the file to be signed.

[0076] The previous signing node can be one of the signing nodes that are connected in no fixed order, and it can be the previous signing node of the current signing node that is connected in order. After the previous signing node completes the signing and generates the target signing file of the previous signing node, it will send the target signing file to the current signing node as the file to be signed on the current signing node. The previous signing node is the generator of the file to be signed.

[0077] Exemplarily, the blockchain network includes two signing nodes, user U1 and user U2, which are connected in order. User U1 is the previous signing node, and user U2 is the current signing node. After the previous signing node U1 completes the signing, it obtains the target signing file D1 of the previous signing node, that is, the file D1 to be signed of the current signing node, and the current signing node user U2 receives the file D1 to be signed.

[0078] By receiving the to-be-signed file sent by the previous signing node, the information basis is provided for the current node to conduct subsequent signing. In this way, the blockchain network that connects multiple signing nodes in sequence realizes the multi-party signing to obtain the final target signing file. The final target signing file can record the signing operations of multiple signing nodes, improving the signing efficiency of multi-party signing.

[0079] Optionally, the blockchain-based document signing method further includes the following specific steps:

[0080] Get the timestamp of each signing node completing the signing;

[0081] Determine the signing order of each signing node based on each timestamp;

[0082] According to the signing order, the backtracking information corresponding to each signing node is obtained in turn, where the backtracking information includes the file to be signed, verification information and the target signing file.

[0083] The timestamp of each signing node completing the signing can be recorded in the target signing file of each signing node, or in a pre-built signing completion time record table, which is not limited here.

[0084] The signing order is based on the timestamps of each signing node completing the signing, and the order of each signing node recorded in the corresponding order of each timestamp.

[0085] The specific method of obtaining the backtracking information corresponding to each signing node in sequence according to the signing order is to determine the verification information of each signing node in the reverse order of the signing order according to the signing order, and obtain the backtracking information corresponding to each signing node in sequence according to the verification information of each signing node.

[0086] Specifically, obtain the timestamp of each signing node completing the signing, determine the signing order of each signing node based on each timestamp, determine the verification information of each signing node in the reverse order of the signing order according to the signing order, and obtain the files to be signed and the target signing files corresponding to each signing node in turn based on the verification information of each signing node.

[0087] For example, there are three signing nodes, C1, C2, and C3. The timestamps of each signing node completing the signing are 2020-5-1 19:00:00 (C1), 2020-5-1 19:01:40 (C2), and 2020-5-1 19:01:20 (C3). The order of signing is C1-C3-C2. Determine the verification information in the reverse order of the signing order: the verification information of C2, the verification information of C3, and the verification information of C1, and determine the documents to be signed and the target documents to be signed of C2, C3, and C1 in turn.

[0088] By obtaining the timestamp of each signing node completing the signing, determining the signing order of each signing node according to each timestamp, and obtaining the corresponding backtracking information of each signing node in sequence according to the signing order, the entire signing process can be backtracked, ensuring the integrity of the entire signing process. Further, when there is a problem with the signing, it is possible to clearly backtrack and query at which signing node the problem occurred, ensuring the accuracy and consistency of the target signing files of each signing node.

[0089] Optionally, the verification of the to-be-signed document based on the first verification information in step 204 includes the following specific steps:

[0090] Performing a hash operation on the file information of the document to be signed to obtain a second hash value of the document to be signed;

[0091] The document to be signed is verified based on the first Hash value and the second Hash value.

[0092] The first verification information is a first hash value obtained by the previous signing node performing a hash operation on the file information of the file to be signed.

[0093] The file information of the document to be signed is information that can characterize the file characteristics of the document to be signed, and may be one or more of the generator information of the document to be signed, the signatory information of the document to be signed, the file name of the document to be signed, the storage address of the document to be signed, and the keywords of the document to be signed.

[0094] Based on the first hash value and the second hash value, the file to be signed is verified. Specifically, if the first hash value and the second hash value are consistent, it is determined that the file to be signed has passed the verification; if the first hash value and the second hash value are inconsistent, it is determined that the file to be signed has failed the verification.

[0095] Specifically, a hash operation is performed on the file information of the file to be signed to obtain a second hash value of the file to be signed. If the first hash value and the second hash value are consistent, it is determined that the file to be signed has passed the verification; if the first hash value and the second hash value are inconsistent, it is determined that the file to be signed has not passed the verification.

[0096] Exemplarily, the first hash value 43f68667 of the file to be signed D1 is the value obtained by the previous signing node (institution C1) performing a hash operation on the keywords of the file to be signed D1. The current signing node performs a hash operation on the keywords of the file to be signed D1 to obtain the second hash value 43f68667 of the file to be signed D1. The first hash value 43f68667 and the second hash value 43f68667 are consistent, and it is determined that the file to be signed D1 has passed the verification.

[0097] By performing a hash operation on the file information of the document to be signed, a second hash value of the document to be signed is obtained, and the document to be signed is verified based on the first hash value and the second hash value. Using the hash value to verify the document to be signed improves the accuracy and efficiency of the verification and ensures the security and consistency of the target document to be signed.

[0098] Optionally, obtaining the first verification information of the document to be signed from the blockchain in step 204 includes the following specific steps:

[0099] Determine the storage address corresponding to the document to be signed;

[0100] According to the storage address, the first verification information of the document to be signed is obtained from the blockchain.

[0101] The file to be signed can be stored in the local storage of the signing node or in the remote storage. The storage address corresponding to the file to be signed is determined according to the file information of the file to be signed. The file information of the file to be signed can be one or more of the generator information of the file to be signed, the signatory information of the file to be signed, the file name of the file to be signed, the storage address of the file to be signed, and the keywords of the file to be signed.

[0102] Each signing node in the blockchain stores the first verification information of the file to be signed, so the first verification information of the file to be signed is obtained from any signing node in the blockchain.

[0103] Specifically, the storage address corresponding to the file to be signed is determined, and according to the storage address, the first verification information of the file to be signed is obtained from any signing node in the blockchain.

[0104] Exemplarily, the storage address 0x40008000 corresponding to the file to be signed D1 is determined, and according to the storage address 0x40008000, the first verification information 9175cfa of the file to be signed D1 is obtained from any signing node in the blockchain.

[0105] Determine the storage address corresponding to the document to be signed, and obtain the first verification information of the document to be signed from the blockchain according to the storage address. The first verification information of the document to be signed can be obtained according to the storage address, which ensures the accuracy of the first verification information obtained, and further ensures the security and reliability of subsequent signing.

[0106] Optionally, step 208 includes the following specific steps:

[0107] Determine the second verification information of the target contract document, and send the second verification information to the blockchain for storage, including:

[0108] Performing a hash operation on the file information of the target contract file to obtain a second hash value of the target contract file;

[0109] Send the second hash value to blockchain storage.

[0110] The file information of the target contract file is information that can characterize the file characteristics of the target contract file, and may be one or more of the generator information of the target contract file, the signatory information of the target contract file, the file name of the target contract file, the storage address of the target contract file, and the keywords of the target contract file.

[0111] The second hash value is sent to the blockchain for storage. Specifically, the second hash value is sent to the blockchain and stored in any signing node on the blockchain.

[0112] Specifically, a hash operation is performed on the file information of the target contract file to obtain a second hash value of the target contract file, and the second hash value is sent to the blockchain and stored on any contract node on the blockchain.

[0113] Exemplarily, a hash operation is performed on the file name of the target signed file D2 to obtain a second hash value 43f63a60 of the target signed file D2, and the second hash value 43f63a60 is sent to the blockchain and stored on any signing node on the blockchain.

[0114] Perform a hash operation on the file information of the target contract file to obtain a second hash value of the target contract file, and send the second hash value to the blockchain storage. Sending the second hash value of the target contract file to the blockchain storage improves the accuracy and efficiency of the verification, and ensures the security and consistency of the target contract file in the subsequent verification of the target contract file.

[0115] Optionally, in step 206, signing the document to be signed based on the target digital certificate to obtain the target signed document includes the following specific steps:

[0116] Use the target private key to digitally sign the document to be signed and obtain a digital signature file;

[0117] Use the target public key to verify the digital signature file;

[0118] If the verification is successful, the digital signature file is determined as the target signing file.

[0119] The target digital certificate is a digital certificate generated by an asymmetric encryption and decryption method, which includes a target public key and a target private key. The target public key is a key that is open to the outside world, that is, the target public key can be viewed by any signing node on the blockchain network, and it is a consistent key for all signing nodes on the blockchain network. The target private key is a key that is only open to the signing node corresponding to the target digital certificate, that is, the target private key cannot be viewed by other signing nodes on the blockchain network, and it is a unique key for the corresponding signing node.

[0120] By utilizing the characteristic that the target private key corresponds to the signing node, the signing document is digitally signed to obtain a digital signature file. By utilizing the characteristic that the target public key is consistent for all signing nodes, the digital signature file is verified to verify that the digital signature file has not been changed, thereby ensuring the security and consistency of the target signing document.

[0121] Exemplarily, the target private key HF09 is used to digitally sign the document D1 to obtain the digital signature file D1', and the target public key 07G6 is used to verify the digital signature file D1'. If the verification is successful, the digital signature file D1' is determined as the target contract file D2.

[0122] The target private key is used to digitally sign the document to be signed, and the digital signature file is obtained. The target public key is used to verify the digital signature file. If the verification is successful, the digital signature file is determined as the target signed document. Using the target private key to digitally sign improves the signing efficiency of the document to be signed. The digital signature file is then verified according to the target public key to obtain the target signed document, ensuring the security and consistency of the target signed document.

[0123] Optionally, obtaining the target digital certificate from the corresponding certificate authority in step 202 includes the following specific steps:

[0124] Sending an authentication request to the certificate authority corresponding to the target contracting party, wherein the authentication request carries the contracting party information of the target contracting party, and the target contracting party is the contracting party that logs in to the contracting node;

[0125] Receive a target digital certificate fed back by a certificate issuing authority, wherein the target digital certificate is generated by the certificate issuing authority based on the contracting party information.

[0126] The target contracting party is the individual or organization that logs in to the contracting node. The target contracting party will establish a corresponding relationship with the corresponding certificate authority in advance. For individuals, they can choose to send a certification request to the certificate authority when they need to sign the contracted document to obtain the target digital certificate, or they can choose to send a certification request to the certificate authority in advance to obtain the target digital certificate. For institutions, generally, they choose to send a certification request to the certificate authority in advance to obtain the target digital certificate.

[0127] The target contracting party's contracting party information is the identity information used to indicate the target contracting party's identity and / or the scenario information of the contracting scenario. For example, a tenant and a landlord need to sign a rental contract. The tenant sends an authentication request to a third-party certificate authority that has a corresponding relationship with the tenant, and the authentication request carries the tenant's identity information and the scenario information of the rental scenario. The landlord sends an authentication request to a third-party certificate authority that has a corresponding relationship with the landlord, and the authentication request carries the landlord's identity information and the scenario information of the rental scenario.

[0128] Specifically, a certification request Cert_Request is sent to the certificate authority C corresponding to the target contracting party (user U3), wherein the certification request includes the identity information of the target contracting party and / or the scenario information of the contracting scenario, and the target digital certificate fed back by the certificate authority is received.

[0129] Exemplarily, the target contracting party is user U3, and an authentication request Cert_Request is sent to the certificate authority C corresponding to user U3, wherein the authentication request Cert_Request includes the identity information number XXXX of user U3 and the scenario information of the contracting scenario (transaction scenario), and the target digital certificate C is received from the certificate authority C, wherein the target digital certificate C is generated based on the identity information number XXXX and the scenario information of the transaction scenario.

[0130] By sending an authentication request with the contracting party information to the certificate authority corresponding to the target contracting party, the target digital certificate based on the contracting party information is generated in response to the certificate authority. The target digital certificate has the correspondence to the target contracting party, which ensures the security of the target digital certificate, that is, the security of the target contracting document obtained by signing based on the target digital certificate.

[0131] The following combination Figure 3 Taking the application of the blockchain-based document signing method provided in this specification in the multi-party contract document signing scenario as an example, the blockchain-based document signing method is further explained. Figure 3 A flowchart of the processing process of a blockchain-based document signing method applied to multi-party contract document signing provided by an embodiment of this specification is shown, which specifically includes the following steps.

[0132] Step 302: Obtain the contract document to be signed generated by the contract generator;

[0133] The blockchain includes multiple signing nodes, and each signing node includes a signing party logged in to the signing node.

[0134] Step 304: The first signing node sends an authentication request to a first certificate issuing authority corresponding to the first signing party, wherein the first signing party is an individual or institution that logs in to the first signing node;

[0135] Step 306: Receive the first target digital certificate fed back by the first certificate issuing authority, wherein the first target digital certificate includes a public key and a first private key;

[0136] Step 308: Obtaining a first hash value of the contract file to be signed from the blockchain, wherein the first hash value is generated in advance based on the file content of the contract file to be signed;

[0137] Step 310: The first signing node generates a second hash value based on the file content of the contract file to be signed;

[0138] Step 312: Compare the first Hash value and the second Hash value;

[0139] Step 314: If the two are consistent, the first signing node uses the first private key to digitally sign the contract document to be signed to obtain a first digital signature document;

[0140] Step 316: The first signing node verifies the first digital signature file using the public key;

[0141] Step 318: If the verification is successful, determine the first digital signature file as the first target contract file;

[0142] Step 320: The first signing node generates a third hash value based on the file content of the first target contract file, and sends the third hash value to the blockchain storage;

[0143] Step 322: Repeat steps 304 to 320 until all signing nodes in the blockchain complete the signing and obtain the target contract document.

[0144] In the embodiments of this specification, by sending an authentication request to the certificate authority corresponding to the contracting party and receiving the target digital certificate generated based on the contracting party information fed back by the certificate authority, the contracting operation is made more adaptable and reliable while ensuring the security of the digital certificate, that is, ensuring the security of the target contract file obtained by signing based on the digital certificate, using the target private key for digital signature, improving the signing efficiency of the contract file, and then verifying the digital signature file according to the target public key to obtain the target contract file, ensuring the security and consistency of the target contract file, using the hash value for comparison, improving the accuracy and efficiency of verification, and ensuring the security and consistency of the target contract file. By utilizing the characteristics of blockchain that the data on the blockchain is difficult to change, the stored hash value cannot be easily tampered with, that is, the signing on each contracting node is securely verified, ensuring the consistency and security of the generated target contract file.

[0145] Corresponding to the above method embodiment, this specification also provides a file signing device embodiment based on blockchain, Figure 4 The following is a schematic diagram showing the structure of a blockchain-based file signing device provided by an embodiment of this specification. Figure 4 As shown, the device comprises:

[0146] The acquisition module 402 is configured to acquire the document to be signed and obtain the target digital certificate from the corresponding certificate authority;

[0147] The verification module 404 is configured to obtain first verification information of the document to be signed from the blockchain, and verify the document to be signed based on the first verification information;

[0148] The signing module 406 is configured to sign the document to be signed based on the target digital certificate to obtain the target signed document if the verification is successful;

[0149] The storage module 408 is configured to determine the second verification information of the target signed document and send the second verification information to the blockchain storage.

[0150] Optionally, the acquisition module 402 may be further configured to:

[0151] Receive the file to be signed sent by the previous signing node, where the previous signing node is the signing node that completed the signing of the previous file, and the file to be signed is the file that has been signed by the previous signing node.

[0152] Optionally, the device further comprises:

[0153] The backtracking module is configured to obtain the timestamp of each signing node completing the signing, determine the signing order of each signing node based on each timestamp, and obtain the backtracking information corresponding to each signing node in turn according to the signing order, wherein the backtracking information includes the file to be signed, verification information and the target signing file.

[0154] Optionally, the verification module 404 may be further configured to:

[0155] A hash operation is performed on the file information of the file to be signed to obtain a second hash value of the file to be signed, and the file to be signed is verified based on the first hash value and the second hash value.

[0156] Optionally, the storage module 408 may be further configured to:

[0157] Perform a hash operation on the file information of the target contract file to obtain a second hash value of the target contract file, and send the second hash value to the blockchain for storage.

[0158] Optionally, the contract signing module 406 may be further configured to:

[0159] The target private key is used to digitally sign the document to be signed to obtain a digital signature file, and the target public key is used to verify the digital signature file. If the verification is successful, the digital signature file is determined as the target signed document.

[0160] Optionally, the acquisition module 402 may be further configured to:

[0161] Send an authentication request to the certificate authority corresponding to the target contracting party, wherein the authentication request carries the contracting party information of the target contracting party, the target contracting party is the contracting party that logs in to the signing node, and receives the target digital certificate fed back by the certificate authority, wherein the target digital certificate is generated by the certificate authority based on the contracting party information.

[0162] In the embodiment of this specification, the document to be signed is obtained, and the target digital certificate is obtained from the corresponding certificate issuing authority, the first verification information of the document to be signed is obtained from the blockchain, and the document to be signed is verified based on the first verification information. If the verification is successful, the document to be signed is signed based on the target digital certificate, the target signed document is obtained, the second verification information of the target signed document is determined, and the second verification information is sent to the blockchain for storage. The signing operation is more adaptable and reliable by signing based on the target digital certificate of the corresponding certificate issuing authority, and the verification information cannot be easily tampered with by setting the verification information and storing the verification information in the blockchain, thereby ensuring the consistency and security of the generated target signed document.

[0163] The above is a schematic scheme of a blockchain-based file signing device of this embodiment. It should be noted that the technical scheme of the blockchain-based file signing device and the technical scheme of the blockchain-based file signing method are of the same concept. For details not described in detail in the technical scheme of the blockchain-based file signing device, please refer to the description of the technical scheme of the blockchain-based file signing method.

[0164] Figure 5 The block diagram of a computing device according to an embodiment of the present specification is shown. The components of the computing device 500 include but are not limited to a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and the database 550 is used to store data.

[0165] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include any type of network interface, wired or wireless, for example, one or more of a network interface card (NIC), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0166] In one embodiment of the present specification, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0167] The computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 500 may also be a mobile or stationary server.

[0168] Among them, the processor 520 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned blockchain-based file signing method.

[0169] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned blockchain-based file signing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the above-mentioned blockchain-based file signing method.

[0170] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned blockchain-based file signing method.

[0171] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned blockchain-based file signing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the above-mentioned blockchain-based file signing method.

[0172] An embodiment of the present specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned blockchain-based file signing method.

[0173] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned blockchain-based file signing method belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be found in the description of the technical scheme of the above-mentioned blockchain-based file signing method.

[0174] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0175] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0176] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0178] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A file signing method based on blockchain, applied to a signing node in a blockchain network, wherein the signing node is any one of a plurality of nodes, and the plurality of signing nodes are connected in sequence to transmit data of a signed file and a file to be signed; the method comprises: Receive the file to be signed sent by the last signing node, and obtain the target digital certificate from the certificate issuing authority corresponding to the signing node, wherein the last signing node is the signing node that completed the signing of the file last time, the file to be signed is the file that has been signed by the last signing node, and the target digital certificate is a digital certificate for authenticating the identity of the signing node; Obtaining first verification information of the document to be signed from the blockchain, and verifying the document to be signed based on the first verification information, wherein the first verification information is generated by encoding the document to be signed in advance; If the verification is successful, the document to be signed is signed based on the target digital certificate to obtain the target signed document; The target signing document is encoded to obtain second verification information of the target signing document, and the second verification information is sent to the blockchain for storage.

2. The method according to claim 1, further comprising: Get the timestamp of each signing node completing the signing; Determining the signing order of each signing node according to each of the timestamps; According to the signing order, the backtracking information corresponding to each signing node is obtained in turn, wherein the backtracking information includes the file to be signed, verification information and the target signing file.

3. According to the method of claim 1, the first verification information is a first hash value obtained by the last signing node performing a hash operation on the file information of the file to be signed; The verifying the to-be-signed file based on the first verification information includes: Performing a hash operation on the file information of the to-be-signed file to obtain a second hash value of the to-be-signed file; The file to be signed is verified based on the first Hash value and the second Hash value.

4. According to the method of claim 1 or 3, the step of obtaining the first verification information of the document to be signed from the blockchain comprises: Determine the storage address corresponding to the document to be signed; According to the storage address, first verification information of the file to be signed is obtained from the blockchain.

5. According to the method of claim 1 or 3, determining the second verification information of the target signing document and sending the second verification information to the blockchain storage comprises: Performing a hash operation on the file information of the target contract file to obtain a second hash value of the target contract file; Sending the second hash value to the blockchain storage.

6. The method according to claim 1, wherein the target digital certificate comprises a target public key and a target private key; The step of signing the to-be-signed document based on the target digital certificate to obtain the target signed document includes: Using the target private key, digitally sign the document to be signed to obtain a digital signature file; Using the target public key, verifying the digital signature file; If the verification is successful, the digital signature file is determined as the target signed file.

7. The method according to claim 1 or 6, wherein obtaining a target digital certificate from a corresponding certificate authority comprises: Sending an authentication request to a certificate authority corresponding to a target contracting party, wherein the authentication request carries contracting party information of the target contracting party, and the target contracting party is the contracting party that logs in to the contracting node; Receive a target digital certificate fed back by the certificate issuing authority, wherein the target digital certificate is generated by the certificate issuing authority based on the contracting party information.

8. A file signing device based on blockchain, applied to a signing node in a blockchain network, wherein the signing node is any one of a plurality of nodes, and the plurality of signing nodes are connected in sequence to transmit data of a signed file and a file to be signed, comprising: an acquisition module, configured to receive a file to be signed sent by a previous signing node, and to obtain a target digital certificate from a certificate issuing authority corresponding to the signing node, wherein the previous signing node is a signing node that has completed the signing of a file, the file to be signed is a file that has been signed by the previous signing node, and the target digital certificate is a digital certificate for authenticating the identity of the signing node; A verification module is configured to obtain first verification information of the to-be-signed document from the blockchain, and verify the to-be-signed document based on the first verification information, wherein the first verification information is generated by encoding the to-be-signed document in advance; A signing module is configured to sign the to-be-signed document based on the target digital certificate to obtain a target signed document if the verification succeeds; The storage module is configured to encode the target signing file, obtain second verification information of the target signing file, and send the second verification information to the blockchain storage.

9. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the blockchain-based file signing method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the blockchain-based file signing method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Full-evidence chain contract signing method and device, storage medium and server

    CN109272300A

  • Signing method and equipment for realizing encrypted electronic contract based on blockchain intelligent contract

    CN112307125A

  • Online signing method and system based on block chain

    CN113824564A

  • Multi-subject online signing method and device

    CN114282913A