CN113205336B - Multiple signature transaction method, computer device and storage medium - Google Patents

Multiple signature transaction method, computer device and storage medium Download PDF

Info

Publication number
CN113205336B
CN113205336B CN202110488618.7A CN202110488618A CN113205336B CN 113205336 B CN113205336 B CN 113205336B CN 202110488618 A CN202110488618 A CN 202110488618A CN 113205336 B CN113205336 B CN 113205336B
Authority
CN
China
Prior art keywords
signature
transaction
multiple signature
address
data
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
CN202110488618.7A
Other languages
Chinese (zh)
Other versions
CN113205336A (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.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110488618.7A priority Critical patent/CN113205336B/en
Publication of CN113205336A publication Critical patent/CN113205336A/en
Application granted granted Critical
Publication of CN113205336B publication Critical patent/CN113205336B/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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides a multiple transaction signature method, a computer device and a storage medium, wherein the method comprises the following steps: receiving a first multiple signature transaction; when the first multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the first multiple signature address is matched with the first multiple signature structure, and verifying whether each first signature data meets the first multiple signature structure: when the verification is correct, the first multiple signature transaction is executed. The multiple signature transaction can be executed without deploying multiple signature contracts.

Description

Multiple signature transaction method, computer device and storage medium
Technical Field
The application relates to the technical field of block chains, in particular to a multi-transaction signature method, computer equipment and a storage medium.
Background
In the prior art, multiple signature transaction rules generally need to be stored in multiple signature contracts, and to execute multiple signature transactions, the multiple signature contracts need to be deployed first.
Disclosure of Invention
In view of the above-described deficiencies or inadequacies in the prior art, it would be desirable to provide a multi-transaction signing method, computer device, and storage medium that performs multi-signature transactions without deploying multi-signature contracts.
In a first aspect, the present invention provides a multiple signature transaction method suitable for a client, where the method includes:
responding to a first multiple signature rule determined by a second client of a plurality of second accounts, generating a first multiple signature structure according to the first multiple signature rule, and generating a first multiple signature address according to the first multiple signature structure; the first multiple signature structure comprises a first public key of a current account, second public keys of all second accounts and first operation weight;
receiving signature request information including first transaction content sent by a third client of a third account, and signing the first transaction content according to a held private key to generate first signature data and returning the first signature data to the third client when the first transaction content is considered to be correct, so that the third client can:
generating a second multiple signature transaction according to the first signature data, the plurality of second signature data, the second multiple signature structure and the second multiple signature address; the second multiple signature structure is generated according to a second multiple signature rule determined by a plurality of fourth accounts including the current account and the third account, the second signature data is obtained by signing the first transaction content according to a held private key by a plurality of fifth accounts except the current account and appointed in the second multiple signature structure, wherein the fifth accounts include the fourth accounts, the second multiple signature address is generated according to the second multiple signature structure, and the second multiple signature structure comprises a first public key, a fifth public key of each fifth account and a second operation weight;
sending the second multi-signed transaction to the blockchain network for the blockchain node to:
when the second multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the second multiple signature address is matched with the second multiple signature structure, and verifying whether the first signature data and each second signature data meet the second multiple signature structure:
when the verification is correct, the first multiple signature transaction is executed.
In a second aspect, the present invention provides a multiple signature transaction method for blockchain nodes, where the method includes:
receiving a first multiple signature transaction; the first multiple signature transaction is generated according to a plurality of first signature data, a first multiple signature structure and a first multiple signature address, the first multiple signature address is generated according to the first multiple signature structure, the first multiple signature structure is generated according to a first multiple signature rule, the first multiple signature rule is determined by a plurality of first accounts, the first multiple signature structure comprises a first public key and a first operation weight of each first account, the first signature data is obtained by signing first transaction content through a plurality of second accounts included in the first accounts and agreed in the first multiple signature structure according to a held private key, and the first transaction content is transaction content of the first multiple signature;
when the first multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the first multiple signature address is matched with the first multiple signature structure, and verifying whether each first signature data meets the first multiple signature structure:
when the verification is correct, the first multiple signature transaction is executed.
In a third aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a multiple signature transaction method provided in accordance with embodiments of the present invention.
In a fourth aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the multiple signature transaction method provided according to the embodiments of the present invention.
The multiple transaction signature method, the computer device and the storage medium provided by the embodiments of the invention receive a first multiple signature transaction; the first multiple signature transaction is generated according to a plurality of first signature data, a first multiple signature structure and a first multiple signature address, the first multiple signature address is generated according to the first multiple signature structure, the first multiple signature structure is generated according to a first multiple signature rule, the first multiple signature rule is determined by a plurality of first accounts, the first multiple signature structure comprises a first public key and a first operation weight of each first account, the first signature data is obtained by signing first transaction content through a plurality of second accounts included in the first accounts and agreed in the first multiple signature structure according to a held private key, and the first transaction content is transaction content of the first multiple signature; when the first multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the first multiple signature address is matched with the first multiple signature structure, and verifying whether each first signature data meets the first multiple signature structure: when the verification is correct, the method for executing the first multiple signature transaction can execute the multiple signature transaction without deploying multiple signature contracts.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a multiple signature transaction method according to an embodiment of the present invention.
FIG. 2 is a flow diagram of a preferred embodiment of the method shown in FIG. 1.
Fig. 3 is a flowchart of another multiple signature transaction method according to an embodiment of the present invention.
FIG. 4 is a flow chart of a preferred embodiment of the method shown in FIG. 3.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a flowchart of a multiple signature transaction method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a multiple signature transaction method applicable to a client, where the method includes:
s12: responding to a first multiple signature rule determined by a second client of a plurality of second accounts, generating a first multiple signature structure according to the first multiple signature rule, and generating a first multiple signature address according to the first multiple signature structure; the first multiple signature structure comprises a first public key of a current account, second public keys of all second accounts and first operation weight;
s14: receiving signature request information including first transaction content sent by a third client of a third account, and signing the first transaction content according to a held private key to generate first signature data and returning the first signature data to the third client when the first transaction content is considered to be correct, so that the third client can:
generating a second multiple signature transaction according to the first signature data, the plurality of second signature data, the second multiple signature structure and the second multiple signature address; the second multiple signature structure is generated according to a second multiple signature rule determined by a plurality of fourth accounts including the current account and the third account, the second signature data is obtained by signing the first transaction content according to a held private key by a plurality of fifth accounts except the current account and appointed in the second multiple signature structure, wherein the fifth accounts include the fourth accounts, the second multiple signature address is generated according to the second multiple signature structure, and the second multiple signature structure comprises a first public key, a fifth public key of each fifth account and a second operation weight;
sending the second multi-signed transaction to the blockchain network for the blockchain node to:
when the second multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the second multiple signature address is matched with the second multiple signature structure, and verifying whether the first signature data and each second signature data meet the second multiple signature structure:
when the verification is correct, the first multiple signature transaction is executed.
Specifically, generating the first multi-signature address according to the first multi-signature structure includes "encoding the first multi-signature structure according to a protobuf protocol to generate a first binary string; performing a hash operation on the first binary string to generate a first multiple signature address, verifying whether the second multiple signature address matches the second multiple signature structure comprises "encoding the second multiple signature structure according to a protobuf protocol to generate a second binary string; performing a hash operation on the second binary string to generate a third multi-signature address; judging whether the third multiple signature address is the same as the second multiple signature address; and generating a second multiple signature transaction according to the first signature data, the plurality of second signature data, the second multiple signature structure and the second multiple signature address comprises generating the second multiple signature transaction according to a multiple signature transaction identifier, the first signature data, the plurality of second signature data, the second multiple signature structure and the second multiple signature address, and judging that the second multiple signature transaction is a multiple signature transaction according to the multiple signature transaction identifier of the second multiple signature transaction when the second multiple signature transaction is judged to be the multiple signature transaction; verifying whether the first signature data and each second signature data meet the second multiple signature structure comprises verifying whether the first public key and each fifth public key belong to the public keys included in the second multiple signature structure; verifying whether the weights of the current account and the account corresponding to each second signature data meet the second operation weight or not is taken as an example;
suppose user a, user B, user C, user D, user E determine multiple signature rules: if any one of the users A to E wants to transfer money from the generated multiple signature addresses, the transfer needs to be agreed by at least any two of the users A to E;
taking the current client as the client of the user A as an example;
the client of the user A executes the step S12, responds to the client of the user B to the client of the user E to determine the multiple signature rules, and generates a multiple signature structure S according to the multiple signature rules, wherein the multiple signature structure S comprises pub (a) -pub (E) and has the operation weight of 5: 2; coding S according to a protobuf protocol to generate a first binary string; performing a hash operation on the first binary string to generate a multiple signature address addr (M);
the client side of the user E responds to the request of the user E, takes 100coin from addr (M), generates transaction content (addr (M), addr (E),100coin) and signature request information comprising the transaction content, and sends the signature request information to the client sides of the users A to D;
the client of the user a executes the step S14, receives the signature request information, and considers that the transaction content is correct, then the client of the user a signs the transaction content according to pri (a) to generate signature data sigdata (a), and sends sigdata (a) to the client of the user E; similarly, the client of the user B generates signature data sigdata (B) and sends the sigdata (B) to the client of the user E;
the client of user E generates a multiple signature transaction tx1(addr (m)), multiple signature transaction identifications multisig, S, sigdata (a), sigdata (b)); those skilled in the art will appreciate that a multiple signature transaction is generated by the client of E, and the transaction recipient defaults to E; in further embodiments, the transaction recipient may also be specified in tx1, i.e., tx1 further includes the transaction recipient address addr (e), which may achieve the same technical effect;
the client of user E sends tx1 to the blockchain network;
the blockchain node judges that tx1 is a multi-signature type transaction through multi-signature transaction identification multisig, the blockchain node encodes S in tx1 according to a protobuf protocol to generate a second binary character string, performs hash operation on the second binary character string to generate a multi-signature address addr (M), and judges whether addr (M) is the same as addr (M);
verifying whether the public key corresponding to sigdata (A) and sigdata (B) belongs to the public key included in S by the blockchain node;
the block chain node verifies whether sigdata (A) and sigdata (B) meet 5: 2;
since addr (m)' is the same as addr (m), public keys pub (a) and pub (B) corresponding to sigdata (a) and sigdata (B) belong to the public keys pub (a) to pub (e)) included in S, sigdata (a) and sigdata (B) satisfy 5:2, and the block link point executes tx 1.
In further embodiments, the manner of generating the first multi-signature address according to the first multi-signature structure may also be configured according to actual requirements, for example, configured to encode the multi-signature structure according to a protocol (e.g., thrift) other than protobuf to generate a binary string, and then perform a hash operation according to the generated binary string to generate the multi-signature address, and accordingly, verify whether the second multi-signature address matches the second multi-signature structure should be configured to "encode the second multi-signature structure according to thrift protocol to generate the second binary string; performing a hash operation on the second binary string to generate a third multi-signature address; and judging whether the third multiple signature address is the same as the second multiple signature address or not, thereby realizing the same technical effect.
In more embodiments, the multiple signature addresses may not include the re-signature transaction identifier, and the determination method of the multiple signature transactions may also be configured according to actual requirements, for example, configured to determine that the multiple signature transactions are multiple signature transactions according to the first byte of the multiple signature transactions, so that the same technical effect may be achieved.
In more embodiments, the manner of verifying whether the first signature data and each second signature data satisfy the second multiple signature structure may also be configured according to actual requirements, for example, the manner of verifying whether the first signature data and each second signature data satisfy the second multiple signature structure includes verifying whether a public key corresponding to a first address of the first current account and a fifth address corresponding to each fifth account belongs to a public key included in the second multiple signature structure; and verifying whether the weights of the current account and the account corresponding to each second signature data meet the second operation weight, so that the same technical effect can be realized.
In further embodiments, different operation weights may be configured for different users according to actual requirements, for example, if the operation weights of the users a to C are configured to be 1.2, and the operation weights of the users D to E are configured to be 0.7, if tx1 only includes sigdata (D) and sigdata (E), the sum of the weights of tx1 is 5:1.4, and does not satisfy 5:2, and the tx1 executed by the block link point fails.
The above-described embodiments enable multiple signature transactions to be performed without deploying multiple signature contracts.
FIG. 2 is a flow diagram of a preferred embodiment of the method shown in FIG. 1. As shown in fig. 2, in a preferred embodiment, S12 includes:
s121: responding to a second client side with a plurality of second accounts to determine a first multiple signature rule, and generating a first multiple signature structure according to the first multiple signature rule;
s122: encoding the first multiple signature structure according to a protobuf protocol to generate a first binary string;
s123: performing a hash operation on the first binary string to generate a first multiple signature address;
verifying that the second multi-signature address matches the second multi-signature structure comprises:
encoding the second multi-signature structure according to a protobuf protocol to generate a second binary string;
performing a hash operation on the second binary string to generate a third multi-signature address;
and judging whether the third multi-signature address is the same as the second multi-signature address or not.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, verifying whether the first signature data, each second signature data satisfies the second multiple signature structure comprises:
verifying whether the first public key and each fifth public key belong to public keys included in the second multiple signature structure;
and verifying whether the weights of the current account and the account corresponding to each second signature data meet the second operation weight.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, generating a second multi-signed transaction based on the first signature data, the plurality of second signature data, the second multi-signature structure, and the second multi-signature address comprises:
generating a second multiple signature transaction according to the multiple signature transaction identifier, the first signature data, the plurality of second signature data, the second multiple signature structure and the second multiple signature address;
when the second multiple signature transaction is judged to be a multiple signature type transaction, the method comprises the following steps:
and judging the second multiple signature transaction as a multiple signature type transaction according to the multiple signature transaction identifier of the second multiple signature transaction.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the determining that the second multiple signature transaction is a multiple signature type transaction includes:
and judging the second multiple signature transaction as a multiple signature type transaction according to the first byte of the second multiple signature transaction.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 3 is a flowchart of another multiple signature transaction method according to an embodiment of the present invention. The method illustrated in fig. 3 may be performed in conjunction with the method illustrated in fig. 1. As shown in fig. 3, in this embodiment, the present invention provides a multiple signature transaction method applicable to a blockchain node, where the method includes:
s22: receiving a first multiple signature transaction; the first multiple signature transaction is generated according to a plurality of first signature data, a first multiple signature structure and a first multiple signature address, the first multiple signature address is generated according to the first multiple signature structure, the first multiple signature structure is generated according to a first multiple signature rule, the first multiple signature rule is determined by a plurality of first accounts, the first multiple signature structure comprises a first public key and a first operation weight of each first account, the first signature data is obtained by signing first transaction content through a plurality of second accounts included in the first accounts and agreed in the first multiple signature structure according to a held private key, and the first transaction content is transaction content of the first multiple signature;
s24: when the first multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the first multiple signature address is matched with the first multiple signature structure, and verifying whether each first signature data meets the first multiple signature structure:
s26: when the verification is correct, the first multiple signature transaction is executed.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
FIG. 4 is a flow chart of a preferred embodiment of the method shown in FIG. 3. As shown in fig. 4, in a preferred embodiment, the first multi-signature address is generated from a hash value of a first binary string, which encodes a first multi-signature structure according to a protobuf protocol to generate;
s24 includes:
s241: when the first multiple signature transaction is judged to be multiple signature type transaction, a first multiple signature structure in the first multiple signature transaction is coded according to a protobuf protocol to generate a second binary character string;
s242: performing a hash operation on the second binary string to generate a second multi-signature address;
s243: determining whether a first multiple signature address and a second multiple signature address in a first multiple signature transaction are the same;
s244: verifying whether each first signature data satisfies the first multiple signature structure.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, verifying whether each first signature data satisfies the first multiple signature structure comprises:
verifying whether each first public key belongs to the public keys included in the first multiple signature structure;
and verifying whether the weight of the account corresponding to each piece of first signature data meets the first operation weight.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the first multiple signature transaction is generated according to the multiple signature transaction identifier, a plurality of first signature data, a first multiple signature structure and a first multiple signature address;
when the first multiple signature transaction is judged to be a multiple signature type transaction, the method comprises the following steps:
and judging the first multiple signature transaction as a multiple signature type transaction according to the multiple signature transaction identifier of the first multiple signature transaction.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the determining that the first multiple-signature transaction is a multiple-signature-type transaction includes:
and judging that the first multiple signature transaction is a multiple signature type transaction according to the first byte of the first multiple signature transaction.
The multi-signature transaction principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
As shown in fig. 5, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU501, ROM502, and RAM503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted on the storage section 508 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
As still another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of such a unit or module does not in some way constitute a limitation on the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (12)

