A method and system for generating a pseudo-distributed SM9 fast identification key
By using the mimicry distributed SM9 fast identification key generation method and heterogeneous executor in the distributed identification key generation system, the problems of key hosting and resource waste in traditional systems are solved, and the security of key generation is improved and efficiency.
Patent Information
- Application Number
- CN202210805840.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-08
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-07-08
AI Technical Summary
The traditional distributed identification key generation system has key hosting problems and waste of resources. When an attacker successfully attacks one KGC, the security of other KGCs is difficult to guarantee, resulting in the risk of master private key leakage.
The mimicry distributed SM9 fast identification key generation method is adopted, and a heterogeneous executor is used to replace the traditional KGC server, and a dynamic task allocation mechanism is introduced to improve the security of KGC and the efficiency of key generation.
Through the heterogeneous executor and task dynamic allocation mechanism, the security and efficiency of key generation are improved, the risk of key hosting is reduced, and resource waste is avoided.
Smart Images

Figure CN115174069B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security technology and relates to a method and system for generating a pseudo-distributed SM9 fast identification key. Background Art
[0002] In the traditional public key cryptography infrastructure (PKI) system, public keys are usually managed by third-party trusted institutions using certificates. During the communication process, both parties need to retrieve and verify each other's public key certificates. In addition, a series of cumbersome processes such as certificate application, management, and maintenance hinder the widespread application of PKI. The emergence of the identity-based token cryptography (IBC) system has alleviated this problem. The user's mobile phone number, email address, IP address, etc. can all become their public key without the need for a certificate. In the identity-based token cryptography system, the private keys of all users are uniformly generated by the key generation center (KGC). The private keys of all users can be obtained by stealing the master private key of the KGC. Therefore, the token key system has the problem of key escrow.
[0003] The most common way to solve the key escrow problem is to use a distributed key generation center for key generation, that is, to use multiple KGCs to jointly generate user private keys. Each KGC is only responsible for the generation of part of the private key, and only when a certain number or all of the KGCs are generated can the user's real private key be combined. Therefore, the leakage of a single or a small number of KGCs will not pose a threat to the security of the private key. However, the traditional distributed identity key generation system also has some shortcomings. For example, if all KGCs use a homogeneous system, if an attacker successfully attacks one KGC, the security of other KGCs is difficult to guarantee, so the master private key is still at risk of leakage. Secondly, for the distributed identity key generation algorithm with threshold secret sharing, the private key can be synthesized by obtaining private key fragments above the threshold value, while the existing method is that all KGCs will generate and send private key fragments, which leads to resource waste and low key generation efficiency in the key generation process.
[0004] In view of the above problems, the present invention proposes a distributed fast SM9 identification key generation method based on the mimicry idea. The method uses heterogeneous executors to replace traditional KGC servers and introduces a dynamic task allocation mechanism to further improve the security of KGC and improve the generation efficiency of identification keys. In the present invention, Jaccard distance is used to measure the heterogeneity between executors. The specific calculation method can be found in the journal article (Wu Ying, Hu Chengnan, Chen Qingnan, Chen Anbang, Zheng Qiuhua. Defense-enhanced dynamic heterogeneous redundant architecture based on executor partitioning [J]. Journal of Communications, 2021, 42(03): 122-134.). The distributed key generation algorithm used by the key generation module of the present invention adopts the method disclosed in the patent with publication number CN113079003A and invention name A distributed SM9 key generation method and system. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for generating a pseudo-distributed SM9 fast identification key.
[0006] A method for generating a pseudo-distributed SM9 fast identification key comprises the following steps:
[0007] Step 1: System initialization:
[0008] First, determine the number m of heterogeneous executors in the executor building module, the computing power index {γ1,γ2…r m}, the total heterogeneity of the execution body μ; determine the system scheduling period T in the execution body scheduling module, the number of execution bodies n in the service body S; determine the parameter group G used by the SM9 algorithm in the key generation module, the threshold value t of the distributed key generation algorithm, t <n。
[0009] Among them, the number of heterogeneous executors m≥n+1, the executor computing power index The number of cpu cores is determined by the cpu hardware of the executor, the IO time is the time required for the executor to communicate, and the CPU time is the time required for the executor to calculate; the system scheduling cycle T is the cycle for replacing the executor in the service body S.
[0010] Then, a heterogeneous executable set is constructed: each layer of software determines two or more product versions to form the component set of the software; under the premise of meeting the software compatibility, the product versions in the component set are combined to form a total of m heterogeneous executables, which constitute the heterogeneous executable set of the system. Each executable includes an operating system, a database software, a server software and a background scripting language.
[0011] Step 2, system operation: After determining the system parameters, the execution body scheduling module executes the scheduling algorithm SA, the task allocation module executes the allocation algorithm DA, and the system starts the identification key generation task. The specific steps are as follows:
[0012] Step 2.1: The execution body scheduling module first randomly selects n execution bodies {E1, E2…E n}, and use Jaccard distance to calculate the heterogeneity μ of n execution bodies n If μ n <μ, then reselect the execution body until μ n ≥μ; n executive bodies constitute the service body S.
[0013] Step 2.2: The identification key generation module first determines the master private key msk of SM9, which is jointly determined by the n execution bodies in the server body S. Specifically, each execution body selects a random value x i, and then share it with other n-1 executors in the form of repeated secret sharing. Each executor will obtain n repeated secret sharing shards, and each executor adds up all secret shards to obtain the global repeated secret sharing shard σ i , the fragments are combined into a secret σ = x1 + x2… + x n Each execution body then converts x i As input, the secret sharing shard conversion algorithm is run locally, and finally each executor holds the master private key shard {msk1,msk2…msk n Among them, the secret recovery threshold is t, that is, only by obtaining t msk secret fragments can the real master private key msk be calculated.
[0014] Step 2.3, the task assignment module assigns the private key generation task: After receiving the identification key generation task, the task assignment module will send the identification to all executors, and will specify some executors to perform private key fragment synthesis according to the allocation algorithm DA. The unspecified executors will only perform partial key operations.
[0015] Step 2.4, the key generation module processes the private key generation task: The private key generation is divided into two steps. In the first step, all the executors in the server S will participate. Each executor will generate a pseudo-random Shamir secret shard z with a threshold value of 2t according to the received task ID. i , and complete the secret sharing to obtain the secret z. In the second step, only the marked execution body participates, and each execution body will eventually generate a private key fragment with an identification ID The key combination center synthesizes the complete private key based on the received private key fragments.
[0016] Step 3: System reset: After the system runs for a period of T, the executive body in the system service body S is cleaned and replaced. The specific steps are as follows:
[0017] Step 3.1, stop receiving the private key generation task, go to step 2.1 and reselect n execution bodies {E1′,E2′,,,E n ′}.
[0018] Step 3.2: The execution body {E1, E2,,, E n}Save {x i ,msk i} are passed to the new executable body {E1′, E2′,,,E n ′}, the new execution body re-composes the service body S. Reset the execution body {E1, E2,,, E n} and put it back into the execution set.
[0019] Step 3.3, restart the reception of the private key generation task and go to step 2.3.
[0020] Furthermore, the total heterogeneity μ of the executables is calculated based on the constructed set of executables, and the heterogeneity between the executables is measured using the Jaccard distance. Where m is the number of heterogeneous execution bodies in the system, C is the number of combinations, Jac(E i ,E j ) represents the computational execution body E i and E j The Jaccard distance between them.
[0021] The further step 2.3 specifically comprises the following steps:
[0022] Step 2.3.1, the task allocation module saves the free computing power of all executors in the current server S {a1, a2…a m} and the used computing power {b1,b2…b m}, where the computing power index γ i =a i +b i . The allocation algorithm DA first arranges the executors from large to small according to the number of free computing power, and selects the first t executors in turn. If the number of free computing power is equal during the selection process, they are arranged from small to large according to the number of used computing power and selected in turn. If the number of used computing power is still equal, they are randomly selected. Finally, the allocation algorithm selects t executors and marks them, and increases the number of used computing power of these t executors by one and decreases the number of free computing power by one.
[0023] Step 2.3.2: The task allocation module sends the identification ID and the execution body marking information in the task to all the execution bodies in the server body S.
[0024] Furthermore, the step 2.4 specifically includes the following steps:
[0025] Step 2.4.1. After each executor receives the task ID, it calculates y i =msk i +H(ID), where msk i For the executive body E i The master private key shard held, H(ID) is the hash function specified in the SM9 algorithm, and the calculation result y i It is also a Shamir secret shard with a threshold value of t.
[0026] Step 2.4.2: Each executor runs the secret sharing shard conversion algorithm locally once, converting the duplicate secret sharing shards σ i Convert to a pseudo-random Shamir secret shard ri , r i is the Shamir secret shard with a threshold value of r of t. Step 2.4.3, n executors jointly run a semi-honest distributed multi-party multiplication protocol to share z i =y i *r i , and finally each executor can obtain the product of secret y and secret r z = y*r through Lagrange interpolation. At this time, the unmarked executor stops the current task and starts processing the new task. The marked executor continues with the following steps.
[0027] Step 2.4.4. Each execution body calculates ω i =1-H(ID)*r i / z,ω i That is the Shamir secret fragment of secret msk / (msk+H(ID)).
[0028] Step 2.4.4, each executive will ω i Multiply it once with the generator of the elliptic curve specified by the SM9 algorithm to get a new point on the elliptic curve, that is That is, the private key S of the ID ID The Shamir secret fragment. Sent to the key combination center.
[0029] Step 2.4.5: The key combination center obtains t copies of S ID The Shamir secret shard is finally used to obtain the private key S of the ID through Lagrange interpolation. ID .
[0030] Step 2.4.6: The key combination center feeds back the private key generation result of the identification ID to the task allocation module. After receiving the feedback result, the task allocation module reduces the used computing power corresponding to the execution body marked by the task by one and increases the free computing power by one. At the same time, if the private key generation of the identification ID fails, the task is reallocated.
[0031] The above method is implemented based on the following system, which includes an executive body construction module, an executive body scheduling module, a task allocation module, and a key generation module;
[0032] Executor construction module: responsible for selecting corresponding components from different component sets to form different heterogeneous executables, each of which has complete KGC server functions. All executables constitute the system's executable set E = {E1, E2…E m}.
[0033] Executor scheduling module: According to the scheduling algorithm SA, n executors are selected from the executor set E to form a service body S, and finally the service body S is put online to participate in the key generation task.
[0034] Task allocation module: responsible for allocating identification key generation tasks to the executors in the server S. According to the allocation algorithm DA, all executors will participate in the initial identification key calculation, but only the specified part of the executors will complete the generation and sending of the private key fragments in the end.
[0035] Key generation module: responsible for writing the system parameters and generation algorithm required for distributed key generation into the execution body in the server body S, and ensuring the smooth progress of the private key generation task.
[0036] The present invention introduces a pseudo-heterogeneous executive body, so that the security of the master private key in the identification cryptographic system is further guaranteed. Selecting an executive body for private key synthesis based on a threshold value can avoid the waste of computing resources, shorten the key generation time, and improve the key generation efficiency. Setting a scheduling cycle to dynamically update the service body can increase the difficulty of detection for attackers and improve the security of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is the system architecture diagram;
[0038] Figure 2 Example diagram for selecting heterogeneous versions of executable software. DETAILED DESCRIPTION
[0039] like Figure 1 As shown, a pseudo-distributed SM9 fast identification key generation system includes an execution body construction module, an execution body scheduling module, a task allocation module, and a key generation module; the execution body construction module generates heterogeneous execution bodies for the execution body scheduling module to call, the execution body scheduling module schedules some execution bodies to form service bodies according to the scheduling algorithm SA for use by the key generation module, the task allocation module receives the identification key generation task and allocates the task to the service body in the key generation module according to the allocation algorithm DA, and the key generation module generates an identification private key according to the distributed identification key generation algorithm.
[0040] Executor construction module: responsible for selecting corresponding components from different component sets to form different heterogeneous executables, each of which has complete KGC server functions. All executables constitute the system's executable set E = {E1, E2…E m}.
[0041] Executor scheduling module: According to the scheduling algorithm SA, n executors are selected from the executor set E to form a service body S, and finally the service body S is put online to participate in the key generation task.
[0042] Task allocation module: responsible for allocating identification key generation tasks to the executors in the server S. According to the allocation algorithm DA, all executors will participate in the initial identification key calculation, but only the specified part of the executors will complete the generation and sending of the private key fragments in the end.
[0043] Key generation module: responsible for writing the system parameters and generation algorithm required for distributed key generation into the execution body in the server body S, and ensuring the smooth progress of the private key generation task.
[0044] Based on the above system, there is a method for generating a pseudo-distributed SM9 fast identification key, which specifically includes the following steps:
[0045] Step 1: System initialization: determine system parameters and build a set of heterogeneous execution bodies.
[0046] Step 1.1. Determine system parameters: Determine the number m of heterogeneous executors in the executor building module, the computing power index {γ1,γ2…r m}, the total heterogeneity of the execution body μ; determine the system scheduling period T in the execution body scheduling module, the number of execution bodies n in the service body S; determine the parameter group G used by the SM9 algorithm in the key generation module, and the threshold value t(t <n)。
[0047] The number of heterogeneous executors is m ≥ n + 1, and the executor computing power index γ represents the number of key generation tasks that the executor can participate in at the same time, such as γ i =4 represents the executive body E i A maximum of 4 threads can be generated to participate in the generation of 4 different identification keys.
[0048] Executor power index
[0049] Among them, the number of cpu cores is determined by the cpu hardware of the executor, the IO time is the time required for the executor to communicate, and the CPU time is the time required for the executor to calculate; the IO time and CPU time can be determined by performing a distributed key generation test on the executor before the system goes online.
[0050] The system scheduling cycle T is the cycle for replacing the executor in the service body S. The total heterogeneity μ of the executors is calculated based on the constructed executor set, and the Jaccard distance is used to measure the heterogeneity between the executors. The larger the Jaccard distance between two executors, the stronger the heterogeneity.
[0051] Where m is the number of heterogeneous execution bodies in the system, C is the number of combinations, Jac(E i ,E j ) represents the computational execution body E i and Ej The Jaccard distance between them.
[0052] Step 1.2, build a set of heterogeneous executive bodies: Heterogeneous executive bodies are KGC server systems with complete components and functions. Each executive body can perform communication transmission, function calculation and data storage. Among them, heterogeneity is reflected in the heterogeneity of the four layers of software: operating system, database software, server software and background script language.
[0053] The specific construction steps are as follows:
[0054] First, determine the component set: According to the four-layer software types (operating system, database software, server software, and background scripting language), first obtain the corresponding product version information from the common platform enumeration (CPE) database. In order to make the executable body built subsequently have strong heterogeneity, each layer of software should select at least two products from different platforms or different manufacturers, and when selecting each product version, avoid selecting multiple similar versions. The specific selection method can be achieved by clustering the vulnerability similarity of each product version or selecting a version that is relatively recognized by the industry. Finally, each layer of software should determine more than two product versions to form the component set of the software.
[0055] Then, an executable set is formed: each executable includes an operating system, a database software, a server software and a background scripting language. According to the determined component set, the product versions in the component set are combined under the premise of meeting the software compatibility, and a total of m heterogeneous executables constituting the system heterogeneous executable set are formed.
[0056] In this embodiment, through vulnerability similarity clustering selection and comprehensive evaluation, 4 operating systems, 3 server software, 3 background scripting languages and 3 database software were finally selected. The detailed software version examples are as follows: Figure 2 As shown. Under the premise of meeting compatibility, a total of 35 heterogeneous executables are built. For example, if you select the four software versions {windows_server_2019; nginx:1.13.8; python:3.5.0; mysql:8.0.1}, you can build an executable. The 35 heterogeneous executables built in this way constitute the heterogeneous executable set of the system.
[0057] After the construction is completed, the performance of all heterogeneous executors is tested to obtain the computing power indicators of all executors {γ1=8,γ2=7…r 35 =5}, and use The total heterogeneity of the executor is calculated to be μ=0.6, the system scheduling cycle is set to T=1 day, the number of executors in the service body is n=5, the parameter group C used by the SM9 algorithm is detailed in the SM9 national standard document, the threshold value of the distributed key generation algorithm is t=3, and it can be seen that the key combination center can only synthesize a complete private key if it obtains more than or equal to 3 private key fragments.
[0058] Step 2, system operation: After determining the system parameters, the execution body scheduling module executes the scheduling algorithm SA, and the task allocation module executes the allocation algorithm DA, and the system can start the identification key generation task. The specific steps are as follows:
[0059] Step 2.1: The execution body scheduling module first randomly selects n execution bodies {E1, E2…E n}, and calculate the heterogeneity μ of these n execution bodies n , the calculation method is also based on the Jaccard distance. n <μ, then reselect the execution body until μ n ≥μ. n executive bodies constitute the service body S.
[0060] In this embodiment, the five executors selected are {E1, E2, E3, E4, E5}, the computing power indicators of these five executors are {γ1=8, γ2=7, γ3=3, γ4=7, r5=5}, and the calculated heterogeneity μ5=0.76>μ, so these five executors can form a service body S.
[0061] Step 2.2: The identification key generation module first determines the master private key msk of SM9. msk is jointly determined by n execution bodies in the service body S. The specific steps are as follows:
[0062] Each execution body selects a random value x i , and then share it with other n-1 executors in the form of repeated secret sharing. Each executor will obtain n repeated secret sharing shards, and each executor adds up all secret shards to obtain the global repeated secret sharing shard σ i , the shards can be combined into a secret σ = x1 + x2… + x n Each execution body then converts x i As input, the secret sharing shard conversion algorithm is run locally, and finally each executor holds the master private key shard {msk1,msk2…msk n The secret recovery threshold is t, that is, only by obtaining t msk secret fragments can the real master private key msk be calculated.
[0063] In this embodiment, the service bodies {E1, E2, E3, E4, E5} will participate in the above process and jointly negotiate to determine the system's master private key msk. Each execution body will retain its own generated random value x i and secret shard σ i .
[0064] Step 2.3, the task assignment module assigns the private key generation task: After receiving the identification key generation task, the task assignment module will send the identification to all executors, and will designate some executors to perform private key fragment synthesis according to the allocation algorithm DA. The undesignated executors will only perform partial key operations. The specific steps are as follows:
[0065] Step 2.3.1, the task allocation module saves the free computing power of all executors in the current server S {a1, a2…a m} and the used computing power {b1,b2…b m}, where the computing power index γ i =a i +b i . The allocation algorithm DA first arranges the executors from large to small according to the number of free computing power, and selects the first t+1 executors in turn. If the number of free computing power is equal during the selection process, they are arranged from small to large according to the number of used computing power and selected in turn. If the number of used computing power is still equal, they are randomly selected. Finally, the allocation algorithm selects t+1 executors and marks them, and increases the used computing power of these t+1 executors by one and decreases the free computing power by one.
[0066] Step 2.3.2: The task allocation module sends the identification ID and the execution body marking information in the task to all the execution bodies in the server body S.
[0067] In this embodiment, after the system has been running for a period of time, the free computing power of the executable body saved by the task allocation module is {a1=4, a2=4, a3=2, a4=6, a5=4} and the used computing power is {b1=4, b2=3, b3=1, b4=1, b5=1}. According to the allocation algorithm DA, when the task allocation module receives the identification key to generate the task ID i When {E4,E1,E2} is marked, these three executables will be ID i Generate a private key fragment.
[0068] Step 2.4, the key generation module processes the private key generation task: The private key generation is divided into two steps. In the first step, all the executors in the server S will participate. Each executor will generate a pseudo-random Shamir secret shard z with a threshold value of 2t according to the received task ID. i, and complete the secret sharing to obtain the secret z. In the second step, only the marked execution body participates, and each execution body will eventually generate a private key fragment with an identification ID And send it to the key combination center. The key combination center synthesizes the complete private key based on the received private key fragments. The specific steps are as follows:
[0069] Step 2.4.1. After each executor receives the task ID, it calculates y i =msk i +H(ID), where msk i For the executive body E i The master private key shard held, H(ID) is the hash function specified in the SM9 algorithm, and the calculation result y i It is also a Shamir secret shard with a threshold value of t.
[0070] Step 2.4.2: Each executor runs the secret sharing shard conversion algorithm locally once, converting the duplicate secret sharing shards σ i Convert to a pseudo-random Shamir secret shard r i , r i is the Shamir secret fragment with a threshold value of r of t.
[0071] Step 2.4.3: n executors jointly run a semi-honest distributed multi-party multiplication protocol to share z i =y i *r i , and finally each executor can obtain the product of secret y and secret r z = y*r through Lagrange interpolation. At this time, the unmarked executor stops the current task and starts processing the new task. The marked executor continues with the following steps.
[0072] Step 2.4.4. Each execution body calculates ω i =1-H(ID)*r i / z,ω i That is the Shamir secret fragment of secret msk / (msk+H(ID)).
[0073] Step 2.4.4, each executive will ω i Multiply it once with the generator of the elliptic curve specified by the SM9 algorithm to get a new point on the elliptic curve, that is That is, the private key S of the ID ID The Shamir secret fragment. Sent to the key combination center.
[0074] Step 2.4.5: The key combination center obtains t copies of S IDThe Shamir secret shard is finally used to obtain the private key S of the ID through Lagrange interpolation. ID .
[0075] Step 2.4.6: The key combination center feeds back the private key generation result of the identification ID to the task allocation module. After receiving the feedback result, the task allocation module reduces the used computing power corresponding to the execution body marked by the task by one and increases the free computing power by one. At the same time, if the private key generation of the identification ID fails, the task is reallocated.
[0076] In this embodiment, all the execution bodies in the service body will perform the first part of the calculation, and finally only the three execution bodies {E4, E1, E2} will be the identification ID i Generate and send private key fragment After receiving these three fragments, the key combination center can use the Lagrange interpolation method to obtain the identification ID i The full identity private key) ID The key combination center will ID i The information of successful private key generation is fed back to the task allocation module. After receiving the feedback, the task allocation module can update the computing power information of the three executors and arrange the next task.
[0077] Step 3: System reset. After the system runs for a period of T, the executive body in the system service body S is cleaned and replaced. The specific steps are as follows:
[0078] Step 3.1, stop receiving the private key generation task, go to step 2.1 and reselect n execution bodies {E1′,E2′,,,E n ′}.
[0079] Step 3.2: The execution body {E1, E2,,, E n}Save {x i ,msk i} are passed to the new executable body {E1′, E2′,,,E n ′}, the new execution body re-composes the service body S. Reset the execution body {E1, E2,,, E n} and put it back into the execution set.
[0080] Step 3.3, restart the reception of the private key generation task and go to step 2.3.
[0081] In this embodiment, the set scheduling period T=1 day, that is, the system will update the service body of the current system after one day, and the execution body scheduling module will reselect 5 execution bodies from the execution body set, such as {E 14 ,E 32 ,E8,E 11 ,E 24}. These five execution bodies form a new service body and start processing the identification key generation task.
[0082] The present invention is not limited to the above specific embodiments, and those skilled in the art may make various changes accordingly. However, any changes equivalent to or similar to the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for generating a pseudo-distributed SM9 fast identification key, characterized in that: The specific steps include: Step 1: System initialization: First, determine the number m of heterogeneous executors in the executor building module, the computing power index {γ1,γ2…r m }, the total heterogeneity of the executive body μ; determine the system scheduling period T in the executive body scheduling module and the number of executive bodies n in the service body S; Determine the parameter group G used by the SM9 algorithm in the key generation module and the threshold t of the distributed key generation algorithm, t <n; Among them, the number of heterogeneous executors m≥n+1, the executor computing power index The number of cpu cores is determined by the cpu hardware of the executor, the IO time is the time required for the executor to communicate, and the CPU time is the time required for the executor to calculate; the system scheduling cycle T is the cycle for replacing the executor in the service body S; Then, a heterogeneous executable set is constructed: each layer of software determines two or more product versions to form the component set of the software; under the premise of meeting the software compatibility, the product versions in the component set are combined to form a total of m heterogeneous executables, which constitute the heterogeneous executable set of the system; each executable includes an operating system, a database software, a server software and a background scripting language; Step 2, system operation: After determining the system parameters, the execution body scheduling module executes the scheduling algorithm SA, the task allocation module executes the allocation algorithm DA, and the system starts the identification key generation task. The specific steps are as follows: Step 2.1: The execution body scheduling module first randomly selects n execution bodies {E1, E2…E n }, and use Jaccard distance to calculate the heterogeneity μ of n execution bodies n If μ n <μ, then reselect the execution body until μ n ≥μ; n executive bodies constitute the service body S; Step 2.2: The identification key generation module first determines the master private key msk of SM9. msk is jointly determined by n execution bodies in the server body S. Specifically, each execution body selects a random value x i , and then share it with other n-1 executors in the form of repeated secret sharing; each executor will obtain n repeated secret sharing shards, and each executor will add up all secret shards to obtain the global repeated secret sharing shard σ i , the fragments are combined into a secret σ = x1 + x2… + x n ; Each execution body then converts x i As input, the secret sharing shard conversion algorithm is run locally, and finally each executor holds the master private key shard {msk1,msk2…msk n }; The secret recovery threshold is t, that is, only by obtaining t msk secret fragments can the real master private key msk be calculated; Step 2.3, the task assignment module assigns the private key generation task: After receiving the identification key generation task, the task assignment module will send the identification to all executors, and will designate some executors to perform private key fragment synthesis according to the assignment algorithm DA. The undesignated executors will only perform partial key operations; Step 2.4: The key generation module processes the private key generation task: The private key generation is divided into two steps. In the first step, all the executors in the server S will participate. Each executor will generate a pseudo-random Shamir secret shard z with a threshold value of 2t according to the received task ID. i , and complete the secret sharing to obtain the secret z; in the second step, only the marked execution body participates, and each execution body will eventually generate a private key fragment with an identification ID The private key is sent to the key combination center, which synthesizes the complete private key based on the received private key fragments. Step 3: System reset: After the system runs for a period of T, the executive body in the system service body S is cleaned and replaced. The specific steps are as follows: Step 3.1, stop receiving the private key generation task, go to step 2.1 and reselect n execution bodies {E1′,E2′,,,E n '}; Step 3.2: The execution body {E1, E2,,, E n }Save {x i ,msk i } are passed to the new executable body {E1′, E2′,,,E n ′}, the new execution body re-composes the service body S; reset the execution body {E1,E2,,,E n } and put it back into the execution set; Step 3.3, restart the reception of the private key generation task and go to step 2.
3.
2. The method for generating a pseudo-distributed SM9 fast identification key according to claim 1, characterized in that: The total heterogeneity μ of the executables is calculated based on the constructed set of executables, and the heterogeneity between the executables is measured using the Jaccard distance. Where m is the number of heterogeneous execution bodies in the system, C is the number of combinations, Jac(E i ,E j ) represents the computational execution body E i and E j The Jaccard distance between them.
3. The method for generating a pseudo-distributed SM9 fast identification key according to claim 1, characterized in that: The step 2.3 specifically includes the following steps: Step 2.3.1, the task allocation module saves the free computing power of all executors in the current server S {a1, a2…a m } and the used computing power {b1,b2…b m }, where the computing power index γ i =a i +b i ; The allocation algorithm DA first arranges the executables from large to small according to the number of free computing power, and takes the first t executables in turn; If the number of free computing power is equal during the selection process, the used computing power is arranged from small to large and selected in order; if the used computing power is still equal, it is randomly selected; the final allocation algorithm selects t executors and marks them, and increases the used computing power of these t executors by one and decreases the free computing power by one; Step 2.3.2: The task allocation module sends the identification ID and the execution body marking information in the task to all the execution bodies in the server body S.
4. The method for generating a pseudo-distributed SM9 fast identification key according to claim 1, characterized in that: The step 2.4 specifically includes the following steps: Step 2.4.
1. After each executor receives the task ID, it calculates y i =msk i +H(ID), where msk i For the executive body E i The master private key shard held, H(ID) is the hash function specified in the SM9 algorithm, and the calculation result y i It is also a Shamir secret shard with a threshold value of t; Step 2.4.2: Each executor runs the secret sharing shard conversion algorithm locally once, converting the duplicate secret sharing shards σ i Convert to a pseudo-random Shamir secret shard r i , r i is the Shamir secret fragment with a threshold value of r of t; Step 2.4.3: n executors jointly run a semi-honest distributed multi-party multiplication protocol to share z i =y i *r i , eventually each executor can obtain the product z=y*r of secret y and secret r through Lagrange interpolation method; at this time, the unmarked executor stops the current task and starts processing the new task; the marked executor continues with the following steps; Step 2.4.
4. Each execution body calculates ω i =1-H(ID)*r i / z,ω i That is, the Shamir secret fragment of secret msk / (msk+H(ID)); Step 2.4.4, each executive will ω i Multiply it once with the generator of the elliptic curve specified by the SM9 algorithm to get a new point on the elliptic curve, that is That is, the private key S of the ID ID Shamir's secret fragment; finally Send to the key combination center; Step 2.4.5: The key combination center obtains t copies of S ID The Shamir secret shard is finally used to obtain the private key S of the ID through Lagrange interpolation. ID ; Step 2.4.6, the key combination center feeds back the private key generation result of the identification ID to the task allocation module. After receiving the feedback result, the task allocation module reduces the used computing power corresponding to the executable body marked by the task by one and increases the free computing power by one. At the same time, if the private key generation of the identification ID fails, the task is reallocated.
5. The method for generating a pseudo-distributed SM9 fast identification key according to claim 1, characterized in that: Based on the following system implementation, the system includes an executive body construction module, an executive body scheduling module, a task allocation module, and a key generation module; Executor construction module: responsible for selecting corresponding components from different component sets to form different heterogeneous executables. Each executable has complete KGC server functions. All executables constitute the system's executable set E = {E1, E2…E m }; Executor scheduling module: According to the scheduling algorithm SA, n executors are selected from the executor set E to form a service body S, and finally the service body S is put online to participate in the key generation task; Task allocation module: responsible for allocating identification key generation tasks to the execution bodies in the server body S; According to the distribution algorithm DA, all executors will participate in the initial identification key calculation, but only a designated part of the executors will complete the generation and sending of the private key fragments in the end; Key generation module: responsible for writing the system parameters and generation algorithm required for distributed key generation into the execution body in the server body S, and ensuring the smooth progress of the private key generation task.
Citation Information
Patent Citations
Distributed SM9 key generation method and system
CN113079003A