CN112910640A - Key signature method based on block chain technology - Google Patents

Key signature method based on block chain technology Download PDF

Info

Publication number
CN112910640A
CN112910640A CN202110192016.7A CN202110192016A CN112910640A CN 112910640 A CN112910640 A CN 112910640A CN 202110192016 A CN202110192016 A CN 202110192016A CN 112910640 A CN112910640 A CN 112910640A
Authority
CN
China
Prior art keywords
block chain
public key
signature
data
private key
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
CN202110192016.7A
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.)
Block Power Guangzhou Technology Co Ltd
Original Assignee
Block Power Guangzhou Technology Co Ltd
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 Block Power Guangzhou Technology Co Ltd filed Critical Block Power Guangzhou Technology Co Ltd
Priority to CN202110192016.7A priority Critical patent/CN112910640A/en
Publication of CN112910640A publication Critical patent/CN112910640A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Abstract

The invention is applicable to the technical field of block chain signature, and provides a key signature method based on a block chain technology, which comprises the following steps: the method comprises the following steps that a public key is generated by a block chain client through a private key encryption algorithm, a private key is used for signing data generated by the client, the signed data and a position index of the public key encryption algorithm are sent to block chain nodes, and the received signed data are checked and signed by the block chain nodes through a public key encryption algorithm corresponding to the position index; random numbers and a Hash algorithm are included when the data are signed, so that the security level is improved; moreover, the private key is used for carrying out one-way operation to obtain a public key, so that the safety is further improved; the private key can not be obtained under the condition that the public key is exposed, and the user experience is improved to the greatest extent.

Description