1. A multiple signature transaction method, adapted for a client, the method comprising:
responding to a first multiple signature rule determined by a second client side of a plurality of second accounts, generating a first multiple signature structure according to the first multiple signature rule, and generating a first multiple signature address according to the first multiple signature structure; the first multiple signature structure comprises a first public key of a current account, a second public key of each second account and a first operation weight;
receiving signature request information including first transaction content sent by a third client of a third account, and signing the first transaction content according to a held private key to generate first signature data and returning the first signature data to the third client when the first transaction content is considered to be correct, so that the third client can:
generating a second multiple signature transaction according to the first signature data, the plurality of second signature data, a second multiple signature structure and a second multiple signature address; the second multiple signature structure is generated according to a second multiple signature rule determined by a plurality of fourth accounts including the current account and the third account, the second signature data is obtained by signing the first transaction content according to a held private key by a plurality of fifth accounts except the current account and included in the fourth accounts, which are agreed in the second multiple signature structure, the second multiple signature address is generated according to the second multiple signature structure, and the second multiple signature structure comprises the first public key, a fifth public key of each fifth account and a second operation weight;
sending the second multi-signature transaction to a blockchain network for blockchain nodes to:
when the second multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the second multiple signature address is matched with the second multiple signature structure, and verifying whether the first signature data and each second signature data meet the second multiple signature structure:
and when the verification is correct, executing the second multiple signature transaction.
2. The method of claim 1, wherein generating a first multi-signature address according to the first multi-signature structure comprises:
encoding the first multi-signature structure according to a protobuf protocol to generate a first binary string;
performing a hash operation on the first binary string to generate a first multi-signature address;
said verifying whether said second multi-signature address matches said second multi-signature structure comprises:
encoding the second multi-signature structure according to a protobuf protocol to generate a second binary string;
performing a hash operation on the second binary string to generate a third multi-signature address;
and judging whether the third multiple signature address is the same as the second multiple signature address.
3. The method of claim 1, wherein verifying whether the first signature data, each of the second signature data, satisfies the second multiple signature structure comprises:
verifying whether the first public key and each fifth public key belong to the public keys included in the second multiple signature structure;
and verifying whether the weight of the current account and the account corresponding to each second signature data meets the second operation weight.
4. A method according to any of claims 1-3, wherein generating a second multi-signed transaction based on the first signature data, the plurality of second signature data, the second multi-signature structure, and the second multi-signature address comprises:
generating a second multiple signature transaction according to the multiple signature transaction identifier, the first signature data, a plurality of second signature data, a second multiple signature structure and a second multiple signature address;
the determining that the second multiple signature transaction is a multiple signature type transaction includes:
and judging that the second multiple signature transaction is a multiple signature type transaction according to the multiple signature transaction identifier of the second multiple signature transaction.
5. The method according to any one of claims 1-3, wherein the determining that the second multiple signature transaction is a multiple signature-based transaction comprises:
and judging that the second multiple signature transaction is a multiple signature type transaction according to the first byte of the second multiple signature transaction.
6. A multiple signature transaction method, applied to a blockchain node, the method comprising:
receiving a first multiple signature transaction; the first multiple signature transaction is generated according to a plurality of first signature data, a first multiple signature structure and a first multiple signature address, the first multiple signature address is generated according to the first multiple signature structure, the first multiple signature structure is generated according to a first multiple signature rule, the first multiple signature rule is determined by a plurality of first accounts, the first multiple signature structure comprises a first public key and a first operation weight of each first account, the first signature data is obtained by signing first transaction content through a plurality of second accounts included in the first accounts and appointed in the first multiple signature structure according to a held private key, and the first transaction content is transaction content of the first multiple signature;
when the first multiple signature transaction is judged to be a multiple signature type transaction, verifying whether the first multiple signature address is matched with the first multiple signature structure, and verifying whether each first signature data meets the first multiple signature structure:
and when the verification is correct, executing the first multiple signature transaction.
7. The method of claim 6, wherein the first multi-signature address is generated from a hash value of a first binary string encoding the first multi-signature structure according to protobuf protocol to generate;
said verifying that said first multi-signature address matches said first multi-signature structure comprises:
encoding the first multi-signature structure in the first multi-signature transaction according to protobuf protocol to generate a second binary string;
hashing the second binary string to generate a second multi-signature address;
determining whether the first multi-signature address and the second multi-signature address in the first multi-signature transaction are the same.
8. The method of claim 6, wherein said verifying that each of said first signature data satisfies said first multiple signature structure comprises:
verifying whether each first public key belongs to a public key included in the first multiple signature structure;
and verifying whether the weight of the account corresponding to each piece of first signature data meets the first operation weight.
9. The method of any of claims 6-8, wherein the first multi-signed transaction is generated based on a multi-signed transaction identification, a number of first signature data, a first multi-signature structure, a first multi-signature address;
the determining that the first multiple signature transaction is a multiple signature type transaction includes:
and judging that the first multiple signature transaction is a multiple signature type transaction according to the multiple signature transaction identifier of the first multiple signature transaction.
10. The method according to any one of claims 6-8, wherein the determining that the first multiple signature transaction is a multiple signature type transaction comprises:
and judging that the first multiple signature transaction is a multiple signature type transaction according to the first byte of the first multiple signature transaction.
11. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-10.
12. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-10.
CN202110488618.7A 2021-05-06 2021-05-06 Multiple signature transaction method, computer device and storage medium Active CN113205336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110488618.7A CN113205336B (en) 2021-05-06 2021-05-06 Multiple signature transaction method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110488618.7A CN113205336B (en) 2021-05-06 2021-05-06 Multiple signature transaction method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN113205336A CN113205336A (en) 2021-08-03
CN113205336B true CN113205336B (en) 2022-09-13

