CN111311172A - Electronic signing method, system and storage medium - Google Patents

Electronic signing method, system and storage medium Download PDF

Info

Publication number
CN111311172A
CN111311172A CN201911272781.9A CN201911272781A CN111311172A CN 111311172 A CN111311172 A CN 111311172A CN 201911272781 A CN201911272781 A CN 201911272781A CN 111311172 A CN111311172 A CN 111311172A
Authority
CN
China
Prior art keywords
signing
contract
electronic
equipment
hash value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911272781.9A
Other languages
Chinese (zh)
Inventor
曾广君
许长贵
高飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201911272781.9A priority Critical patent/CN111311172A/en
Publication of CN111311172A publication Critical patent/CN111311172A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/101Collaborative creation, e.g. joint development of products or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an electronic signing method, a system and a storage medium, comprising the following steps: the first signing equipment creates an electronic contract according to user operation and obtains a hash value of the electronic contract according to a first algorithm; the first signing equipment uploads the hash value and the electronic contract to the block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a public key of the first signing equipment and a public key of the second signing equipment; the first signing equipment and the second signing equipment acquire contract fingerprints on the block chain and verify the contract fingerprints; and if the verification is successful, the first signing equipment and the second signing equipment respectively use the private key to sign the contract fingerprint, and respectively upload the signed contract fingerprint to the block chain to complete the electronic signing. The invention aims to solve the problem that the information security cannot be ensured in the existing electronic subscription.

Description