Key signature method based on block chain technology
Technical Field
The invention belongs to the technical field of block chain encryption, and particularly relates to a key signature method based on a block chain technology.
Background
The block chain technology is a decentralized distributed internet database, and 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. In a block chain, in order to ensure that data cannot be tampered in the whole system and ensure the identities of both parties of a transaction are true and reliable, and the like, signature authentication needs to be performed on transaction data.
Therefore, a need exists for a security mechanism for blockchain access that improves the security risk and reliability of blockchain technology usage.
Disclosure of Invention
In view of the above deficiencies of the prior art, an object of the present invention is to provide a key signature method based on a block chain technique, which aims to solve the problems that the signature can be broken by reverse pushing, the security is poor, and the user experience is poor due to the failure of providing an effective key signature method based on a block chain technique in the prior art.
In one aspect, the present invention provides a key signature method based on a block chain technique, where the method includes the following steps:
the blockchain client generates a public key by using a private key encryption algorithm;
signing data generated by the client by using the private key;
and sending the signed data and the position index of the public key encryption algorithm to a block chain node, and verifying the signature of the received signed data by the block chain node by adopting a public key encryption algorithm corresponding to the position index.
Further preferably, before said signing the data generated by the client using the private key, the method further comprises:
the method comprises the following steps: acquiring a random number;
the signing the client-generated data using the private key comprises:
step two: according to the formula: r G (x, y) = R (x ", y") is obtained curve points, wherein R is a random number, G is a base point, x is coordinate values in the x-axis direction, y is coordinate axes in the y-axis direction, and R is the curve points.
Preferably, the method further comprises:
step three: and carrying out hash calculation on the data to obtain a first hash value, wherein the first hash value is represented by h.
Preferably, the method further comprises:
step four: according to the formula: s = (h + k × Rx)/r, obtaining a first signature, wherein s is the first signature, k is a private key, and Rx is a second signature which is a numerical value of the curve point in the x-axis direction;
step five: sending the data, the first hash value and the first and second signatures to a blockchain.
Preferably, the verifying the signature of the received signed data by the blockchain node by using the public key encryption algorithm corresponding to the position index includes:
step six: carrying out Hash calculation on the received data to obtain a second Hash value, wherein the second Hash value is represented by H;
step seven: according to the formula: r '= HG (x, y)/s + RxK (x', y ')/s obtaining a quadratic curve point, where R' is a verification curve point and K is a public key;
step eight: if R' x = Rx, the signature verification passes, otherwise, the signature verification fails.
Further preferably, the method further comprises: and replacing the random number when the curve point is obtained again.
Preferably, the generating a public key by the blockchain client using a private key encryption algorithm includes:
and performing one-way operation by using the private key to obtain the public key.
Further preferably, the generating, by the blockchain client, the public key using a private key and a secret key encryption algorithm includes:
according to the formula: kG (x, y) = K (x ', y') acquires a public key.
In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing computer-executable instructions, which when executed by one or more processors, may cause the one or more processors to perform the above-mentioned key signature method based on the block chain technique.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions which, when executed by a processor, cause the processor to perform the above-mentioned key signature method based on block chain technique.
The invention has the beneficial effects that: the method comprises the following steps that a public key is generated by a block chain client through a private key encryption algorithm, a private key is used for signing data generated by the client, the signed data and a position index of the public key encryption algorithm are sent to block chain nodes, and the received signed data are checked and signed by the block chain nodes through a public key encryption algorithm corresponding to the position index; random numbers and a Hash algorithm are included when the data are signed, so that the security level is improved; moreover, the private key is used for carrying out one-way operation to obtain a public key, so that the safety is further improved; the private key can not be obtained under the condition that the public key is exposed, and the user experience is improved to the greatest extent.
Drawings
Fig. 1 is a flowchart of an implementation of a key signature method based on a block chain technique according to an embodiment of the present invention;
fig. 2 is a flowchart of an implementation of a key signature method based on a block chain technique according to a second 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.
The following detailed description of specific implementations of the present invention is provided in conjunction with specific embodiments:
the first embodiment is as follows:
fig. 1 shows an implementation flow of a key signature method based on a block chain technique according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, which are detailed as follows:
in step S100, the blockchain client generates a public key using a private key encryption algorithm;
in the embodiment of the present invention, it is further preferable that the public key is obtained by performing a one-way operation using a private key, for example: elliptic curve multiplication is used, so that reverse cracking is avoided.
In step S200, the client-generated data is signed using a private key.
In step S300, the signed data and the position index of the public key encryption algorithm are sent to the block chain node, and the block chain node verifies the signature of the received signed data by using the public key encryption algorithm corresponding to the position index.
Example two:
fig. 2 shows an implementation flow of a key signature method based on a blockchain technique according to a second embodiment of the present invention, where the second embodiment further includes, on the basis of the first embodiment:
in step S201, a random number is acquired;
in an embodiment of the present invention, a random number generator may be used to obtain the random number.
In step S202, according to the formula: r x G (x, y) = R (x ", y") obtaining curve points;
in an embodiment of the invention, signing client generated data using a private key comprises, according to the formula: r G (x, y) = R (x ", y") is obtained curve points, wherein R is a random number, G is a base point, x is a coordinate value in the x-axis direction, y is a coordinate axis in the y-axis direction, and R is a curve point.
In step S203, performing hash calculation on the data to obtain a first hash value;
in an embodiment of the invention, the first hash value is denoted by h.
In step S204, according to the formula: s = (h + k Rx)/r obtains a first signature;
in an embodiment of the present invention, s is a first signature, k is a private key, and Rx is a second signature, which is a numerical value of a curve point in an x-axis direction.
In step S205, the data, the first hash value, and the first and second signatures are sent to the blockchain.
In the embodiment of the invention, only the first hash value can be sent for signature verification in some cases needing privacy protection.
The method for verifying the signature of the signed data by the block chain node by adopting a public key encryption algorithm corresponding to the position index comprises the following steps:
in step S206, performing hash calculation on the received data to obtain a second hash value;
in an embodiment of the present invention, the second hash value is denoted by H.
In step S207, according to the formula: r ' = HG (x, y)/s + RxK (x ', y ')/s obtaining a quadratic curve point;
in the embodiment of the invention, R' is a verification curve point, and K is a public key.
In step S208, if R' x = Rx, the signature verification passes, otherwise, the signature verification fails.
Further preferably, the blockchain client generating the public key using a private key encryption algorithm comprises according to the formula: kG (x, y) = K (x ', y') acquires a public key.
The method comprises the following steps that a public key is generated by a block chain client through a private key encryption algorithm, a private key is used for signing data generated by the client, the signed data and a position index of the public key encryption algorithm are sent to block chain nodes, and the received signed data are checked and signed by the block chain nodes through a public key encryption algorithm corresponding to the position index; random numbers and a Hash algorithm are included when the data are signed, so that the security level is improved; moreover, the private key is used for carrying out one-way operation to obtain a public key, so that the safety is further improved; the private key can not be obtained under the condition that the public key is exposed, and the user experience is improved to the greatest extent.
Example three:
a third embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by one or more processors, for example, to perform the above-described method steps S201 to S208 in fig. 2.
By way of example, non-volatile storage media can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Synchronous RAM (SRAM), dynamic RAM, (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The disclosed memory components or memory of the operating environment described herein are intended to comprise one or more of these and/or any other suitable types of memory.
Example four:
an embodiment of the present invention provides a computer program product, where the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions, which, when executed by a processor, cause the processor to execute the key signature method based on the block chain technique of the above-mentioned method embodiment. For example, the method steps S201 to S208 in fig. 2 described above are performed.
The above-described embodiments are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. With this in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer electronic device (which may be a personal computer, a server, or a network electronic device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
What has been described herein in the specification and drawings includes examples that can provide a key signature method based on a blockchain technique. It will, of course, not be possible to describe every conceivable combination of components and/or methodologies for purposes of describing the various features of the disclosure, but it can be appreciated that many further combinations and permutations of the disclosed features are possible. It is therefore evident that various modifications can be made to the disclosure without departing from the scope or spirit thereof. In addition, or in the alternative, other embodiments of the disclosure may be apparent from consideration of the specification and drawings and from practice of the disclosure as presented herein. It is intended that the examples set forth in this specification and the drawings be considered in all respects as illustrative and not restrictive. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.

Claims (10)

1. A key signature method based on block chain technology, the method comprising the steps of:
the blockchain client generates a public key by using a private key encryption algorithm;
signing data generated by the client by using the private key;
and sending the signed data and the position index of the public key encryption algorithm to a block chain node, and verifying the signature of the received signed data by the block chain node by adopting a public key encryption algorithm corresponding to the position index.
2. The method of claim 1, further comprising, prior to said signing the client-generated data using the private key:
the method comprises the following steps: acquiring a random number;
the signing the client-generated data using the private key comprises:
step two: according to the formula: r G (x, y) = R (x ", y") is obtained curve points, wherein R is a random number, G is a base point, x is coordinate values in the x-axis direction, y is coordinate axes in the y-axis direction, and R is the curve points.
3. The method of claim 2, wherein the method further comprises:
step three: and carrying out hash calculation on the data to obtain a first hash value, wherein the first hash value is represented by h.
4. The method of claim 3, wherein the method further comprises:
step four: according to the formula: s = (h + k × Rx)/r, obtaining a first signature, wherein s is the first signature, k is a private key, and Rx is a second signature which is a numerical value of the curve point in the x-axis direction;
step five: sending the data, the first hash value and the first and second signatures to a blockchain.
5. The method of claim 4, wherein the block chain node verifying the received signed data using a public key encryption algorithm corresponding to the position index comprises:
step six: carrying out Hash calculation on the received data to obtain a second Hash value, wherein the second Hash value is represented by H;
step seven: according to the formula: r '= HG (x, y)/s + RxK (x', y ')/s obtaining a quadratic curve point, where R' is a verification curve point and K is a public key;
step eight: if R' x = Rx, the signature verification passes, otherwise, the signature verification fails.
6. The method of claim 2, wherein the method further comprises: and replacing the random number when the curve point is obtained again.
7. The method of claim 1, wherein the blockchain client generating a public key using a private key encryption algorithm comprises:
and performing one-way operation by using the private key to obtain the public key.
8. The method of claim 1, wherein the blockchain client generating a public key using a private key encryption algorithm comprises:
according to the formula: kG (x, y) = K (x ', y') acquires a public key.
9. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform the method of block chain technology-based key signing according to any one of claims 1 to 7.
10. A computer program product, characterized in that the computer program product comprises a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions which, when executed by a processor, cause the processor to carry out the method of key signature based on block chain technique according to any one of claims 1 to 7.
CN202110192016.7A 2021-02-19 2021-02-19 Key signature method based on block chain technology Pending CN112910640A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110192016.7A CN112910640A (en) 2021-02-19 2021-02-19 Key signature method based on block chain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110192016.7A CN112910640A (en) 2021-02-19 2021-02-19 Key signature method based on block chain technology

Publications (1)

Publication Number Publication Date
CN112910640A true CN112910640A (en) 2021-06-04

Family

ID=76124074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110192016.7A Pending CN112910640A (en) 2021-02-19 2021-02-19 Key signature method based on block chain technology

Country Status (1)

Country Link
CN (1) CN112910640A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205087A (en) * 2021-08-30 2022-03-18 深圳时空云科技有限公司 Block chain based random number generation method
CN116827554A (en) * 2023-07-24 2023-09-29 三未信安科技股份有限公司 Multi-channel cooperator strategy method and system based on block chain nodes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109816383A (en) * 2019-02-22 2019-05-28 杭州秘猿科技有限公司 A kind of block chain endorsement method, block chain wallet and block chain
WO2020053851A1 (en) * 2018-09-11 2020-03-19 Kzen Networks Ltd. System and method for secure multi-party computation based blockchain transactions
US20200175590A1 (en) * 2018-11-29 2020-06-04 Shu Ya Huo Method to turn digital rental buyer into subscriber and an apparatus to secure access & trade the rental item
CN111526167A (en) * 2020-07-06 2020-08-11 南京可信区块链与算法经济研究院有限公司 Data transmission method and device applied to block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020053851A1 (en) * 2018-09-11 2020-03-19 Kzen Networks Ltd. System and method for secure multi-party computation based blockchain transactions
US20200175590A1 (en) * 2018-11-29 2020-06-04 Shu Ya Huo Method to turn digital rental buyer into subscriber and an apparatus to secure access & trade the rental item
CN109816383A (en) * 2019-02-22 2019-05-28 杭州秘猿科技有限公司 A kind of block chain endorsement method, block chain wallet and block chain
CN111526167A (en) * 2020-07-06 2020-08-11 南京可信区块链与算法经济研究院有限公司 Data transmission method and device applied to block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
石润华等: "基于区块链技术的物联网密钥管理方案", 《信息网络安全》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114205087A (en) * 2021-08-30 2022-03-18 深圳时空云科技有限公司 Block chain based random number generation method
CN114205087B (en) * 2021-08-30 2023-12-15 深圳时空云科技有限公司 Block chain random number generation method
CN116827554A (en) * 2023-07-24 2023-09-29 三未信安科技股份有限公司 Multi-channel cooperator strategy method and system based on block chain nodes
CN116827554B (en) * 2023-07-24 2024-04-09 三未信安科技股份有限公司 Multi-channel cooperator strategy method and system based on block chain nodes

Similar Documents

Publication Publication Date Title
AU2019204708B2 (en) Retrieving public data for blockchain networks using highly available trusted execution environments
AU2019207311B2 (en) Securely executing smart contract operations in a trusted execution environment
EP3685334B1 (en) Improving integrity of communications between blockchain networks and external data sources
US20210258164A1 (en) Methods and systems for universal storage and access to user-owned credentials for trans-institutional digital authentication
AU2019207312B2 (en) Distributed key management for trusted execution environments
EP3486817B1 (en) Blockchain-based identity authentication methods, computer program products and nodes
JP4896537B2 (en) Method and system for asymmetric key security
AU2019204708A1 (en) Retrieving public data for blockchain networks using highly available trusted execution environments
CN114726643B (en) Data storage and access methods and devices on cloud platform
WO2019220317A1 (en) Improved systems and methods for storage, generation and verification of tokens used to control access to a resource
CN105721158A (en) Cloud safety privacy and integrity protection method and cloud safety privacy and integrity protection system
JP2009517911A (en) Proof of neighborhood using CPUFS
CN112910640A (en) Key signature method based on block chain technology
CN111566647B (en) Identity recognition system based on block chain
CN112436938B (en) Digital signature generation method and device and server
JP2005520364A (en) System and method for updating and extending a digitally signed certificate
US20200153622A1 (en) System and method for enforcement of correctness for key derivation
CN113434889A (en) Service data access method, device, equipment and storage medium
He et al. Public integrity auditing for dynamic regenerating code based cloud storage
CN114168924B (en) Method and system for group member mutual authentication based on digital certificate
WO2022205959A1 (en) Method and apparatus for sending transaction in blockchain, and method and apparatus for executing transaction in blockchain
Patil et al. Efficient privacy preserving and dynamic public auditing for storage cloud
US11930117B2 (en) Method and apparatus for reversible tokenization with support for embeddable role-based access control
JP6216567B2 (en) Biometric signature system
WO2023238308A1 (en) Authentication system, authentication server device, authentication method, and program

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210604