Family

ID=77029850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110488618.7A Active CN113205336B (en) 2021-05-06 2021-05-06 Multiple signature transaction method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN113205336B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060056A (en) * 2019-03-18 2019-07-26 阿里巴巴集团控股有限公司 A kind of business confirmation method and system based on block chain intelligence contract
WO2020082887A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Block chain transaction method and apparatus
CN112381543A (en) * 2020-12-09 2021-02-19 杭州复杂美科技有限公司 Multiple signature transaction method, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10839379B2 (en) * 2017-07-20 2020-11-17 Chicago Mercantile Exchange Inc. Blockchain including linked digital assets

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020082887A1 (en) * 2018-10-26 2020-04-30 阿里巴巴集团控股有限公司 Block chain transaction method and apparatus
CN110060056A (en) * 2019-03-18 2019-07-26 阿里巴巴集团控股有限公司 A kind of business confirmation method and system based on block chain intelligence contract
CN112381543A (en) * 2020-12-09 2021-02-19 杭州复杂美科技有限公司 Multiple signature transaction method, device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种新的高效的无证书广播多重签名方案;牛淑芬等;《计算机应用研究》;20200831(第08期);全文 *
基于承签原语与多重签名的改进虚拟交易系统方案;张泓等;《计算机工程》;20160228(第02期);全文 *

