CN114362970A - Ring signature method, system, storage medium and equipment based on intelligent contract - Google Patents

Ring signature method, system, storage medium and equipment based on intelligent contract Download PDF

Info

Publication number
CN114362970A
CN114362970A CN202210260900.4A CN202210260900A CN114362970A CN 114362970 A CN114362970 A CN 114362970A CN 202210260900 A CN202210260900 A CN 202210260900A CN 114362970 A CN114362970 A CN 114362970A
Authority
CN
China
Prior art keywords
signature
random number
participant
participants
proportion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210260900.4A
Other languages
Chinese (zh)
Other versions
CN114362970B (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.)
Jiangxi Agricultural University
Original Assignee
Jiangxi Agricultural University
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 Jiangxi Agricultural University filed Critical Jiangxi Agricultural University
Priority to CN202210260900.4A priority Critical patent/CN114362970B/en
Publication of CN114362970A publication Critical patent/CN114362970A/en
Application granted granted Critical
Publication of CN114362970B publication Critical patent/CN114362970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a ring signature method, a system, a storage medium and equipment based on an intelligent contract, wherein the method comprises the following steps: acquiring a public key of a participant and generating an initial random number; carrying out data encryption on the initial random number, and sending the obtained random number ciphertext to a corresponding participant so as to enable the participant to decrypt to obtain a random number original text and carry out data processing on the random number original text to obtain a target random number; and calculating the target random number to obtain the approval proportion, randomly generating an enforcer public and private key pair, and performing ring signature according to the public key of the participant, the enforcer public and private key pair and the approval proportion to generate a signature result. According to the ring signature method, the ring signature system, the storage medium and the equipment based on the intelligent contract, through research on the collective ring signature scene, the ring signature is unrelated to the number of participants, the quick response of transaction data is realized, the signature efficiency is improved, and the technical problem of low signature efficiency in the prior art is solved.

Description

Ring signature method, system, storage medium and equipment based on intelligent contract
Technical Field
The invention relates to the technical field of block chains, in particular to a ring signature method, a ring signature system, a storage medium and a device based on an intelligent contract.
Background
Ring signatures evolve from group signatures, as opposed to group signatures where there is one group administrator-centric, ring signatures do not rely on such one. In short, ring signatures are spontaneous, that is, a certain user in a ring arbitrarily selects the public keys of other users to form a ring required by a signature together, so as to hide the public key of the user, and the other users on the ring do not know that the user is added into the ring at all, thereby realizing the identity privacy of a signer.
In the prior art, the research range of ring signatures mainly focuses on identity information protection in a single transaction, the optimization direction is also the improvement of the internal structure of the ring signatures, and the research on a collective ring signature scene is lacked, so that the existing ring signature method cannot realize the quick response of high-frequency transaction data when facing an application scene needing a large number of signatures, and the signature efficiency of the existing ring signature method is low.
Disclosure of Invention
Based on this, the invention aims to provide a ring signature method, a ring signature system, a storage medium and a device based on an intelligent contract, which are used for solving the technical problem of low signature efficiency caused by the fact that the rapid response of high-frequency transaction data cannot be realized when a large number of signature application scenes are required in the ring signature scheme in the prior art.
One aspect of the present invention provides a ring signature method based on an intelligent contract, including:
acquiring public keys of all participants and generating a plurality of groups of initial random numbers corresponding to the number of the participants;
carrying out data encryption on the initial random number according to a public key of a participant, and sending a random number ciphertext obtained by data encryption to a corresponding participant so that the participant decrypts the random number ciphertext according to a private key of the participant to obtain a random number original text, and carrying out data processing on the random number original text by combining opinions of the participant to obtain a target random number;
and calculating the target random number and the number of participants to obtain the praise proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the public key of the participants, the enforcer public and private key pair and the praise proportion.
The ring signature method based on the intelligent contract encrypts the data of the initial random number according to the public key of the participant and sends the random number ciphertext obtained by encrypting the data to the corresponding participant so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text and processes the data of the random number original text by combining the opinion of the participant to obtain the target random number so that the intelligent contract obtains the overall opinion condition of each participant, and then performs ring signature on the obtained overall opinion to realize the research on the collective ring signature scene, thereby realizing that the collection of the opinions of the participant can be completed only by one ring signature, so that the ring signature is unrelated to the number of the participants, realizing the quick response of transaction data, improving the signature efficiency, further performing the ring signature and generating the signature result according to the public key pair of the participant, the public and private key pair of an implementer and the praise proportion, the method has the advantages that the outside of the ring signature is optimized and then added into the existing ring signature scheme, so that the optimized scheme has transportability to the ring signature, the performance of the ring signature is further improved, and the technical problem that the rapid response of high-frequency transaction data cannot be realized to cause low signature efficiency when the scheme of the ring signature in the prior art faces an application scene needing a large amount of signatures is solved.
In addition, the ring signature method based on the intelligent contract according to the present invention may further have the following additional technical features:
further, in the step of performing data processing on the nonce text in combination with the opinion of the user to obtain the target nonce, the data processing includes:
if yes, adding 1 to the initial random number;
if the object or the disclaimer is rejected, the initial random number is kept unchanged.
Further, the step of performing ring signature and generating signature result according to the public key of the participant in combination with the enforcer public-private key pair and the approval proportion is followed by:
and acquiring the signature result, distributing the signature result to each participant, and performing signature verification on the signature result by combining a preset proportion.
Further, the step of performing signature verification on the signature result in combination with a preset proportion includes:
performing signature verification on the signature result by combining a preset proportion, and judging whether the signature result is valid;
if the signature is invalid, displaying that the verification result is invalid;
if the signature is valid, comparing the preset proportion with the approval proportion, and judging whether the approval proportion is greater than the preset proportion;
if yes, the generated final overall signature opinion is approved;
if not, the final overall signature opinion generated is against.
Further, the step of calculating the target random number in combination with the participant number to obtain the favorable ratio may be preceded by the steps of:
and uploading the target random number to a block chain without encryption.
Further, the step of calculating the target random number in combination with the participant number to obtain the favorable proportion comprises:
calculating a difference between the target random number and the initial random number to obtain a number of praise persons;
and obtaining the approval proportion according to the approval number and the number of participants.
Further, the target random number displays only the overall opinion situation of all participants, and does not relate to detailed opinion information of each participant.
Another aspect of the present invention provides a ring signature system based on an intelligent contract, the system including:
the acquisition module is used for acquiring public keys of all participants and generating a plurality of groups of initial random numbers corresponding to the number of the participants;
the data processing module is used for carrying out data encryption on the initial random number according to a public key of a participant and sending a random number ciphertext obtained by data encryption to a corresponding participant so that the participant decrypts the random number ciphertext according to a private key of the participant to obtain a random number original text and carries out data processing on the random number original text by combining opinions of the participant to obtain a target random number;
and the signature module is used for calculating the combination of the target random number and the number of participants to obtain a favorable proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the combination of the public key of the participants and the enforcer public and private key pair and the favorable proportion.
Another aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the smart contract-based ring signature method as described above.
Another aspect of the present invention also provides a data processing apparatus comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the smart contract-based ring signature method as described above when executing the program.
Drawings
FIG. 1 is a diagram of a prior art ring signature;
FIG. 2 is a diagram of the steps of a ring signature method based on smart contracts in a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a ring signature in the present application;
FIG. 4 is a schematic diagram of a multi-party secure computing;
FIG. 5 is a flow chart of signature in a ring signature of the present application;
FIG. 6 is a flow diagram of signature verification;
FIG. 7 is a diagram of the steps of a ring signature method based on smart contracts in a second embodiment of the present invention;
fig. 8 is a system block diagram of a ring signature system based on smart contracts in a third embodiment of the present invention.
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Fig. 1 is a schematic diagram of a ring signature in the prior art. The ring signature is essentially a signature composed of a plurality of keys, and a ring association is formed between partial parameters of the signature in the process of constructing the signature. Setting:pkis a set of public keys that are,Sis a random number group and is used as a random number group,Cto generate the challenge array, the subscripts of the different parameters represent the identity of the participant. Wherein, the challenge generated by the participant forms a ring association according to a specific rule, if the participants are arranged in sequence, the operation is performed according to the formula (1), and the formula (1) is as follows:
Figure 5963DEST_PATH_IMAGE001
wherein the content of the first and second substances,Gis a base point of the elliptic curve, mthe data representing the signature is transmitted to the user,I=SK S H P (P S )in order to be a mirror image of the key,P S in order to sign the private key of the implementer,HandH P two different hash functions are represented. In particular toTo, the next participantiCorresponding challengeC i Is challenged by the last participantC i-1Public keypk i-1And random numberS i-1Composition is performed sequentially according to this rule. When the last participant generates the challenge, the challenge of the first participant can be generated by adding its public key and random number. Finally, a loop is formed, and the representation form is annular. In this process, in order to be able to form a closed loop, it is necessary to start the signature with the private key, which, unlike the public key, generates the challenge as shown in equation (2), where equation (2) is as follows:
Figure 516578DEST_PATH_IMAGE002
the owner of the private key using a random numberuReplacing random numbersS s Generate challenges, and in this process, need not use their own corresponding challengesC s Specifically, generated by formula (3)S s Substituting into equation (1) results in equation (2), i.e. as shown in equation (4), the remaining participants generate challenges according to equation (1). When the owner of the private key also obtains a corresponding challengeC s After that, the closed loop is completed. Random number of private key owner, different from the rest of participantsS s Not randomly generated but by the private keySK S And random numberuThe construction process is shown as formula (3), and formula (3) is as follows:
S s =u-C s ×SK S (3)
equation (4) is as follows:
Figure 30736DEST_PATH_IMAGE003
at this time, the ring signature is finishedBecome, the signature is
Figure 160366DEST_PATH_IMAGE004
In the prior art, the inside of the ring signature is generally optimized, so that when a large number of signature application scenes are needed, the scheme of the ring signature in the prior art cannot realize high-frequency quick response of transaction data, and the signature efficiency is low. In the scheme of the application, the current optimal ring signature algorithm can be transplanted by optimizing the outer part of the ring signature, and on the basis, the performance of the ring signature is further improved. On the other hand, in the scheme of the application, the application range of the ring signature is expanded by researching the collective signature, multi-party security calculation is introduced to realize opinion collection of a plurality of participants, and the intelligent contract is adopted as a trusted authority to implement the secure ring signature, so that the high-frequency collective signature has better performance.
Example one
Referring to fig. 2, a ring signature method based on smart contracts in a first embodiment of the present invention is shown, where the method includes steps S101 to S103:
s101, public keys of all participants are obtained, and multiple groups of initial random numbers corresponding to the number of the participants are generated.
Fig. 3 is a schematic diagram of a ring signature in the present application. The intelligent contract is an implementation subject of the ring signature in the invention application and is also a private key owner in the ring signature. In addition to the smart contract, the participants include the owner of the public key in the ring signature. The blockchain serves as a carrier for data interaction between the intelligent contract and the participants. The signature step is as follows: firstly, an intelligent contract initiates a ring signature event to acquire public keys of all members participating in the ring signature; then, the opinions of the participants are obtained by using multi-party security calculation; then, generating a public and private key pair in the intelligent contract, and carrying out ring signature by using a private key in the public and private key pair and public keys of all participants; finally, the signature is published into the blockchain, completing the signature. In the whole ring signature process, the intelligent contract adopts a one-time secret signature scheme. The public key of the smart contract is randomly generated, the public key cannot be obtained by other participants, and the public key of all participants is required to be used for each round of signature, so that the signature of the smart contract cannot be forged. The participant opinions collected by the intelligent contracts are processed according to the formula (5), wherein the formula (5) is as follows:
Figure 833793DEST_PATH_IMAGE005
wherein the content of the first and second substances,
Figure 390676DEST_PATH_IMAGE006
in order to favor the ratio of the ratio,vin order to increase the number of praise people,nrepresenting the number of participants in addition to a smart contract, which does not qualify the overall opinion, but rather will favor proportionally
Figure 392130DEST_PATH_IMAGE006
Added as a parameter to the signature, composing
Figure 325451DEST_PATH_IMAGE004
. In the signature verification stage, the approval proportion and the preset coefficient are compared, and then the final opinion is determined, so that the signature verification method is more suitable for actual needs. Finally, compared with the ring signature before improvement, the ring signature method used by the application only needs one ring signature to complete the collection of the opinions of the participants.
S102, data encryption is carried out on the initial random number according to the public key of the participant, and the random number ciphertext obtained by data encryption is sent to the corresponding participant, so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text, and data processing is carried out on the random number original text by combining the opinion of the participant to obtain the target random number.
FIG. 4 is a schematic diagram of multi-party secure computing. The multi-party security computing is a method for completing a certain computing task by a plurality of participants without revealing privacy of the participants. The method and the device finish the collection of opinions of ring signature participants by utilizing the principle of multi-party security calculation. In the multi-party security calculation, a mechanism is needed to carry out comprehensive calculation on data, and the method and the system are applied to the comprehensive calculation of the dataIn the scheme, an intelligent contract is used as a computing intermediary. The method comprises the following steps: firstly, collecting public keys of all participants by an intelligent contract; then, a random number (f) corresponding to the number of participants is generatedx i Is a random number for the corresponding participant,
Figure 853385DEST_PATH_IMAGE007
n is a positive integer), and encrypts the random numbers one by using the public key of the participant, and then sends the random number ciphertext to the corresponding participant; the participants use the private keys of themselves to decrypt and obtain the random number texts, then process according to the opinions of themselves, if yes, add one to the random numbers, if no, the random numbers remain unchanged, and finally send the processed random numbers to the intelligent contract; after the intelligent contract collects the random numbers processed by all participants, the intelligent contract calculates according to a formula (6) to obtain the overall opinion condition of the participants, wherein the formula (6) is as follows:
v=N -N(6)
whereinvIn order to keep the number of people who agree in favor,N the sum of the processed random numbers for all participants,Nis the sum of the generated random numbers. In the whole process, the intelligent contract and the participants do not directly carry out data interaction, but are stored through a block chain; the random number generated by the intelligent contract needs to be encrypted firstly when being transmitted, and the random number processed by the participant can be transmitted in original text. In the process, the random number processing condition of other people cannot be known among the participants, so that the opinions of the participants are hidden. In the application, the intelligent contract is taken as a trusted third party, so that the private data of the user cannot be disclosed, and the calculated result only displays the overall opinion of the participants and does not relate to the detailed opinions of the participants. Therefore, the multi-party safety calculation method can effectively hide the opinions of the participants and complete the overall opinion collection.
It should be further noted that the random number mentioned in the above steps is a random number used for multi-party secure computation, and the random number mentioned in fig. 5 is a random number used for participating in the ring signature, and the two numbers are different in nature.
S103, calculating the target random number and the number of participants to obtain the approval proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the public key of the participants, the enforcer public and private key pair and the approval proportion.
In the application, the public and private key pair is generated randomly, and each ring signature needs to be regenerated, so that each signature corresponds to a different key, namely 'one signature one secret' is realized. The opinion collection of the signing party is carried out through multi-party security calculation, the privacy of the signing party in the data interaction process in the alliance chain is protected, the signing process organization is carried out by using an intelligent contract technology, a signing policy of one signing and one secret is formulated, and the fact that the signature cannot be forged is guaranteed.
Fig. 5 is a signature flow chart in the ring signature of the present application. The precondition is that the public keys of all participants are obtained in the intelligent contract and the voting approval opinions are obtained through multi-party security calculation. Firstly, dividing the praise opinion number by the participant number, and taking the quotient as the praise proportion; then, a key generation algorithm is called to obtain a group of public and private key pairs, the public key is added into a public key group formed by participants, and a mirror function is called by taking the private key as a parameter to generate a key mirror. Then, starting formal ring signature, starting processing from private key to generate a random numberuAnd calculating according to formula (2) to obtain the challenge of the next signerC S+1
Then, the public keys except the intelligent contract are processed one by one, and a random number needs to be generated when each public key is signedS i Calculating according to the formula (1) to obtain the next challenge, and replacing the challenge with the subscript of 0 when the subscript of the challenge value reaches the array length until the challenge of the subscript corresponding to the private key is calculatedC S At this time, all public keys are signed completely;
and then based on the resulting challengeC S Calculating the random number corresponding to the private key according to the formula (3)S S The random number group is S,S S =S[s]is an element of the array; finally signing the contentmPraise ratio
Figure 581169DEST_PATH_IMAGE006
And generatedC 0 And random arrays generated by all participantsSAnd adding the ring signature into the signature until the ring signature is finished.
The ring signature includes a signature phase and a verification phase, and fig. 6 shows a signature verification flowchart. First acquiring a ring signature
Figure 69919DEST_PATH_IMAGE008
And a predetermined proportionPThen, a random array is obtained from the ring signatureS(ii) a The challenge is then calculated according to equation (1), fromC 1 At the beginning, the calculation is repeated all the time in sequenceC n And assign a value toC 0 nIs a random arraySA length; after which the calculation is verifiedC 0 If the signature is consistent with the signature, if the signature is not consistent with the signature, the verification fails, and if the signature is consistent with the signature, the preset proportion is usedPAnd praise in signature
Figure 541352DEST_PATH_IMAGE006
And comparing to obtain the final overall signature opinion (the positive proportion is greater than or equal to the preset proportion and indicates positive, otherwise, the negative), and finishing the verification.
In summary, in the ring signature method based on the intelligent contract in the above embodiments of the present invention, the initial random number is encrypted according to the public key of the participant, and the random number ciphertext obtained by encrypting the data is sent to the corresponding participant, so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text, and performs data processing on the random number original text in combination with the opinion of the participant to obtain the target random number, so that the intelligent contract obtains the overall opinion of each participant, and then performs ring signature on the obtained overall opinion to realize the research on the collective ring signature scenario, thereby realizing that the collection of the opinions of the participants can be completed only by one ring signature, so that the ring signature is unrelated to the number of the participants, thereby realizing the quick response of the transaction data, improving the signature efficiency, and further, combining the public key pair of the implementer with the public key of the participant according to the public key of the participant, and realizing the quick response of the transaction data, and improving the signature efficiency And the optimized scheme has portability to the ring signature, the performance of the ring signature is further improved, and the technical problem of low signature efficiency caused by the fact that the rapid response of high-frequency transaction data cannot be realized when the scheme of the ring signature in the prior art faces an application scene needing a large amount of signatures is solved.
Example two
Referring to fig. 7, a ring signature method based on smart contracts according to a second embodiment of the present invention is shown: the method includes steps S201 to S205:
s201, public keys of all participants are obtained, and multiple groups of initial random numbers corresponding to the number of the participants are generated.
The scheme in the present application will be described by taking as an example that a certain class votes for zhang san and determines whether it serves as a chief task. If half or more votes are obtained, the election is successful. The voting system in the scheme of the application is adopted for the voting, and at the beginning stage, each member on duty registers an account number on a platform, and the system generates a unique public and private key pair for the member. The team master initiates a voting event on the platform, and the members on the team upload respective public keys to the system.
S202, data encryption is carried out on the initial random number according to the public key of the participant, and the random number ciphertext obtained by data encryption is sent to the corresponding participant, so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text, and data processing is carried out on the random number original text by combining the opinion of the participant to obtain the target random number.
In the above steps, it should be further explained that the target random number only displays the overall opinion situation of all participants, and does not relate to the detailed opinion information of each participant. Further, the data processing comprises: if yes, adding 1 to the initial random number; if the object or disclaimer is rejected, the initial random number remains unchanged.
As a specific example, inside the system (smart contract), each member on the shift is assigned a random number and encrypted using its uploaded public key, and the encrypted random number is sent to each member. After the members in class obtain the encrypted random numbers, the members in class can decrypt the encrypted random numbers through respective private keys to obtain the original texts of the random numbers. At this time, the interface pops up the selection columns of approval and disapproval, if approval is selected, the random number is automatically increased by one, and if disapproval is selected, the random number is kept unchanged. After the selection is completed, the processed random number is uploaded to the system (intelligent contract).
And S203, uploading the target random number to the block chain without encryption.
S204, calculating the target random number and the number of participants to obtain the approval proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the public key of the participants, the enforcer public and private key pair and the approval proportion.
Specifically, calculating the difference between the target random number and the initial random number to obtain the number of praise people; the ratio of the praise is obtained according to the number of praise people and the number of participants.
As a specific example, the system can calculate the number of votes in favor based on the collected random numbers and the assigned random numbers, and in combination with the number of votes, can obtain the proportion of the favor. At this moment, the system triggers the signature event, firstly, a group of public and private key pairs are randomly generated in the system, then, the public key pairs of all voters and the public and private key pairs generated by the system are taken as parameters, a preset ring signature algorithm is called to generate a signature, and praise is proportionally added into the signature to be taken as the final signature result.
S205, obtaining the signature result, distributing the signature result to each participant, and performing signature verification on the signature result by combining a preset proportion.
Specifically, the signature verification step includes: performing signature verification on the signature result by combining a preset proportion, and judging whether the signature result is valid; if the signature is invalid, displaying that the verification result is invalid; if the signature is valid, comparing the preset proportion with the praise proportion, and judging whether the praise proportion is greater than the preset proportion; if yes, the generated final overall signature opinion is approved; if not, the final overall signature opinion generated is against.
After the signature is over, the system sends the signature to each shift member, and the shift member inputs a preset proportion (i.e., a minimum approved proportion satisfying the success of the election, such as 1/2) to perform signature verification. In the verification process, the system takes the public keys of all signatures (including the public key of the intelligent contract) and the signatures as parameters, calls a signature verification algorithm, verifies the validity of the signatures and compares the approval proportion with the preset proportion, if the approval proportion is greater than or equal to the preset proportion, the opinion is approved, otherwise, the opinion is objected; and finally, feeding back the verification result and the opinion to each class member. The executive decides whether the third Zhang becomes the shift length according to the obtained opinions.
In summary, in the ring signature method based on the intelligent contract in the above embodiments of the present invention, the initial random number is encrypted according to the public key of the participant, and the random number ciphertext obtained by encrypting the data is sent to the corresponding participant, so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text, and performs data processing on the random number original text in combination with the opinion of the participant to obtain the target random number, so that the intelligent contract obtains the overall opinion of each participant, and then performs ring signature on the obtained overall opinion to realize the research on the collective ring signature scenario, thereby realizing that the collection of the opinions of the participants can be completed only by one ring signature, so that the ring signature is unrelated to the number of the participants, thereby realizing the quick response of the transaction data, improving the signature efficiency, and further, combining the public key pair of the implementer with the public key of the participant according to the public key of the participant, and realizing the quick response of the transaction data, and improving the signature efficiency And the optimized scheme has portability to the ring signature, the performance of the ring signature is further improved, and the technical problem of low signature efficiency caused by the fact that the rapid response of high-frequency transaction data cannot be realized when the scheme of the ring signature in the prior art faces an application scene needing a large amount of signatures is solved.
EXAMPLE III
Referring to fig. 8, a ring signature system based on smart contracts according to a third embodiment of the present invention is shown, where the system includes:
the acquisition module is used for acquiring public keys of all participants and generating a plurality of groups of initial random numbers corresponding to the number of the participants;
the data processing module is used for carrying out data encryption on the initial random number according to a public key of a participant and sending a random number ciphertext obtained by data encryption to a corresponding participant so that the participant decrypts the random number ciphertext according to a private key of the participant to obtain a random number original text and carries out data processing on the random number original text by combining opinions of the participant to obtain a target random number;
and the signature module is used for calculating the combination of the target random number and the number of participants to obtain a favorable proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the combination of the public key of the participants and the enforcer public and private key pair and the favorable proportion.
In some optional embodiments, the data processing module comprises:
a first execution unit, configured to, when granted, add 1 to the initial random number;
a second execution unit for holding the initial random number unchanged when a right is objected or discarded.
In some optional embodiments, the signature module comprises, after:
and the verification module is used for acquiring the signature result, distributing the signature result to each participant and verifying the signature of the signature result by combining a preset proportion.
In some optional embodiments, the verification module comprises:
the first judgment unit is used for carrying out signature verification on the signature result by combining a preset proportion and judging whether the signature result is valid;
the third execution unit is used for displaying that the verification result is invalid when the signature is invalid;
a fourth execution unit, configured to compare the preset ratio with the approval ratio when the signature is valid, and determine whether the approval ratio is greater than the preset ratio;
the first execution subunit is used for generating final overall signature opinions as approval when the approval proportion is greater than the preset proportion;
and the second execution subunit is used for generating the final overall signature opinion as an objection when the approval proportion is not greater than the preset proportion.
In some optional embodiments, the signature module previously comprises:
and the uploading module is used for uploading the target random number to the block chain without encryption.
In some optional embodiments, the signature module comprises:
a praise count calculation unit for calculating a difference between the target random number and the initial random number to obtain a number of praise counts;
and the approval proportion calculating unit is used for obtaining the approval proportion according to the approval number and the participant number.
In summary, in the ring signature system based on the intelligent contract in the above embodiments of the present invention, the initial random number is encrypted according to the public key of the participant, and the random number ciphertext obtained by encrypting the data is sent to the corresponding participant, so that the participant decrypts the random number ciphertext according to the private key of the participant to obtain the random number original text, and performs data processing on the random number original text in combination with the opinion of the participant to obtain the target random number, so that the intelligent contract obtains the overall opinion of each participant, and then performs ring signature on the obtained overall opinion to realize the research on the collective ring signature scenario, thereby realizing that the collection of the opinions of the participants can be completed only by one ring signature, so that the ring signature is unrelated to the number of the participants, thereby realizing the quick response of the transaction data, improving the signature efficiency, and further, combining the public key pair of the implementer with the public key of the participant according to the public key of the participant to realize the quick response of the transaction data, and improving the signature efficiency And the optimized scheme has portability to the ring signature, the performance of the ring signature is further improved, and the technical problem of low signature efficiency caused by the fact that the rapid response of high-frequency transaction data cannot be realized when the scheme of the ring signature in the prior art faces an application scene needing a large amount of signatures is solved.
Furthermore, an embodiment of the present invention also proposes a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method in the above-described embodiment.
Furthermore, an embodiment of the present invention also provides a data processing apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the method in the above-mentioned embodiment.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. A ring signature method based on a smart contract, the method comprising:
acquiring public keys of all participants and generating a plurality of groups of initial random numbers corresponding to the number of the participants;
carrying out data encryption on the initial random number according to a public key of a participant, and sending a random number ciphertext obtained by data encryption to a corresponding participant so that the participant decrypts the random number ciphertext according to a private key of the participant to obtain a random number original text, and carrying out data processing on the random number original text by combining opinions of the participant to obtain a target random number;
and calculating the target random number and the number of participants to obtain the praise proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the public key of the participants, the enforcer public and private key pair and the praise proportion.
2. The ring signature method based on smart contracts according to claim 1, wherein in the step of performing data processing on the random number original text in combination with the opinion thereof to obtain the target random number, the data processing comprises:
if yes, adding 1 to the initial random number;
if the object or the disclaimer is rejected, the initial random number is kept unchanged.
3. The intelligent contract-based ring signature method according to claim 1, wherein said step of performing ring signature and generating a signature result according to the public key of the participant in combination with the enforcer public-private key pair and the approval proportion is followed by the steps of:
and acquiring the signature result, distributing the signature result to each participant, and performing signature verification on the signature result by combining a preset proportion.
4. The ring signature method based on the smart contract as claimed in claim 3, wherein the step of performing signature verification on the signature result in combination with a preset ratio comprises:
performing signature verification on the signature result by combining a preset proportion, and judging whether the signature result is valid;
if the signature is invalid, displaying that the verification result is invalid;
if the signature is valid, comparing the preset proportion with the approval proportion, and judging whether the approval proportion is greater than the preset proportion;
if yes, the generated final overall signature opinion is approved;
if not, the final overall signature opinion generated is against.
5. A smart contract-based ring signature method as claimed in claim 1, wherein said step of calculating said target random number in combination with a number of participants to obtain a positive proportion is preceded by the steps of:
and uploading the target random number to a block chain without encryption.
6. A smart contract-based ring signature method as claimed in claim 1, wherein said step of calculating said target random number in combination with the number of participants to obtain a positive proportion comprises:
calculating a difference between the target random number and the initial random number to obtain a number of praise persons;
and obtaining the approval proportion according to the approval number and the number of participants.
7. A ring signature method based on a smart contract according to claim 1, wherein the target random number only shows the overall opinion status of all participants, not relating to detailed opinion information of individual participants.
8. A ring signature system based on smart contracts, the system comprising:
the acquisition module is used for acquiring public keys of all participants and generating a plurality of groups of initial random numbers corresponding to the number of the participants;
the data processing module is used for carrying out data encryption on the initial random number according to a public key of a participant and sending a random number ciphertext obtained by data encryption to a corresponding participant so that the participant decrypts the random number ciphertext according to a private key of the participant to obtain a random number original text and carries out data processing on the random number original text by combining opinions of the participant to obtain a target random number;
and the signature module is used for calculating the combination of the target random number and the number of participants to obtain a favorable proportion, randomly generating an enforcer public and private key pair according to a key generation algorithm, and performing ring signature and generating a signature result according to the combination of the public key of the participants and the enforcer public and private key pair and the favorable proportion.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a ring signature method based on smart contracts according to any one of claims 1 to 7.
10. A data processing apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the smart contract-based ring signature method of any one of claims 1 to 7 when executing the program.
CN202210260900.4A 2022-03-17 2022-03-17 Ring signature method, system, storage medium and equipment based on intelligent contract Active CN114362970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210260900.4A CN114362970B (en) 2022-03-17 2022-03-17 Ring signature method, system, storage medium and equipment based on intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210260900.4A CN114362970B (en) 2022-03-17 2022-03-17 Ring signature method, system, storage medium and equipment based on intelligent contract

Publications (2)

Publication Number Publication Date
CN114362970A true CN114362970A (en) 2022-04-15
CN114362970B CN114362970B (en) 2022-07-05

Family

ID=81095201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210260900.4A Active CN114362970B (en) 2022-03-17 2022-03-17 Ring signature method, system, storage medium and equipment based on intelligent contract

Country Status (1)

Country Link
CN (1) CN114362970B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619947A (en) * 2022-12-19 2023-01-17 江西农业大学 Three-dimensional modeling cooperation method and system based on block chain
CN117040928A (en) * 2023-10-08 2023-11-10 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
CN107453865A (en) * 2017-07-18 2017-12-08 众安信息技术服务有限公司 A kind of multiparty data sharing method and system for protecting data transmission source privacy
CN109067547A (en) * 2018-09-21 2018-12-21 北京计算机技术及应用研究所 A kind of block chain method for secret protection based on disposable ring signatures
CN109257184A (en) * 2018-11-08 2019-01-22 西安电子科技大学 Linkable ring signature method based on anonymous broadcast enciphering
US20200213130A1 (en) * 2019-06-26 2020-07-02 Alibaba Group Holding Limited Ring signature-based anonymous transaction
US10903991B1 (en) * 2019-08-01 2021-01-26 Coinbase, Inc. Systems and methods for generating signatures
CN113079704A (en) * 2018-09-06 2021-07-06 马蒂夫股份有限公司 Method and system for providing targeted advertising to consumer devices
CN113360943A (en) * 2021-06-23 2021-09-07 京东数科海益信息科技有限公司 Block chain private data protection method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106779704A (en) * 2016-12-06 2017-05-31 杭州趣链科技有限公司 A kind of block chain anonymous deal method based on ring signatures
CN107453865A (en) * 2017-07-18 2017-12-08 众安信息技术服务有限公司 A kind of multiparty data sharing method and system for protecting data transmission source privacy
US20190273620A1 (en) * 2017-07-18 2019-09-05 Zhongan Information Technology Service Co., Ltd. Data sharing method and data sharing system
CN113079704A (en) * 2018-09-06 2021-07-06 马蒂夫股份有限公司 Method and system for providing targeted advertising to consumer devices
CN109067547A (en) * 2018-09-21 2018-12-21 北京计算机技术及应用研究所 A kind of block chain method for secret protection based on disposable ring signatures
CN109257184A (en) * 2018-11-08 2019-01-22 西安电子科技大学 Linkable ring signature method based on anonymous broadcast enciphering
US20200213130A1 (en) * 2019-06-26 2020-07-02 Alibaba Group Holding Limited Ring signature-based anonymous transaction
US10903991B1 (en) * 2019-08-01 2021-01-26 Coinbase, Inc. Systems and methods for generating signatures
CN113360943A (en) * 2021-06-23 2021-09-07 京东数科海益信息科技有限公司 Block chain private data protection method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
OLEKSANDR KURBATOV; PAVEL KRAVCHENKO: "Using Ring Signatures For An Anonymous E-Voting System", 《IEEE》 *
于天娇等: "基于联盟链的匿名电子投票方案", 《网络空间安全》 *
周菊香等: "基于环签名理论的电子拍卖方案", 《计算机工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115619947A (en) * 2022-12-19 2023-01-17 江西农业大学 Three-dimensional modeling cooperation method and system based on block chain
CN115619947B (en) * 2022-12-19 2023-12-26 江西农业大学 Three-dimensional modeling cooperation method and system based on blockchain
CN117040928A (en) * 2023-10-08 2023-11-10 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract
CN117040928B (en) * 2023-10-08 2024-02-09 广州市悦智计算机有限公司 Method for realizing voting right privacy distribution based on blockchain intelligent contract

