CN110517045A - Block chain data processing method, device, equipment and storage medium - Google Patents

Block chain data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN110517045A
CN110517045A CN201911002855.7A CN201911002855A CN110517045A CN 110517045 A CN110517045 A CN 110517045A CN 201911002855 A CN201911002855 A CN 201911002855A CN 110517045 A CN110517045 A CN 110517045A
Authority
CN
China
Prior art keywords
target
signature
unified
block chain
data structure
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.)
Granted
Application number
CN201911002855.7A
Other languages
Chinese (zh)
Other versions
CN110517045B (en
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201911002855.7A priority Critical patent/CN110517045B/en
Publication of CN110517045A publication Critical patent/CN110517045A/en
Application granted granted Critical
Publication of CN110517045B publication Critical patent/CN110517045B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses a kind of block chain data processing method, device, equipment and storage mediums.This method comprises: determining target user's target transaction data to be processed;Based on Target Signature algorithm, it is digitally signed using the block chain key pair target transaction data of target user, to obtain Target Signature content;According to Target Signature algorithm and the Target Signature content, the unified signature result with unified signed data structure is generated.The embodiment of the present invention has the unified signature result of unified signed data structure by generating, and the identification information of Target Signature algorithm is dissolved into unified signature result, realize the unification of signed data structure in block chain network, block chain network is supported to use unified digital signature technology, it avoids the additional independent addition of signature algorithm information and sends, so that merging signature algorithm information in signature result, the signature algorithm used is directly embodied in unified signature result, convenient for carrying out sign test to signature result.

Description

Block chain data processing method, device, equipment and storage medium
Technical field
The present embodiments relate to block chain technical field more particularly to a kind of block chain data processing method, device, set Standby and storage medium.
Background technique
With the continuous development of Internet technology, a kind of decentralization and open and clear block chain technology is come into being. Block chain is the new application mould of the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm Formula.
Wherein, in order to prove that the Transaction Information transmitted in block chain is strictly to be signed and issued by sender, with And determine the integrality of Transaction Information, it generallys use digital signature technology and signature and sign test is carried out to Transaction Information.Digital signature Technology is the private key encryption by summary info with sender, sends recipient to together with Transaction Information.Correspondingly, recipient is only The public key of useful sender could decrypt encrypted summary info, then generate one to the Transaction Information received with hash function A summary info, the summary info obtained with decryption compare, and realize the sign test to Transaction Information.
Signature algorithm type at present in block chain network is more, such as ECDSA, EDDSA, Schnorr, ring signatures, multiple Signature etc. does not have in block chain network since the binary signature data generated based on all kinds of signature algorithms have diversity There is unified digital signature technology, increases the difficulty and uncertainty of sign test.
Summary of the invention
The embodiment of the invention provides a kind of block chain data processing method, device, equipment and storage mediums, can support Block chain network uses unified digital signature technology.
In a first aspect, executed the embodiment of the invention provides a kind of block chain data processing method by user node, it is described Method includes:
Determine target user's target transaction data to be processed;
Based on Target Signature algorithm, target transaction data described in the block chain key pair using the target user carry out digital label Name, to obtain Target Signature content;
According to the Target Signature algorithm and the Target Signature content, the unified signature with unified signed data structure is generated As a result.
Second aspect, the embodiment of the invention provides a kind of block chain data processing methods, are executed by user node, described Method includes:
Obtain the block chain key of target user, target transaction data, and the unified signature with unified signed data structure As a result;
According to the unified signature result and the unified signed data structure, the Target Signature of the target transaction data is determined Algorithm and Target Signature content;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to institute It states Target Signature content and carries out sign test.
The third aspect, the embodiment of the invention provides a kind of block chain data processing equipments, are configured at user node, described Device includes:
Transaction Information determining module, for determining target user's target transaction data to be processed;
Digital Signature module, for being based on Target Signature algorithm, target described in the block chain key pair using the target user Transaction Information is digitally signed, to obtain Target Signature content;
Signature result generation module, for according to the Target Signature algorithm and the Target Signature content, generating to have unification The unified signature result of signed data structure.
Fourth aspect, the embodiment of the invention provides a kind of block chain data processing equipments, are configured at user node, described Device includes:
Signature result obtains module, for obtaining the block chain key of target user, target transaction data, and there are unified label The unified signature result of name data structure;
Digital signature determining module, described in determining according to the unified signature result and the unified signed data structure The Target Signature algorithm and Target Signature content of target transaction data;
Sign test module, for being based on the Target Signature algorithm, block chain key and the target using the target user Transaction Information carries out sign test to the Target Signature content.
5th aspect, the embodiment of the invention provides a kind of equipment, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Block chain data processing method described in existing first aspect present invention any embodiment, or realize that second aspect of the present invention is any Block chain data processing method described in embodiment.
6th aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes block chain data processing method described in first aspect present invention any embodiment when the program is executed by processor, Or realize block chain data processing method described in second aspect of the present invention any embodiment.
The embodiment of the present invention determines target user's target transaction to be processed using target user as the sender of Transaction Information Data are based on Target Signature algorithm, are digitally signed, are obtained using the block chain key pair target transaction data of target user Target Signature content, finally according to Target Signature algorithm and Target Signature content, common generate has unified signed data structure Unified signature result.The embodiment of the present invention has the unified signature result of unified signed data structure by generating, and by mesh The identification information of tag name algorithm is dissolved into unified signature result, and signed data structure in block chain network is realized It is unified, it supports block chain network to use unified digital signature technology, avoids additional independent addition and the hair of signature algorithm information It send, so that merging signature algorithm information in signature result, directly embodies the signature algorithm used in unified signature result, be convenient for Sign test is carried out to signature result.
Detailed description of the invention
Fig. 1 is a kind of flow chart for block chain data processing method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow chart of block chain data processing method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow chart for block chain data processing method that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow chart for block chain data processing method that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram for block chain data processing equipment that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for block chain data processing equipment that the embodiment of the present invention six provides;
Fig. 7 is a kind of structural schematic diagram for equipment that the embodiment of the present invention seven provides.
Specific embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this Locate described specific embodiment and is used only for explaining the embodiment of the present invention, rather than limitation of the invention.It further needs exist for Bright, only parts related to embodiments of the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
It also should be noted that illustrate only part relevant to the application for ease of description, in attached drawing rather than Full content.It should be mentioned that some exemplary embodiments are described before exemplary embodiment is discussed in greater detail At the processing or method described as flow chart.Although operations (or step) are described as the processing of sequence by flow chart, It is that many of these operations can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of operations can be by again It arranges.The processing can be terminated when its operations are completed, it is also possible to have the additional step being not included in attached drawing. The processing can correspond to method, function, regulation, subroutine, subprogram etc..
Embodiment one
Fig. 1 is a kind of flow chart for block chain data processing method that the embodiment of the present invention one provides, and the present embodiment is applicable to The case where user node in block chain network is digitally signed Transaction Information, this method can be by a kind of block chain data Device is managed to execute, which can realize by the way of software and/or hardware, preferably be arranged in user node.The party Method specifically includes as follows:
S110, target user's target transaction data to be processed are determined.
In the specific embodiment of the invention, target transaction data refer to the Transaction Information of pending digital signature, such as send out Transaction original contents between the side of sending and recipient, for sender by the target transaction data added with digital signature to reception Side is sent, correspondingly, recipient can verify target transaction data according to digital signature.Wherein, it is with scene of trading Example, Transaction Information may include transaction input information, transaction output information, exchange hour information, transaction initiator's information, transaction Description information and ETC(Ethereum Classic, ether mill are classical) etc..Transaction Information can be the bright of not encrypted processing Text is also possible to the ciphertext based on Encryption Algorithm processing.
In the present embodiment, target user refers to that the sender of target transaction data, target user pass through user node for mesh Mark at least one other users node into block chain network of transaction data transfer, for recipient by it is described at least one its He receives target transaction data by user node.
Wherein, user node can be common block chain node, be also possible to lightweight node, and user node can take It is engaged in one or more target users.Specifically, lightweight node is as the node in block chain network, it can be directly to block Chain sends request, and receives the Transaction Information of block chain network or other block chain node feeding backs.Equipment belonging to target user It can be used as user node, directly the Transaction Information of target user handled;Alternatively, equipment belonging to target user can be with It is communicatively coupled as external device and user node, user node, which can be used as, to be communicated between block chain and external device Channel, can receive information transmitted by external device and generates transaction request and be transmitted in block chain network, Yi Jixiang External device transmits the information obtained from block chain.Meanwhile user node is as the node in block chain network, it can be in area Transaction request is handled in block chain.
Specifically, target user can operate terminal device belonging to user node, or operation is communicated with user node The external device of connection initiates transaction request to block chain network, target transaction data is transmitted to block chain network In.Correspondingly, user node determines target user's target transaction data to be processed according to transaction request.
S120, it is based on Target Signature algorithm, carries out number using the block chain key pair target transaction data of target user Signature, to obtain Target Signature content.
In the specific embodiment of the invention, the block chain key of user may include private key and public key, and it is close to be based on block chain Key can be used for being digitally signed according to signature algorithm, or carry out signature verification according to signature algorithm, can be also used for basis Encryption Algorithm is encrypted or is decrypted.In digital signature procedure, private key commonly used in user to Transaction Information to be sent into Row ciphering signature, public key are decrypted and verify to the Transaction Information received for other users.The block chain key of user Can the acquisition in the transaction request for receiving user, or in the target transaction data to be processed for determining target user It obtains.
Wherein, the block chain key of user can be when creating the block chain account of user, be added according to elliptic curve class What Target ellipse curve employed in close algorithm generated.For example, user node obtains random number from block chain network, or User node is locally based on generating random number rule and generates random number, using random number as parsing corresponding to Target ellipse curve The parameter of expression formula, by solving analytical expression corresponding to Target ellipse curve, using solving result as the block of user Value part in chain key.Correspondingly, Target ellipse calibration curve information can be gone out according to the block chain cipher key-extraction of user.
In the present embodiment, Target Signature algorithm refers to user node target transaction data currently to be processed to target user When being digitally signed, used specific Digital Signature Algorithm (Digital Signature Algorithm, DSA).Number Word signature algorithm generallys use the private key of Transaction Information sender to entire Transaction Information to be sent based on certain operation rule Carry out calculation process, the Target Signature content of the digital signature of generation.Wherein, Digital Signature Algorithm includes but is not limited to ECDSA, EdDSA, multi-signature algorithm and ring signatures algorithm etc..When Target Signature algorithm can be target user's initiation request Specified algorithm is also possible to user node and is based on the selected algorithms of factors such as intelligent contract.It can in Target Signature algorithm To include one or more Digital Signature Algorithms.
Specifically, according to the operation rule of Target Signature algorithm defined, it is whole using the block chain key pair of target user A target transaction data carry out calculation process, generate the Target Signature content including digital signature and target transaction data.Example Property, it is based on Target Signature algorithm, user node generates abstract using hash function from target transaction data, and uses target The block chain key pair of the user abstract encrypts, and the corresponding digital signature of target transaction data is obtained, as Target Signature Content.
S130, according to Target Signature algorithm and Target Signature content, generate the unified label with unified signed data structure Name result.
In the specific embodiment of the invention, and indirect sent out Target Signature content as final signature result It send, but combining target signature algorithm carries out secondary encapsulation to original signature, generates the unification with unified signed data structure Signature result.Wherein, have in the unified signature result of unified signed data structure not only including the mark of Target Signature algorithm Information, and unification is carried out to the data structure of signature algorithms different in block chain network, convenient for being formed in block chain network Support the unified digital signature technology of different signature algorithms.
In the present embodiment, for Target Signature content, each signature algorithm all has corresponding original signature data knot The corresponding original signature data structure of structure, i.e. signature algorithm is for recording Target Signature content.Correspondingly, according to signature algorithm pair The original signature data structure answered can parse the information such as Target Signature content and digital signature therein, therefrom for connecing Debit verifies according to digital signature.
In the present embodiment, for Target Signature content and Target Signature algorithm, to the original signature number of all signature algorithms Secondary encapsulation is carried out according to structure, unified signed data structure is configured for all signature algorithms, i.e., in unified signed data structure It not only include Target Signature content, but also the identification information including Target Signature algorithm.Correspondingly, unified signed data structure In at least may include signature contents part and signature algorithm identifier part, using signature algorithm identifier information as in signature result A part, rather than independent information not only increases the degree of association of signature algorithm identifier information and signature contents, avoids with only Easily lead to loss of data when vertical form information transmission, and there is algorithm mark action to signature contents, convenient for recipient according to Signature algorithm identifier quickly determines Target Signature algorithm, and directlys adopt Target Signature algorithm and verify to signature contents.
Specifically, determining the signature contents part in unified signed data structure, wherein can according to Target Signature content Can distinguish coding rule based on certain coding rule, such as DER(Distinguished Encoding Rules), it is right Target Signature content is encoded, and Target Signature byte arrays are obtained, by Target Signature byte arrays, as unified signed data The value of signature contents part in structure.According to Target Signature algorithm, the signature algorithm in unified signed data structure is determined Identification division, wherein if Target Signature algorithm includes elliptic curve digital signature algorithm, it is determined that digital signature of elliptic curve is calculated The Target ellipse curve that method uses, according to the mark of the identification information of elliptic curve digital signature algorithm and Target ellipse curve Information determines the signature algorithm identifier part in unified signed data structure.It is calculated according to determining signature contents part and signature Method identification division generates unified signature result.
In addition, considering based on the difficulty write, parse and generated and convenience to signature result, one can also be used Fixed data exchange ways, such as JSON (JavaScript Object Notation, object numbered musical notation) data interchange format, will Unified signature result is converted into byte arrays format, obtains the final signature result of target transaction data.
Illustratively, it is assumed that Target Signature algorithm is multi-signature algorithm, and assumes the original signature data structure generated It is as follows:
type MultiSignature struct {
S []byte
R []byte
}。
Wherein, MultiSignature indicates multi-signature algorithm;Type MultiSignature struct indicate with The corresponding original signature data structure of the multi-signature algorithm of byte arrays format;S and R indicates the target label of byte array form Name content.According to Target Signature algorithm and Target Signature content, the following system with unified signed data structure can be generated One signature result:
type XuperSignature struct {
SigType string
SigContent []byte
}。
Wherein, XuperSignature indicates the unified signature result of final unified signed data structure;type XuperSignature struct indicates the unified signed data structure that secondary encapsulation is carried out to Target Signature content;SigType It indicates the algorithm mark of Target Signature algorithm, such as can indicate multi-signature with symbolization " MultiSig ", " RingSig " table Show ring signatures algorithm;The Target Signature content of SigContent expression byte array form.
The technical solution of the present embodiment determines that target user is to be processed using target user as the sender of Transaction Information Target transaction data are based on Target Signature algorithm, carry out number using the block chain key pair target transaction data of target user Signature, obtains Target Signature content, and finally according to Target Signature algorithm and Target Signature content, common generate has unified signature The unified signature result of data structure.The embodiment of the present invention has the unified signature knot of unified signed data structure by generating Fruit, and the identification information of Target Signature algorithm is dissolved into unified signature result, it realizes and signs in block chain network The unification of data structure supports block chain network to use unified digital signature technology, avoids the additional only of signature algorithm information Vertical addition and transmission directly embody the label used in unified signature result so that merging signature algorithm information in signature result Name algorithm, convenient for carrying out sign test to signature result.
Embodiment two
The present embodiment on the basis of the above embodiment 1, provides a preferred implementation side of block chain data processing method Formula, can be according to Target Signature algorithm and Target Signature content, and generating includes signature contents part and signature algorithm identifier part This unifies the unified signature result of signed data structure.Fig. 2 is at a kind of block chain data provided by Embodiment 2 of the present invention The flow chart of reason method, as shown in Fig. 2, this method specifically include it is as follows:
S210, target user's target transaction data to be processed are determined.
S220, it is based on Target Signature algorithm, carries out number using the block chain key pair target transaction data of target user Signature, to obtain Target Signature content.
In the specific embodiment of the invention, according to the operation rule of Target Signature algorithm defined, using target user's The entire target transaction data of block chain key pair carry out calculation process, and generating includes the Target Signature content signed.Further, For Target Signature content, each signature algorithm all has corresponding original signature data structure, i.e. signature algorithm is corresponding Original signature data structure is for recording Target Signature content.
S230, according to Target Signature content, determine the signature contents part in unified signed data structure.
In the specific embodiment of the invention, unified signed data structure is the form of expression of unified signature result, unified to sign At least dividing in name data structure has signature contents part, for recording the digital signature for target transaction data, i.e. target Signature contents.The application can be carried out with the original signature data structure of the Target Signature content generated based on Target Signature algorithm Secondary treatment, as the signature contents part in unified signed data structure.
Optionally, Target Signature content is encoded, obtains Target Signature byte arrays;By Target Signature byte number Group, the value as the signature contents part in unified signed data structure.
In the present embodiment, Target Signature content can be encoded based on certain coding rule, with this unified signature The form of expression of content obtains the Target Signature content of byte array form, thus using Target Signature byte arrays as unified The value of signature contents part in signed data structure.Wherein it is possible to ASN.1 language standard is based on, using based on binary system DER coding standard Target Signature content is encoded.
S240, according to Target Signature algorithm, determine the signature algorithm identifier part in unified signed data structure.
In the specific embodiment of the invention, at least also dividing in unified signed data structure has signature algorithm identifier part, For recording the signature algorithm for generating Target Signature content, the unique identification information of Target Signature algorithm can be stored in signature Algorithm identification division.Wherein, if in Target Signature algorithm can also include at least one optional algorithm details calculation condition, example As different elliptic curves can be used in circular curve Digital Signature Algorithm, then it may further determine that at least one algorithm is thin Calculation condition is saved, and by the identification information one of the identification information of at least one the algorithm details calculation condition and Target Signature algorithm And it is recorded in signature algorithm identifier part, it is used for abundant identification signature algorithm, avoids the uncertain of any factor in signature algorithm Situation generates, and the uncertainty of any factor is avoided to cause Target Signature algorithm that can not execute.
Optionally, if Target Signature algorithm includes elliptic curve digital signature algorithm, it is determined that digital signature of elliptic curve The Target ellipse curve that algorithm uses;According to the identification information of elliptic curve digital signature algorithm and the mark of Target ellipse curve Know information, determines the signature algorithm identifier part in unified signed data structure.
It may include one or more Digital Signature Algorithms in Target Signature algorithm, in view of elliptic curve in the present embodiment It can be digitally signed, therefore can be identified according to algorithm using different elliptic curves in Digital Signature Algorithm, if detection Include elliptic curve digital signature algorithm to Target Signature algorithm, then needs to further determine that used Target ellipse curve. Wherein it is possible to which the elliptic curve information according to used by elliptic curve digital signature algorithm in Target Signature algorithm determines that target is ellipse Circular curve can also extract Target ellipse calibration curve information from the block chain key of target user.Finally by elliptic curve word The identification information of signature algorithm and the identification information of Target ellipse curve are used as the value of signature algorithm identifier part together.
S250, the unified signature result including signature algorithm identifier part and signature contents part is generated.
In the specific embodiment of the invention, and indirect sent out Target Signature content as final signature result It send, but combining target signature algorithm carries out secondary encapsulation to original signature data structure, based on unified signed data structure, root According to signature algorithm identifier part and signature contents part, unified signature result is generated.
S260, byte arrays format is converted by unified signature result, obtains the final signature result of target transaction data.
In the specific embodiment of the invention, based on the difficulty and convenience writing, parse and generate to signature result Consider, certain data exchange ways can also be used, for example, by using JSON (JavaScript Object Notation, it is right As numbered musical notation) data interchange format, byte arrays format is converted by unified signature result, obtains the final label of target transaction data Name result.Therefore final signature result not only formally obtains unification, i.e., the final signature result that different signature algorithms generate Form be all identical, and final signature result from content by signature contents together with signature algorithm Information encapsulation, Signature algorithm information therein is for being identified the signature algorithm of signature contents, and then this kind of signature scheme supports block chain All Digital Signature Algorithms in network, so that all Digital Signature Algorithms obtain unification, convenient for the transmission and uniformly of Transaction Information Processing.
The technical solution of the present embodiment determines that target user is to be processed using target user as the sender of Transaction Information Target transaction data are based on Target Signature algorithm, carry out number using the block chain key pair target transaction data of target user Signature, obtains Target Signature content, determines the signature contents part in unified signed data structure, root according to Target Signature content The signature algorithm identifier part in unified signed data structure is determined according to Target Signature algorithm, and generating includes signature algorithm identifier portion Divide the unified signature result with signature contents part, and convert byte arrays format for unified signature result, obtains target thing The final signature result for data of being engaged in.The embodiment of the present invention has the unified signature result of unified signed data structure by generating, And be dissolved into the identification information of Target Signature algorithm in unified signature result, realize signed data in block chain network The unification of structure supports block chain network to use unified digital signature technology, the additional of signature algorithm information is avoided independently to add Adduction is sent, so that merging signature algorithm information in signature result, the signature used is directly embodied in unified signature result and is calculated Method, convenient for carrying out sign test to signature result.
Embodiment three
Fig. 3 is a kind of flow chart for block chain data processing method that the embodiment of the present invention three provides, and the present embodiment is applicable to The case where user node carries out sign test to the Transaction Information received, this method can be held by a kind of block chain data processing equipment Row, which can be realized by the way of software and/or hardware, preferably be arranged in user node.This method specifically includes It is as follows:
S310, the block chain key for obtaining target user, target transaction data, and the unification with unified signed data structure Signature result.
In the specific embodiment of the invention, target transaction data refer to the Transaction Information to sign test, for example, sender with connect Transaction original contents between debit, so that recipient can verify target transaction data according to digital signature.Wherein, By taking scene of trading as an example, Transaction Information may include transaction input information, transaction output information, exchange hour information, transaction hair Person's information, transaction description information and ETC(Ethereum Classic are played, ether mill is classical) etc..Transaction Information can be not The plaintext of encrypted processing is also possible to the ciphertext based on Encryption Algorithm processing.
In the present embodiment, target user refers to that the sender of target transaction data, target user pass through user node for mesh Mark at least one other users node into block chain network of transaction data transfer, for recipient by it is described at least one its He receives target transaction data by user node.
In the present embodiment, based on the above embodiment in digital signature of sender's user node to target transaction data, mesh The digital signature for marking Transaction Information is no longer single signature contents, but has the unified signature knot of unified signed data structure Fruit.Wherein, at least dividing in unified signed data structure has signature contents part and signature algorithm identifier part, signature contents portion Divide for recording the digital signature for target transaction data, signature algorithm identifier certain customers record target transaction data signature When signature algorithm information.It include the unified signature of signature contents and signature algorithm identifier based on unified signed data structural generation As a result, directly embodying signature algorithm used by signature contents by signature algorithm identifier part in unified signature result, it is convenient for Recipient quickly recognizes the signature algorithm of target transaction data, and using the signature algorithm identified to target transaction data into Row sign test.
Specifically, recipient user can be by the terminal device belonging to user node, or by logical with user node Believe the external device of connection, receives the target transaction data for carrying out digital signature transmitted in block chain network, it is corresponding to go back It can receive the corresponding unified signature result and sender i.e. mesh with unified signed data structure of target transaction data Mark the block chain key of user, such as public key.
Wherein, consider in view of the difficulty write, parse and generated and convenience to signature result, user node receives To signature result can be format conversion after final signature result.Optionally, obtaining has unified signed data structure Unified signature result includes: to convert byte arrays format for unified signature result, obtains the final signature of target transaction data As a result.Such as based on JSON data interchange format, carry out JSON conversion.And then obtaining the system with unified signed data structure During one signature result, the final signature result of the target transaction data of available byte arrays format, by target thing The final signature result of business data is converted into unified signed data structure, such as converts against JSON, obtains unified signature result.
S320, according to unified signature result and unified signed data structure, determine that the Target Signature of target transaction data is calculated Method and Target Signature content.
In the specific embodiment of the invention, according to unified signature result, from the signature algorithm mark of unified signed data structure Know the signature algorithm information for extracting target transaction data in part, determine Target Signature algorithm, from unified signed data structure The signature contents that target transaction data are extracted in signature contents part, determine Target Signature content.Wherein, if Target Signature algorithm Including elliptic curve digital signature algorithm, then elliptic curve letter is extracted from the signature contents part of unified signed data structure Breath, determines the Target ellipse curve that elliptic curve digital signature algorithm uses.It wherein, can also be close from the block chain of target user Elliptic curve information is extracted in key.
S330, it is based on Target Signature algorithm, using the block chain key and target transaction data of target user, to target label Name content carries out sign test.
In the specific embodiment of the invention, pass through the identification information of signature algorithm in unified signature result, recipient user Node faces a binary signed data when obtaining target transaction data, will not know which kind of sign test of the selection is calculated Method is verified;The choosing will not be known for elliptic curve class signature algorithm in face of a binary signed data Select which kind of elliptic curve is verified.And then it is directly based upon the operation rule of the Target Signature algorithm identified, it is used using target The block chain key pair Target Signature content at family is decrypted, and is carried out according to decrypted result and the target transaction data received It compares, realizes the quick sign test to target transaction data.
Illustratively, it is based on Target Signature algorithm, user node is generated from target transaction data using hash function and plucked Want A;And be decrypted using block chain key Target Signature content, that is, digital signature of target user, abstract B is obtained, finally will Abstract A and abstract B are compared, if decrypted result is consistent with target transaction data, sign test data are correct;, whereas if Decrypted result is consistent with target transaction data, then sign test error in data.
In the present embodiment, in view of Target Signature content is directed to, each signature algorithm all has corresponding original signature number According to structure, i.e., the corresponding original signature data structure of signature algorithm is for recording Target Signature content, and unifies signed data knot The unified signature result of structure is for Target Signature content and Target Signature algorithm, to the original signature data of all signature algorithms Structure carries out what secondary encapsulation obtained.Therefore during sign test, first by the original signature data knot of Target Signature algorithm Structure is determined as target data structure, is decoded according to target data structure to Target Signature content, by Target Signature content It is decoded into target data structure, is and target by the Target Signature Content Transformation in the unified result for unifying signed data structure The consistent original signature data structure of signature algorithm, so that Target Signature algorithm is based on, using the block chain key of target user With target transaction data, sign test is carried out to the Target Signature content for being decoded into target data structure.
Wherein, if in Target Signature algorithm including elliptic curve digital signature algorithm, identified Target ellipse is used The block chain key pair Target Signature content of curve and target user are decrypted, according to decrypted result and the target received Transaction Information is compared, and realizes the quick sign test to target transaction data.Wherein, multi-signature algorithm etc. is needed multiple The algorithm that block chain key is digitally signed can be based on block chain during carrying out sign test with target transaction data The quantity of key is verified.Illustratively, it if the block chain number of keys of the target user obtained, is needed with Target Signature algorithm Block chain number of keys to be used is different, it is determined that sign test mistake;If the block chain number of keys of the target user obtained, with Target Signature algorithm needs block chain number of keys to be used identical, it is determined that the block chain of at least two target users of acquisition Whether elliptic curve used in key is identical;If the elliptic curve used is different, it is determined that sign test mistake.
The technical solution of the present embodiment, using target user as the sender of Transaction Information, user node obtains target user Block chain key, target transaction data, and the unified signature result with unified signed data structure sign according to unified As a result with unified signed data structure, the Target Signature algorithm and Target Signature content of target transaction data is determined, target is based on Signature algorithm carries out sign test to Target Signature content using the block chain key and target transaction data of target user.The present invention Embodiment has the unified signature result of unified signed data structure by receiving, so that merging signature algorithm letter in signature result Breath directly embodies the signature algorithm used in unified signature result, for sign test provide the judgement of signature algorithm according to, thus Sign test is carried out to target transaction data based on determining Target Signature algorithm, convenient for carrying out sign test to signature result.
Example IV
The present embodiment provides a preferred implementation side of block chain data processing method on the basis of above-described embodiment three Formula can verify digital signature based on the signed data structure of determining Target Signature algorithm and thaumatropy.Figure The flow chart of the 4 a kind of block chain data processing methods provided for the embodiment of the present invention four, as shown in figure 4, this method is specifically wrapped It includes as follows:
S410, the block chain key for obtaining target user, target transaction data, and the unification with unified signed data structure Signature result.
S420, the signature algorithm identifier part in signature result in unified signed data structure will be unified, as target thing The Target Signature algorithm for data of being engaged in;By the signature contents part in signed data structure unified in unified signature result, as mesh Mark the Target Signature content of Transaction Information.
In the specific embodiment of the invention, at least dividing in unified signed data structure has signature contents part and signature to calculate Method identification division, signature contents part are used to record the digital signature for target transaction data, and signature algorithm identifier part is used Family records signature algorithm information when target transaction data signature.According to unified signature result, from unified signed data structure The signature algorithm information that target transaction data are extracted in signature algorithm identifier part, determines Target Signature algorithm, signs from unified The signature contents that target transaction data are extracted in the signature contents part of data structure, determine Target Signature content.
Optionally, if Target Signature algorithm includes elliptic curve digital signature algorithm, according to unified signature result and system One signed data structure determines the Target ellipse curve that elliptic curve digital signature algorithm uses.
In the present embodiment, different elliptic curves can be used to carry out digital label in view of in elliptic curve digital signature algorithm Name, therefore can identify according to algorithm, if detecting, Target Signature algorithm includes elliptic curve digital signature algorithm, need from Elliptic curve information is extracted in the signature algorithm identifier part of unified signed data structure, determines elliptic curve digital signature algorithm The Target ellipse curve used.Wherein, Target ellipse calibration curve information can also be extracted from the block chain key of target user.
S430, the signed data structure by Target Signature algorithm, as target data structure.
In the specific embodiment of the invention, in view of Target Signature content is directed to, each signature algorithm all has corresponding The corresponding original signature data structure of original signature data structure, i.e. signature algorithm is signed for recording Target Signature content As a result unified signed data structure is used.Therefore during sign test, it is first determined original used by Target Signature algorithm Beginning signed data structure, using this with the consistent original signature data structure of Target Signature algorithm as target data structure.
S440, Target Signature content is decoded according to target data structure, by Target Signature content decoding at mesh Mark data structure.
In the specific embodiment of the invention, in view of Target Signature algorithm be typically only capable to consistent signed data knot itself Structure is parsed, therefore after the target data structure of true Target Signature algorithm, by Target Signature content decoding at number of targets According to structure.
Illustratively, it is assumed that have the unified signature result of unified signed data structure as follows:
type XuperSignature struct {
SigType string
SigContent []byte
}。
Wherein, SigType is signature algorithm identifier part, is judged according to SigType, determines that target transaction data are adopted With which kind of Target Signature algorithm.SigContent is signature contents part, can extract target thing according to SigContent Target Signature content, that is, the digital signature for data of being engaged in.
For another example assuming that Target Signature algorithm is multi-signature algorithm, it is determined that the corresponding target data knot of polyalgorithm Structure MultiSignature struct, by Target Signature content SigContent [] byte in above-mentioned unified signature result Be converted to following data structure:
type MultiSignature struct {
S []byte
R []byte
}。
Wherein, S and R indicates the Target Signature content of byte array form.
S450, it is based on Target Signature algorithm, using the block chain key and target transaction data of target user, to being decoded into The Target Signature content of target data structure carries out sign test.
In the specific embodiment of the invention, pass through the identification information of signature algorithm in unified signature result, recipient user Node faces a binary signed data when obtaining target transaction data, will not know which kind of sign test of the selection is calculated Method is verified;The choosing will not be known for elliptic curve class signature algorithm in face of a binary signed data Select which kind of elliptic curve is verified.And then it is directly based upon the operation rule of the Target Signature algorithm identified, it is used using target The block chain key pair Target Signature content at family is decrypted, and is carried out according to decrypted result and the target transaction data received It compares, realizes the quick sign test to target transaction data.Optionally, if Target Signature algorithm includes that digital signature of elliptic curve is calculated Method is then based on elliptic curve digital signature algorithm, using Target ellipse curve, the block chain key of target user and target transaction Data carry out sign test to Target Signature content.
The present embodiment, for the algorithm that multi-signature algorithm etc. needs multiple block chain keys to be digitally signed, with During target transaction data carry out sign test, it can be verified based on the quantity of block chain key.Optionally, if obtain The block chain number of keys of target user needs block chain number of keys to be used different, it is determined that test from Target Signature algorithm Sign mistake.If quantity is identical, continue subsequent verifying process.Further, if the block chain of the target user obtained Number of keys needs block chain number of keys to be used identical, it is determined that at least two targets of acquisition with Target Signature algorithm Whether elliptic curve used in the block chain key of user is identical;If the elliptic curve used is different, it is determined that sign test mistake; If the elliptic curve used is identical, continue subsequent verifying process.Wherein, sign test misrepresentation is tested based on digital signature It demonstrate,proves out sender's identity mistake and/or target transaction data does not have integrality.
The technical solution of the present embodiment, using target user as the sender of Transaction Information, user node obtains target user Block chain key, target transaction data, and the unified signature result with unified signed data structure sign according to unified As a result with unified signed data structure, the Target Signature algorithm and Target Signature content of target transaction data is determined, target is based on Signature algorithm carries out sign test to Target Signature content using the block chain key and target transaction data of target user.The present invention Embodiment has the unified signature result of unified signed data structure by receiving, so that merging signature algorithm letter in signature result Breath directly embodies the signature algorithm used in unified signature result, for sign test provide the judgement of signature algorithm according to, thus Sign test is carried out to target transaction data based on determining Target Signature algorithm, convenient for carrying out sign test to signature result.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for block chain data processing equipment that the embodiment of the present invention five provides, and the present embodiment can fit The case where being digitally signed for the user node in block chain network to Transaction Information, the device are configured at for node, Block chain data processing method described in any embodiment of that present invention can be achieved.The device specifically includes as follows:
Transaction Information determining module 510, for determining target user's target transaction data to be processed;
Digital Signature module 520, for being based on Target Signature algorithm, mesh described in the block chain key pair using the target user Mark Transaction Information is digitally signed, to obtain Target Signature content;
Signature result generation module 530, for according to the Target Signature algorithm and the Target Signature content, generating to have system The unified signature result of one signed data structure.
Optionally, the signature result generation module 530 includes:
Signature contents determination unit 5301, for determining in the unified signed data structure according to the Target Signature content Signature contents part;
Signature algorithm determination unit 5302, for determining in the unified signed data structure according to the Target Signature algorithm Signature algorithm identifier part;
Signature result generation unit 5303 includes the signature algorithm identifier part and the signature contents part for generating Unified signature result.
Optionally, the signature contents determination unit 5301 is specifically used for:
The Target Signature content is encoded, Target Signature byte arrays are obtained;
Value by the Target Signature byte arrays, as the signature contents part in the unified signed data structure.
Optionally, the signature algorithm determination unit 5302 is specifically used for:
If the Target Signature algorithm includes elliptic curve digital signature algorithm, it is determined that the elliptic curve digital signature algorithm The Target ellipse curve used;
According to the identification information of the elliptic curve digital signature algorithm and the identification information of the Target ellipse curve, determine Signature algorithm identifier part in the unified signed data structure.
Further, described device further includes format conversion module 540, is specifically used for:
After the unified signature result that the generation has unified signed data structure, convert the unified signature result to Byte arrays format obtains the final signature result of the target transaction data.
The technical solution of the present embodiment realizes target transaction data by the mutual cooperation between each functional module Determination, the generation of digital signature, the determination of signature contents, the determination of signature algorithm, the generation and number of signature of signature result The functions such as the conversion according to structure.The embodiment of the present invention has the unified signature result of unified signed data structure by generating, and The identification information of Target Signature algorithm is dissolved into unified signature result, realizes signed data knot in block chain network The unification of structure supports block chain network to use unified digital signature technology, avoids the additional independent addition of signature algorithm information And transmission directly embodies the signature algorithm used in unified signature result so that merging signature algorithm information in signature result, Convenient for carrying out sign test to signature result.
Embodiment six
Fig. 6 is a kind of structural schematic diagram for block chain data processing equipment that the embodiment of the present invention six provides, and the present embodiment can fit The case where carrying out sign test to the Transaction Information received for user node, which is configured at for node, it can be achieved that this hair Block chain data processing method described in bright any embodiment.The device specifically includes as follows:
Signature result obtains module 610, for obtaining the block chain key of target user, target transaction data, and there is system The unified signature result of one signed data structure;
Digital signature determining module 620, for determining institute according to the unified signature result and the unified signed data structure State the Target Signature algorithm and Target Signature content of target transaction data;
Sign test module 630, for being based on the Target Signature algorithm, using the block chain key and the mesh of the target user Transaction Information is marked, sign test is carried out to the Target Signature content.
Optionally, the digital signature determining module 620 is specifically used for:
By the signature algorithm identifier part in unified signed data structure described in the unified signature result, as the target The Target Signature algorithm of Transaction Information;
By the signature contents part in unified signed data structure described in the unified signature result, as the target transaction The Target Signature content of data.
Optionally, the sign test module 630 is specifically used for:
By the signed data structure of the Target Signature algorithm, as target data structure;
The Target Signature content is decoded according to the target data structure, by the Target Signature content decoding at The target data structure;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to solution Code carries out sign test at the Target Signature content of the target data structure.
Optionally, if the Target Signature algorithm includes elliptic curve digital signature algorithm, the digital signature is determined Module 620 is specifically also used to: according to the unified signature result and the unified signed data structure, determining the elliptic curve The Target ellipse curve that Digital Signature Algorithm uses;
Correspondingly, the sign test module 630 is specifically used for: the elliptic curve digital signature algorithm is based on, using the target Elliptic curve, the block chain key of the target user and the target transaction data, test the Target Signature content Label.
Optionally, the signature result obtains module 610 and is specifically used for:
Obtain the final signature result of the target transaction data of byte arrays format;
The unified signed data structure is converted by the final signature result of the target transaction data, obtains unified knot of signing Fruit.
Optionally, the sign test module 630 is specifically used for:
If the block chain number of keys of the target user obtained, block chain cipher key number to be used is needed with the Target Signature algorithm Amount is different, it is determined that sign test mistake;
If the block chain number of keys of the target user obtained, block chain cipher key number to be used is needed with the Target Signature algorithm It measures identical, it is determined that whether elliptic curve used in the block chain key of at least two target users of acquisition is identical;
If the elliptic curve used is different, it is determined that sign test mistake.
The technical solution of the present embodiment realizes unified signature result by the mutual cooperation between each functional module Acquisition, the magically change of unified signature result format, the determination of the Target Signature algorithm carried out based on same signed data structure and The functions such as the determination of Target Signature content, the conversion of Target Signature content format and sign test.The embodiment of the present invention is by receiving tool There is the unified signature result of unified signed data structure, so that signature algorithm information is merged in signature result, in unified signature knot The signature algorithm used is directly embodied in fruit, provides the judgement of signature algorithm according to thus based on determining target for sign test Signature algorithm carries out sign test to target transaction data, convenient for carrying out sign test to signature result.
Embodiment seven
Fig. 7 is a kind of structural schematic diagram for equipment that the embodiment of the present invention seven provides, and Fig. 7, which is shown, to be suitable for being used to realizing the present invention The block diagram of the example devices of embodiment embodiment.The equipment that Fig. 7 is shown is only an example, should not be implemented to the present invention The function and use scope of example bring any restrictions.
The equipment 700 that Fig. 7 is shown is only an example, should not function to the embodiment of the present invention and use scope bring Any restrictions.The equipment 700 is preferably the electronic equipment for carrying block chain link point.
As shown in fig. 7, equipment 700 is showed in the form of universal computing device.The component of equipment 700 may include but unlimited In one or more processor 710, system storage 720, different system components (including system storage 720 and place are connected Manage device 710) bus 730.
Bus 730 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to ISA(Industry Standard Architecture) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and periphery component interconnection (PCI) bus.
Equipment 700 typically comprises a variety of computer system readable media.These media can be it is any can be by equipment The usable medium of 700 access, including volatile and non-volatile media, moveable and immovable medium.
System storage 720 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 721 and/or cache memory 722.Equipment 700 may further include other removable/not removable Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 723 can be used for read and write can not Mobile, non-volatile magnetic media (Fig. 7 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 7, Ke Yiti For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver It can be connected by one or more data media interfaces with bus 730.System storage 720 may include at least one journey Sequence product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform this hair The function of bright each embodiment of embodiment.
Program/utility 725 with one group of (at least one) program module 724, can store and deposit in such as system In reservoir 720, such program module 724 includes but is not limited to operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.Program mould Block 724 usually executes function and/or method in described embodiment of the embodiment of the present invention.
Equipment 700 can also be with one or more external equipment 740(such as keyboard, sensing equipment, display 741 etc.) it is logical Letter, can also be enabled a user to one or more equipment interact with the equipment 700 communicate, and/or with make the equipment 700 Any equipment (such as network interface card, modem etc.) that can be communicated with one or more of the other calculating equipment communicates.This Kind communication can be carried out by input/output (I/O) interface 750.Also, equipment 700 can also by network adapter 760 with One or more network (such as Local Area Network, wide area network (WAN) and/or public network, such as internet) communication.Such as Shown in figure, network adapter 760 is communicated by bus 730 with other modules of equipment 700.It should be understood that although not showing in figure Out, other hardware and/or software module can be used with bonding apparatus 700, including but not limited to: microcode, device driver, superfluous Remaining processor, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processor 710 passes through at least one program in multiple programs that operation is stored in system storage 720, thus Application and data processing are performed various functions, such as is realized at block chain data provided by first aspect present invention embodiment Reason method, or realize block chain data processing method provided by second aspect of the present invention embodiment.
Embodiment eight
The embodiment of the present invention eight also provides a kind of computer readable storage medium, be stored thereon with computer program (or for meter Calculation machine executable instruction), one executed in above-mentioned any embodiment by user node can be realized when which is executed by processor Kind block chain data processing method, this method comprises:
Determine target user's target transaction data to be processed;
Based on Target Signature algorithm, target transaction data described in the block chain key pair using the target user carry out digital label Name, to obtain Target Signature content;
According to the Target Signature algorithm and the Target Signature content, the unified signature with unified signed data structure is generated As a result.
The embodiment of the present invention eight also provides a kind of computer readable storage medium, be stored thereon with computer program (or For computer executable instructions), it can realize when which is executed by processor and be executed in above-mentioned any embodiment by user node Another block chain data processing method, this method comprises:
Obtain the block chain key of target user, target transaction data, and the unified signature with unified signed data structure As a result;
According to the unified signature result and the unified signed data structure, the Target Signature of the target transaction data is determined Algorithm and Target Signature content;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to institute It states Target Signature content and carries out sign test.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random-access memory (ram), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with one or more programming languages or combinations thereof come write for execute the embodiment of the present invention operation Computer program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed in equipment.In situations involving remote computers, remote computer can pass through the network of any kind --- including Local area network (LAN) or wide area network (WAN)-are connected to subscriber computer, or, it may be connected to outer computer (such as using ISP is connected by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being implemented by above embodiments to the present invention Example is described in further detail, but the embodiment of the present invention is not limited only to above embodiments, is not departing from structure of the present invention It can also include more other equivalent embodiments in the case where think of, and the scope of the present invention is determined by scope of the appended claims It is fixed.

Claims (12)

1. a kind of block chain data processing method, which is characterized in that executed by user node, which comprises
Determine target user's target transaction data to be processed;
Based on Target Signature algorithm, target transaction data described in the block chain key pair using the target user carry out digital label Name, to obtain Target Signature content;
According to the Target Signature algorithm and the Target Signature content, the unified signature with unified signed data structure is generated As a result;
Wherein, described according to the Target Signature algorithm and the Target Signature content, generating has unified signed data structure Unified signature result, comprising:
According to the Target Signature content, the signature contents part in the unified signed data structure is determined;
According to the Target Signature algorithm, the signature algorithm identifier part in the unified signed data structure is determined;
Generate the unified signature result including the signature algorithm identifier part and the signature contents part;
Wherein, described according to the Target Signature content, determine the signature contents part in the unified signed data structure, packet It includes:
The Target Signature content is encoded, Target Signature byte arrays are obtained;
Value by the Target Signature byte arrays, as the signature contents part in the unified signed data structure.
2. determining the system the method according to claim 1, wherein described according to the Target Signature algorithm Signature algorithm identifier part in one signed data structure, comprising:
If the Target Signature algorithm includes elliptic curve digital signature algorithm, it is determined that the elliptic curve digital signature algorithm The Target ellipse curve used;
According to the identification information of the elliptic curve digital signature algorithm and the identification information of the Target ellipse curve, determine Signature algorithm identifier part in the unified signed data structure.
3. the method according to claim 1, wherein in the unification for generating and there is unified signed data structure After signature result, further includes:
Byte arrays format is converted by the unified signature result, obtains the final signature result of the target transaction data.
4. a kind of block chain data processing method, which is characterized in that executed by user node, which comprises
Obtain the block chain key of target user, target transaction data, and the unified signature with unified signed data structure As a result;
According to the unified signature result and the unified signed data structure, the Target Signature of the target transaction data is determined Algorithm and Target Signature content;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to institute It states Target Signature content and carries out sign test;
Wherein, described to be based on the Target Signature algorithm, block chain key and the target transaction using the target user Data carry out sign test to the Target Signature content, comprising:
By the signed data structure of the Target Signature algorithm, as target data structure;
The Target Signature content is decoded according to the target data structure, by the Target Signature content decoding at The target data structure;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to solution Code carries out sign test at the Target Signature content of the target data structure.
5. according to the method described in claim 4, it is characterized in that, described according to the unified signature result and the unified label Name data structure, determines the Target Signature algorithm and Target Signature content of the target transaction data, comprising:
By the signature algorithm identifier part in unified signed data structure described in the unified signature result, as the target The Target Signature algorithm of Transaction Information;
By the signature contents part in unified signed data structure described in the unified signature result, as the target transaction The Target Signature content of data.
6. according to the method described in claim 4, it is characterized in that, the method also includes:
If the Target Signature algorithm includes elliptic curve digital signature algorithm, according to the unified signature result and the system One signed data structure determines the Target ellipse curve that the elliptic curve digital signature algorithm uses;
Correspondingly, described to be based on the Target Signature algorithm, block chain key and the target thing using the target user Business data carry out sign test to the Target Signature content, comprising:
Based on the elliptic curve digital signature algorithm, the block chain using the Target ellipse curve, the target user is close Key and the target transaction data carry out sign test to the Target Signature content.
7. according to the method described in claim 4, it is characterized in that, obtaining the unified signature knot with unified signed data structure Fruit, comprising:
Obtain the final signature result of the target transaction data of byte arrays format;
The unified signed data structure is converted by the final signature result of the target transaction data, obtains unified knot of signing Fruit.
8. according to the method described in claim 4, it is characterized in that, described be based on the Target Signature algorithm, using the mesh The block chain key of mark user and the target transaction data carry out sign test to the Target Signature content, comprising:
If the block chain number of keys of the target user obtained, block chain cipher key number to be used is needed with the Target Signature algorithm Amount is different, it is determined that sign test mistake;
If the block chain number of keys of the target user obtained, block chain cipher key number to be used is needed with the Target Signature algorithm It measures identical, it is determined that whether elliptic curve used in the block chain key of at least two target users of acquisition is identical;
If the elliptic curve used is different, it is determined that sign test mistake.
9. a kind of block chain data processing equipment, which is characterized in that be configured at user node, described device includes:
Transaction Information determining module, for determining target user's target transaction data to be processed;
Digital Signature module, for being based on Target Signature algorithm, target described in the block chain key pair using the target user Transaction Information is digitally signed, to obtain Target Signature content;
Signature result generation module, for according to the Target Signature algorithm and the Target Signature content, generating to have unification The unified signature result of signed data structure;
Wherein, the signature result generation module includes:
Signature contents determination unit, for determining the label in the unified signed data structure according to the Target Signature content Name content part;
Signature algorithm determination unit, for determining the label in the unified signed data structure according to the Target Signature algorithm Name algorithm identification division;
Signature result generation unit, for generating the unification including the signature algorithm identifier part and the signature contents part Signature result;
Wherein, the signature contents determination unit is specifically used for:
The Target Signature content is encoded, Target Signature byte arrays are obtained;
Value by the Target Signature byte arrays, as the signature contents part in the unified signed data structure.
10. a kind of block chain data processing equipment, which is characterized in that be configured at user node, described device includes:
Signature result obtains module, for obtaining the block chain key of target user, target transaction data, and there are unified label The unified signature result of name data structure;
Digital signature determining module, described in determining according to the unified signature result and the unified signed data structure The Target Signature algorithm and Target Signature content of target transaction data;
Sign test module, for being based on the Target Signature algorithm, block chain key and the target using the target user Transaction Information carries out sign test to the Target Signature content;
Wherein, the sign test module is specifically used for:
By the signed data structure of the Target Signature algorithm, as target data structure;
The Target Signature content is decoded according to the target data structure, by the Target Signature content decoding at The target data structure;
Based on the Target Signature algorithm, block chain key and the target transaction data using the target user, to solution Code carries out sign test at the Target Signature content of the target data structure.
11. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Existing block chain data processing method as claimed in any one of claims 1-3, or realize such as any one of claim 4-8 The block chain data processing method.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as right is realized when realizing block chain data processing method as claimed in any one of claims 1-3 when execution, or executing It is required that block chain data processing method described in any one of 4-8.
CN201911002855.7A 2019-10-22 2019-10-22 Block chain data processing method, device, equipment and storage medium Active CN110517045B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911002855.7A CN110517045B (en) 2019-10-22 2019-10-22 Block chain data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911002855.7A CN110517045B (en) 2019-10-22 2019-10-22 Block chain data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110517045A true CN110517045A (en) 2019-11-29
CN110517045B CN110517045B (en) 2020-02-04

Family

ID=68633574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911002855.7A Active CN110517045B (en) 2019-10-22 2019-10-22 Block chain data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110517045B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846564A (en) * 2023-08-30 2023-10-03 北京格尔国信科技有限公司 Signature verification method, system, terminal and storage medium supporting multiple algorithms

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106712965A (en) * 2017-01-17 2017-05-24 数安时代科技股份有限公司 Digital signature method, device and cipher device
CN106878318A (en) * 2017-03-03 2017-06-20 钱德君 A kind of block chain real time polling cloud system
US20180096347A1 (en) * 2016-09-30 2018-04-05 Cable Television Laboratories, Inc Systems and methods for securely tracking consumable goods using a distributed ledger
CN107888375A (en) * 2017-11-08 2018-04-06 深圳市携网科技有限公司 A kind of electronic evidence safety system and method based on block chain technology
CN108833114A (en) * 2018-06-13 2018-11-16 上海交通大学 A kind of decentralization identity authorization system and method based on block chain
CN109034805A (en) * 2018-08-09 2018-12-18 江苏先安科技有限公司 It is a kind of to stab signature verification method suitable for the new time of block chain and built-in field

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180096347A1 (en) * 2016-09-30 2018-04-05 Cable Television Laboratories, Inc Systems and methods for securely tracking consumable goods using a distributed ledger
CN106712965A (en) * 2017-01-17 2017-05-24 数安时代科技股份有限公司 Digital signature method, device and cipher device
CN106878318A (en) * 2017-03-03 2017-06-20 钱德君 A kind of block chain real time polling cloud system
CN107888375A (en) * 2017-11-08 2018-04-06 深圳市携网科技有限公司 A kind of electronic evidence safety system and method based on block chain technology
CN108833114A (en) * 2018-06-13 2018-11-16 上海交通大学 A kind of decentralization identity authorization system and method based on block chain
CN109034805A (en) * 2018-08-09 2018-12-18 江苏先安科技有限公司 It is a kind of to stab signature verification method suitable for the new time of block chain and built-in field

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116846564A (en) * 2023-08-30 2023-10-03 北京格尔国信科技有限公司 Signature verification method, system, terminal and storage medium supporting multiple algorithms
CN116846564B (en) * 2023-08-30 2024-02-02 北京格尔国信科技有限公司 Signature verification method, system, terminal and storage medium supporting multiple algorithms

Also Published As

Publication number Publication date
CN110517045B (en) 2020-02-04

Similar Documents

Publication Publication Date Title
CN109150499B (en) Method and device for dynamically encrypting data, computer equipment and storage medium
CN107733656A (en) A kind of cipher authentication method and device
JP6592583B1 (en) Method and apparatus for information exchange
CN110460439A (en) Information transferring method, device, client, server-side and storage medium
CN110011793A (en) Anti-fake data processing method of tracing to the source, device, equipment and medium
CN111131278B (en) Data processing method and device, computer storage medium and electronic equipment
CN106067874B (en) It is a kind of by the method for data record to server end, terminal and server
CN110176990A (en) Vehicle assembly replaces recognition methods, device, computer equipment and storage medium
CN111556007B (en) Identity verification method, device and equipment based on block chain and storage medium
CN104796257A (en) Flexible data authentication
CN105162588B (en) A kind of media file encipher-decipher method and device
US7751556B2 (en) Apparatus and method of generating falsification detecting data of encrypted data in the course of process
CN107222759A (en) Method, system, equipment and the medium of media file encryption and decryption
CN110414190A (en) Endorsement method, relevant apparatus, storage medium and the electronic equipment of application installation package
CN109613990A (en) Soft keyboard secured inputting method, server, client, electronic equipment and medium
CN104168117B (en) A kind of speech digit endorsement method
CN109101664A (en) A kind of data transmission method, device, equipment and the medium of lightweight node
CN109194669A (en) A kind of data transmission method, device, equipment and the medium of lightweight node
CN109257176A (en) Decruption key segmentation and decryption method, device and medium based on SM2 algorithm
US10296765B2 (en) Multi-level security enforcement
CN107171808B (en) A kind of verification method and device of electronic record authenticity
CN110545542B (en) Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment
CN113038463B (en) Communication encryption authentication experimental device
CN109711178A (en) A kind of storage method of key-value pair, device, equipment and storage medium
CN110517045A (en) Block chain data processing method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant