SM2-based two-party collaborative anti-dual authentication signature generation method and system
By distributing signing authority to both the client and the server, and employing a two-party collaborative anti-dual authentication signature generation method based on the SM2 algorithm, the problem of server-client collusion attacks in decentralized auction signature schemes is solved. This achieves secure isolation and traceability of signature keys, thereby improving the fairness and security of the electricity trading market.
Patent Information
- Application Number
- CN202511506420.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-01-16
AI Technical Summary
Existing decentralized auction signature schemes cannot effectively defend against attacks where the server and client collude to submit multiple auction signatures. Especially in spot trading, there is a risk of price manipulation and market interference, and there is a lack of auditable and accountable protection capabilities.
A two-party collaborative signature generation method based on SM2 is adopted to prevent double authentication. The signing authority is distributed to two independent participants, the client and the server. Through key isolation and collaborative signature generation control mode, it is ensured that the signature key can still be prevented from being leaked when either device is maliciously controlled, and the server's private key is publicly extracted for punishment in the event of double signing.
It effectively prevents the overall leakage of signature keys, enhances the system's resistance to malicious behavior, enables verifiable and traceable collaborative malicious acts, ensures the fairness and security of the electricity trading market, and is applicable to distributed identity authentication and behavior supervision in the electricity spot market.
Smart Images

