CN111445250B - Block chain key testing method and device - Google Patents

Block chain key testing method and device Download PDF

Info

Publication number
CN111445250B
CN111445250B CN202010299439.4A CN202010299439A CN111445250B CN 111445250 B CN111445250 B CN 111445250B CN 202010299439 A CN202010299439 A CN 202010299439A CN 111445250 B CN111445250 B CN 111445250B
Authority
CN
China
Prior art keywords
transaction data
key
data
encryption key
transaction
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.)
Active
Application number
CN202010299439.4A
Other languages
Chinese (zh)
Other versions
CN111445250A (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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010299439.4A priority Critical patent/CN111445250B/en
Publication of CN111445250A publication Critical patent/CN111445250A/en
Application granted granted Critical
Publication of CN111445250B publication Critical patent/CN111445250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • 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/3827Use of message hashing
    • 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

Abstract

The embodiment of the application discloses a method and a device for testing a block chain key, and particularly, monitoring equipment firstly obtains first transaction data sent by first equipment to second equipment, and digitally signs the first transaction data by using a first encryption key stored in advance to obtain second transaction data, wherein the second transaction data comprises a first digital signature and the first transaction data, and the first digital signature is obtained by the monitoring equipment digitally signing the first transaction data by using the first encryption key. Meanwhile, the monitoring device acquires third transaction data from the second device, wherein the third transaction data comprises a second digital signature and the first transaction data, and the second digital signature is obtained by the second device through digital signature of the first transaction data by using a second encryption key. And the monitoring equipment judges whether the first encryption key is the same as the second encryption key or not according to the second transaction data and the third transaction data, and further verifies whether the second encryption key stored by the second equipment is correct or not.

Description

Block chain key testing method and device
Technical Field
The present application relates to the technical field of key processing, and in particular, to a method and an apparatus for testing a block chain key.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like, and is essentially a decentralized database. The block chain carries out data encryption and decryption through various cryptographic mechanisms, the basis of an ownership verification mechanism is an asymmetric encryption algorithm, and a public and private key pair which is asymmetrically encrypted in the block chain is a cornerstone for constructing a whole trust system: the public key is used to express an address and the private key is used to sign a transaction.
However, in practical applications, the public and private key pairs may be kept improperly, which may result in the loss of the control right of the private key. How to ensure the correctness of the public key or the private key stored by each node in the block chain is an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method and an apparatus for testing a blockchain key to ensure correctness of a key stored in each node.
In order to solve the above problem, the technical solution provided by the embodiment of the present application is as follows:
in a first aspect of an embodiment of the present application, a method for testing a blockchain key is provided, where the method includes:
the monitoring equipment acquires first transaction data from first equipment, wherein the first transaction data is transaction data sent from the first equipment to second equipment;
the monitoring device utilizes a first encryption key to digitally sign the first transaction data to obtain second transaction data, wherein the second transaction data comprises first signature data and the first transaction data, and the first signature data is obtained by the monitoring device utilizing the first encryption key to digitally sign the first transaction data;
the monitoring equipment acquires third transaction data from the second equipment, wherein the third transaction data comprises second signature data and the first transaction data, and the second signature data is obtained by the second equipment through digitally signing the first transaction data by using a second encryption key;
and the monitoring equipment acquires a first test result according to the second transaction data and the third transaction data, wherein the first test result represents whether the first encryption key and the second encryption key are the same or not.
In a possible implementation manner, the acquiring, by the monitoring device, a first test result according to the second transaction data and the third transaction data includes:
the monitoring device compares whether first signature data in the second transaction data and second signature data in the third transaction data are consistent;
when the first signature data and the second signature data are the same, the monitoring device determines that the first encryption key and the second encryption key are the same;
when the first signature data and the second signature data are not the same, the monitoring device determines that the first encryption key and the second encryption key are not the same.
In one possible implementation, the method further includes:
the monitoring equipment acquires fourth transaction data from third equipment, wherein the fourth transaction data is obtained after the third equipment performs digital signature verification on the third transaction data by using a second decryption key;
the monitoring equipment performs digital signature verification on the third transaction data by using a first decryption key to obtain fifth transaction data;
and the monitoring equipment acquires a second test result according to the fourth transaction data and the fifth transaction data, wherein the second test result represents whether the first decryption key and the second decryption key are the same or not.
In a possible implementation manner, the acquiring, by the monitoring device, a second test result according to the fourth transaction data and the fifth transaction data includes:
when the fourth transaction data is the same as the fifth transaction data, the monitoring device determines that the first decryption key is the same as the second decryption key;
when the fourth transaction data is different from the fifth transaction data, the monitoring device determines that the first decryption key is different from the second decryption key.
In one possible implementation, the method further includes:
and the monitoring equipment acquires a third test result according to the first transaction data and the fourth transaction data, wherein the third test result represents the integrity of the transaction data in the transmission process.
In a possible implementation manner, the first device is a client device, the second device is a server device, and the third device is a block link end device.
In one possible implementation, the first encryption key includes a user private key and/or a transaction institution private key, and the second encryption key includes a user private key and/or a transaction institution private key.
In one possible implementation, the first decryption key includes a user public key and/or a transaction institution public key, and the second decryption key includes a user public key and/or a transaction institution public key.
In a second aspect of the embodiments of the present application, there is provided a device for testing a block chain key, where the device is disposed in a monitoring device, and includes:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring first transaction data from first equipment, and the first transaction data is data sent from the first equipment to second equipment;
the signature unit is used for digitally signing the first transaction data by using a first encryption key to obtain second transaction data, wherein the second transaction data comprises a first digital signature and the first transaction data, and the first digital signature is obtained by digitally signing the first transaction data by using the first encryption key through the monitoring equipment;
a second obtaining unit, configured to obtain third transaction data from the second device, where the third transaction data includes a second digital signature and the first transaction data, and the second digital signature is obtained by digitally signing the first transaction data by using a second encryption key by the second device;
a third obtaining unit, configured to obtain a first test result according to the second transaction data and the third transaction data, where the first test result indicates whether the first encryption key and the second encryption key are the same.
In a third aspect of embodiments of the present application, a computer-readable storage medium is provided, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the blockchain key testing method according to the first aspect.
In a fourth aspect of the embodiments of the present application, there is provided an apparatus for testing a blockchain key, where the apparatus includes a memory and a processor, the memory is configured to store one or more programs, and the processor is configured to call the programs in the memory to execute the blockchain key testing method according to the first aspect.
Therefore, the embodiment of the application has the following beneficial effects:
according to the embodiment of the application, the monitoring device firstly obtains first transaction data sent by the first device to the second device, and digitally signs the first transaction data by using the pre-stored first encryption key to obtain second transaction data, wherein the second transaction data comprises a first digital signature and the first transaction data, and the first digital signature is obtained by digitally signing the first transaction data by using the first encryption key by the monitoring device. Meanwhile, the monitoring device acquires third transaction data from the second device, wherein the third transaction data comprises a second digital signature and the first transaction data, and the second digital signature is obtained by the second device through digital signature of the first transaction data by using a second encryption key. The monitoring device judges whether the first encryption key and the second encryption key are the same according to the second transaction data and the third transaction data, and then verifies whether the second encryption key stored in the second device is correct, so that the security of the key is ensured.
Drawings
Fig. 1 is a block chain key management system structure diagram according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for testing a block chain key according to an embodiment of the present disclosure;
FIG. 3 is a diagram of a test framework provided by an embodiment of the present application;
fig. 4 is a block chain key testing apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the drawings are described in detail below.
In order to facilitate understanding of the technical solutions provided in the embodiments of the present application, the following description will first describe the technologies related to the embodiments of the present application.
The blockchain key management system includes a client, a server, and blockchain ends, as shown in fig. 1. The blockchain key management system is a system for realizing key management and transaction data storage by using blockchain technology. The client initiates a transaction through the client, the server performs digital signature on transaction data in sequence according to a client private key and/or a transaction mechanism private key, and the blockchain end verifies the digital signature of the transaction data by using a client public key corresponding to the client private key and/or a transaction mechanism public key corresponding to the transaction mechanism private key and stores the transaction data of the client.
The embodiment of the application provides a test method for verifying whether a client private key and a transaction structure private key used by a server for performing digital signature on transaction data are correct keys and a client public key and a transaction institution public key used for verifying the digital signature at a verification block link end are correct keys.
In addition, the process of digitally signing and verifying the digital signature is specifically that when a text (transaction data) is sent, a sender generates a text digest from the text by using a hash function, then the digest is encrypted by using a private key of the sender, the encrypted digest is sent to a receiver as the digital signature of the text together with the text, the receiver first calculates the text digest from the received original text by using the same hash function as the sender, then decrypts the digital signature attached to the text by using a public key of the receiver, and if the two digests are the same, the receiver can confirm that the digital signature is of the sender.
Digital signatures have two effects: one is to be able to determine that the message was indeed signed and sent by the sender because someone else cannot impersonate the sender's signature. The second is that the digital signature can determine the integrity of the message. Because the digital signature is characterized in that the digital signature represents the characteristics of the text, if the text is changed, the value of the text abstract is changed, and different texts obtain different text abstracts. A digital signature involves a hash function, the public key of the recipient, and the private key of the recipient.
To facilitate understanding of the technical solution provided by the embodiment of the present application, referring to a flowchart of a block chain key testing method shown in fig. 2, as shown in fig. 2, the method may include:
s201: the monitoring device obtains first transaction data from a first device.
In this embodiment, when the first device sends the first transaction data to the second device, the monitoring device may obtain the first transaction data from the first device through the corresponding interface, and store the first transaction data, so as to perform a subsequent test using the first transaction data.
S202: the monitoring device digitally signs the first transaction data using the first encryption key to obtain second transaction data.
And after the monitoring equipment acquires the first transaction data, digitally signing the first transaction data by using a built-in first encryption key to acquire second transaction data. Wherein the second transaction data includes the first signature data and the first transaction data.
The monitoring device carries out digital signature on first transaction data by using a first encryption key to obtain a specific process of second transaction data, carries out Hash calculation on the first transaction data to obtain an abstract corresponding to the first transaction data, then encrypts the abstract by using the first encryption key to obtain first signature data, and generates the second transaction data according to the first signature data and the first transaction data. The first encryption key is a client private key and/or a transaction mechanism private key which are/is pre-arranged in the monitoring device, specifically, the monitoring device can encrypt the first transaction data only by using the client private key or only use the transaction mechanism private key, or can encrypt the first transaction data for the first time by using the client private key to obtain ciphertext data, and then encrypt the ciphertext data by using the transaction mechanism private key to obtain first signature data.
S203: the monitoring device obtains third transaction data from the second device, wherein the third transaction data includes the second digital signature and the first transaction data.
In this embodiment, after the first device sends the first transaction data to the second device, the second device performs digital signature on the first transaction data by using a second encryption key stored in advance to obtain second signature data, and generates third transaction data according to the second signature data and the first transaction data. The second encryption key may be a private key of the client and/or a private key of the transaction institution, and reference may be made to S202 for a process of the second device obtaining the second signature data by using the second encryption key, which is not described herein again in this example.
It should be noted that, the manner in which the monitoring device digitally signs the first transaction data using the first encryption key is the same as the manner in which the second device digitally signs the first transaction data using the second encryption key. Moreover, the hash algorithm used by the monitoring device to obtain the summary of the first transaction data is the same as the hash algorithm used by the second device to obtain the summary of the first transaction data. The hash algorithm may include SHA1 and SHA2.
S204: and the monitoring equipment acquires a first test result according to the second transaction data and the third transaction data.
In this embodiment, when the monitoring device obtains the second transaction data and the third transaction data, the second transaction data and the third transaction data are compared and verified to obtain a first test result, where the first test result may indicate whether the first encryption key and the second encryption key are the same.
Specifically, the monitoring device may compare whether the first signature data in the second transaction data and the second signature data in the third transaction data are consistent; if the first signature data and the second signature data are identical, it is determined that the first encryption key and the second encryption key are identical, indicating that the second encryption key stored in the second device is the correct key. Because the first signature data is obtained by the monitoring device by digitally signing the first transaction data by using the first encryption key, and the second signature data is obtained by the second device by digitally signing the first transaction data by using the second encryption key, and because the first encryption key built in the monitoring device is a correct key, when the first signature data is the same as the second signature data, the second encryption key stored in the second device can be determined to be correct. When the first signature data is different from the second signature data, the monitoring device determines that the first encryption key is different from the second encryption key, which indicates that the second encryption key stored in the second device is different from the first encryption key, and there may be a risk that the keys are tampered.
Therefore, the monitoring equipment realizes the test of the function of the digital signature of the server by comparing the second transaction data with the third transaction data.
In some embodiments, the monitoring device may further test the digital signature verification function of the block link end, which may be specifically implemented by:
1) The monitoring device obtains fourth transaction data from the third device.
In this embodiment, the monitoring device may obtain fourth transaction data from the third device through a preset interface, where the fourth transaction data is obtained after the third device performs digital signature verification on the third transaction data by using the second decryption key. Specifically, after the second device produces the third transaction data, the third transaction data may be sent to the third device, and the third device performs digital signature verification on the third transaction data by using the second decryption key saved in advance. It is to be understood that the second encryption key and the second decryption key are a key pair, specifically, the second encryption key is a private key, and the second decryption key is a public key.
The process that the third device performs digital signature verification on the third transaction data by using the second decryption key is that the third device decrypts the second signature data in the third transaction data by using the second decryption key to obtain the first digest. Meanwhile, the third equipment performs hash operation on the first transaction data in the third transaction data to obtain a second abstract, and if the first abstract is the same as the second abstract, the verification is passed; if the first digest and the second digest are not the same, the verification fails.
2) And the monitoring equipment performs digital signature verification on the third transaction data by using the first decryption key to obtain fifth transaction data.
In this embodiment, after the monitoring device obtains the third transaction data from the second device, the monitoring device verifies the digital signature of the third transaction data by using the first decryption key to obtain the fifth transaction data. That is, in this embodiment, the monitoring device will simulate the second device to sign the third transaction data. The first encryption key and the first decryption key are key pairs, specifically, the first encryption key is a private key, and the first decryption key is a public key.
The specific implementation that the monitoring device performs digital signature verification on the third transaction data by using the first decryption key may refer to that the third device performs digital signature verification on the third transaction data by using the second decryption key.
3) And the monitoring equipment acquires a second test result according to the fourth transaction data and the fifth transaction data.
In this embodiment, the monitoring device compares the fourth transaction data acquired from the third device with the fifth transaction data verified by the monitoring device, so as to obtain a second test result. Specifically, when the fourth transaction data is the same as the fifth transaction data, the monitoring device determines that the first decryption key is the same as the second decryption key; when the fourth transaction data is different from the fifth transaction data, the monitoring device determines that the first decryption key is different from the second decryption key.
Therefore, the monitoring device can test the function of verifying the digital signature of the block link end through the second test result, so as to check the function of the block link end.
In some embodiments, the monitoring device may further detect whether data tampering occurs in the transaction process of the blockchain system, and specifically, the monitoring device obtains a third test result according to the first transaction data and the fourth transaction data, where the third test result indicates integrity of the transaction data in the transmission process.
For facilitating understanding of the embodiment of the present application, referring to the frame diagram shown in fig. 3, as shown in fig. 3, a testing apparatus for testing a private key and a corresponding public key of a customer and testing a private key and a corresponding public key of a transaction institution is built in; setting a client of the interface 1; the service end where interface 2 is located and the block link end where interface 3 is located.
Step 1, the testing device simulates a testing client to initiate transaction through an interface 1, records transaction data and records the transaction data as transaction data 1.
And 2, the testing device carries out digital signature on the transaction data 1 by using the same built-in private key of the testing client and the same private key of the testing transaction mechanism, wherein the same private key is the same as the private key when the transaction is initiated, and the transaction data subjected to digital signature is recorded as transaction data 2.
And 3, receiving the transaction data digitally signed by the server side at the interface 2 by the testing device, and recording the transaction data as transaction data 3. The testing device compares the transaction data 3 with the transaction data 2 for verification, and records the result as a verification result 1.
Step 4, the testing device receives the transaction data stored at the end of the block link at the interface 3, and the transaction data is recorded as transaction data 4.
And 5, the testing device uses the same built-in public key of the testing client and the same built-in public key of the testing transaction institution when the transaction is initiated to verify the digital signature of the transaction data 3, so as to form transaction data 5. The testing device compares the transaction data 5 with the transaction data 4 for verification, and records the result as a verification result 2.
And 6, comparing and checking the transaction data 4 and the transaction data 1, and recording as a checking result 3.
The verification result 1 is a result of testing the function of digitally signing the transaction data by the service end of the blockchain key management system. Verification result 2 is the result of testing the function of verifying the digital signature at the end of the blockchain key management system blockchain. The verification result 3 is a result of testing the function of performing a transaction using the blockchain key management system.
Based on the foregoing method embodiment, an embodiment of the present application further provides a device for testing a block chain key, as shown in fig. 4, where the device is disposed in a monitoring device, and specifically, the device may include:
a first obtaining unit 401, configured to obtain first transaction data from a first device, where the first transaction data is data sent by the first device to a second device;
a signature unit 402, configured to digitally sign the first transaction data by using a first encryption key to obtain second transaction data, where the second transaction data includes a first digital signature and the first transaction data, and the first digital signature is obtained by digitally signing the first transaction data by using the first encryption key by the monitoring device;
a second obtaining unit 403, configured to obtain third transaction data from the second device, where the third transaction data includes a second digital signature and the first transaction data, and the second digital signature is obtained by digitally signing, by the second device, the first transaction data by using a second encryption key;
a third obtaining unit 404, configured to obtain a first test result according to the second transaction data and the third transaction data, where the first test result indicates whether the first encryption key and the second encryption key are the same.
In a possible implementation manner, the third obtaining unit includes:
the comparison subunit is used for comparing whether the first signature data in the second transaction data and the second signature data in the third transaction data are consistent or not;
a first determining subunit configured to determine that a first encryption key is the same as the second encryption key when the first signature data is the same as the second signature data;
a second determining subunit, configured to determine that the first encryption key is different from the second encryption key when the first signature data is different from the second signature data.
In one possible implementation, the apparatus further includes:
a fourth obtaining unit, configured to obtain fourth transaction data from a third device, where the fourth transaction data is obtained after the third device performs digital signature verification on the third transaction data by using a second decryption key;
the verification unit is used for carrying out digital signature verification on the third transaction data by using a first decryption key to obtain fifth transaction data;
a fifth obtaining unit, configured to obtain a second test result according to the fourth transaction data and the fifth transaction data, where the second test result indicates whether the first decryption key and the decryption key are the same.
In a possible implementation manner, the fifth obtaining unit specifically includes:
a third determining subunit, configured to determine that the first decryption key and the second decryption key are the same when the fourth transaction data and the fifth transaction data are the same;
a fourth determining subunit, configured to determine that the first decryption key is different from the second decryption key when the fourth transaction data is different from the fifth transaction data.
In one possible implementation, the apparatus further includes:
and the sixth acquisition unit is used for acquiring a third test result according to the first transaction data and the fourth transaction data, wherein the third test result represents the integrity of the transaction data in the transmission process.
In a possible implementation manner, the first device is a client device, the second device is a server device, and the third device is a block link end device.
In one possible implementation, the first encryption key includes a user private key and/or a transaction institution private key, and the second encryption key includes a user private key and/or a transaction institution private key.
In one possible implementation, the first decryption key includes a user public key and/or a transaction institution public key, and the second decryption key includes a user public key and/or a transaction institution public key.
It should be noted that, for implementation of each unit in this embodiment, reference may be made to the above method example, and details of this embodiment are not described herein again.
In addition, the embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, and the program is executed by a processor to execute the block chain key testing method.
The embodiment of the application provides equipment for testing a block chain key, and the equipment comprises a memory and a processor, wherein the memory is used for storing one or more programs, and the processor is used for calling the programs in the memory to execute the block chain key testing method.
According to the above, the monitoring device first obtains first transaction data sent by the first device to the second device, and digitally signs the first transaction data by using the first encryption key stored in advance to obtain second transaction data, wherein the second transaction data includes the first digital signature and the first transaction data, and the first digital signature is obtained by the monitoring device digitally signing the first transaction data by using the first encryption key. Meanwhile, the monitoring device acquires third transaction data from the second device, wherein the third transaction data comprises a second digital signature and the first transaction data, and the second digital signature is obtained by the second device through digital signature of the first transaction data by using a second encryption key. The monitoring device judges whether the first encryption key and the second encryption key are the same according to the second transaction data and the third transaction data, and then verifies whether the second encryption key stored in the second device is correct, so that the security of the key is ensured.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system or the device disclosed by the embodiment, the description is simple because the system or the device corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
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 reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for testing a blockchain key, the method comprising:
the method comprises the steps that a monitoring device obtains first transaction data from a first device, wherein the first transaction data are transaction data sent from the first device to a second device;
the monitoring device utilizes a first encryption key to digitally sign the first transaction data to obtain second transaction data, wherein the second transaction data comprises first signature data and the first transaction data, and the first signature data is obtained by the monitoring device utilizing the first encryption key to digitally sign the first transaction data;
the monitoring equipment acquires third transaction data from the second equipment, wherein the third transaction data comprises second signature data and the first transaction data, and the second signature data is obtained by the second equipment through digitally signing the first transaction data by using a second encryption key;
and the monitoring equipment acquires a first test result according to the second transaction data and the third transaction data, wherein the first test result represents whether the first encryption key and the second encryption key are the same or not.
2. The method of claim 1, wherein the monitoring device obtaining a first test result based on the second transaction data and the third transaction data comprises:
the monitoring device compares whether first signature data in the second transaction data and second signature data in the third transaction data are consistent;
when the first signature data and the second signature data are the same, the monitoring device determines that the first encryption key and the second encryption key are the same;
when the first signature data and the second signature data are not the same, the monitoring device determines that the first encryption key and the second encryption key are not the same.
3. The method of claim 1, further comprising:
the monitoring equipment acquires fourth transaction data from third equipment, wherein the fourth transaction data is obtained after the third equipment performs digital signature verification on the third transaction data by using a second decryption key;
the monitoring equipment performs digital signature verification on the third transaction data by using a first decryption key to obtain fifth transaction data;
and the monitoring equipment acquires a second test result according to the fourth transaction data and the fifth transaction data, wherein the second test result represents whether the first decryption key and the second decryption key are the same or not.
4. The method of claim 3, wherein the monitoring device obtaining a second test result based on the fourth transaction data and the fifth transaction data comprises:
when the fourth transaction data is the same as the fifth transaction data, the monitoring device determines that the first decryption key is the same as the second decryption key;
when the fourth transaction data is different from the fifth transaction data, the monitoring device determines that the first decryption key is different from the second decryption key.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
and the monitoring equipment acquires a third test result according to the first transaction data and the fourth transaction data, wherein the third test result represents the integrity of the transaction data in the transmission process.
6. The method of claim 1, wherein the first device is a client device, the second device is a server device, and the third device is a block link end device.
7. The method of claim 1, wherein the first encryption key comprises a user private key and/or a transaction facility private key, and wherein the second encryption key comprises a user private key and/or a transaction facility private key.
8. The method of claim 3, wherein the first decryption key comprises a user public key and/or a transaction institution public key, and wherein the second decryption key comprises a user public key and/or a transaction institution public key.
9. The block chain key testing device is characterized in that the device is arranged on monitoring equipment and comprises:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring first transaction data from first equipment, and the first transaction data is data sent from the first equipment to second equipment;
the signature unit is used for carrying out digital signature on the first transaction data by using a first encryption key to obtain second transaction data, wherein the second transaction data comprises a first digital signature and the first transaction data, and the first digital signature is obtained by carrying out digital signature on the first transaction data by using the first encryption key by the monitoring equipment;
a second obtaining unit, configured to obtain third transaction data from the second device, where the third transaction data includes a second digital signature and the first transaction data, and the second digital signature is obtained by digitally signing the first transaction data by using a second encryption key by the second device;
a third obtaining unit, configured to obtain a first test result according to the second transaction data and the third transaction data, where the first test result indicates whether the first encryption key and the second encryption key are the same.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the blockchain key testing method of any one of claims 1 to 8.
11. An apparatus for blockchain key testing, the apparatus comprising a memory for storing one or more programs and a processor for invoking a program in the memory to perform the blockchain key testing method of any one of claims 1 to 8.
CN202010299439.4A 2020-04-16 2020-04-16 Block chain key testing method and device Active CN111445250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010299439.4A CN111445250B (en) 2020-04-16 2020-04-16 Block chain key testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010299439.4A CN111445250B (en) 2020-04-16 2020-04-16 Block chain key testing method and device