Electronic signing method, system and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method, a system, and a storage medium for electronic subscription.
Background
At present, most electronic signing processes are signed through a third-party platform on the network, the problem of certificate storage of signing contracts is solved, contracts are directly called from a network certificate storage center when certificates need to be held, the contracts are used for judicial certificate holding, and paper contracts do not need to be called. However, in the existing electronic signing technology, personal information is stored in a database of a third party, so that the database of the third party is at a risk of being easily stolen, and it is difficult to ensure that the signing information is not leaked.
Disclosure of Invention
The invention mainly aims to provide an electronic signing method, an electronic signing system and a storage medium. The method aims to solve the problem that the existing electronic subscription cannot guarantee information security.
In order to achieve the above object, the present invention provides an electronic subscription method, which comprises the following steps:
the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm;
the first signing equipment uploads the hash value and the electronic contract to a block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment;
the first signing equipment and the second signing equipment acquire the contract fingerprints stored on the block chain and verify the acquired contract fingerprints;
and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing.
Optionally, the step of acquiring, by the first subscription device and the second subscription device, the contract fingerprint stored on the blockchain, and verifying the acquired contract fingerprint includes:
the first signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful;
and the second signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the contract fingerprint is verified successfully.
Optionally, if the verification is successful, the steps of the first signing device and the second signing device signing the contract fingerprint by using corresponding pre-stored private keys respectively, and uploading the signed contract fingerprint to the blockchain respectively include:
the first signing device and the second signing device enable the block chain to receive the contract fingerprint signed by the private key of the first signing device and the contract fingerprint signed by the private key of the second signing device, and respectively verify whether the signatures are matched with the contract fingerprints;
and if the signature is matched with the contract fingerprint, the first signing equipment and the second signing equipment finish electronic signing.
Optionally, before the step of creating, by the first signing device, a corresponding electronic contract according to a user operation and calculating a hash value of the electronic contract according to a first algorithm, the method further includes:
and the first signing equipment uploads the personal signing information corresponding to the first signing equipment to the block chain.
Optionally, the step of uploading, by the first subscription device, the personal subscription information corresponding to the first subscription device to the block chain includes:
the first signing equipment calculates a private key and a public key corresponding to the first signing equipment according to a second algorithm;
a first signing device reads user information corresponding to the first signing device and verifies the user information;
and if the verification is successful, the first signing equipment generates corresponding personal signing information according to the public key of the first signing equipment and the user information of the first signing equipment, and uploads the personal signing information to the block chain.
Optionally, the step of uploading, by the first subscribing device, the hash value and the electronic contract to a blockchain includes:
and the first signing equipment uploads the hash value, the electronic contract and corresponding contract key information in the electronic contract to a block chain.
Optionally, the first algorithm comprises an MD5 code hashing algorithm and the second algorithm comprises an elliptic encryption algorithm.
Optionally, the contract key information includes contract MD5 code and data change information.
In addition, to achieve the above object, the present invention also provides an electronic signing system, including: the method comprises the steps of a block chain, a first signing device comprising a memory and a processor, a second signing device comprising a memory and a processor, and an electronic signing program which is stored on the memory of the first signing device and the second signing memory and can be run by the processor of the first signing device and the second signing processor, wherein when the electronic signing program is executed, the steps of the electronic signing method are realized.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, having an electronic signing program stored thereon, where the electronic signing program implements the steps of the electronic signing method as described above when executed by a processor.
The invention provides an electronic signing method, a system and a storage medium, comprising the following steps: the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm; the first signing equipment uploads the hash value and the electronic contract to the block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment; the first signing equipment and the second signing equipment acquire contract fingerprints stored on the block chain and verify the acquired contract fingerprints; and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing. According to the method, the contract fingerprint is obtained according to the electronic contract and the hash value, the hash value can perform the function of error correction, namely the hash value changes once the contract fingerprint is changed, and the contract fingerprint is verified in a manner of comparing the hash value, so that the contract fingerprint is prevented from being tampered; the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprint, and the private keys have uniqueness and non-tamper property, so that the signing authenticity is improved, and meanwhile, the security of electronic signing is also improved.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an electronic subscription method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a detailed process of the first subscribing device and the second subscribing device acquiring a contract fingerprint stored on a blockchain and verifying the contract fingerprint according to the embodiment of the present invention;
fig. 4 is a flowchart illustrating an electronic subscription method according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating an electronic subscription method according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating a detailed process of uploading, by the first subscription device, personal subscription information corresponding to the first subscription device to a block chain according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a detailed process of uploading the hash value and the electronic contract to the blockchain by the first subscribing device according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a computer, and can also be a mobile terminal device with a display function and an input function, such as a smart phone, a tablet computer and a portable computer.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a WiFi module, and the like, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a network operation control application program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 mainly includes an input unit such as a keyboard including a wireless keyboard and a wired keyboard, and is used to connect to the client and perform data communication with the client; and the processor 1001 may be configured to call the electronic signature program stored in the memory 1005 and perform the following operations:
the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm;
the first signing equipment uploads the hash value and the electronic contract to a block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment;
the first signing equipment and the second signing equipment acquire the contract fingerprints stored on the block chain and verify the acquired contract fingerprints;
and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing.
Further, the processor 1001 may call the electronic contract program stored in the memory 1005, and also perform the following operations:
the first signing device and the second signing device acquire the contract fingerprints stored on the block chain, and the step of verifying the acquired contract fingerprints includes:
the first signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful;
and the second signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the contract fingerprint is verified successfully.
Further, the processor 1001 may call the electronic contract program stored in the memory 1005, and also perform the following operations:
if the verification is successful, the steps that the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints and respectively upload the signed contract fingerprints to the block chain comprise:
the first signing device and the second signing device enable the block chain to receive a contract fingerprint signed by a private key of the first signing device and a contract fingerprint signed by a private key of the second signing device, and respectively verify whether the signatures are matched with the contract fingerprints;
and if the signature is matched with the contract fingerprint, the first signing equipment and the second signing equipment finish electronic signing.
Further, the processor 1001 may call the electronic contract program stored in the memory 1005, and also perform the following operations:
the steps that the first signing device creates a corresponding electronic contract according to user operation and obtains a hash value of the electronic contract according to a first algorithm calculation further comprise:
and the first signing equipment uploads the personal signing information corresponding to the first signing equipment to the block chain.
Further, the processor 1001 may call the electronic contract program stored in the memory 1005, and also perform the following operations:
the step of uploading the personal subscription information corresponding to the first subscription device to the block chain by the first subscription device includes:
the first signing equipment calculates a private key and a public key corresponding to the first signing equipment according to a second algorithm;
a first signing device reads user information corresponding to the first signing device and verifies the user information;
and if the verification is successful, the first signing equipment generates corresponding personal signing information according to the public key of the first signing equipment and the user information of the first signing equipment, and uploads the personal signing information to the block chain.
Further, the processor 1001 may call the electronic contract program stored in the memory 1005, and also perform the following operations:
the step of uploading, by the first subscribing device, the hash value and the electronic contract to a blockchain includes:
and the first signing equipment uploads the hash value, the electronic contract and corresponding contract key information in the electronic contract to a block chain.
Based on the hardware structure, the embodiments of the electronic signing method are provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of an electronic signing method according to an embodiment of the present invention, where the electronic signing method provided in this embodiment includes the following steps:
step S10, the first signing equipment creates a corresponding electronic contract according to the user operation, and calculates a hash value of the electronic contract according to a first algorithm;
in the embodiment of the present invention, taking APP (computer application program) application of the electronic signing method on a mobile phone as an example, it should be understood that the electronic signing method disclosed in the present invention can be applied to a computer, a smart phone, a tablet computer, a portable computer, and other mobile terminal devices having a display function and an input function. It should be understood that, since the party b of one contract may be the party a of another contract, the first contracting device is a generic device, and may be the first contracting device or the second contracting device in this embodiment.
In order to meet different signing requirements of users, a customizable contract template is preset in the application program of the embodiment, so that the use experience of the users can be improved. The preset contract template comprises a plurality of types, such as a buying and selling contract template, a service contract template, a leasing contract template, a borrowing contract template and the like, and can meet different signing requirements of users; of course, the user can also customize the contract in the application program interface according to the requirement of the user. The contract includes basic information such as the name or name and address of the signing party, quantity, price or consideration, duration, location and mode of fulfillment, and liability of breach of contract.
And after the corresponding electronic contract is created according to the user operation, the first signing equipment calculates the hash value of the electronic contract according to a first algorithm. The first algorithm includes the MD5 code hashing algorithm, which is an algorithm that transforms an input of arbitrary length into a fixed length output through a hashing algorithm. The hash algorithm comprises SHA-1 hash algorithm, MD4 code hash algorithm, MD5 code hash algorithm and other hash algorithms. Since the MD5 code hash algorithm has the characteristics of high security and better performance in terms of analysis resistance and difference resistance, the MD5 code hash algorithm is used in this embodiment, but other hash algorithms may be used. The hash value of the electronic contract is calculated by using the first algorithm, the message or data is compressed into the abstract by the hash value, so that the data volume is reduced, the format of the data is fixed, and the authenticity of the transmitted information can be ensured and the error correction effect can be realized.
Step S20, the first signing device uploads the hash value and the electronic contract to a block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing device and a pre-stored public key corresponding to the second signing device;
in this embodiment, the first subscription device uploads the hash value obtained by the first algorithm and the created electronic contract to the block chain, and the public key and the private key of the first subscription device are generated simultaneously and uploaded to the block chain in preference to the electronic contract. The block chain stores a public key corresponding to the first subscription device and a public key corresponding to the second subscription device, the public keys are public parts in a key pair, and the public keys are generally used for encrypting a session key, verifying a digital signature, or encrypting data which can be decrypted by using corresponding private keys. And the block chain generates a corresponding contract fingerprint according to the electronic contract uploaded by the first signing equipment, the hash value, the public key corresponding to the first signing equipment stored on the block chain and the public key corresponding to the second signing equipment stored on the block chain. In this way, the authenticity of the subscription is guaranteed, since the data encrypted with the public key must also be decrypted with the private key. In the subscription method, the first subscription device may simultaneously sign with one or more second subscription devices, so as to support two-party or multi-party subscription.
Step S30, the first signing device and the second signing device acquire the contract fingerprints stored on the block chain and verify the acquired contract fingerprints;
the first signing device and the second signing device respectively acquire contract fingerprints stored on the block chain, and obtain MD5 code hash values of the contract fingerprints according to a first algorithm. The MD5 code is a 128-bit feature code obtained by performing mathematical transformation on original information according to the disclosed MD5 algorithm, and has uniqueness, and the change of the MD5 code indicates contract change. And verifying whether the contract is changed according to the characteristics of the MD5 code of the contract fingerprint. If the MD5 code hash value of the contract fingerprint is consistent with the obtained hash value of the electronic contract, indicating that the contract content is not changed, the verification is successful. It should be understood that the first subscribing device needs to verify the resulting contract fingerprint, as does the second subscribing device. And when the two parties verify successfully, the next operation of the electronic signing method is carried out. By the mode of verifying whether the contract content is changed or not, the authenticity of the electronic contract is strengthened.
And step S40, if the verification is successful, the first signing device and the second signing device respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing.
When the first signing device and the second signing device are verified successfully, that is, the content of the contract is determined to be not changed, the first signing device and the second signing device respectively use corresponding pre-stored private keys to sign the contract fingerprints, and upload the contract fingerprints signed respectively to the block chain, that is, the first signing device agrees to the contract with the second signing device and signs the contract.
The private key and the public key are generated simultaneously, and different from the public key, the private key is stored in a memory of the signing equipment and is in one-to-one correspondence with the signing equipment used by a user, namely, one signing equipment corresponds to one unique private key, so that the authenticity of signing activities is ensured.
It should be understood that the second subscribing device in this embodiment is a generic device, which may be one or multiple devices, and therefore the contract fingerprint of the second subscribing device may include signatures of two and/or more users.
The electronic subscription method in the embodiment includes the following steps: the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm; the first signing equipment uploads the hash value and the electronic contract to the block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment; the first signing equipment and the second signing equipment acquire contract fingerprints stored on the block chain and verify the acquired contract fingerprints; and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing. According to the method, the contract fingerprint is obtained according to the electronic contract and the hash value, the hash value can perform the function of error correction, namely the hash value changes once the contract fingerprint is changed, and the contract fingerprint is verified in a manner of comparing the hash value, so that the contract fingerprint is prevented from being tampered; the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprint, and the private keys have uniqueness and non-tamper property, so that the signing authenticity is improved, and meanwhile, the security of electronic signing is also improved.
Further, referring to fig. 3, fig. 3 is a schematic flowchart illustrating a detailed process of the first subscribing device and the second subscribing device acquiring a contract fingerprint stored on a block chain and verifying the contract fingerprint in the embodiment of the present invention. The steps of the first signing device and the second signing device acquiring contract fingerprints stored on the blockchain and verifying the contract fingerprints include:
step S31, the first signing device acquires the contract fingerprint stored on the block chain, and calculates the hash value of the contract fingerprint according to the first algorithm, when the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful;
step S32, the second signing device obtains the contract fingerprint stored in the block chain, and calculates a hash value of the contract fingerprint according to the first algorithm, and when the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful.
The first signing device and the second signing device acquire the contract fingerprints stored on the block chain, namely the block chain respectively sends the stored contract fingerprints to the first signing device and the second signing device. And after the first signing device and the second signing device acquire the contract fingerprints, calculating the hash value of the electronic contract according to a first algorithm. The first algorithm includes the MD5 code hashing algorithm, which is an algorithm that transforms an input of arbitrary length into a fixed length output through a hashing algorithm. The hash algorithm comprises SHA-1 hash algorithm, MD4 code hash algorithm, MD5 code hash algorithm and other hash algorithms. Since the MD5 code hash algorithm has the characteristics of high security and better performance in terms of analysis resistance and difference resistance, the MD5 code hash algorithm is used in this embodiment, but other hash algorithms may be used. The hash value of the contract is calculated by using a first algorithm, the message or data is compressed into a summary by the hash value, so that the data volume is reduced, the format of the data is fixed, and the authenticity of the transmitted information can be ensured and the error correction effect can be realized.
And after the hash value is obtained through calculation, verifying the hash value of the contract fingerprint, comparing the hash value of the contract fingerprint obtained by the first signing equipment and the second signing equipment with the hash value of the electronic contract, and when the hash value of the contract fingerprint is consistent with the hash value of the electronic contract, indicating that the contract is not changed. When the hash value of the contract fingerprint obtained by the first signing device is consistent with the hash value of the electronic contract, and the hash value of the contract fingerprint obtained by the second signing device is also consistent with the hash value of the electronic contract, the verification is successful.
Further, referring to fig. 4, fig. 4 is a schematic flowchart of an electronic subscription method according to another embodiment of the present invention. In step S40, after the first signing device and the second signing device respectively verify the acquired contract fingerprints, and if the verification is successful, the first signing device and the second signing device respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain, the method includes:
step S50, the first signing device and the second signing device enable the block chain to receive the contract fingerprint signed by the private key of the first signing device and the contract fingerprint signed by the private key of the second signing device, and respectively verify whether the signature is matched with the contract fingerprint;
and step S60, if the signature is matched with the contract fingerprint, the first signing equipment and the second signing equipment complete electronic signing.
And after the first signing equipment and the second signing equipment respectively sign the acquired contract fingerprints by using the respective corresponding private keys, uploading the signed contract fingerprints to the block chain. And the block link receives the signed contract fingerprint, and verifies the contract fingerprint sent by the first signing equipment and the contract fingerprint sent by the second signing equipment. The public key is the part of the key pair that is disclosed, and is typically used to encrypt the session key, verify the digital signature, or encrypt data that can be decrypted with the corresponding private key. Since the data encrypted with the public key must also be decrypted with the private key, the contract fingerprint received by the first subscribing device is to be decrypted using the private key of the first subscribing device, and the contract fingerprint received by the second subscribing device is to be decrypted using the private key of the second subscribing device. The block chain has a function of checking whether the private key is matched with the public key, and after the block chain acquires the signed contract fingerprint, the block chain checks whether the public key stored on the contract fingerprint and the private key stored on the signature are a pair of key pairs and are matched with each other.
And when the contract fingerprint of the first signing equipment received by the block link is matched with the signature and the contract fingerprint of the second signing equipment received by the block link is also matched with the signature, the matching is successful. And after matching is successful, storing the contract fingerprint signed by the first signing equipment and the contract fingerprint signed by the second signing equipment on the block chain to finish the electronic signing.
Further, referring to fig. 5, fig. 5 is a schematic flowchart of an electronic subscription method according to another embodiment of the present invention. Before the step S10 that the first signing device creates a corresponding electronic contract according to the user operation, and generates a corresponding contract fingerprint according to the electronic contract and the private key of the first signing device, the method includes:
in step S70, the first subscriber device uploads the personal subscription information corresponding to the first subscriber device to the block chain.
The individual contract information of the first contract device is uploaded to the block chain, and it should be understood that, since the party b of one contract may be the party a of another contract, the first contract device is a generic finger and may be the first contract device or the second contract device in this embodiment. The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and is essentially a decentralized database. Because the block chain has the characteristic of decentralization, the personal signing information corresponding to the signing equipment does not need to be stored in a database in the third-party platform, so that the third-party platform is prevented from stealing the contract information of the signing equipment, and the personal information is prevented from being stolen by the third-party platform for signing.
Further, referring to fig. 6, fig. 6 is a schematic flowchart illustrating a step of the first subscription device uploading the personal subscription information corresponding to the first subscription device to the block chain in the embodiment of the present invention. The step of uploading the individual subscription information corresponding to the first subscription device to the block chain by the first subscription device includes:
step S71, the first signing equipment calculates a private key and a public key corresponding to the first signing equipment according to a second algorithm;
step S72, a first signing device reads user information corresponding to the first signing device and verifies the user information;
step S73, if the verification is successful, the first subscriber device generates corresponding personal subscription information according to the public key of the first subscriber device and the user information of the first subscriber device, and uploads the personal subscription information to the block chain.
The second algorithm comprises an elliptic encryption algorithm, the elliptic encryption algorithm is a public key encryption system, the mathematical basis of the elliptic encryption algorithm is the calculation difficulty of elliptic discrete logarithm on an Abel addition group formed by rational points on an elliptic curve, and the elliptic encryption algorithm is an algorithm for establishing public key encryption, namely asymmetric encryption. And generating a public key and a private key of the signing equipment used by the user based on an elliptic encryption algorithm, wherein the private keys correspond to the equipment one by one, and only one corresponding private key can be generated by one equipment.
The identity of the user is authenticated to ensure the authenticity of the identity, and further ensure that the agreement or contract signed by the user is real and has legal effectiveness. The user of the first signing device inputs personal information of the user on a terminal interface of the first signing device, the application program can be combined with mechanisms such as a public security ministry of public network identity recognition system and the like to authenticate the identity of the user using the first signing device, and authentication modes can include mobile phone authentication, bank card authentication, identity card authentication, face recognition authentication and the like.
And after the verification is successful, when the identity authentication of the user is completed, recording the user information of the first signing equipment and the public key corresponding to the first signing equipment to generate personal signing information, and uploading the personal signing information corresponding to the first signing equipment to the block chain, wherein the personal signing information comprises the public key corresponding to the first signing equipment.
When the blockchain acquires the personal subscription information, the public key is disclosed to show that the public key is authenticated and is authentic. Since the public key of the first signing device and the public key of the second signing device are stored in the contract fingerprint, the block chain sends the contract fingerprint to the first signing device and the second signing device by using the public key stored in the contract fingerprint, so that the first signing device and the second signing device can conveniently sign the received contract fingerprint, and the signing speed is accelerated by the mode.
Further, referring to fig. 7, fig. 7 is a schematic flowchart illustrating a detailed process of uploading the hash value and the electronic contract to the block chain by the first subscription device in the embodiment of the present invention. The uploading, by the first signing device, the hash value and the electronic contract to the blockchain includes:
step S21, the first signing device uploads the hash value, the electronic contract, and the contract key information corresponding to the electronic contract to the block chain.
After the first signing device obtains the hash value of the electronic contract, corresponding contract key information in the contract is uploaded to the block chain, wherein the contract key information comprises a contract MD5 code and data change information, and can also comprise information which can specifically identify the contract, such as a template number. After the first signing device uploads the contract key information to the block chain, when the first signing device needs to extract the stored electronic contract on the block chain, the electronic contract can be quickly extracted in the block chain according to the contract key information. By the method, the electronic contracts stored in the block chain are backed up, so that the situation that the first signing equipment and the second signing equipment lose the electronic contracts and cannot complete electronic signing is avoided.
Further, the first algorithm comprises an MD5 code hashing algorithm, and the second algorithm comprises an elliptic encryption algorithm.
The first algorithm includes the MD5 code hashing algorithm, which is an algorithm that transforms an input of arbitrary length into a fixed length output through a hashing algorithm. The hash algorithm comprises SHA-1 hash algorithm, MD4 code hash algorithm, MD5 code hash algorithm and other hash algorithms. Since the MD5 code hash algorithm has the characteristics of high security and better performance in terms of analysis resistance and difference resistance, the MD5 code hash algorithm is used in this embodiment, but other hash algorithms may be used.
The second algorithm comprises an elliptic encryption algorithm, the elliptic encryption algorithm is a public key encryption system, the mathematical basis of the elliptic encryption algorithm is the calculation difficulty of elliptic discrete logarithm on an Abel addition group formed by rational points on an elliptic curve, and the elliptic encryption algorithm is an algorithm for establishing public key encryption, namely asymmetric encryption.
Further, the contract key information includes contract MD5 code and data change information.
The contract key information includes the contract MD5 code and data change information, and may also include information such as template number that can specifically identify the contract. The data change information records a change record of the electronic contract even if the first contracting device changes the electronic contract. Nor does it prevent the extraction of electronic contracts stored in blockchains. The MD5 code is a 128-bit feature code obtained by mathematically transforming original information according to a disclosed MD5 algorithm, and has uniqueness. And verifying whether the contract is changed according to the characteristics of the MD5 code of the contract. By the verification, the verification of the electronic contract is strengthened, so that the authenticity of the contract is ensured.
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where an electronic subscription program is stored on the computer-readable storage medium, and when executed by a processor, the electronic subscription program implements the following operations:
the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm;
the first signing equipment uploads the hash value and the electronic contract to a block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment;
the first signing equipment and the second signing equipment acquire the contract fingerprints stored on the block chain and verify the acquired contract fingerprints;
and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing.
Further, the electronic signing program, when executed by the processor, further implements the following operations:
the first signing device and the second signing device acquire the contract fingerprints stored on the block chain, and the step of verifying the acquired contract fingerprints includes:
the first signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful;
and the second signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the contract fingerprint is verified successfully.
Further, the electronic signing program, when executed by the processor, further implements the following operations:
the first signing device and the second signing device respectively verify the acquired contract fingerprints, if the verification is successful, the first signing device and the second signing device respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain, and the steps comprise the following steps:
the first signing device and the second signing device enable the block chain to receive a contract fingerprint signed by a private key of the first signing device and a contract fingerprint signed by a private key of the second signing device, and respectively verify whether the signatures are matched with the contract fingerprints;
and if the signature is matched with the contract fingerprint, the first signing equipment and the second signing equipment finish electronic signing.
Further, the electronic signing program, when executed by the processor, further implements the following operations:
the steps that the first signing device creates a corresponding electronic contract according to user operation and obtains a hash value of the electronic contract according to a first algorithm calculation further comprise:
and the first signing equipment uploads the personal signing information corresponding to the first signing equipment to the block chain.
Further, the electronic signing program, when executed by the processor, further implements the following operations:
the step of uploading the personal subscription information corresponding to the first subscription device to the block chain by the first subscription device includes:
the first signing equipment calculates a private key and a public key corresponding to the first signing equipment according to a second algorithm;
a first signing device reads user information corresponding to the first signing device and verifies the user information;
and if the verification is successful, the first signing equipment generates corresponding personal signing information according to the public key of the first signing equipment and the user information of the first signing equipment, and uploads the personal signing information to the block chain.
Further, the electronic signing program, when executed by the processor, further implements the following operations:
the step of uploading, by the first subscribing device, the hash value and the electronic contract to a blockchain includes:
and the first signing equipment uploads the hash value, the electronic contract and corresponding contract key information in the electronic contract to a block chain.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the electronic subscription method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An electronic subscription method, comprising the steps of:
the first signing equipment creates a corresponding electronic contract according to user operation, and calculates a hash value of the electronic contract according to a first algorithm;
the first signing equipment uploads the hash value and the electronic contract to a block chain, so that the block chain generates a corresponding contract fingerprint according to the electronic contract, the hash value, a pre-stored public key corresponding to the first signing equipment and a pre-stored public key corresponding to the second signing equipment;
the first signing equipment and the second signing equipment acquire the contract fingerprints stored on the block chain and verify the acquired contract fingerprints;
and if the verification is successful, the first signing equipment and the second signing equipment respectively use corresponding pre-stored private keys to sign the contract fingerprints, and respectively upload the signed contract fingerprints to the block chain to complete the electronic signing.
2. A method of electronic signing according to claim 1, wherein the first signing device and the second signing device obtain the contract fingerprint stored on a blockchain and the step of verifying the obtained contract fingerprint comprises:
the first signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the verification is successful;
and the second signing equipment acquires the contract fingerprint stored on the block chain, calculates the hash value of the contract fingerprint according to the first algorithm, and if the hash value of the contract fingerprint is consistent with the hash value of the contract, the contract fingerprint is verified successfully.
3. A method of electronic signing according to claim 1, wherein the steps of the first signing device and the second signing device signing the contract fingerprint using corresponding pre-stored private keys, respectively, and uploading the signed contract fingerprint to the blockchain, respectively, if the verification is successful, comprise:
the first signing device and the second signing device enable the block chain to receive a contract fingerprint signed by a private key of the first signing device and a contract fingerprint signed by a private key of the second signing device, and respectively verify whether the signatures are matched with the contract fingerprints;
and if the signature is matched with the contract fingerprint, the first signing equipment and the second signing equipment finish electronic signing.
4. A method of electronic signing according to claim 1, wherein the step of the first signing device creating a corresponding electronic contract according to a user operation and calculating a hash value of the electronic contract according to a first algorithm is preceded by:
and the first signing equipment uploads the personal signing information corresponding to the first signing equipment to the block chain.
5. The electronic subscription method according to claim 4, wherein the step of uploading the individual subscription information corresponding to the first subscription device to the blockchain by the first subscription device comprises:
the first signing equipment calculates a private key and a public key corresponding to the first signing equipment according to a second algorithm;
a first signing device reads user information corresponding to the first signing device and verifies the user information;
and if the verification is successful, the first signing equipment generates corresponding personal signing information according to the public key of the first signing equipment and the user information of the first signing equipment, and uploads the personal signing information to the block chain.
6. A method of electronic signing according to claim 1, wherein the step of the first signing device uploading the hash value and the electronic contract to a blockchain comprises:
and the first signing equipment uploads the hash value, the electronic contract and corresponding contract key information in the electronic contract to a block chain.
7. An electronic subscription method according to any one of claims 1-6, wherein said first algorithm comprises an MD5 code hashing algorithm and said second algorithm comprises an elliptic cryptography algorithm.
8. An electronic signing method according to any one of claims 1 to 6, wherein the contract key information includes contract MD5 code and change data information.
9. An electronic subscription system, comprising: a blockchain, a first subscribing device comprising a memory and a processor, a second subscribing device comprising a memory and a processor, and an electronic subscribing program stored on and executable by the processor of the first subscribing device and the second subscribing processor, the electronic subscribing program, when executed, implementing the steps of the electronic subscribing method according to any one of claims 1 to 8.
10. A computer-readable storage medium, having stored thereon an electronic subscription program, which when executed by a processor, performs the steps of the electronic subscription method according to any one of claims 1 to 8.
CN201911272781.9A 2019-12-12 2019-12-12 Electronic signing method, system and storage medium Pending CN111311172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911272781.9A CN111311172A (en) 2019-12-12 2019-12-12 Electronic signing method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911272781.9A CN111311172A (en) 2019-12-12 2019-12-12 Electronic signing method, system and storage medium

Publications (1)

Publication Number Publication Date
CN111311172A true CN111311172A (en) 2020-06-19

Family

ID=71159697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911272781.9A Pending CN111311172A (en) 2019-12-12 2019-12-12 Electronic signing method, system and storage medium

Country Status (1)

Country Link
CN (1) CN111311172A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270556A (en) * 2020-11-23 2021-01-26 苏州园启软件有限公司 Method for verifying authenticity of electronic contract, electronic device and storage medium
CN112801663A (en) * 2021-02-05 2021-05-14 北京众享比特科技有限公司 Block chain evidence storing method, device, system, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109035024A (en) * 2018-08-15 2018-12-18 杭州链汇通区块链科技有限公司 Method, system and the storage medium of electronic signature

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109035024A (en) * 2018-08-15 2018-12-18 杭州链汇通区块链科技有限公司 Method, system and the storage medium of electronic signature

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270556A (en) * 2020-11-23 2021-01-26 苏州园启软件有限公司 Method for verifying authenticity of electronic contract, electronic device and storage medium
CN112801663A (en) * 2021-02-05 2021-05-14 北京众享比特科技有限公司 Block chain evidence storing method, device, system, equipment and medium
CN112801663B (en) * 2021-02-05 2024-03-19 北京众享比特科技有限公司 Blockchain certification method, device, system, equipment and medium