Figure CN121356758A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of encryption technology, and in particular relates to a two-party collaborative anti-dual authentication signature generation method and system based on SM2. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] In the electricity spot market, the context of grid privacy trading is closely related to the market's adjustment mechanisms. With the gradual opening of the electricity market and the widespread integration of distributed energy resources, the frequency and complexity of spot market transactions have increased significantly. The application of digital technologies, particularly smart contracts and blockchain, has made transaction automation and efficiency possible. These technologies not only enhance market transparency but also improve transaction efficiency.
[0004] However, traditional centralized trading models pose significant data breach risks, especially regarding sensitive information such as user electricity consumption data and transaction records, which urgently require effective protection. With increasing demands for privacy protection, decentralized trading models are gaining attention. In a decentralized model, trading parties can directly match and transact, reducing reliance on centralized institutions while enhancing privacy protection. In the spot market, decentralized trading models offer greater flexibility, enabling faster responses to market supply and demand changes and real-time adjustments and optimizations. This model not only improves market efficiency but also promotes the optimal allocation of electricity resources and stable market operation while protecting user privacy.
[0005] As a crucial component of public-key cryptography, digital signature technology plays an irreplaceable role in many situations. Depending on the application scenario and requirements, by appending extra data to data units or performing cryptographic transformations on data units, various forms of digital signatures have emerged, allowing the recipient of the data to verify its origin and integrity and prevent forgery, such as ring signatures, blind signatures, aggregate signatures, and non-repudiation signatures.
[0006] Existing decentralized auction signature schemes typically assume that the server is trustworthy, making them vulnerable to attacks where the server and client collude to submit multiple auction signatures. This is especially true in spot trading, where one party can use the platform to generate multiple mutated quotes to manipulate prices and disrupt the market. Summary of the Invention
[0007] To address the technical problems mentioned above, this invention provides a two-party collaborative anti-dual authentication signature generation method and system based on SM2. By distributing signature authority to two independent participants, the client and the server, a control mode of key isolation and collaborative signature generation is achieved. Even if either device is maliciously controlled, the overall leakage of the signature key can still be effectively prevented, thus enhancing the ability to resist malicious attacks.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a two-party collaborative anti-dual authentication signature generation method based on SM2, applied to a client, comprising: Retrieve the public parameter set and the message to be signed; Based on the message to be signed, a first intermediate result is calculated using a cryptographic hash function; a second intermediate result is calculated based on a public parameter set, and the first and second intermediate results are output to obtain a partial signature value fed back by the server; the server calculates a point on the elliptic curve based on the second intermediate result and the server's secret share, and then calculates the server's partial signature value based on the first intermediate result. Based on the server-side partial signature value and the client-side secret share, the client-side partial signature value is calculated, and the two partial signature values are merged into the final signature value.
[0009] Furthermore, the first intermediate result is: Where p is the content payload of the message to be signed. This is a cryptographic hash function.
[0010] Furthermore, the second intermediate result is: ;in, For generators in the public parameter set, These are some intermediate values.
[0011] Furthermore, the client-side partial signature value is: Where d1 and k1 are both secret shares of the client, and r is the partial signature value of the server. This is the fourth intermediate result. For safety parameters.
[0012] Furthermore, the secret share of the server and the secret share of the client are generated by the two parties through interaction.
[0013] Furthermore, the final signature value can be publicly verified by everyone.
[0014] A second aspect of the present invention provides a two-party collaborative anti-dual authentication signature generation method based on SM2, applied to a server, comprising: Obtain a first intermediate result and a second intermediate result; the first intermediate result is calculated by the client based on the message to be signed using a cryptographic hash function; the second intermediate result is calculated by the client based on a public parameter set. Based on the second intermediate result, combined with the server's secret share, a point on the elliptic curve is calculated. Then, combined with the first intermediate result, the server's partial signature value is calculated. This allows the client to calculate its partial signature value based on the server's partial signature value and the client's secret share. The two signature values are then merged into the final signature value.
[0015] Furthermore, one point of the elliptic curve is: ;in, This is the second intermediate result. d2 is the third intermediate result, and d2 is the secret share of the server.
[0016] Furthermore, the server-side partial signature value is: ;in, Let x be the x-coordinate of a point on the elliptic curve. This is the first intermediate result, and n is the safety parameter.
[0017] Furthermore, once the secret share of the server is extracted, the regulatory authorities will intervene and revoke its electricity sales qualification as a punishment.
[0018] A third aspect of the present invention provides a two-party collaborative anti-dual authentication signature generation method based on SM2, comprising: The client obtains the public parameter set and the message to be signed; based on the message to be signed, it calculates the first intermediate result using a cryptographic hash function; based on the public parameter set, it calculates the second intermediate result and outputs the first and second intermediate results. Based on the second intermediate result and combined with the server's secret share, the server calculates a point on the elliptic curve and then calculates the server's partial signature value by combining it with the first intermediate result. Based on the server's partial signature value and the client's secret share, the client calculates its partial signature value and merges the two signature values into the final signature value.
[0019] A fourth aspect of the present invention provides a two-party collaborative anti-dual authentication signature generation system based on SM2, comprising: The client is configured to: obtain a public parameter set and a message to be signed; calculate a first intermediate result based on the message to be signed using a cryptographic hash function; calculate a second intermediate result based on the public parameter set, and output the first and second intermediate results. The server is configured to: calculate a point on the elliptic curve based on the second intermediate result and the server's secret share, and then calculate the server's partial signature value based on the first intermediate result. The client is also configured to: calculate the client's partial signature value based on the server's partial signature value and the client's secret share, and merge the two partial signature values into the final signature value.
[0020] A fifth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the two-party collaborative anti-dual authentication signature generation method based on SM2 as described above.
[0021] A sixth aspect of the present invention provides a computer device including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein the processor executes the program to implement the steps in the SM2-based two-party collaborative anti-dual authentication signature generation method described above.
[0022] Compared with the prior art, the beneficial effects of the present invention are: This invention achieves a control mode of key isolation and collaborative signature generation by distributing signing authority to two independent participants, the client and the server. Even if either device is maliciously controlled, it can still effectively prevent the overall leakage of the signing key and improve the ability to resist malicious attacks.
[0023] If double signing occurs under the same signature address, the present invention can extract the server's private key to make the coordinated malicious behavior verifiable and traceable. Attached Figure Description
[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0025] Figure 1 This is a flowchart of a two-party collaborative anti-dual authentication signature generation method based on SM2 according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of the key generation protocol according to Embodiment 1 of the present invention; Figure 3 This is a flowchart of the collaborative signature generation protocol according to Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0027] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, 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 pertains.
[0028] Terminology Explanation: Multi-Party Signing refers to a process where two or more devices each store a portion of a key, and the digital signature is completed collaboratively by the participating parties. No single party can possess the complete key, thus effectively ensuring the security of the user's key even if a single device is controlled by a malicious entity.
[0029] Two-factor authentication preventable signature (DAP) is a signature property designed to sign two messages that have the same first part (called the address) but different second parts (called the payload), allowing the secret signing key to be publicly extracted from both such signatures. The primary application of DAP is to suppress and / or punish the creation of two signatures on different payloads within the same address, such as punishing certificate authorities in PKI systems that issue different key certificates for the same domain, or punishing users who double-spend Bitcoin transactions.
[0030] The SM2 algorithm is an elliptic curve cryptography algorithm. The standard document mainly includes four parts: general principles, digital signature algorithm, key exchange protocol, and public key encryption algorithm. The hash algorithm used is the SM3 cryptographic hash algorithm, and the key derivation function is also defined in the standard.
[0031] Example 1 This embodiment provides a two-party collaborative anti-dual authentication signature generation method based on SM2.
[0032] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment effectively prevents dual authentication by transforming the one-time signature architecture, meets the requirements of unforgeable security, and prevents the electricity purchaser and seller from illegally winning bids by bypassing the bidding mechanism.
[0033] The SM2-based two-party collaborative anti-duplicate authentication signature generation method provided in this embodiment consists of two parts: an address and a content payload. Only one signature is allowed per party for a message at the same address. If two parties collude maliciously, the server's private key is publicly extracted. In this case, even if the electricity purchaser and seller collude, they cannot generate two valid signatures on the same quoted address. Once collusion and double signing occur, the seller's private key will be automatically extracted. An external third-party monitoring center can then use this as a basis to trace the responsibilities of both the purchaser and seller, ensuring fair competition in the electricity trading market.
[0034] This embodiment provides a two-party collaborative anti-dual authentication signature generation method based on SM2, with the participating parties including the electricity seller. , electricity purchaser and third-party external regulatory centers They are described separately: Electricity sellers: Service providers in the anti-dual signature system, the main body of the power supply side, publish available electricity and price information, and participate in bidding matching; each bidding action is bound to a unique "address"; Electricity purchaser: The client in the anti-double signature process, the main entity on the electricity demand side, submits a bidding application based on actual needs, participates in the bidding matching, and completes the transaction signature in collaboration with the electricity seller; External regulatory center: The regulatory and auditing body for the electricity market, responsible for supervising and reviewing the compliance of bidding activities, enforcing accountability and penalties, and ensuring the fairness and impartiality of the electricity trading market.
[0035] The SM2-based two-party collaborative signature generation method for preventing dual authentication provided in this embodiment employs a one-time signature architecture conversion mechanism. By distributing signing authority to two independent participants—the client (electricity purchaser) and the server (electricity seller)—it achieves key isolation and a collaborative signature generation control mode. Even if either party's device is maliciously controlled, it effectively prevents the overall leakage of the signing key, enhancing the system's resistance to malicious attacks. If dual signing occurs under the same signing address, this method can extract the server's private key to make the collaborative malicious behavior verifiable and traceable.
[0036] The SM2-based two-party collaborative anti-duplicate authentication signature generation method provided in this embodiment is particularly suitable for the distributed identity authentication and behavior monitoring requirements in electricity spot market bidding systems. In this scenario, the electricity purchaser and seller collaborate with an external monitoring center to complete the signing process, effectively preventing the same identity from signing multiple bids and ensuring the fairness of the bidding process and the uniqueness of the results. Simultaneously, this method balances the compliance of national cryptographic algorithms with the lightweight deployment requirements of the power grid terminal environment, enhancing the monitorability of transaction behavior and the non-repudiation of data while ensuring the signature is unforgeable and verifiable.
[0037] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment has the advantages of high security, complete functions, and high computational efficiency. It is applicable to a variety of security scenarios based on distributed key management architecture, including preventing bidding and duplicate signatures in power grid trading platforms, preventing double-spending attacks in blockchain payment systems, and preventing certificate authorities from issuing certificates repeatedly in PKI systems. It plays an important role in promoting the application of domestic cryptographic algorithms in critical infrastructure.
[0038] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment is as follows: Figure 1 As shown, it includes the following steps: Step 1: Initialization, handled by an external monitoring center. implement.
[0039] The specific initialization steps are as follows: Input security parameters Output public parameter set : Step 101: Select a finite field Generate elliptic curve equations mod (in, The points that satisfy the equation form an abelian group G. Include A finite field of n elements; a and b are... Define an elliptic curve equation from the elements in the equation. G is the order of The elliptic curve group is defined by points on the elliptic curves; q is a finite field. The number of elements in the cyclic group G; Modulus The operation involves x and y, which are the independent and dependent variables of the elliptic curve equation, respectively, and n is a safety parameter.
[0040] Step 102: Randomly select a generator The coordinates are Its order is .in, Cyclic group A generator; For point The coordinates.
[0041] Step 103: Select a hash function ;in, satisfy .in, and For cryptographic hash functions; For integers A set of integers; is a bit string of arbitrary length; c, d, e, and f are the elements at the corresponding positions in the hash function H1.
[0042] Step 104: Select a pseudo-random function .in, For pseudo-random functions, with To evaluate the key.
[0043] Step 105: Output the public parameter set .
[0044] Step 2, Key generation, by the electricity seller. With the electricity purchaser Interactive execution. Before execution, Publish bidding activities and bind a unique address to each bidding activity. .
[0045] Step 201: Input the public parameter set .
[0046] Step 202 Randomly select As their respective partial private keys. To evaluate the key set; for A portion of the private key (secret share); for A portion of the private key (secret share).
[0047] Step 203, Initialization function , .
[0048] Step 204, as follows Figure 2 As shown, for all addresses : (1) That is, client U sends Give to the server : calculate ; Calculate for address Partial public key ; Proof of generating discrete logarithms That is, proof about The discrete logarithm is .
[0049] in, In the context of collaborative signature, the server-side specifically refers to the electricity seller. The client in the collaborative signature process, specifically the electricity purchaser; As a third-party regulatory center for the power trading market; for A portion of the private key (secret share) is used for collaborative signing; for Part of the public key; Proof of discrete logarithms; represents some intermediate values; F is a pseudo-random function.
[0050] (2) That is, server S sends To client U: calculate ; Calculate for address Partial public key ; Proof of generating discrete logarithms That is, proof about The discrete logarithm is .
[0051] in, for Part of the public key; for A portion of the private key (secret share) is used for collaborative signing.
[0052] (3) That is, client U sends To server S: verify Whether it is legal; if legal, continue execution. calculate ; Calculate the hash function value ; verify Whether it is legal or not, if it is legal, then continue to execute it.
[0053] (4) Common output public key: calculate ; calculate ; Calculate address Corresponding public key .
[0054] in, For the common public key; and For cryptographic hash functions; This refers to the set of addresses, specifically the set of bidding activities posted by the electricity seller. For the message The address portion of the file is a unique identifier for the bidding activity.
[0055] Step 205, then Each retains a secret share and .
[0056] Step 206, Public Key .
[0057] Step 207: Return the public key .in, For a set of public keys, This is a partial set of public keys corresponding to an address.
[0058] Step 3, Collaborative Signature, by and Interactive execution, for the bidding behavior they match. and price Collaborative signature authentication.
[0059] Input public parameter set Messages awaiting signature Each party's secret share and ,like Figure 3 As shown, the execution steps are as follows: Step 301 That is, client U sends To server S: Analysis ; Based on the content payload, the first intermediate result is calculated using a cryptographic hash function, i.e.: Calculate ; Based on the publicly available parameter set, a second intermediate result is calculated, namely: Calculation ; Proof of generating discrete logarithms That is, proof about The discrete logarithm is .
[0060] in, The message value to be signed consists of two parts, represented as follows: ; For the message The address portion of the file is a unique identifier for the bidding activity; For the message The content load in the middle refers to the electricity price agreed upon by the electricity purchaser and the electricity seller; For function The first intermediate result obtained from the calculation; This is the second intermediate result in the signature generation / verification process.
[0061] Step 302 That is, the server S sends To client U: verify Is it legal? If legal, continue. Calculate the third intermediate result ; Proof of generating discrete logarithms That is, proof about The discrete logarithm is ; Based on the second intermediate result, and combined with the server's secret share, a point on the elliptic curve is calculated, i.e.: Calculate ; calculate ; Calculate the fourth intermediate result .
[0062] in, This represents the x-coordinate of a point on the elliptic curve. The ordinate value of a point on the elliptic curve; This is a partial signature value.
[0063] Step 303 Output signature: verify Is it legal? If legal, continue. Based on the partial signature value returned by the server, combined with the secret share, the partial signature value of the electricity purchaser is calculated, that is: Calculation ; Output signature .
[0064] in, This is a partial signature value; This is the output signature value.
[0065] Step 4: Signature verification. This can be publicly verified by anyone to ensure the legality of the transaction.
[0066] Input public parameter set Messages to be verified Signature value Public key Perform the following steps: Step 401, Analysis = It should be noted that the message is yet to be verified. and signature value Because it is parsed by the verifier, it has a default superscript '.
[0067] Step 402, Calculation .in, Indicates the generation of the corresponding address The shared public key.
[0068] Step 403, Judgment If the condition is true, continue with the next step; otherwise, output the value. Verification failed.
[0069] Step 404: Calculate the hash value .
[0070] Step 405: Calculate intermediate results .
[0071] Step 406: Calculate a point on the elliptic curve .
[0072] Step 407, Judgment If the statement is true, then the validation passes; otherwise, the validation fails and the statement is output. Verification failed; among them, = .
[0073] Step 5: Extraction, which proceeds automatically. Once extracted... The private key (secret share), the regulator Intervention to revoke their electricity sales qualification as a punishment is intended to maintain fairness in the electricity trading market.
[0074] Enter public key ,information ,sign Perform the following steps: Step 501, Analysis = .
[0075] Step 502, Calculation .
[0076] Step 503, if Then continue with the following steps.
[0077] Step 504: Calculate each party's share of the secret information. r1 and r2 are parts of the signature.
[0078] Step 505, Calculation .
[0079] Step 506, Calculation .
[0080] Step 507: Return partial private key to the server .
[0081] This embodiment provides a two-party collaborative anti-duplicate authentication signature generation method based on SM2. It designs a novel two-party collaborative anti-duplicate authentication signature generation method and system, applicable to distributed server and client scenarios, effectively resisting malicious collusion between two parties. When the client and server collaboratively create two signatures on the same address, the server's private key can be publicly extracted. While ensuring signature correctness and unforgeability, it meets the functional characteristics of anti-duplicate authentication signatures, effectively connecting the key generation, signature generation, and signature verification algorithms of the SM2 signature scheme. It is particularly suitable for trusted signature scenarios in distributed bidding systems in the spot market. Without introducing a centralized trust center, it prevents the server and client from colluding to submit double-signed bids through structured key distribution and collaborative signature strategies, effectively enhancing the auditability and punitive nature of the transaction process. This provides important cryptographic support for building a highly secure, private, and efficient electricity spot market.
[0082] This embodiment provides a two-party collaborative signature generation method based on SM2 to prevent double authentication, applied to a decentralized privacy auction trading scenario in the electricity spot market. In this method, each trading entity in the electricity market, such as the buyer and seller, establishes a collaborative signature mechanism between the client and server. The server and client each hold a portion of the signature private key, collaboratively generating the transaction signature. No single party can independently construct a complete signature, thus preventing the risk of single-point private key leakage. When a market participant submits a transaction application, it completes an encrypted signature through this collaborative signature mechanism, attaching address information and bidding details, which are then matched by the electricity trading platform. When any two collaborating entities (such as the client and server) perform double signature operations on the same address for different payloads (i.e., submitting different prices for the same bidding address), the dual authentication anti-counterfeiting mechanism can be used to extract the server's private key as evidence of malicious behavior, which can then be submitted to regulatory agencies for punishment.
[0083] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment effectively forms a cryptographic constraint on collaborative malicious behavior by extracting the private key through dual signatures, fundamentally improving the auditability and non-repudiation of the transaction process. This method supports the key generation, signature generation, and signature verification processes of the standard SM2 signature algorithm and can be seamlessly embedded into existing national cryptographic architecture systems to ensure the legitimacy and unforgeability of signatures.
[0084] Compared with existing signature mechanisms, this scheme has the following advantages: by distributing keys on the client and server, it effectively avoids single points of failure or key leakage; in the event of double signing, the private key can be publicly extracted, achieving traceability and punishability of malicious actors; it does not require the introduction of additional trusted hardware or trusted intermediaries, improving the deployability and decentralization of the scheme; the transaction matching process does not need to expose complete plaintext data, strengthening privacy protection while ensuring the legitimacy of the signature.
[0085] Therefore, existing market signature and authentication schemes still have significant shortcomings in dealing with double-signature attacks and node collusion, lacking auditable and traceable protection capabilities. The SM2 collaborative anti-double-signature method provided in this embodiment can enhance the behavioral constraints of all participants in electricity spot trading without sacrificing signature efficiency, ensuring the fairness, security, and highly reliable execution of transactions, and providing crucial support for building a compliant, efficient, and privacy-protected electricity market system.
[0086] The SM2-based two-party collaborative anti-duplicate authentication signature generation method provided in this embodiment is applicable to the construction of identity verification and accountability mechanisms in distributed power grid transactions. Under the premise of distributed key holding, this method divides signing authority among two independent entities: the electricity seller and the electricity buyer. Through collaborative computation, they jointly generate the signature result, ensuring that any single-party leakage will not expose the complete signature key, thereby enhancing the system's resistance to malicious activity. If dual-signature behavior with different payloads occurs under the signature address, the electricity seller's private key can be extracted through an algorithm, realizing a verifiable and accountable security mechanism for malicious parties, ensuring a fair and non-repudiable transaction process.
[0087] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment is the first to propose a two-party collaborative anti-dual authentication signature method applicable to the supervision of dual identity behavior. It expands the security and controllability boundaries of digital signatures, fills the gap in the collaborative malicious detection mechanism, and is particularly suitable for distributed power trading platforms with frequent transactions and identity separation.
[0088] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment is based on the SM2 algorithm standard of the State Cryptography Administration. It naturally supports the national cryptographic ecosystem, has high security and strong compatibility, and helps to accelerate the deployment of domestic cryptographic algorithms in energy information infrastructure.
[0089] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment can be flexibly embedded into the existing power grid purchase and sale transaction process. Without changing the user terminal interaction mode, it provides security guarantees for behavior that can be monitored and anti-dual signature that can be traced. It improves the transaction system's ability to detect behaviors such as malicious bidding and duplicate signatures, and provides a solid cryptographic foundation for maintaining the fairness, transparency and stable operation of the power market.
[0090] The two-party collaborative anti-dual authentication signature generation method based on SM2 provided in this embodiment has low computation and communication overhead, is suitable for resource-constrained power grid terminal equipment environments, and has good scalability and practical deployment value.
[0091] Example 2 This embodiment provides a two-party collaborative signature generation method for preventing dual authentication based on SM2, applied to a client, which includes: Retrieve the public parameter set and the message to be signed; Based on the message to be signed, a first intermediate result is calculated using a cryptographic hash function; a second intermediate result is calculated based on a public parameter set, and the first and second intermediate results are output to obtain a partial signature value fed back by the server; the server calculates a point on the elliptic curve based on the second intermediate result and the server's secret share, and then calculates the server's partial signature value based on the first intermediate result. Based on the server-side partial signature value and the client-side secret share, the client-side partial signature value is calculated, and the two partial signature values are merged into the final signature value.
[0092] Furthermore, the first intermediate result is: Where p is the content payload of the message to be signed. This is a cryptographic hash function.
[0093] Furthermore, the second intermediate result is: ;in, For generators in the public parameter set, These are some intermediate values.
[0094] Furthermore, the client-side partial signature value is: Where d1 and k1 are both secret shares of the client, and r is the partial signature value of the server. This is the fourth intermediate result. For safety parameters.
[0095] Furthermore, the secret share of the server and the secret share of the client are generated by the two parties through interaction.
[0096] Furthermore, the final signature value can be publicly verified by everyone.
[0097] Example 3 This embodiment provides a two-party collaborative anti-dual authentication signature generation method based on SM2, applied to the server side, which includes: Obtain a first intermediate result and a second intermediate result; the first intermediate result is calculated by the client based on the message to be signed using a cryptographic hash function; the second intermediate result is calculated by the client based on a public parameter set. Based on the second intermediate result, combined with the server's secret share, a point on the elliptic curve is calculated. Then, combined with the first intermediate result, the server's partial signature value is calculated. This allows the client to calculate its partial signature value based on the server's partial signature value and the client's secret share. The two signature values are then merged into the final signature value.
[0098] Furthermore, one point of the elliptic curve is: ;in, This is the second intermediate result. d2 is the third intermediate result, and d2 is the secret share of the server.
[0099] Furthermore, the server-side partial signature value is: ;in, Let x be the x-coordinate of a point on the elliptic curve. This is the first intermediate result, and n is the safety parameter.
[0100] Furthermore, once the secret share of the server is extracted, the regulatory authorities will intervene and revoke its electricity sales qualification as a punishment.
[0101] Example 4 This embodiment provides a two-party collaborative anti-dual authentication signature generation system based on SM2, which specifically includes: The client is configured to: obtain a public parameter set and a message to be signed; calculate a first intermediate result based on the message to be signed using a cryptographic hash function; calculate a second intermediate result based on the public parameter set, and output the first and second intermediate results. The server is configured to: calculate a point on the elliptic curve based on the second intermediate result and the server's secret share, and then calculate the server's partial signature value based on the first intermediate result. The client is also configured to: calculate the client's partial signature value based on the server's partial signature value and the client's secret share, and merge the two partial signature values into the final signature value.
[0102] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, Embodiment 2 or Embodiment 3, and their specific implementation process is the same, so it will not be repeated here.
[0103] Example 5 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the SM2-based two-party collaborative anti-dual authentication signature generation method as described in Embodiment 1, Embodiment 2, or Embodiment 3 above.
[0104] Example 6 This embodiment provides a computer device, such as... Figure 4 As shown, the system includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means. The communication interface 1002 is used to receive and send data. When the processor 1001 executes the program, it implements the steps in the SM2-based two-party collaborative anti-dual authentication signature generation method described in Embodiments 1, 2, or 3 above.
[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A two-party collaborative double-authentication resistant signature generation method based on SM2, applied to a client, characterized in that, The method comprises the following steps: obtaining a public parameter set and a message to be signed; calculating a first intermediate result based on the message to be signed through a cryptographic hash function; calculating a second intermediate result based on the public parameter set, and outputting the first intermediate result and the second intermediate result to obtain a partial signature value fed back by a server; calculating a point on an elliptic curve based on the second intermediate result and a secret share of the server, and then calculating a partial signature value of the server based on the first intermediate result; calculating a partial signature value of a client based on the partial signature value of the server and a secret share of the client, and merging the two partial signature values into a final signature value.
2. The SM2-based two-party collaborative double-resistance authentication signature generation method of claim 1, wherein, The first intermediate result is: ; wherein p is a content payload in a message to be signed, is a cryptographic hash function.
3. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 1, characterized in that, The second intermediate result is: ; wherein is a generator of a set of public parameters, is a partial intermediate value.
4. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 1, characterized in that, The client part signature value is: ; wherein d1 and k1 are both secret shares of the client, r is a server part signature value, is a fourth intermediate result, is a security parameter.
5. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 1, characterized in that, The secret share of the server and the secret share of the client are generated by interaction between the two parties.
6. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 1, characterized in that, The final signature value can be publicly verified by anyone.
7. A two-party collaborative double-authentication-resistant signature generation method based on SM2, applied to a service end, characterized in that, The method comprises the following steps: obtaining a first intermediate result and a second intermediate result; the first intermediate result is calculated by a client based on a message to be signed through a cryptographic hash function; the second intermediate result is calculated by the client based on a public parameter set; calculating a point on an elliptic curve based on the second intermediate result and a secret share of a server, and then calculating a partial signature value of the server based on the first intermediate result, so that a partial signature value of a client is calculated based on the partial signature value of the server and a secret share of the client, and the two partial signature values are merged into a final signature value.
8. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 7, characterized in that, A point of the elliptic curve is: ; wherein, is a second intermediate result, is a third intermediate result, and d2 is a secret share of the server.
9. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 7, characterized in that, The server-side partial signature value is: ; wherein, is the abscissa of a point of the elliptic curve, is a first intermediate result, and n is a security parameter.
10. The two-party collaborative double-resisting authentication signature generation method based on SM2 according to claim 7, characterized in that, Once the secret share of the server is extracted, a regulatory party intervenes to revoke the electricity seller's qualification as a punishment.
11. A two-party collaborative double-authentication resistant signature generation method based on SM2, characterized in that, The method comprises the following steps: a client obtains a public parameter set and a message to be signed; calculating a first intermediate result based on the message to be signed through a cryptographic hash function; calculating a second intermediate result based on the public parameter set, and outputting the first intermediate result and the second intermediate result; calculating a point on an elliptic curve based on the second intermediate result and a secret share of a server, and then calculating a partial signature value of the server based on the first intermediate result; calculating a partial signature value of a client based on the partial signature value of the server and a secret share of the client, and merging the two partial signature values into a final signature value.
12. A two-party collaborative double-authentication resistant signature generation system based on SM2, characterized in that, The method comprises the following steps: a client is configured to obtain a public parameter set and a message to be signed; calculating a first intermediate result based on the message to be signed through a cryptographic hash function; calculating a second intermediate result based on the public parameter set, and outputting the first intermediate result and the second intermediate result; a server is configured to calculate a point on an elliptic curve based on the second intermediate result and a secret share of the server, and then calculate a partial signature value of the server based on the first intermediate result; the client is further configured to calculate a partial signature value of the client based on the partial signature value of the server and a secret share of the client, and merge the two partial signature values into a final signature value.
13. A computer readable storage medium having stored thereon a computer program, characterized in that, The program is executed by a processor to realize the steps in the SM2-based two-party cooperative anti-duplication authentication signature generation method according to any one of claims 1-6 or claims 7-10.
14. A computer device, comprising a computer readable storage medium, a processor, and a computer program stored on the computer readable storage medium and executable on the processor, wherein, The processor implements the steps in the SM2-based two-party collaborative double-resistance authentication signature generation method according to any one of claims 1-6 or 7-10 when executing the program.
