IP Library Granted Patent US 11,315,111
Granted Patent B2
US 11,315,111 · App. 16/721,346 · Granted Apr 26, 2022

Methods and devices for testing signature verification for blockchain system

Inventor: Yu Ma (Zhejiang, CN)
Assignee: Advanced New Technologies Co., Ltd.
G06Q20/3829G06Q20/3825G06Q20/3827H04L9/0643H04L9/3249G06Q2220/00H04L9/0637
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,315,111
App. No.
16/721,346
Filed
Dec 19, 2019
Granted
Apr 26, 2022
Kind
B2
Art Unit
3685
USPC
705/76
Abstract

Disclosed herein are methods, devices, and apparatuses, including computer programs stored on computer-readable media, for testing signature verification for a blockchain system. One of the methods includes: obtaining a testing configuration from a configuration file, wherein the testing configuration specifies a cryptography algorithm used in the blockchain system, a group of one or more private keys corresponding to the cryptography algorithm, and a predetermined execution result based on the cryptography algorithm and the group of one or more private keys; signing a transaction, by encrypting data representing the transaction based on the cryptography algorithm and the group of one or more private keys, to generate one or more signed transactions; sending the one or more signed transactions to the blockchain system and receiving an execution result from the blockchain system; and determining whether the predetermined execution result is satisfied based on the execution result.

Claims (49)

1. A computer-implemented method for testing signature verification for a blockchain system, comprising:

obtaining a testing configuration from a configuration file, wherein the testing configuration specifies a cryptographic algorithm used in the blockchain system, a group of private keys corresponding to the cryptographic algorithm, and a predetermined execution result based on the cryptographic algorithm and the group of private keys, wherein the group of private keys specified by the testing configuration includes duplicative private keys, a first one of the duplicative private keys being valid, and a second one of the duplicative private keys being invalid, and wherein the predetermined execution result of the testing configuration is set to be invalid;

signing a transaction, by encrypting data representing the transaction based on the cryptographic algorithm and the group of private keys, to generate signed transactions;

sending the signed transactions to the blockchain system and receiving an execution result from the blockchain system, the execution result indicating whether the signed transactions correspond to a valid transaction or an invalid transaction; and

determining whether the predetermined execution result is satisfied based on the execution result received from the blockchain system.

2. The method of claim 1 , wherein the cryptographic algorithm used in the blockchain system comprises at least one of an RSA algorithm, an ECDSA algorithm, or an SM2 algorithm.

3. The method of claim 1 , wherein the testing configuration includes a representation of each of the group of private keys, the method further comprising:

mapping the representation of each of the group of private keys to a corresponding private key; and

obtaining the corresponding private key.

4. The method of claim 1 , further comprising:

generating the transaction; and

determining a hash value for the generated transaction as the data representing the transaction.

5. The method of claim 1 , wherein determining whether the predetermined execution result is satisfied comprises:

comparing the execution result received from the blockchain system with the predetermined execution result to make the determination.

6. The method of claim 1 , further comprising:

receiving the execution result based on a weight corresponding to each private key in the group of private keys.

7. The method of claim 1 , further comprising:

in response to a determination that the predetermined execution result is satisfied, displaying a testing result indicating that signature verification in the blockchain system operates properly.

8. The method of claim 1 , further comprising:

obtaining a plurality of testing configurations from the configuration file, wherein the plurality of testing configurations specify a plurality of cryptographic algorithms used in the blockchain system, a plurality of groups of private keys, and a plurality of predetermined execution results; and

performing the testing in parallel based on the plurality of testing configurations.

9. A device for testing signature verification for a blockchain system, comprising:

one or more processors; and

one or more computer-readable memories coupled to the one or more processors and having instructions stored thereon that are executable by the one or more processors, wherein the one or more processors are configured to:

obtain a testing configuration from a configuration file, wherein the testing configuration specifies a cryptographic algorithm used in the blockchain system, a group of private keys corresponding to the cryptographic algorithm, and a predetermined execution result based on the cryptographic algorithm and the group of private keys, wherein the group of private keys specified by the testing configuration includes duplicative private keys, a first one of the duplicative private keys being valid, and a second one of the duplicative private keys being invalid, and wherein the predetermined execution result of the testing configuration is set to be invalid;

sign a transaction, by encrypting data representing the transaction based on the cryptographic algorithm and the group of private keys, to generate signed transactions;

send the signed transactions to the blockchain system and receive an execution result from the blockchain system, the execution result indicating whether the signed transactions correspond to a valid transaction or an invalid transaction; and

determine whether the predetermined execution result is satisfied based on the execution result received from the blockchain system.

10. The device of claim 9 , wherein the cryptographic algorithm used in the blockchain system comprises at least one of an RSA algorithm, an ECDSA algorithm, or an SM2 algorithm.

11. The device of claim 9 , wherein the testing configuration includes a representation of each of the group of private keys, and the one or more processors are further configured to:

map the representation of each of the group of private keys to a corresponding private key; and

obtain the corresponding private key.

12. The device of claim 9 , wherein the one or more processors are further configured to:

generate the transaction; and

determine a hash value for the generated transaction as the data representing the transaction.

13. The device of claim 9 , wherein in determining whether the predetermined execution result is satisfied, the one or more processors are further configured to:

compare the execution result received from the blockchain system with the predetermined execution result to make the determination.

14. The device of claim 9 , wherein the one or more processors are further configured to:

receive the execution result based on a weight corresponding to each private key in the group of private keys.

15. The device of claim 9 , wherein the one or more processors are further configured to:

in response to a determination that the predetermined execution result is satisfied, display a testing result indicating that signature verification in the blockchain system operates properly.

16. The device of claim 9 , wherein the one or more processors are further configured to:

obtain a plurality of testing configurations from the configuration file, wherein the plurality of testing configurations specify a plurality of cryptographic algorithms used in the blockchain system, a plurality of groups of private keys, and a plurality of predetermined execution results; and

perform the testing in parallel based on the plurality of testing configurations.

17. A non-transitory computer-readable medium having stored therein instructions that, when executed by a processor of a device, cause the device to perform a method for testing signature verification for a blockchain system, the method comprising:

obtaining a testing configuration from a configuration file, wherein the testing configuration specifies a cryptographic algorithm used in the blockchain system, a group of private keys corresponding to the cryptographic algorithm, and a predetermined execution result based on the cryptographic algorithm and the group of private keys, wherein the group of private keys specified by the testing configuration includes duplicative private keys, a first one of the duplicative private keys being valid, and a second one of the duplicative private keys being invalid, and wherein the predetermined execution result of the testing configuration is set to be invalid;

signing a transaction, by encrypting data representing the transaction based on the cryptographic algorithm and the group of private keys, to generate signed transactions;

sending the signed transactions to the blockchain system and receiving an execution result from the blockchain system, the execution result indicating whether the signed transactions correspond to a valid transaction or an invalid transaction; and

determining whether the predetermined execution result is satisfied based on the execution result received from the blockchain system.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 13, 2020
From: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
To: ADVANCED NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053761/0338 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 5, 2020
From: ALIBABA GROUP HOLDING LIMITED
To: ADVANTAGEOUS NEW TECHNOLOGIES CO., LTD.
Reel/Frame 053713/0665 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 19, 2019
From: MA, YU
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 051336/0771 →
Continuity (2)
Continuation PCTCN2019076884 · Mar 4, 2019
Related Publication 20200286087A1 · Sep 10, 2020