CN110992030A - Transaction method and system based on super account book fabric - Google Patents
Transaction method and system based on super account book fabric Download PDFInfo
- Publication number
- CN110992030A CN110992030A CN201911218122.7A CN201911218122A CN110992030A CN 110992030 A CN110992030 A CN 110992030A CN 201911218122 A CN201911218122 A CN 201911218122A CN 110992030 A CN110992030 A CN 110992030A
- Authority
- CN
- China
- Prior art keywords
- transaction
- encryption algorithm
- signature
- suite
- algorithm suite
- 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
Links
- 239000004744 fabric Substances 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012795 verification Methods 0.000 claims abstract description 29
- 230000000977 initiatory effect Effects 0.000 claims abstract description 20
- 238000012163 sequencing technique Methods 0.000 claims abstract description 17
- 230000006870 function Effects 0.000 claims description 68
- 238000004590 computer program Methods 0.000 claims description 16
- 238000010586 diagram Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3825—Use of electronic signatures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic 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/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3247—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2209/00—Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
- H04L2209/72—Signcrypting, i.e. digital signing and encrypting simultaneously
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- Accounting & Taxation (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Power Engineering (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention provides a transaction method and a transaction system based on a super book fabric. The method comprises the following steps: judging whether a national encryption algorithm is configured in the configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, and generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite; sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; receiving a transaction result from each endorsement node; verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite; assembling the transaction after the transaction signature is generated and the transaction result after the transaction signature is verified into transaction information; and sending the transaction information to a sequencing node in the blockchain network. The invention can flexibly interface two block chain networks, thereby reducing the realization cost.
Description
Technical Field
The invention relates to the technical field of super account books, in particular to a transaction method and a transaction system based on a super account book fabric.
Background
Hyperledger (hyper ledger) Fabric is a distributed ledger platform facing enterprises, introduces authority management, supports pluggable and extensible design, and is the first open source project facing alliance chain scenes. HyperLegridge Fabric has a plurality of application cases in the fields of finance, trade and the like at present.
Cryptographic algorithms play a key role in blockchain systems. The cryptographic algorithm is widely used in many functions such as an identity authentication module in the HyperLegendr Fabric and a Merkle Tree in a block chain.
The cryptographic algorithm used in HyperLegger Fabric is an international universal cryptographic algorithm, and the algorithms have a large number of uncontrollable factors, so that once the algorithms are attacked by lawless persons, the loss generated is immeasurable. The national cryptographic algorithm is independently developed by China and is an admission threshold in some fields. The cryptographic algorithm is introduced into the HyperLegendr Fabric source code, and the method plays an important role in the application of the Block chain technology framework of Fabric in the payment system field.
The existing HyperLegendr Fabric java SDK (Software Development Kit) cannot communicate with a HyperLegendr Fabric blockchain supporting a cryptographic algorithm on a network. If a set of Hyperl edge ger Fabric java SDK is optimized separately to realize the communication with the Hyperridge Fabric block chain network supporting the national cryptographic algorithm, the Hyperridge Fabric java SDK and the Hyperridge Fabric java SDK supporting the international universal cryptographic algorithm are different versions or program branches, and the unified maintenance is not convenient. Meanwhile, the applied block chain client program needs to be correspondingly modified, so that the implementation cost is increased.
Disclosure of Invention
The embodiments of the present invention mainly aim to provide a transaction method and system based on a super book fabric, which can flexibly interface two block link networks, facilitate uniform maintenance, and reduce implementation cost.
In order to achieve the above object, an embodiment of the present invention provides a transaction method based on a hyper book fabric, including:
judging whether a national encryption algorithm is configured in the configuration file;
loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite;
initiating a transaction, and generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network;
receiving a transaction result from each endorsement node;
verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
assembling the transaction after the transaction signature is generated and the transaction result after the transaction signature is verified into transaction information;
and sending the transaction information to a sequencing node in the blockchain network.
An embodiment of the present invention further provides a transaction system based on the super ledger fabric, including:
the first judgment unit is used for judging whether a national encryption algorithm is configured in the configuration file;
the loading unit is used for loading the national encryption algorithm suite when the national encryption algorithm is used in configuration; otherwise, loading an international encryption algorithm suite;
a transaction initiating unit for initiating a transaction;
the signature unit is used for generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
the sending unit is used for sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; sending the transaction information to a sequencing node in the blockchain network;
the receiving unit is used for receiving the transaction result from each endorsement node;
the verification unit is used for verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
and the assembling unit is used for assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the steps of the transaction method based on the hyper-ledger fabric when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the transaction method based on the hyper-book fabric.
The transaction method and the transaction system based on the super book fabric of the embodiment of the invention firstly judge whether a cryptographic algorithm is configured and used in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a hyper book fabric-based transaction method in an embodiment of the invention;
FIG. 2 is a code diagram of a cryptographic algorithm suite in an embodiment of the present invention;
fig. 3 is a block diagram of a transaction system based on a hyper book fabric according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the inconvenience of unified maintenance and the increase of implementation cost in the prior art, embodiments of the present invention provide a transaction method based on a super account book fabric, so as to flexibly interface two block chain networks, facilitate unified maintenance, and reduce implementation cost. The present invention will be described in detail below with reference to the accompanying drawings.
FIG. 1 is a flow chart of a transaction method based on a hyper book fabric in an embodiment of the invention. As shown in fig. 1, the transaction method based on the hyper book fabric includes:
s101: and judging whether a national encryption algorithm is configured in the configuration file.
S102: loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading the international encryption algorithm suite.
The embodiment of the invention dynamically loads the encryption algorithm suite in the globally unique factory through a java reflection mechanism, and the encryption algorithm suite is used for calling the Fabric java SDK upper code through realizing a uniform interface, so that the client can realize the non-perception of the specific algorithm logic. Different encryption algorithm logics are realized by configuring different encryption algorithm suites.
S103: initiating a transaction, and generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite.
Wherein, after initiating the transaction, further comprising: and generating a transaction ID of the transaction according to a hash function in the encryption algorithm suite.
When the encryption algorithm suite is a national secret encryption algorithm suite, the hash function in the encryption algorithm suite is a hash function (hash function) using SM3 algorithm, and the signature function is a signature function (sign function) using SM2 algorithm.
S104: and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network.
S105: transaction results from each endorsement node are received.
S106: and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite.
When the encryption algorithm suite is a national encryption algorithm suite, the signature verification function is a signature verification function (verify function) using an SM2 algorithm.
S107: and assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
In one embodiment, S107 includes: judging whether the number of the endorsement signatures which are verified to be correct meets a preset endorsement strategy or not; and when the preset endorsement strategy is met, assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
S108: and sending the transaction information to a sequencing node in the blockchain network.
The execution subject of the hyper book fabric-based transaction method shown in fig. 1 may be a fabric client. As can be seen from the process shown in fig. 1, the transaction method based on the hyper book fabric of the embodiment of the present invention first determines whether a cryptographic algorithm is configured in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
The specific process of the embodiment of the invention is as follows:
1. the fabric client judges whether a national encryption algorithm is configured in the configuration file or not; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading the international encryption algorithm suite.
For example, when the configuration in the configuration file uses the following code, the national encryption algorithm suite is loaded:
org.hyperledger.fabric.sdk.crypto.suite=org.hyperledger.fabric.sdk.security.CryptoSuiteGuo Mi。
in specific implementation, the hash function of the national encryption algorithm suite uses SM3 algorithm, and the original international encryption algorithm suite of fabric java sdk uses SHA256 algorithm; the signature/signature verification function of the national encryption algorithm suite uses an SM2 algorithm, and the original international encryption algorithm suite of fabric java sdk uses an ECDSA algorithm; the SM2 national secret certificate is analyzed by the national secret encryption algorithm suite, and the standard X509 certificate is analyzed by the original international encryption algorithm suite of fabric java sdk.
Fig. 2 is a code diagram of a national encryption algorithm suite in an embodiment of the present invention. As shown in fig. 2, the table whose header is "hlsdkjcrytosuitfactory" is a factory class.
2. The fabric client initiates a transaction, generates a transaction ID of the transaction according to a hash function in the encryption algorithm suite, and generates a transaction signature on the transaction according to a signature function in the encryption algorithm suite.
3. The fabric client sends the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network.
4. And each endorsement node verifies the transaction signature, executes the transaction after the verification is successful, generates a transaction result and generates the endorsement signature on the transaction result.
5. And each endorsement node sends the transaction result after the endorsement signature is generated to the fabric client.
6. The fabric client receives the transaction results from each endorsement node, and verifies the endorsement signature on each transaction result according to the signature verification function in the encryption algorithm suite.
7. The fabric client judges whether the number of the verified correct endorsement signatures meets a preset endorsement strategy; and when the preset endorsement strategy is met, assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
8. The fabric client sends the transaction information to a sequencing node in the blockchain network.
9. The sequencing node sends the transaction information to all nodes in the blockchain network. The transaction information comprises transaction valid information or transaction invalid information.
10. Each node in the blockchain network appends the transaction information to the blockchain and sends an update notification to the fabric client.
11. The fabric client receives the update notification.
To sum up, the transaction method based on the super book fabric of the embodiment of the present invention first determines whether a cryptographic algorithm is configured in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
Based on the same inventive concept, the embodiment of the invention also provides a transaction system based on the super ledger fabric, and as the problem solving principle of the system is similar to the transaction method based on the super ledger fabric, the implementation of the system can refer to the implementation of the method, and repeated parts are not described again.
Fig. 3 is a block diagram of a transaction system based on a hyper book fabric according to an embodiment of the present invention. As shown in fig. 3, the transaction system based on the hyper book fabric includes:
the first judgment unit is used for judging whether a national encryption algorithm is configured in the configuration file;
the loading unit is used for loading the national encryption algorithm suite when the national encryption algorithm is used in configuration; otherwise, loading an international encryption algorithm suite;
a transaction initiating unit for initiating a transaction;
the signature unit is used for generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
the sending unit is used for sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; sending the transaction information to a sequencing node in the blockchain network;
the receiving unit is used for receiving the transaction result from each endorsement node;
the verification unit is used for verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
and the assembling unit is used for assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
In one embodiment, the method further comprises the following steps:
and the transaction ID unit is used for generating the transaction ID of the transaction according to the hash function in the encryption algorithm suite.
In one embodiment, the method further comprises the following steps:
the second judgment unit is used for judging whether the number of the endorsement signatures which are verified correctly meets a preset endorsement strategy or not;
the assembly unit is specifically configured to: and when the preset endorsement strategy is met, assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
In one embodiment, when the encryption algorithm suite is a national encryption algorithm suite, the hash function in the encryption algorithm suite is a hash function using SM3 algorithm, the signature function is a signature function using SM2 algorithm, and the signature verification function is a signature verification function using SM2 algorithm.
To sum up, the transaction system based on the super book fabric of the embodiment of the present invention first determines whether a usage of a national encryption algorithm is configured in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor may implement all or part of the contents of the transaction method based on the hyper-ledger fabric when executing the computer program, for example, the processor may implement the following contents when executing the computer program:
judging whether a national encryption algorithm is configured in the configuration file;
loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite;
initiating a transaction, and generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network;
receiving a transaction result from each endorsement node;
verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
assembling the transaction after the transaction signature is generated and the transaction result after the transaction signature is verified into transaction information;
and sending the transaction information to a sequencing node in the blockchain network.
To sum up, the computer device of the embodiment of the present invention first determines whether a use of a national encryption algorithm is configured in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, may implement all or part of a transaction method based on a hyper-ledger fabric, for example, when the processor executes the computer program, the following may be implemented:
judging whether a national encryption algorithm is configured in the configuration file;
loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite;
initiating a transaction, and generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network;
receiving a transaction result from each endorsement node;
verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
assembling the transaction after the transaction signature is generated and the transaction result after the transaction signature is verified into transaction information;
and sending the transaction information to a sequencing node in the blockchain network.
To sum up, the computer-readable storage medium of the embodiment of the present invention first determines whether a cryptographic algorithm is configured in a configuration file; loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite; initiating a transaction, generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite, and sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; then receiving a transaction result from each endorsement node; and verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite, finally assembling the transaction after generating the transaction signature and the verified transaction result into transaction information, and sending the transaction information to a sequencing node in the block chain network, so that the two block chain networks can be flexibly connected, and the implementation cost is reduced.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, or devices described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
Claims (10)
1. A transaction method based on a hyper book fabric is characterized by comprising the following steps:
judging whether a national encryption algorithm is configured in the configuration file;
loading a national encryption algorithm suite when a national encryption algorithm is configured to be used; otherwise, loading an international encryption algorithm suite;
initiating a transaction, and generating a transaction signature on the transaction according to a signature function in an encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network;
receiving a transaction result from each endorsement node;
verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
assembling the transaction after the transaction signature is generated and the transaction result after the transaction signature is verified into transaction information;
and sending the transaction information to a sequencing node in the block chain network.
2. The hyper book fabric-based transaction method of claim 1, further comprising, after initiating a transaction:
and generating the transaction ID of the transaction according to the hash function in the encryption algorithm suite.
3. The hyper book fabric-based transaction method of claim 1, wherein assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information comprises:
judging whether the number of the endorsement signatures which are verified to be correct meets a preset endorsement strategy or not;
and when the preset endorsement strategy is met, assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
4. The hyper book fabric-based transaction method of claim 1,
when the encryption algorithm suite is a national encryption algorithm suite, the hash function in the encryption algorithm suite is a hash function using an SM3 algorithm, the signature function is a signature function using an SM2 algorithm, and the signature verification function is a signature verification function using an SM2 algorithm.
5. A transaction system based on a hyper book fabric, comprising:
the first judgment unit is used for judging whether a national encryption algorithm is configured in the configuration file;
the loading unit is used for loading the national encryption algorithm suite when the national encryption algorithm is used in configuration; otherwise, loading an international encryption algorithm suite;
a transaction initiating unit for initiating a transaction;
the signature unit is used for generating a transaction signature on the transaction according to a signature function in the encryption algorithm suite; the encryption algorithm suite is a national encryption algorithm suite or an international encryption algorithm suite;
the sending unit is used for sending the transaction after the transaction signature is generated to a plurality of endorsement nodes in the blockchain network; sending transaction information to a sequencing node in the blockchain network;
the receiving unit is used for receiving the transaction result from each endorsement node;
the verification unit is used for verifying the endorsement signature on each transaction result according to a signature verification function in the encryption algorithm suite;
and the assembling unit is used for assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
6. The hyper book fabric-based transaction system of claim 5, further comprising:
and the transaction ID unit is used for generating the transaction ID of the transaction according to the hash function in the encryption algorithm suite.
7. The hyper book fabric-based transaction system of claim 5, further comprising:
the second judgment unit is used for judging whether the number of the endorsement signatures which are verified correctly meets a preset endorsement strategy or not;
the assembly unit is specifically configured to: and when the preset endorsement strategy is met, assembling the transaction after the transaction signature is generated and the verified transaction result into transaction information.
8. The hyper book fabric-based transaction system of claim 5,
when the encryption algorithm suite is a national encryption algorithm suite, the hash function in the encryption algorithm suite is a hash function using an SM3 algorithm, the signature function is a signature function using an SM2 algorithm, and the signature verification function is a signature verification function using an SM2 algorithm.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of the hyper book fabric-based transaction method of any of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the hyper book fabric-based transaction method of any of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911218122.7A CN110992030A (en) | 2019-12-03 | 2019-12-03 | Transaction method and system based on super account book fabric |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911218122.7A CN110992030A (en) | 2019-12-03 | 2019-12-03 | Transaction method and system based on super account book fabric |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110992030A true CN110992030A (en) | 2020-04-10 |
Family
ID=70089457
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911218122.7A Pending CN110992030A (en) | 2019-12-03 | 2019-12-03 | Transaction method and system based on super account book fabric |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110992030A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767566A (en) * | 2020-06-18 | 2020-10-13 | 安徽旅贲科技有限公司 | Partial substitution integration method and system of CFL authentication system in Fabric system |
CN112672098A (en) * | 2020-12-30 | 2021-04-16 | 北京弈天诚达科技有限公司 | Cloud video conference encryption method, device and system |
CN112737779A (en) * | 2020-12-30 | 2021-04-30 | 深圳市宝能投资集团有限公司 | Service method and device for cipher machine, cipher machine and storage medium |
CN113364776A (en) * | 2021-06-04 | 2021-09-07 | 北银金融科技有限责任公司 | Method and system for verifying block link point usage cryptographic algorithm communication |
CN113379419A (en) * | 2021-06-25 | 2021-09-10 | 远光软件股份有限公司 | Transaction information access method and system and computer equipment |
CN113452521A (en) * | 2021-06-28 | 2021-09-28 | 杭州云象网络技术有限公司 | Block chain state password adaptation method, state password adapter, system and device |
CN115549928A (en) * | 2022-11-30 | 2022-12-30 | 山东区块链研究院 | Signature checking method, system, storage medium and equipment in block chain system |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103747001A (en) * | 2014-01-14 | 2014-04-23 | 中电长城(长沙)信息技术有限公司 | Audio-access mobile payment terminal based on security algorithm and communication method based on security algorithm |
CN108777625A (en) * | 2018-06-28 | 2018-11-09 | 腾讯科技(深圳)有限公司 | Verification method, device and system, storage medium, the electronic device of signature |
CN109146490A (en) * | 2018-10-11 | 2019-01-04 | 北京京东尚科信息技术有限公司 | block generation method, device and system |
CN109389506A (en) * | 2018-10-23 | 2019-02-26 | 四川大学 | Detection method for transaction data source under super account book multichain scene |
CN109598616A (en) * | 2018-12-09 | 2019-04-09 | 大连飞创信息技术有限公司 | A method of introducing the block chain data-privacy protection of arbitration mechanism |
CN109767212A (en) * | 2018-10-11 | 2019-05-17 | 平安科技(深圳)有限公司 | Assets exchanging method, system, terminal and storage medium based on block chain |
CN109981297A (en) * | 2019-04-11 | 2019-07-05 | 百度在线网络技术(北京)有限公司 | Block chain processing method, device, equipment and storage medium |
CN110070362A (en) * | 2019-05-05 | 2019-07-30 | 北京共识数信科技有限公司 | A kind of financial industry block chain transaction system using national secret algorithm |
CN110163004A (en) * | 2018-02-14 | 2019-08-23 | 华为技术有限公司 | A kind of method, relevant device and system that block chain generates |
CN110189122A (en) * | 2019-04-30 | 2019-08-30 | 阿里巴巴集团控股有限公司 | The method and device fixed time for the data anchor on block chain, electronic equipment |
CN110377635A (en) * | 2019-07-02 | 2019-10-25 | 银清科技(北京)有限公司 | Multiple method and device is looked into the cross-border payment of RMB based on block chain framework |
-
2019
- 2019-12-03 CN CN201911218122.7A patent/CN110992030A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103747001A (en) * | 2014-01-14 | 2014-04-23 | 中电长城(长沙)信息技术有限公司 | Audio-access mobile payment terminal based on security algorithm and communication method based on security algorithm |
CN110163004A (en) * | 2018-02-14 | 2019-08-23 | 华为技术有限公司 | A kind of method, relevant device and system that block chain generates |
CN108777625A (en) * | 2018-06-28 | 2018-11-09 | 腾讯科技(深圳)有限公司 | Verification method, device and system, storage medium, the electronic device of signature |
CN109146490A (en) * | 2018-10-11 | 2019-01-04 | 北京京东尚科信息技术有限公司 | block generation method, device and system |
CN109767212A (en) * | 2018-10-11 | 2019-05-17 | 平安科技(深圳)有限公司 | Assets exchanging method, system, terminal and storage medium based on block chain |
CN109389506A (en) * | 2018-10-23 | 2019-02-26 | 四川大学 | Detection method for transaction data source under super account book multichain scene |
CN109598616A (en) * | 2018-12-09 | 2019-04-09 | 大连飞创信息技术有限公司 | A method of introducing the block chain data-privacy protection of arbitration mechanism |
CN109981297A (en) * | 2019-04-11 | 2019-07-05 | 百度在线网络技术(北京)有限公司 | Block chain processing method, device, equipment and storage medium |
CN110189122A (en) * | 2019-04-30 | 2019-08-30 | 阿里巴巴集团控股有限公司 | The method and device fixed time for the data anchor on block chain, electronic equipment |
CN110070362A (en) * | 2019-05-05 | 2019-07-30 | 北京共识数信科技有限公司 | A kind of financial industry block chain transaction system using national secret algorithm |
CN110377635A (en) * | 2019-07-02 | 2019-10-25 | 银清科技(北京)有限公司 | Multiple method and device is looked into the cross-border payment of RMB based on block chain framework |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767566A (en) * | 2020-06-18 | 2020-10-13 | 安徽旅贲科技有限公司 | Partial substitution integration method and system of CFL authentication system in Fabric system |
CN111767566B (en) * | 2020-06-18 | 2023-07-18 | 安徽旅贲科技有限公司 | Partial replacement integration method and system of CFL authentication system in Fabric system |
CN112672098A (en) * | 2020-12-30 | 2021-04-16 | 北京弈天诚达科技有限公司 | Cloud video conference encryption method, device and system |
CN112737779A (en) * | 2020-12-30 | 2021-04-30 | 深圳市宝能投资集团有限公司 | Service method and device for cipher machine, cipher machine and storage medium |
CN112672098B (en) * | 2020-12-30 | 2022-09-20 | 北京真视通数字科技有限公司 | Cloud video conference encryption method, device and system |
CN113364776A (en) * | 2021-06-04 | 2021-09-07 | 北银金融科技有限责任公司 | Method and system for verifying block link point usage cryptographic algorithm communication |
CN113379419A (en) * | 2021-06-25 | 2021-09-10 | 远光软件股份有限公司 | Transaction information access method and system and computer equipment |
CN113379419B (en) * | 2021-06-25 | 2022-08-16 | 远光软件股份有限公司 | Transaction information access method and system and computer equipment |
CN113452521A (en) * | 2021-06-28 | 2021-09-28 | 杭州云象网络技术有限公司 | Block chain state password adaptation method, state password adapter, system and device |
CN115549928A (en) * | 2022-11-30 | 2022-12-30 | 山东区块链研究院 | Signature checking method, system, storage medium and equipment in block chain system |
CN115549928B (en) * | 2022-11-30 | 2023-06-13 | 山东区块链研究院 | Signature verification method, system, storage medium and equipment in block chain system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110992030A (en) | Transaction method and system based on super account book fabric | |
KR102382474B1 (en) | System and method for establishing trust using secure transmission protocols | |
US10164963B2 (en) | Enforcing server authentication based on a hardware token | |
CN113474774A (en) | System and method for approving a new validator | |
EP3759630A1 (en) | Systems and methods for controlling access to a blockchain | |
CN110177124B (en) | Identity authentication method based on block chain and related equipment | |
KR101799366B1 (en) | Server Apparatus for Dynamic Secure Module and Driving Method Thereof | |
CN104486343A (en) | Method and system for double-factor bidirectional authentication | |
US20210241270A1 (en) | System and method of blockchain transaction verification | |
US20220294637A1 (en) | System and Method of Establishing a Trusted Relationship in a Distributed System | |
KR20180027323A (en) | System and method for authenticating critical operations on solid-state drives | |
WO2019178763A1 (en) | Certificate importing method and terminal | |
JP2022525551A (en) | Preventing erroneous transmission of copies of data records to distributed ledger systems | |
CN111769956B (en) | Service processing method, device, equipment and medium | |
MX2007013310A (en) | Method, system, and program product for connecting a client to a network. | |
CN109388923B (en) | Program execution method and device | |
US20230082949A1 (en) | Systems and methods for implementing indirect certificate pinning | |
WO2023124420A1 (en) | Application signature methods and system, transaction terminal and service platform | |
CN112702419B (en) | Data processing method, device, equipment and storage medium based on block chain | |
CN114760070A (en) | Digital certificate issuing method, digital certificate issuing center and readable storage medium | |
CN111259411B (en) | Block chain management method, device, electronic equipment and readable storage medium | |
WO2023155642A1 (en) | Identity authentication using time-based one-time password algorithm | |
JP7334280B2 (en) | Program verification method and device, platform and user terminal, and online service system | |
CN112801662A (en) | Business link access management method and system based on intelligent block chain contract | |
CN111522563A (en) | Block chain-based terminal upgrade protection system and method |
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 |
Application publication date: 20200410 |
|
RJ01 | Rejection of invention patent application after publication |