Collaborative signature method, device, electronic device and storage medium
By using the identity information identifier in the collaborative signature method to bind the key to the user's identity, the problem in the existing technology that the key cannot be associated with the identity is solved, and communication efficiency is improved.
Patent Information
- Application Number
- CN202211124948.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-15
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-09-15
AI Technical Summary
In the existing collaborative signature method based on SM2 algorithm, the key cannot be associated with the identity, resulting in the need to be bound with a longer digital certificate, thereby reducing communication efficiency.
By receiving the server signature value and the intermediate signature value sent by the server, based on these values and the client's first key, the client signature value is determined, and the key is bound to the user identity through the identity information identification, avoiding the use of digital certificates .
Binding the key to the user's identity through identity information identification reduces the network bandwidth and resources required for data transmission and storage, and improves communication efficiency in the collaborative signature process.
Smart Images

Figure CN115378615B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology. Specifically, the present application relates to a collaborative signature method, device, electronic device and storage medium. Background Art
[0002] Digital signature is a key part of the public key cryptography system. It can meet security requirements such as integrity, anti-tampering, and non-repudiation, and plays an important role in the field of information security technology.
[0003] The SM2 algorithm refers to the elliptic curve public key cryptography algorithm specified in the "GM / T 0003-2012 SM2 Elliptic Curve Public Key Cryptography Algorithm" standard formulated by the State Cryptography Administration. It is a specific algorithm of the ECC elliptic curve cryptography (Elliptic Curve Cryptography) cryptographic system.
[0004] In the existing collaborative signature method based on the SM2 algorithm, the key cannot be associated with the identity, and a digital certificate is usually required to bind the user identity and the key. However, the digital certificate is long and will occupy more network bandwidth and resources during transmission and storage, resulting in low communication efficiency. Summary of the invention
[0005] The embodiments of the present application provide a collaborative signature method, device, electronic device and storage medium, which can solve the problem of low communication efficiency of existing collaborative signature methods.
[0006] The technical solution is as follows:
[0007] According to one aspect of an embodiment of the present application, a collaborative signing method is provided, the method comprising:
[0008] Receive the server signature value and intermediate signature value sent by the server;
[0009] Determine the client signature value based on the server signature value, the intermediate signature value and the first key of the client; wherein the first key is determined based on a hash value, and the hash value is determined based on the identity information identifier of the client and the public key identifier of the server;
[0010] Based on the server signature value and the client signature value, a collaborative signature result is determined.
[0011] Optionally, the method further comprises:
[0012] Receiving a first intermediate parameter and a second intermediate parameter sent by the server;
[0013] When both the first intermediate parameter and the second intermediate parameter are not zero, determining the first key based on the first intermediate parameter and the second intermediate parameter;
[0014] The first intermediate parameter is determined based on the second key of the server and the random number of the server identification;
[0015] The second intermediate parameter is determined based on the second key, the hash value and an initial random number of the server.
[0016] Optionally, before receiving the first intermediate parameter and the second intermediate parameter sent by the server, the method further includes:
[0017] Based on the first key random number, generate a first key elliptic curve point;
[0018] The first key elliptic curve point and the identity information identifier of the client are sent to the server, and the server is instructed to determine the public key identifier based on the first key elliptic curve point, and determine the hash value based on the public key identifier and the identity information identifier.
[0019] Optionally, after determining the collaborative signature result based on the server signature value and the client signature value, the method further includes:
[0020] Determine the collaborative public key;
[0021] Verifying the collaborative signature result according to the collaborative public key;
[0022] The collaborative public key is determined based on the hash value, the public key identifier of the server and the initial public key.
[0023] Optionally, before receiving the server signature value and the intermediate signature value sent by the server, the method further includes:
[0024] Based on the first random number, determining a first elliptic curve point;
[0025] The message digest of the message to be signed and the first elliptic curve point are sent to the server, instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point.
[0026] Optionally, sending the message digest of the message to be signed and the first elliptic curve point to the server, and instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point, includes:
[0027] Sending the message digest of the message to be signed and the first elliptic curve point to the server, instructing the server to determine the server signature value based on the message digest and the second elliptic curve point, and determining the intermediate signature value based on the second key corresponding to the server and the server signature value;
[0028] The second elliptic curve point is determined based on the first elliptic curve point, the second key and a second random number of the server.
[0029] Optionally, before determining the first elliptic curve point based on the first random number, the method further includes:
[0030] The message to be signed is preprocessed to obtain the message digest.
[0031] According to another aspect of an embodiment of the present application, a collaborative signature device is provided, the device comprising:
[0032] The first receiving module is used to receive the server signature value and the intermediate signature value sent by the server;
[0033] A first determination module, configured to determine a client signature value based on the server signature value, the intermediate signature value, and a first key corresponding to the client; wherein the first key is determined based on a hash value, and the hash value is determined based on an identity information identifier of the client and a public key identifier of the server;
[0034] The collaborative signature module is used to determine the collaborative signature result based on the server signature value and the client signature value.
[0035] According to another aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of any one of the above-mentioned collaborative signature methods when executing the program.
[0036] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned collaborative signature methods are implemented.
[0037] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0038] The key is bound to the user identity through the identity information identifier, and there is no need to use a digital certificate to associate the key with the user identity. Since the data length of the identity information identifier and / or the public key identifier is much smaller than the length of the digital certificate, the requirements for network bandwidth and storage resources during transmission and storage are lower, and the scope of application is wider; under the conditions of the same network bandwidth and storage resources, the data transmission and processing speed is faster, thereby improving the communication efficiency in the collaborative signature process. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0040] Figure 1 A flowchart of a collaborative signature method provided in an embodiment of the present application;
[0041] Figure 2 A schematic diagram of a process for collaborative key generation provided in an embodiment of the present application;
[0042] Figure 3 A flowchart of a collaborative signature method provided in another embodiment of the present application;
[0043] Figure 4 A schematic diagram of a collaborative signature device provided in an embodiment of the present application
[0044] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.
[0046] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we call an element "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here may include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".
[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0048] Digital signature is a key part of the public key cryptography system. It can meet security requirements such as integrity, anti-tampering, and non-repudiation, and plays an important role in the field of information security technology.
[0049] The SM2 algorithm refers to the elliptic curve public key cryptography algorithm specified in the "GM / T 0003-2012 SM2 Elliptic Curve Public Key Cryptography Algorithm" standard formulated by the State Cryptography Administration. It is a specific algorithm of the ECC elliptic curve cryptography (Elliptic curve cryptography) cryptographic system.
[0050] In the existing collaborative signature method based on the SM2 algorithm, the key cannot be associated with the identity, and a digital certificate is usually required to bind the user identity and the key. However, the digital certificate is long and will occupy more network bandwidth and resources during transmission and storage, resulting in low communication efficiency.
[0051] The collaborative signature method, device, electronic device and storage medium provided in this application are intended to solve the above technical problems of the prior art.
[0052] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.
[0053] The embodiment of the present application provides a collaborative signature method, which is applied to a client, which may be a smart phone, tablet computer, laptop computer, desktop computer, smart watch, etc., but is not limited thereto. The client and the server may be directly or indirectly connected via wired or wireless communication, and the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services, which is not limited in the present application.
[0054] Figure 1 A flowchart of the collaborative signature method provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0055] Step 101, receiving the server signature value and the intermediate signature value sent by the server;
[0056] Specifically, collaborative signature means that both parties in communication generate partial keys, that is, neither party knows the complete signature key, and complete the entire signature process through interaction. The client and server participating in collaborative signature share the elliptic curve parameters E(Fq), G and n of the SM2 algorithm; among which, the elliptic curve E is an elliptic curve defined on the finite field Fq, and G is the base point of the nth order on the elliptic curve E.
[0057] The collaborative signature result includes the client signature value and the server signature value corresponding to the client and server participating in the collaborative signature. The server can calculate the server signature value and the intermediate signature value through interaction with the client, where the server signature value is not zero. If the server signature value calculated by the server is zero, the server signature value needs to be recalculated. Then, the server sends the server signature value and the intermediate signature value to the client, and the client receives the server signature value and the intermediate signature value sent by the server for further calculation of the client signature value.
[0058] Step 102, determining the client signature value based on the server signature value, the intermediate signature value and the first key of the client; wherein the first key is determined based on a hash value, and the hash value is determined based on the identity information identifier of the client and the public key identifier of the server;
[0059] Specifically, in the embodiment of the present application, the key is split into two parts, namely, a first key corresponding to the client and a second key corresponding to the server, which are stored on the client and the server respectively. That is, no one of the communicating parties includes the complete key, and even if any one of the communicating parties leaks its key, the complete key will not be leaked, thereby improving the security of the data.
[0060] Optionally, before performing collaborative signing, the client and the server respectively calculate the first key and the second key corresponding thereto, and store the calculated first key and the second key locally for subsequent calling during collaborative signing.
[0061] After receiving the server signature value and intermediate signature value sent by the server, the client can call the pre-calculated first key and calculate the client signature value based on the server signature value, the intermediate signature value and the first key.
[0062] The first key may be determined based on a hash value, and the hash value may be determined based on the identity information identifier of the client and the public key identifier of the server, and a preset cryptographic hash algorithm. Optionally, the preset cryptographic hash algorithm may be an SM3 cryptographic algorithm.
[0063] Specifically, the hash value h can be calculated by the following formula:
[0064] Formula 1: h=HASH(ID||Q x ||Q y )
[0065] Where, HASH() is the SM3 cryptographic algorithm, ID is the client's identity information, (Q x ,Q y ) are the horizontal and vertical coordinates of the public key identifier Q of the server.
[0066] In an embodiment of the present application, a hash value is determined based on the identity information identifier of the client and the public key identifier of the server, and a first key is determined based on the hash. The key is bound to the user identity through the identity information identifier, and there is no need to use a digital certificate to associate the key with the user identity. Since the data length of the identity information identifier and / or the public key identifier is much smaller than the length of the digital certificate, the requirements for network bandwidth and storage resources during transmission and storage are lower, and the scope of application is wider. Under the conditions of equal network bandwidth and storage resources, the data transmission and processing speed is faster, thereby improving the communication efficiency in the collaborative signature process.
[0067] In addition, the SM9 algorithm can also be used in the prior art to realize the binding of identity and key, but the SM9 algorithm must use bilinear pairing operation, and its calculation scale is 3072 bits, which is 12 times of the SM2 algorithm compared to the 256 bits of the SM2 algorithm. In the embodiment of the present application, on the basis of realizing the binding of the user identity and its corresponding key through identity information identification, the SM2 algorithm is used for collaborative signing, which has a smaller calculation scale, lower calculation complexity and higher efficiency than the SM9 algorithm in the prior art.
[0068] Step 103: Determine the collaborative signature result based on the server signature value and the client signature value.
[0069] Specifically, after calculating the client signature value, the client can combine the client signature value with the server signature value based on the received server signature value to obtain a complete collaborative signature result. For example, if the server signature value is r and the client signature value is s, the collaborative signature result can be (r, s).
[0070] It should be noted that if the client signature value calculated by the client is zero, the client signature value needs to be recalculated until the client signature value is not zero.
[0071] In the embodiment of the present application, the key is bound to the user identity through the identity information identifier, and there is no need to use a digital certificate to associate the key with the user identity. Since the data length of the identity information identifier and / or the public key identifier is much smaller than the length of the digital certificate, the requirements for network bandwidth and storage resources during transmission and storage are lower, and the scope of application is wider; under the conditions of equal network bandwidth and storage resources, the data transmission and processing speed is faster, thereby improving the communication efficiency in the collaborative signature process.
[0072] As an optional embodiment, the collaborative signature method provided in the embodiment of the present application also includes:
[0073] Receive a first intermediate parameter and a second intermediate parameter sent by the server;
[0074] When both the first intermediate parameter and the second intermediate parameter are not zero, determining the first key based on the first intermediate parameter and the second intermediate parameter;
[0075] Among them, the first intermediate parameter is determined based on the second key of the server and the identification random number of the server; the second intermediate parameter is determined based on the second key, the hash value and the initial random number of the server.
[0076] Specifically, before participating in the collaborative signature, the client may also pre-calculate the first key, and the first key may be calculated by the following steps:
[0077] The server calculates the first intermediate parameter based on the second key and the identification random number; calculates the second intermediate parameter based on the second key, the initial random number and the hash value, and sends the first intermediate parameter and the second intermediate parameter to the client.
[0078] Specifically, the first intermediate parameter x is calculated by the following formula:
[0079] Formula 2: x = [(1 + d2) -1 *w]mod n
[0080] In the formula, w is an identification random number, mod is a modulus operation, d2 is a second key, and d2 is a random number in the range of [1, n-2] that can be generated for the server.
[0081] Specifically, the second intermediate parameter y is calculated by the following formula:
[0082] Formula 3: y = [(1 + d2) -1 *(h*s+1)]mod n
[0083] In the formula, s is an initial random number in the range of [1, n-1], h is a hash value, mod is a modulus operation, d2 is a second key, and d2 is a random number in the range of [1, n-2] that can be generated for the server.
[0084] It should be noted that if the first intermediate parameter or the second intermediate parameter calculated by the server is zero, the first intermediate parameter or the second intermediate parameter needs to be recalculated until both the first intermediate parameter and the second intermediate parameter are not zero.
[0085] After receiving the first intermediate parameter and the second intermediate parameter sent by the server, the client calculates the first key based on the first intermediate parameter and the second intermediate parameter.
[0086] Specifically, the first key d1 can be calculated by the following formula:
[0087] Formula 4: d1 = (u*x+y-1) mod n
[0088] In the formula, x is the first intermediate parameter, y is the second intermediate parameter, and u is a random number in the range of [1, n-1] generated by the client.
[0089] In an embodiment of the present application, a second intermediate parameter is determined based on a hash value, and a first key is determined based on the second intermediate parameter. Since the hash value is determined based on the identity information identifier of the client and the public key identifier of the server, the key is bound to the user identity through the identity information identifier, and there is no need to use a digital certificate to associate the key with the user identity, which expands the scope of application and improves the communication efficiency in the collaborative signature process.
[0090] As an optional embodiment, before receiving the first intermediate parameter and the second intermediate parameter sent by the server, the method further includes:
[0091] Based on the first key random number, generate a first key elliptic curve point;
[0092] The first key elliptic curve point and the identity information identifier of the client are sent to the server, and the server is instructed to determine the public key identifier based on the first key elliptic curve point, and determine the hash value based on the public key identifier and the identity information identifier.
[0093] Specifically, the client can generate a first key random number u∈[1,n-1], calculate the first key elliptic curve point v=[u]G based on the elliptic curve parameters of the SM2 algorithm, and then send the first key elliptic curve point v and identity information identification ID to the server.
[0094] The server generates a random identification number w∈[1,n-1], calculates the public key identification Q=w*v, and can make Q public. On this basis, the server calculates the hash value h based on the above formula 1.
[0095] As an optional embodiment, after step 103, the method further includes:
[0096] Determine the collaborative public key;
[0097] The collaborative public key is determined based on the hash value, the public key identifier of the server, and the initial public key;
[0098] Specifically, in order to verify the collaborative signature result, it is necessary to obtain the collaborative public key, wherein the collaborative public key is determined based on the hash value, the public key identifier of the server, and the initial public key.
[0099] Specifically, the collaborative public key P can be calculated by the following formula:
[0100] Formula 5: P = Q + h * P pub
[0101] Where P pub is the initial public key of the server, the initial public key P pub It can be based on the server generating an initial random number s in the range [1, n-1] and the formula P pub =[s]G calculated.
[0102] Since the hash value, public key identifier and initial public key can be disclosed to the public, on this basis, the collaborative public key can be calculated locally by the client based on the acquired hash value, public key identifier and initial public key; it can also be a calculated collaborative public key sent by the server or a third communication party and received by the client. The embodiments of the present application are not limited here.
[0103] Verify the collaborative signature result based on the collaborative public key.
[0104] Specifically, after the client obtains the collaborative public key, the collaborative signature result can be verified based on the collaborative public key. Since the collaborative public key is determined based on the client's identity information identifier and the server's public key identifier, the collaborative signature result can only be verified when the client's identity information identifier and the server's public key identifier are correct, that is, the binding of the key to the user's identity is realized without the need for a digital certificate, saving network bandwidth and resources during transmission and storage, and improving communication efficiency.
[0105] As an optional embodiment, before step 101, the method further includes:
[0106] Based on the first random number, determining a first elliptic curve point;
[0107] The message digest and the first elliptic curve point of the message to be signed are sent to the server, instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point.
[0108] Specifically, before executing step 101, the client may generate a first random number k1 in the range of [1, n-1], and calculate a first elliptic curve point V1=[k1]G based on the elliptic curve parameters of the SM2 algorithm.
[0109] Optionally, before calculating the first elliptic curve point, the client may also pre-process the message to be signed to obtain a message digest of the message to be signed. The message M to be signed may be pre-processed by a hash algorithm to obtain a message digest e.
[0110] After obtaining the message digest e and the first elliptic curve point V1, the client sends the message digest e and the first elliptic curve point V1 to the server. The server can further calculate the server signature value and the intermediate signature value based on the received message digest e and the first elliptic curve point V1.
[0111] As an optional embodiment, sending the message digest and the first elliptic curve point of the message to be signed to the server, and instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point, includes:
[0112] Sending the message digest and the first elliptic curve point of the message to be signed to the server, instructing the server to determine the server signature value based on the message digest and the second elliptic curve point, and determine the intermediate signature value based on the second key corresponding to the server and the server signature value;
[0113] The second elliptic curve point is determined based on the first elliptic curve point, the second key and the second random number of the server.
[0114] Specifically, after receiving the message digest e and the first elliptic curve point V1, the server can generate a second random number k2 in the range of [1, n-1], and calculate the second elliptic curve point V2 = (1 + d2) * (V1 + [k2] G) based on the elliptic curve parameters of the SM2 algorithm, where d2 is the second key corresponding to the server. The server signature value is calculated based on the second elliptic curve point and the message digest e. If the calculated server signature value is zero, the server signature value is recalculated until the server signature value is not zero.
[0115] The server signature value r is calculated using the following formula:
[0116] Formula 6: r = (x2 + e) mod n
[0117] Where x2 is the horizontal coordinate of the second elliptic curve point.
[0118] After obtaining the server signature value, the server may calculate an intermediate signature value based on the server signature value, the second random number, and the second key.
[0119] Specifically, the server signature value W2 is calculated using the following formula:
[0120] Formula 7: W2=[k2+r*(1+d2) -1 ]mod n
[0121] In the formula, (1+d2) -1 represents the inverse of (1+d2) modulo n on Fq.
[0122] On this basis, the server sends the calculated server signature value r and intermediate signature value W2 to the client, and the client calculates the client signature value based on the received server signature value r, intermediate signature value W2, the first random number and the first key.
[0123] Specifically, the client signature value s is calculated using the following formula:
[0124] Formula 8: s = [(1 + d1) -1 *(k1+W2)-r]mod n
[0125] In the formula, (1+d1) -1 represents the inverse of (1+d1) modulo n on Fq.
[0126] As an optional embodiment, Figure 2 A schematic diagram of a collaborative key generation method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method comprises the following steps:
[0127] Step 201: The collaborative signature server generates a random number s∈[1,n-1] as the private value of the identification key and calculates the identification master public key P pub = [s] G, and P pub Open to the public.
[0128] Step 202: The collaborative signature client generates a random number u∈[1,n-1], calculates v=[u]G, and sends v and the user identity ID to the collaborative signature server;
[0129] Step 203, the collaborative signature server generates a random number w∈[1,n-1], calculates the user public key identifier Q=w*v, and makes Q public;
[0130] Step 204, record the coordinates of Q (Q x ,Q y ), combined with the user identity, calculate h = HASH (ID || Q x ||Q y ), where HASH() uses the SM3 cryptographic algorithm;
[0131] Step 205: The collaborative signature server generates a random number d2∈[1,n-2] and calculates x=[(1+d2) -1 *w]mod n and y=[(1+d2) -1 *(h*s+1)]mod n;
[0132] Step 206: if x=0 or y=0, then repeat step 205; otherwise, send x and y to the collaborative signature client;
[0133] Step 207, the collaborative signature client calculates d1=(u*x+y-1)mod n;
[0134] Step 208: If d1 = 0, then repeat step 202, where d1 and d2 are the user keys of the collaborative signature client and the collaborative signature server, respectively.
[0135] As an optional embodiment, Figure 3 A flowchart of the collaborative signature method provided in the embodiment of the present application is shown in FIG. Figure 3 As shown, the method comprises the following steps:
[0136] Step 301, the collaborative signature client performs signature preprocessing on the message to be signed M to obtain a message digest e;
[0137] Step 302, the collaborative signature client generates a random number k1∈[1,n-1], calculates V1=[k1]G, and sends e and V1 to the collaborative signature server;
[0138] Step 303, the collaborative signature server generates a random number k2∈[1,n-1] and calculates V2=(1+d2)*(V1+[k2]G);
[0139] Step 304, let the coordinates of V2 be (x2, y2), and calculate r = (x2 + e) mod n according to x2 and e;
[0140] Step 305, if r=0, then go back to step 303, otherwise go to step 306;
[0141] Step 306, the collaborative signature server calculates W2 = [k2 + r*(1 + d2) -1 ]mod n, where (1+d2) -1 Represent the inverse element of (1+d2) modulo n on Fq, and send r and W2 to the collaborative signature client;
[0142] Step 307, the collaborative signature client calculates s=[(1+d1) -1 *(k1+W2)-r]mod n, where (1+d1) -1 represents the inverse element of (1+d1) modulo n on Fq,
[0143] Step 308: if s=0, repeat step 302; otherwise, output signature values r and s as collaborative signature results.
[0144] Figure 4 A schematic diagram of the structure of a collaborative signature device provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the device of this embodiment may include:
[0145] The first receiving module 401 is used to receive the server signature value and the intermediate signature value sent by the server;
[0146] A first determination module 402, configured to determine a client signature value based on the server signature value, the intermediate signature value, and a first key corresponding to the client; wherein the first key is determined based on a hash value, and the hash value is determined based on the identity information identifier of the client and the public key identifier of the server;
[0147] The collaborative signature module 403 is used to determine the collaborative signature result based on the server signature value and the client signature value.
[0148] The collaborative signature device provided in the embodiment of the present application binds the key to the user identity through an identity information identifier, and there is no need to use a digital certificate to associate the key with the user identity. Since the data length of the identity information identifier and / or the public key identifier is much smaller than the length of the digital certificate, the requirements for network bandwidth and storage resources during transmission and storage are lower, and the scope of application is wider; under the conditions of equal network bandwidth and storage resources, the data transmission and processing speeds are faster, thereby improving the communication efficiency in the collaborative signature process.
[0149] As an optional embodiment, the collaborative signature device further includes:
[0150] A first key determination module, used for receiving a first intermediate parameter and a second intermediate parameter sent by the server;
[0151] When both the first intermediate parameter and the second intermediate parameter are not zero, determining the first key based on the first intermediate parameter and the second intermediate parameter;
[0152] The first intermediate parameter is determined based on the second key of the server and the random number of the server identification;
[0153] The second intermediate parameter is determined based on the second key, the hash value and an initial random number of the server.
[0154] As an optional embodiment, the collaborative signature device further includes:
[0155] A first key interaction module, configured to generate a first key elliptic curve point based on a first key random number;
[0156] The first key elliptic curve point and the identity information identifier of the client are sent to the server, and the server is instructed to determine the public key identifier based on the first key elliptic curve point, and determine the hash value based on the public key identifier and the identity information identifier.
[0157] As an optional embodiment, the collaborative signature device further includes:
[0158] A verification module, used to determine the collaborative public key;
[0159] Verifying the collaborative signature result according to the collaborative public key;
[0160] The collaborative public key is determined based on the hash value, the public key identifier of the server and the initial public key.
[0161] As an optional embodiment, the collaborative signature device further includes a first sending module, the first sending module including a first elliptic curve point determination submodule and a first sending submodule;
[0162] A first elliptic curve point determination submodule, configured to determine a first elliptic curve point based on a first random number;
[0163] The first sending submodule is used to send the message digest of the message to be signed and the first elliptic curve point to the server, and instruct the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point.
[0164] As an optional embodiment, the first sending submodule is used to send the message digest of the message to be signed and the first elliptic curve point to the server, instructing the server to determine the server signature value based on the message digest and the second elliptic curve point, and determine the intermediate signature value based on the second key corresponding to the server and the server signature value;
[0165] The second elliptic curve point is determined based on the first elliptic curve point, the second key and a second random number of the server.
[0166] As an optional embodiment, the collaborative signature device further includes:
[0167] The preprocessing module is used to preprocess the message to be signed to obtain the message digest.
[0168] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0169] An electronic device is provided in an embodiment of the present application, including a memory, a processor and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the above-mentioned collaborative signature method. Compared with the related art, it can achieve: binding the key to the user identity through the identity information identifier, without the need to use a digital certificate to realize the association between the key and the user identity. Since the data length of the identity information identifier and / or the public key identifier is much smaller than the length of the digital certificate, the requirements for network bandwidth and storage resources during transmission and storage are lower, and the scope of application is wider; under the conditions of equal network bandwidth and storage resources, the data transmission and processing speed is faster, thereby improving the communication efficiency in the collaborative signature process.
[0170] In an alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5The electronic device 5000 shown includes: a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, such as through a bus 5002. Optionally, the electronic device 5000 may also include a transceiver 5004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 5004 is not limited to one, and the structure of the electronic device 5000 does not constitute a limitation on the embodiments of the present application.
[0171] Processor 5001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 5001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0172] The bus 5002 may include a path to transmit information between the above components. The bus 5002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 5002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0173] The memory 5003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0174] The memory 5003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 5001. The processor 5001 is used to execute the computer program stored in the memory 5003 to implement the steps shown in the above method embodiment.
[0175] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.
[0176] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.
[0177] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0178] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A collaborative signature method, applied to a client, characterized in that: include: Receive the server signature value and intermediate signature value sent by the server; Determine the client signature value based on the server signature value, the intermediate signature value and the first key of the client; wherein the first key is determined based on a hash value, and the hash value is determined based on the identity information identifier of the client and the public key identifier of the server; Determine a collaborative signature result based on the server signature value and the client signature value; The method further comprises: Receiving a first intermediate parameter and a second intermediate parameter sent by the server; When both the first intermediate parameter and the second intermediate parameter are not zero, determining the first key based on the first intermediate parameter and the second intermediate parameter; The first intermediate parameter is determined based on the second key of the server and the random number of the server identification; The second intermediate parameter is determined based on the second key, the hash value and an initial random number of the server.
2. The collaborative signature method according to claim 1, characterized in that: Before receiving the first intermediate parameter and the second intermediate parameter sent by the server, the method further includes: Based on the first key random number, generate a first key elliptic curve point; The first key elliptic curve point and the identity information identifier of the client are sent to the server, and the server is instructed to determine the public key identifier based on the first key elliptic curve point, and determine the hash value based on the public key identifier and the identity information identifier.
3. The collaborative signature method according to claim 1 or 2, characterized in that: After determining the collaborative signature result based on the server signature value and the client signature value, the method further includes: Determine the collaborative public key; Verifying the collaborative signature result according to the collaborative public key; The collaborative public key is determined based on the hash value, the public key identifier of the server and the initial public key.
4. The collaborative signature method according to claim 1 or 2, characterized in that: Before receiving the server signature value and the intermediate signature value sent by the server, the method further includes: Based on the first random number, determining a first elliptic curve point; The message digest of the message to be signed and the first elliptic curve point are sent to the server, instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point.
5. The collaborative signature method according to claim 4, characterized in that: The sending the message digest of the message to be signed and the first elliptic curve point to the server, and instructing the server to determine the server signature value and the intermediate signature value based on the message digest and the first elliptic curve point, includes: Sending the message digest of the message to be signed and the first elliptic curve point to the server, instructing the server to determine the server signature value based on the message digest and the second elliptic curve point, and determining the intermediate signature value based on the second key corresponding to the server and the server signature value; The second elliptic curve point is determined based on the first elliptic curve point, the second key and a second random number of the server.
6. The collaborative signature method according to claim 4, characterized in that: Before determining the first elliptic curve point based on the first random number, the method further includes: The message to be signed is preprocessed to obtain the message digest.
7. A collaborative signature device, characterized in that: include: The first receiving module is used to receive the server signature value and the intermediate signature value sent by the server; A first determination module, configured to determine a client signature value based on the server signature value, the intermediate signature value, and a first key corresponding to the client; wherein the first key is determined based on a hash value, and the hash value is determined based on an identity information identifier of the client and a public key identifier of the server; A collaborative signature module, used to determine a collaborative signature result based on the server signature value and the client signature value; A first key determination module, used for receiving a first intermediate parameter and a second intermediate parameter sent by the server; When both the first intermediate parameter and the second intermediate parameter are not zero, determining the first key based on the first intermediate parameter and the second intermediate parameter; The first intermediate parameter is determined based on the second key of the server and the random number of the server identification; The second intermediate parameter is determined based on the second key, the hash value and an initial random number of the server.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Signature method and device for generating SM2 algorithm through mutual coordination, and storage medium
CN109245903A
Lightweight certificateless authentication method, client and system
CN111245847A
SSL connection establishment method and device thereof, electronic equipment and computer readable storage medium
CN113904773A