CN117201041A - Under-chain collaborative threshold signature method and device based on block chain - Google Patents

Under-chain collaborative threshold signature method and device based on block chain Download PDF

Info

Publication number
CN117201041A
CN117201041A CN202311320624.7A CN202311320624A CN117201041A CN 117201041 A CN117201041 A CN 117201041A CN 202311320624 A CN202311320624 A CN 202311320624A CN 117201041 A CN117201041 A CN 117201041A
Authority
CN
China
Prior art keywords
signature
contract
address
key
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311320624.7A
Other languages
Chinese (zh)
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.)
Hunan Tianhe Guoyun Technology Co Ltd
Original Assignee
Hunan Tianhe Guoyun 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 Hunan Tianhe Guoyun Technology Co Ltd filed Critical Hunan Tianhe Guoyun Technology Co Ltd
Priority to CN202311320624.7A priority Critical patent/CN117201041A/en
Publication of CN117201041A publication Critical patent/CN117201041A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a method and a device for signing a collaborative threshold under a chain based on a blockchain, wherein the method comprises the steps of determining a cryptographic algorithm for signing; deploying intelligent contracts on the participating nodes, generating independent contract addresses by the participating nodes according to deployed contract codes, and sharing the contract addresses to other participating nodes; the participating node verifies the contract address, derives a public key generation address according to the contract address, and performs address matching; generating a key according to public parameters required in the signing process by a cryptographic algorithm, and slicing the key; the participating nodes use the contract address as a public parameter, perform collaborative signature under the condition that the signature algorithm threshold is reached, and jointly verify the validity of the signature by using a verification algorithm and the contract address. Compared with the related art, the method and the device for the collaborative threshold signature under the chain based on the blockchain can improve the signature safety and the signature efficiency.

Description