Similar Documents

Publication Publication Date Title
US20220058655A1 (en) Authentication system
CN109862041B (en) Digital identity authentication method, equipment, device, system and storage medium
CN111628868B (en) Digital signature generation method and device, computer equipment and storage medium
CN109951489B (en) Digital identity authentication method, equipment, device, system and storage medium
CN109756485B (en) Electronic contract signing method, electronic contract signing device, computer equipment and storage medium
CN106487511B (en) Identity authentication method and device
CN109035024A (en) Method, system and the storage medium of electronic signature
US9124571B1 (en) Network authentication method for secure user identity verification
CN108234442B (en) Method, system and readable storage medium for acquiring contract
CN108833431B (en) Password resetting method, device, equipment and storage medium
KR102284396B1 (en) Method for generating pki keys based on bioinformation on blockchain network and device for using them
US20130104218A1 (en) Method and system for securely accessing to protected resource
JP2017532707A (en) User verification based on digital fingerprint signal derived from out-of-band data
CN111506632A (en) Data processing method and device
CN106209730B (en) Method and device for managing application identifier
CN111062059B (en) Method and device for service processing
CN113709115A (en) Authentication method and device
CN114168922B (en) User CA certificate generation method and system based on digital certificate
CN111311172A (en) Electronic signing method, system and storage medium
CN109978543B (en) Contract signing method and device, electronic equipment and storage medium
CN107733645B (en) Encrypted communication authentication method and system
CN111681141B (en) File authentication method, file authentication device and terminal equipment
CN111245594B (en) Homomorphic operation-based collaborative signature method and system
CN110175471B (en) File storage method and system
JP7250960B2 (en) User authentication and signature device using user biometrics, and method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200619

WD01 Invention patent application deemed withdrawn after publication