Publications (2)

Publication Number Publication Date
CN111445250A CN111445250A (en) 2020-07-24
CN111445250B true CN111445250B (en) 2023-04-11

Family

ID=71651868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010299439.4A Active CN111445250B (en) 2020-04-16 2020-04-16 Block chain key testing method and device

Country Status (1)

Country Link
CN (1) CN111445250B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032265B (en) * 2021-03-25 2023-08-08 深圳忆联信息系统有限公司 Asymmetric encryption algorithm testing method and device, computer equipment and storage medium
CN113783705A (en) * 2021-11-12 2021-12-10 北京华云安信息技术有限公司 Zero knowledge proof method, verification terminal, equipment and storage medium of key

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411653A (en) * 2016-10-26 2017-02-15 飞天诚信科技股份有限公司 Test method and device for intelligent secrete key equipment
CN107040383A (en) * 2017-04-24 2017-08-11 中山大学 A kind of blind Verifiable Encryptosystem endorsement method based on block chain
CN109510818A (en) * 2018-10-29 2019-03-22 梁伟 Data transmission system, method, apparatus, equipment and the storage medium of block chain
CN110493008A (en) * 2019-09-19 2019-11-22 腾讯科技(深圳)有限公司 A kind of block chain authentication method, device, equipment and medium
CN110753940A (en) * 2017-06-26 2020-02-04 斯坦普斯网站公司 System and method for cryptographic chain based authentication of postage transaction records
CN110892674A (en) * 2017-06-22 2020-03-17 Plc集团公司 Transaction generation method and block verification method of block chain

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3644548B1 (en) * 2017-06-21 2023-07-26 Nippon Telegraph And Telephone Corporation Key exchange system and key exchange method
WO2019143936A1 (en) * 2018-01-19 2019-07-25 Nasdaq, Inc. Systems and methods of digital content certification and verification using cryptography and blockchain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411653A (en) * 2016-10-26 2017-02-15 飞天诚信科技股份有限公司 Test method and device for intelligent secrete key equipment
CN107040383A (en) * 2017-04-24 2017-08-11 中山大学 A kind of blind Verifiable Encryptosystem endorsement method based on block chain
CN110892674A (en) * 2017-06-22 2020-03-17 Plc集团公司 Transaction generation method and block verification method of block chain
CN110753940A (en) * 2017-06-26 2020-02-04 斯坦普斯网站公司 System and method for cryptographic chain based authentication of postage transaction records
CN109510818A (en) * 2018-10-29 2019-03-22 梁伟 Data transmission system, method, apparatus, equipment and the storage medium of block chain
CN110493008A (en) * 2019-09-19 2019-11-22 腾讯科技(深圳)有限公司 A kind of block chain authentication method, device, equipment and medium