Also Published As

Publication number Publication date
CN114362970B (en) 2022-07-05

Similar Documents

Publication Publication Date Title
CN114362970B (en) Ring signature method, system, storage medium and equipment based on intelligent contract
JP4639084B2 (en) Encryption method and encryption apparatus for secure authentication
Zhang et al. Efficient public key encryption with equality test in the standard model
Tian et al. Policy-based chameleon hash for blockchain rewriting with black-box accountability
Kiayias et al. DEMOS-2: scalable E2E verifiable elections without random oracles
Damgård et al. Unclonable group identification
US20140089670A1 (en) Unique code in message for signature generation in asymmetric cryptographic device
Eskandarian et al. Clarion: Anonymous communication from multiparty shuffling protocols
WO2021081866A1 (en) Transaction method, device, and system based on account model, and storage medium
CN110912705A (en) Distributed electronic voting method and system based on block chain
Hébant et al. Traceable constant-size multi-authority credentials
Pan et al. Signed (group) diffie–hellman key exchange with tight security
CN113612604A (en) Asynchronous network-oriented safe distributed random number generation method and device
Goldwasser et al. Transformation of digital signature schemes into designated confirmer signature schemes
Hermans et al. Private yoking proofs: attacks, models and new provable constructions
Alwen et al. Collusion-free multiparty computation in the mediated model
CN110851804B (en) Alliance chain identity authentication mode based on electronic contract
CN116865970A (en) Multiparty cooperative key generation and digital signature method and system based on national cryptographic algorithm
Fischlin Anonymous signatures made easy
Tso et al. Identity-based blind multisignature from lattices
Feng et al. A new public remote integrity checking scheme with user and data privacy
Huang et al. Ambiguous optimistic fair exchange: Definition and constructions
Jiang et al. Efficient authentication protocol with anonymity and key protection for mobile Internet users
Guo et al. Scalable protocol for cross-domain group password-based authenticated key exchange
Syta et al. Deniable anonymous group authentication

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