Also Published As

Publication number Publication date
CN113205336A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
US20240074004A1 (en) Verification of interactions system and method
US20210160082A1 (en) Blockchain transaction method and apparatus
US20220138737A1 (en) Computer-implemented systems and methods for implementing transfers over a blockchain network
CN110751475A (en) Cross-chain method, system, equipment and storage medium for blockchain transaction
CN109716375A (en) Processing method, device and the storage medium of block chain account
CN111478772B (en) Assembly line friendly signature and signature verification method, device and storage medium
CN111903062A (en) Computer-implemented method and system related to arithmetic coding for serializing arithmetic circuits
US11271728B2 (en) Secure key management
JP2018197832A (en) Block chain update system, server device, client device, block chain update method, and program
CN115526634B (en) Intelligent cross-chain interaction method and system based on block chain and storage medium
CN112381543A (en) Multiple signature transaction method, device and storage medium
CN111385096A (en) Block chain network, signature processing method, terminal and storage medium
CN109801168B (en) Block chain transaction verification method, equipment and storage medium
CN112184228B (en) Asset exchange method, device and storage medium
CN112016135B (en) Joint account generation and transaction method, system, equipment and storage medium
CN113205336B (en) Multiple signature transaction method, computer device and storage medium
CN111523896B (en) Attack prevention method, apparatus and storage medium
CN112435123A (en) Transaction method, system and storage medium based on isomorphic multi-chain system
CN111310242A (en) Method and device for generating device fingerprint, storage medium and electronic device
CN109801066A (en) The implementation method and device of long-range storage service
CN114372879A (en) Transaction method, computer device and storage medium
CN111709727B (en) Method and computer readable storage medium for maintaining multiple signatures in a blockchain wallet
US7895438B2 (en) Method and apparatus for generating and verifying digital signature
CN112804066A (en) Method and device for transferring message in cross-link mode based on relay equipment
CN113222577B (en) Delayed transfer method, computer 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