Also Published As

Publication number Publication date
CN111445250A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN109905360B (en) Data verification method and terminal equipment
EP1622301A2 (en) Methods and system for providing a public key fingerprint list in a PK system
CN110597836B (en) Information inquiry request response method and device based on block chain network
CN1172224C (en) Method and device for authenticating a program code
CN109766134A (en) System start method, device, electronic equipment and storage medium
WO2020038137A1 (en) Two-dimensional code generation method, data processing method, apparatus, and server
CN110233850B (en) Registration method, application server, user side and system based on alliance chain
CN111445250B (en) Block chain key testing method and device
CN109214146A (en) The endorsement method of application software, sign test method and apparatus
CN112165382A (en) Software authorization method and device, authorization server and terminal equipment
CN111130798A (en) Request authentication method and related equipment
CN112765626A (en) Authorization signature method, device and system based on escrow key and storage medium
CN111598681A (en) Credit evaluation method, credit evaluation system and readable storage medium
CN111161075B (en) Blockchain transaction data proving and supervising method, system and related equipment
CN111079190A (en) Block chain supply chain transaction hiding dynamic supervision system and method
US10756900B2 (en) Non-repudiation protocol using time-based one-time password (TOTP)
CN110321734A (en) A kind of file verification method and device
CN110175471B (en) File storage method and system
CN112347516A (en) Asset certification method and device based on block chain
CN109818965B (en) Personal identity verification device and method
CN110034922B (en) Request processing method, processing device, request verification method and verification device
CN111369364A (en) Electronic signature method and device based on super counter
CN111050326A (en) Short message verification method, device, equipment and medium based on block chain
CN115118433A (en) Client authorization method and device, privacy protection set intersection calculation method and device
CN114117388A (en) Device registration method, device registration apparatus, electronic device, 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