Under-chain collaborative threshold signature method and device based on block chain
Technical Field
The application relates to the technical field of blockchains, in particular to a method and a device for collaborative threshold signature under a chain based on a blockchain.
Background
In recent years, digital currencies with decentralised and non-tamperable properties have attracted a large number of users, and more people are willing to trade with encrypted digital currencies, and blockchains are also known as the underlying technology for digital currencies. Blockchains are a type of non-tamperable, de-centralized, shared ledger that combines blocks in a chain fashion into a specific data structure in time order, and that is cryptographically guaranteed.
Blockchain under-chain transactions refer to transactions conducted outside the blockchain, also referred to as off-chain transactions or under-chain transactions, which are based on conventional trust mechanisms, and rely on a central agency or other trusted third party to complete the transactions and settlements of the transactions in addition to the parties involved in the transactions, typically with faster validation speeds and higher privacy than under-chain transactions on the blockchain.
The application number 202010582070.8 'an SM2 collaborative threshold signature method and an electronic device', the main content is as follows: the user generates a first partial private key d 1 Second partial private key d 2 Calculate the point W on the elliptic curve 1 ,W 2 And n private key shares c i Will (W) 2 ,c i ) Secret transmission to n service terminals U i The method comprises the steps of carrying out a first treatment on the surface of the At n server terminals U during signature i Selecting m service terminals U j Forming a set M; the user generates a random number k c Server side U j Generating random numbers k from a set M j The user end and each server end Uj calculate a first partial signature r and a second partial signature s to obtain a final signature (r, s), and the scheme is only applicable to a network system consisting of one user end and a plurality of servers.
The application number is 201910657002.0, which is a collaborative signature method and a collaborative signature system supporting information hiding, and the main content is as follows: initializing signature parameters; generating private keys and public keys of the calling party and the cooperator; generating a signature; the calling party and the cooperator respectively store SM2 sub private key parts to cooperatively finish signature operation of the message; no one party can obtain complete SM2 private key information. The scheme calling party and the cooperator cooperate to complete the signature, and it can be deduced from the scheme that the scheme is suitable for the signature scheme between the two parties of the transaction, and is suitable for being used as an algorithm of the transaction signature on the blockchain, and the achievement of the transaction under the blockchain requires the cooperation of the transaction initiator, the transaction cooperator, the service provider or the third party mechanism to complete. Secondly, the under-chain transaction is different from the on-chain transaction, each transaction on the chain needs to be synchronized to all nodes of the blockchain for confirmation and verification, and the confirmation speed of the blockchain transaction is slower while the transaction is irreversible and tamper-proof, so that in the under-chain transaction, the transaction speed is faster without waiting for the generation and verification of the blocks. Therefore, in the collaborative signature process, the mutual parameter transmission of each transaction party for many times is avoided, the operation with high complexity is operated, the network bandwidth and the CPU calculation time are wasted, otherwise, the collaborative signature and the transaction speed are possibly reduced, and the risks of calculation occupation and bandwidth increase are caused.
Accordingly, there is a need for a new type of blockchain-based under-chain collaborative threshold signature method and apparatus that overcomes the above-described drawbacks.
Disclosure of Invention
The application aims to provide a novel under-chain collaborative threshold signature method and device based on a blockchain, which improve collaborative signature risk resistance, signature efficiency and security.
In order to achieve the above object, the present application provides a blockchain-based under-chain cooperative threshold signature method, comprising:
determining at least three participating nodes participating in the signing operation, and determining a cryptographic algorithm for signing;
deploying intelligent contracts on the participating nodes, generating independent contract addresses by the participating nodes according to deployed contract codes, and sharing the contract addresses to other participating nodes;
the participating node verifies the contract address, derives a public key generation address according to the contract address, and performs address matching;
generating public parameters required in the signing process according to a cryptographic algorithm, initializing the signing parameters, generating a secret key through the cryptographic algorithm, and fragmenting the secret key;
the participating nodes use the contract address as a public parameter, perform collaborative signature under the condition that the signature algorithm threshold is reached, and jointly verify the validity of the signature by using a verification algorithm and the contract address.
The application also provides a device for signing the under-chain cooperative threshold based on the block chain, which comprises:
the signature password algorithm module is used for generating a secret key meeting signature characteristics, dividing a signature calculation task into a plurality of subtasks and calculating in parallel, so that the efficiency and throughput of signature are improved;
the trusted third party is responsible for generating system parameters and deploying intelligent contracts;
the transaction initiator is used for generating a secret key according to the signature password algorithm module;
and the transaction cooperator is used for verifying according to the key generated by the initiator and the contract address of the intelligent contract.
The present application also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the blockchain-based under-chain collaborative threshold signing method.
The application also provides a computer terminal comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the block chain-based under-chain cooperative threshold signature method when executing the computer program.
Compared with the related art, the method and the device have the advantages that identity verification is firstly carried out on each contract address in the collaborative signature process, after verification is finished, the under-chain privacy computing node contract address is used as a public parameter of the collaborative signature of the cryptographic algorithm, and the security and the high efficiency of the collaborative signature are realized based on the threshold signature mode; the application can generate an effective signature by separating the private key to two devices for storage through a safe two-way distributed signature algorithm, without reconstructing the whole private key, has smaller communication complexity and can resist a suspension attack to a certain extent.
Drawings
For a clearer description of the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments are briefly introduced below, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art, wherein:
FIG. 1 is a flow chart of a blockchain-based under-chain collaborative threshold signature method of the present application;
FIG. 2 is a block chain based under-chain cooperative threshold signature apparatus architecture diagram of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be clear and complete, and it is obvious that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, the present application designs a method for signing a cooperative threshold under a chain based on a blockchain, comprising:
determining at least three participating nodes participating in the signing operation, and determining a cryptographic algorithm for signing;
deploying intelligent contracts on the participating nodes, generating independent contract addresses by the participating nodes according to deployed contract codes, and sharing the contract addresses to other participating nodes;
the participating node verifies the contract address, derives a public key generation address according to the contract address, and performs address matching;
generating public parameters required in the signing process according to a cryptographic algorithm, initializing the signing parameters, generating a secret key through the cryptographic algorithm, and fragmenting the secret key;
the participating nodes use the contract address as a public parameter, perform collaborative signature under the condition that the signature algorithm threshold is reached, and jointly verify the validity of the signature by using a verification algorithm and the contract address.
In order to overcome the defects in the prior art, the scheme uses the contract address of the under-chain privacy computing node as the public parameter of the collaborative signature of the domestic cryptographic algorithm, provides the SM2 under-chain collaborative threshold signature method, and can simultaneously meet the threshold signature characteristic and the collaborative signature characteristic in safety. Signing requires three or more participants to coordinate and allows signing and verification to be completed in the absence of some participants.
The above steps will be described in detail:
step one: selecting an appropriate cryptographic algorithm
SM2 is a digital signature algorithm constructed based on the difficult assumption of elliptic curve discrete logarithm problem, and has better performance than RSA algorithm in terms of security, password complexity, processing speed and machine performance consumption, so SM2 is selected as the password algorithm in the scheme.
The SM2 elliptic curve public key cryptographic algorithm comprises a digital signature algorithm, a key exchange protocol and a public key encryption algorithm, and the security of the algorithm is based on solving the problem of discrete logarithm problem of elliptic curve on a finite field. The SM2 algorithm plays an important role in safety protection in domestic identity authentication, electronic commerce and other applications. The SM2 signature algorithm is as follows: key generation: a) Randomly selecting a key d, (d E [1, q-1)]) Where d is an integer and q is the order of G on the elliptic curve; b) Calculate p=d·g (G is the point on the elliptic curve, (·) is the point multiplication operation on the elliptic curve) and disclose P as the public key and d as the private key. Signature generation: a) The signer selects a random number k, k.epsilon.1, q-1](k is an integer) calculate k.g= (x) 1 ,y 1 ),(x 1 ,y 1 ) Coordinate values of a point on the elliptic curve; b) Calculated value r= (Hash (Message) +x 1 ) mod (q), wherein Message is the Message to be signed, hash (·) is a one-way Hash function, and if r=0 or r+k=q, the random number k is reselected; c) Calculation value s= (1+d) -1 (k-rd) mod (q); if s=0, the random number k is re-selected, otherwise (r, s) is used as the signature result. Signature verification: a) After receiving m and (r, s), the verifier first checks whether r, s E [1, q-1 ] is satisfied]And (r+s) noteq, if satisfied, calculate (x) 1 ′,y 1 ' s·g+ (r+s) ·p, where (x) 1 ′,y 1 ' is the coordinate value of a point on the elliptic curve; b) Calculate r' = (Hash (m) +x) 1 ') mod (q), if r' is equal to r, then signature verification passes, otherwise verification fails.
Step two: determining a threshold signature scheme
The threshold signature algorithm divides the signature calculation task into a plurality of subtasks, and calculates in parallel, so that the signature efficiency and throughput are improved, during the period, the threshold signature algorithm allows a plurality of participants to finish the signature process together, single-point faults are avoided, the individual participants cannot acquire the complete signature key, and the characteristics of decentralization, weight division and privacy protection are realized.
The threshold secret sharing scheme can be used for sharing key information to a plurality of users for scattered storage, the password function operation can be completed by at least threshold users in cooperation, and any user less than the threshold cannot collusion. On one hand, the robustness of the system is improved, and the password system can not lose functionality even if a small number of users lose keys; on the other hand, the security of the system is improved, and even if a malicious adversary steals part (less than the threshold value) of the key of the user, the security of the password system is difficult to break.
Step three: deployment of intelligent contracts on under-chain privacy nodes
Compiling the intelligent contract code into a byte code format to generate a file required by deployment;
and deploying the contract file generated in the previous step to the downlink privacy node through a deployment tool or command line code.
Step four: sharing contract addresses
SHA-256 is selected as a contract address parameter, and each node generates an independent contract address according to the hash calculation result of the deployed contract code. Assuming that node a calculates address X, node B calculates address Y, node C calculates address Z, each node shares its own calculated independent contract address with other nodes, i.e., nodes a, B, C share addresses X, Y, Z, respectively.
Transaction stage:
enc in the following scheme pk () Representing an encryption operation using the public key pk, dec sk () A decryption operation using the private key sk is indicated.
Step five: validating contract addresses
Acquiring a contract address to be verified;
firstly, verifying whether an address format meets the format requirement;
converting the contract address to a public key;
deriving a public key generation address, carrying out address matching, comparing the generated address with a contract address to be verified, and checking whether the generated address is matched.
Step six: signature parameter initialization
The public parameters required in the whole signature process are generated: the parameters include: elliptic curve related parameters (q, F) of SM2 algorithm q N, G), cryptographic Hash function Hash ();
where q is a large prime number, fq is a finite field containing q elements, n is a prime number, G is a base point of an elliptic curve, and its order is n.
Step seven: generating a key
At this stage, the transaction initiator and the transaction partner interact with each other to generate a public key Q;
P 1 randomly selecting one of the positions [1, n-1 ]]Number x 1 And calculate Q 1 =x 1 G;
P 1 Transmission (live, 1, Q 1 ,x 1 ) To a third party;
through operation, P 1 Generating a Paillier key pair (pk, sk), wherein pk is a public key and sk is a private key;
P 1 transmission (move, 1, N, (p) 1 ,p 2 ) To a third party, where pk=n=p 1 ·p 2
P 2 Receiving a message from a third partyInformation (proof, 1, Q) 1 ),(proof,1,N);
P 2 Randomly selecting one of the positions [1, n-1 ]]Number x 2 And calculate Q 2 =x 2 G;
P 2 Send (2, Q 2 ,x 2 ) To a third party;
P 2 calculate q=x 2 ·Q 1 -G, and preserving (x 2 ,Q,pk);
P 1 Receiving third party messages (proof, 2, Q 2 ) Calculated q=x 1 ·Q 2 -G and save (x 1 ,Q,(sk,pk));
It can be calculated that q=x 2 ·Q 1 -G=x 1 ·Q 2 -G=(x1x 2 -1)G
Step eight: key sharding
According to step seven, P can be obtained 1 Private key x of (2) 1 ,P 2 Private key x of (2) 2 The two private keys are maintained separately by the respective participating nodes.
Step nine: collaborative signature
The participants use the contract address provided by the privacy computing node under the chain as a public parameter on the basis of having the private key fragments, and the cooperative signature is carried out under the condition that a certain number of the participants reach a threshold value. The method comprises the following specific steps:
P 1 initiated collaborative signature request, P 1 Randomly selecting one of the positions [1, n-1 ]]Number k 1 And (3) calculating: r is R 1 =k 1 G;
Encrypting k using homomorphic encryption algorithm 1 ,C key =Enc pk (k 1 );
P 1 Send (move, 1, (R) 1 ,C key ),(k 1 Sk)) to a third party;
if P 2 Receiving the request (proof, 1, (R) 1 ,C key ) The following steps are performed:
P 2 randomly selecting one of the positions [1, n-1 ]]Number k 2
And (3) calculating: r is R 2 =k 2 G;
Transmission (2, R 2, k 2 ) To a third party;
P 2 calculating r=k 2 R 1 =k 1 k 2 G=(r x ,r y ) Where r= (rx+e) mod n;
p according to homomorphic encryption 2 And (3) calculating:
ρ is an arbitrary value;
P 2 send C 3 To P 1
Step ten: verifying signatures
After the collaborative signature is obtained, the validity of the signature may be jointly verified using the following verification algorithm and the contract address.
Calculating z=h (ENTL ID a b G Y);
if (r') is not a natural number, and 0 is output;
if (s') is not a natural number, and 0 is output;
setting a '=z||m', and calculating e '=h (a');
calculating t= (r's') mod n, if (t=0), and outputting 0;
calculation (r') x ,r` y )=s`G+tQ;
Calculate r= (e +' R x ) mod n if (r=r') outputs 1, otherwise 0.
The application solves the problem that the transaction initiator, the transaction cooperator and the third party mechanism cooperatively carry out threshold signature on the basis of meeting the safety in the cooperative signature process in the under-chain transaction scene, realizes that the under-chain transaction scene can also store the secret key in each signature party node in a distributed manner by applying the threshold signature mode, and improves the cooperative signature anti-risk and anti-attack capability in the under-chain transaction; meanwhile, the problems of frequent parameter exchange, complex calculation operation, calculation power occupation and bandwidth occupation among all nodes in the collaborative threshold signature process are solved, a safe and efficient signature mode is realized, and the signature efficiency is ensured.
Referring to fig. 2, the present application further provides a link-down cooperative threshold signature device based on a blockchain, which includes:
the signature password algorithm module is used for generating a secret key meeting signature characteristics, dividing a signature calculation task into a plurality of subtasks and calculating in parallel, so that the efficiency and throughput of signature are improved;
the trusted third party is responsible for generating system parameters and deploying intelligent contracts;
the transaction initiator is used for generating a secret key according to the signature password algorithm module;
and the transaction cooperator is used for verifying according to the key generated by the initiator and the contract address of the intelligent contract.
Compared with the related art, the method and the device for collaborative signature aim to further improve collaborative signature efficiency and security, and the scheme selects to carry out identity verification on each contract address in the collaborative signature process, and after verification is completed, the contract address of the under-chain privacy calculation node is used as a public parameter of collaborative signature of a domestic cryptographic algorithm (SM 2), so that collaborative signature is realized based on a threshold signature mode. The SM2 domestic cryptographic algorithm is adopted in the scheme, and the security, the cryptographic complexity, the processing speed and the machine performance consumption of the SM2 signature algorithm are excellent, so that the safety and the high efficiency of the transaction process of the scheme are ensured.
The current threshold transaction scheme cannot adapt to the operation of carrying out threshold signature on two parties of a transaction participant in a transaction scene under a chain, and the scheme adopts a threshold cryptography mode and zero knowledge proof to realize the possibility of the threshold signature of the two parties. Moreover, in the threshold cryptography, the private key is shared to a plurality of independent participants, and each time of signature and verification needs to be agreed by the plurality of participants, so that the scheme has smaller communication complexity and can resist a suspension attack to a certain extent.
In another aspect, the present application also provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the blockchain-based under-chain collaborative threshold signature method described above.
An extension of another aspect of the present application also provides a computer terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the blockchain-based under-chain collaborative threshold signature method described above when the computer program is executed.
The processor, when executing the computer program, performs the functions of the modules/units in the above-described device embodiments. The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present application, for example. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The computer terminal can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. May include, but is not limited to, a processor, memory. More or fewer components may be included or certain components may be combined, or different components may be included, for example, in input and output devices, network access devices, buses, etc.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit, such as a hard disk or a memory. The memory may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card, etc. Further, the memory may also include both internal storage units and external storage devices. The memory is used for storing the computer program and other programs and data. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The foregoing description is only illustrative of the present application and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present application.

Claims (9)

1. A blockchain-based under-chain collaborative threshold signature method, comprising:
determining at least three participating nodes participating in the signing operation, and determining a cryptographic algorithm for signing;
deploying intelligent contracts on the participating nodes, generating independent contract addresses by the participating nodes according to deployed contract codes, and sharing the contract addresses to other participating nodes;
the participating node verifies the contract address, derives a public key generation address according to the contract address, and performs address matching;
generating a key according to public parameters required in the signing process by a cryptographic algorithm, and slicing the key;
the participating nodes use the contract address as a public parameter, perform collaborative signature under the condition that the signature algorithm threshold is reached, and jointly verify the validity of the signature by using a verification algorithm and the contract address.
2. The blockchain-based under-chain collaborative threshold signing method of claim 1, wherein deploying the intelligent contract on the participating nodes comprises:
compiling the intelligent contract code into a byte code format to generate a contract deployment file;
and deploying the generated contract deployment file to the participation nodes of the under-link privacy through a deployment tool or command line code.
3. The blockchain-based under-chain collaborative threshold signing method of claim 2, wherein the participating nodes verify contract addresses and derive public key generation addresses from the contract addresses and perform address matching comprising:
acquiring a contract address to be verified;
firstly, verifying whether an address format meets the format requirement;
converting the contract address to a public key;
deriving a public key generation address, carrying out address matching, comparing the generated address with a contract address to be verified, and checking whether the generated address is matched.
4. The blockchain-based under-chain collaborative threshold signature method according to claim 3, wherein the generating public parameters required in the signature process according to a cryptographic algorithm, initializing the signature parameters, comprises:
the parameters include: elliptic curve related parameters (q, F q N, G), cryptographic Hash function Hash ();
wherein q is a large prime number, fq is a finite field containing q elements, n is a prime number, G is a base point of an elliptic curve, and the order is n;
generating a public key Q:
P 1 randomly selecting one of the positions [1, n-1 ]]Number x 1 And calculate Q 1 =x 1 G;
P 1 Transmission (live, 1, Q 1 ,x 1 ) To a third party;
through operation, P 1 Generating a key pair (pk, sk), wherein pk is a public key and sk is a private key;
P 1 transmission (move, 1, N, (p) 1 ,p 2 ) To a third party, where pk=n=p 1 ·p 2
P 2 Receiving messages (proof, 1, Q) 1 ),(proof,1,N);
P 2 Randomly selecting one of the positions [1, n-1 ]]Number x 2 And calculate Q 2 =x 2 G;
P 2 Send (2, Q 2 ,x 2 ) To a third party;
P 2 calculate q=x 2 ·Q 1 -G, and preserving (x 2 ,Q,pk);
P 1 Receiving third party messages (proof, 2, Q 2 ) Calculated q=x 1 ·Q 2 -G and save (x 1 ,Q,(sk,pk));
Calculated q=x 2 ·Q 1 -G=x 1 ·Q 2 -G=(x1x 2 -1)G;
At the same time obtain P 1 Private key x of (2) 1 ,P 2 Private key x of (2) 2 The private key is maintained separately by each participating node.
5. The blockchain-based under-chain collaborative threshold signing method of claim 4, wherein the participating nodes co-sign if a signing algorithm threshold is reached with a contract address as a common parameter comprising:
P 1 initiated collaborative signature request, P 1 Randomly selecting one of the positions [1, n-1 ]]Number k 1 And (3) calculating: r is R 1 =k 1 G;
Encrypting k using encryption algorithm 1 ,C key =Enc pk (k 1 );
P 1 Send (move, 1, (R) 1 ,C key ),(k 1 Sk)) to a third party, P 2 Receiving the request (proof, 1, (R) 1 ,C key ) The following steps are performed:
P 2 randomly selecting one of the positions [1, n-1 ]]Number k 2
And (3) calculating: r is R 2 =k 2 G;
Transmission (2, R 2, k 2 ) To a third party;
P 2 calculating r=k 2 R 1 =k 1 k 2 G=(r x ,r y ) Where r= (rx+e) mod n;
according to the encryption algorithm, P 2 And (3) calculating:C 2 =C 1 ⊕Enc pk (r),/> ρ is an arbitrary value;
P 2 send C 3 To P 1
6. The blockchain-based under-chain collaborative threshold signature method of claim 5, wherein the jointly verifying the validity of the signature using a verification algorithm and a contract address includes:
after the collaborative signature is obtained, a verification algorithm and a contract address are used for verification;
calculating z=h (ENTL ID a b G Y);
if (r') is not a natural number, and 0 is output;
if (s') is not a natural number, and 0 is output;
setting a '=z||m', and calculating e '=h (a');
calculating t= (r's') mod n, if (t=0), and outputting 0;
calculation (r') x ,r` y )=s`G+tQ;
Calculate r= (e +' R x ) mod n, if (r=r') outputs 1, otherwise 0.
7. An apparatus for applying the blockchain-based under-chain cooperative threshold signature method of any of claims 1-6, the apparatus comprising:
the signature password algorithm module is used for generating a secret key meeting signature characteristics, dividing a signature calculation task into a plurality of subtasks and calculating in parallel, so that the efficiency and throughput of signature are improved;
the trusted third party is responsible for generating system parameters and deploying intelligent contracts;
the transaction initiator is used for generating a secret key according to the signature password algorithm module;
and the transaction cooperator is used for verifying according to the key generated by the initiator and the contract address of the intelligent contract.
8. A computer readable storage medium storing a computer program, which when executed by a processor performs the steps of the blockchain-based under-chain collaborative threshold signing method of any of claims 1 to 6.
9. A computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the blockchain-based under-chain collaborative threshold signing method of any of claims 1 to 6.
CN202311320624.7A 2023-10-12 2023-10-12 Under-chain collaborative threshold signature method and device based on block chain Pending CN117201041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311320624.7A CN117201041A (en) 2023-10-12 2023-10-12 Under-chain collaborative threshold signature method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311320624.7A CN117201041A (en) 2023-10-12 2023-10-12 Under-chain collaborative threshold signature method and device based on block chain

Publications (1)

Publication Number Publication Date
CN117201041A true CN117201041A (en) 2023-12-08

Family

ID=88994358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311320624.7A Pending CN117201041A (en) 2023-10-12 2023-10-12 Under-chain collaborative threshold signature method and device based on block chain

Country Status (1)

Country Link
CN (1) CN117201041A (en)

Similar Documents

Publication Publication Date Title
CN107579819B (en) A kind of SM9 digital signature generation method and system
CN109309569B (en) SM2 algorithm-based collaborative signature method and device and storage medium
CN107634836B (en) SM2 digital signature generation method and system
RU2376651C2 (en) Using isogenies to design cryptosystems
CN108667625B (en) Digital signature method of cooperative SM2
CN107248909B (en) Certificateless secure signature method based on SM2 algorithm
CN110932865B (en) Linkable ring signature generation method based on SM2 digital signature algorithm
CN112187469B (en) SM2 multiparty collaborative digital signature method and system based on key factors
WO2019110399A1 (en) Two-party signature device and method
CN111030821B (en) Encryption method of alliance chain based on bilinear mapping technology
CN112436938B (en) Digital signature generation method and device and server
CN113676333A (en) Method for generating SM2 blind signature through cooperation of two parties
CN112417489B (en) Digital signature generation method and device and server
CN111783136A (en) Data protection method, device, equipment and storage medium
Bellare et al. Deterring certificate subversion: efficient double-authentication-preventing signatures
CN112632630A (en) SM 2-based collaborative signature calculation method and device
Tsai et al. An ECC‐based blind signcryption scheme for multiple digital documents
CN117478302B (en) Block chain-based privacy node identity verification method and device
CN108768634B (en) Verifiable cryptographic signature generation method and system
CN110932866B (en) Ring signature generation method based on SM2 digital signature algorithm
CN117220891A (en) Threshold ECDSA signature method and system based on non-interactive distributed key
CN111245594A (en) Homomorphic operation-based collaborative signature method and system
JP2003513480A (en) A method for proving the authenticity of an entity and / or the integrity of a message
CN115174037A (en) Construction method and device of chameleon hash function based on SM9 signature
CN117795901A (en) Generating digital signature shares

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