A method and device for generating a bls negotiation key in a dynamically changing environment
By constructing simplified polynomials and using elliptic curve mapping in the dynamic blockchain environment, the high overhead problem in the key generation process of the BLS signature scheme is solved, achieving more efficient key negotiation and reducing communication and computation load.
Patent Information
- Application Number
- CN202411506766.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In the dynamic environment of blockchain, the BLS signature scheme incurs heavy communication and computational overhead in the key generation and distribution process, which limits its application in blockchain.
By constructing a polynomial and simplifying its coefficients, the communication and computational overhead of the verification process is reduced. A simplified key contribution and verification vector distribution mechanism is adopted, and the system private key is reconstructed using mapping on elliptic curves and Lagrange interpolation.
The communication overhead was reduced from O(n²·t) to O(n²), and the computation overhead was reduced from O(n) to O(1), thus improving the efficiency of the BLS signature scheme in dynamic environments.
Smart Images

Figure CN119483928B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security, and in particular to a method and apparatus for generating BLS negotiation keys in a dynamically changing environment. Background Technology
[0002] The BLS (Boneh-Lynn-Shacham) signature scheme plays a crucial role in blockchains. On one hand, BLS allows signatures from multiple signers to be aggregated into a single signature without requiring individual verification. This aggregated signature characteristic makes verifying transactions or contracts in a blockchain more efficient, reducing computational and storage costs and improving system throughput and performance. On the other hand, the aggregated signature size generated by the BLS scheme is fixed and independent of the number of participants. In contrast, traditional multi-signature schemes require storing and transmitting each individual signature, resulting in a signature size that is linearly related to the number of participants. In blockchains, signature size is critical for reducing storage requirements and network bandwidth. The BLS signature scheme optimizes signature size through aggregation, reducing storage and transmission overhead. Therefore, by using the BLS signature scheme, blockchains can achieve higher throughput and lower resource consumption, promoting the widespread application and development of blockchain technology.
[0003] In a decentralized blockchain environment, BLS relies on the DKG (Distributed Key Generation) protocol to achieve secure and reliable key generation and distribution. Since nodes in a distributed environment are not mutually trusted, (t,n)-DKG needs to detect and prevent malicious participants from tampering with or forging key shares through interactions and verification between participants. However, the interaction complexity between multiple participants is O(n^2). 2 Furthermore, each participant needs to broadcast its own verification vector of length t for verification. By combining the verification vectors, participants can verify the correctness of the received private key contributions. Therefore, the communication overhead required for DKG verification is O(n^t). 2 The computational cost is O(n). In the highly dynamic environment of public blockchain validators, the heavy communication and computational overhead limits the further application of the BLS signature scheme in blockchains.
[0004] Therefore, designing a more efficient and lightweight BLS key negotiation mechanism in a dynamically changing blockchain environment is a current research challenge in the blockchain field. This invention addresses this problem by proposing an algorithm for BLS key negotiation in a dynamically changing environment, effectively solving this challenge. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a method for generating BLS negotiation keys in dynamically changing environments.
[0006] The objective of this invention is achieved through the following technical solution: a method for generating BLS negotiation keys in a dynamically changing environment, comprising the following steps:
[0007] S1. Construct a polynomial for each participating node in the blockchain. In the polynomial, select a random number generator to generate a random constant term and a polynomial coefficient, and fix the polynomial coefficients other than the randomly generated ones to 1.
[0008] S2. Each participating node increments the ID value of the other nodes by 1 and then distributes it to each node by entering its own polynomial. It calculates the key contribution vector received by each participating node and calculates and distributes the verification vector.
[0009] S3. Verify the correctness of the key contribution based on the collected verification vector and contribution vector;
[0010] S4. Add the first element of the verification vector corresponding to the verified node to obtain the system public key, and add the key contributions of the verified nodes to obtain the aggregated key contribution. Forward the aggregated key contribution to other nodes and reconstruct the system private key using Lagrange interpolation.
[0011] Furthermore, the formula for the polynomial is as follows:
[0012]
[0013] Where, s∈Z t-1 Each participating node N i Choose a secure random number generator to generate t random polynomial coefficients. The degree of the polynomial is t-1. Fix t-2 random coefficients (excluding the constant term) of the t-1 polynomial coefficients to 1 to reduce the communication and computational overhead of the verification process.
[0014] Furthermore, the key contribution specifically includes:
[0015] Each participating node N i The id is i, and each participating node N i Other nodes N j After incrementing the id value by 1, we substitute it into the polynomial to obtain f. i (j+1), then f i (j+1) is distributed to each node N. j , where i, j∈Z n-1 Then for each participating node N j The key contribution vector it receives can be represented as
[0016] SC j =[f0(j+1),f1(j+1),…,f n-1 (j+1)]
[0017] Furthermore, the verification vector is node N. j The mapping of the corresponding polynomial coefficients on the elliptic curve BN128 is as follows:
[0018] V j =[a j,0 ·G, G, ..., a j,s ·G,…,G]
[0019] Among them, a j,0 ·G represents N j The mapping of the constant term coefficients of the corresponding polynomial on the elliptic curve BN128; the verification vector of length t has t-2 terms that are constants 1·G.
[0020] Furthermore, the verification key contribution specifically includes:
[0021] X i,j =SC i [j]·G
[0022]
[0023] If X i,j =Y i,j Then participating node N i It is possible to prove node N j The sent f j (i+1) is the correct value for each participating node N. i Calculate Y i,j At that time, only a needs to be calculated. j,0 ·G+(i+1) s a j,s The value of G, Obtained through pre-calculation.
[0024] Furthermore, S4 specifically includes:
[0025] Each participating node N i First, sum the first elements of the verification vectors corresponding to all successfully verified nodes to obtain the system public key; if the key contributions sent by n nodes are all correct, then the system public key is represented as follows:
[0026]
[0027] Then, each participating node N iAdd all verified key contributions together to obtain the aggregated key contribution, denoted as:
[0028]
[0029] The aggregated key contribution is then forwarded to other nodes; each participating node receives t S from other nodes. i The system private key SK is reconstructed using Lagrange interpolation and is represented as:
[0030]
[0031] in is the Lagrange multiplier.
[0032] On the other hand, this specification also provides a BLS negotiation key generation apparatus in a dynamically changing environment, including a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements the BLS negotiation key generation method in a dynamically changing environment.
[0033] On the other hand, this specification also provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the BLS negotiation key generation method in a dynamically changing environment.
[0034] The beneficial effects of this invention are as follows: Addressing the heavy communication and computational overhead of the BLS algorithm during key negotiation, this invention proposes an algorithm for BLS key negotiation in dynamically changing environments. By simplifying the polynomial coefficients, the size of the verification vector used for distribution by each participating node during the key distribution process is simplified to a constant of 2. Benefiting from the above design, this invention can reduce the communication overhead from O(n^2) to O(n^2) / O ... 2 ·t) is reduced to O(n) 2 Meanwhile, since the verification elements of t-2 terms are all constants 1·G, most of the verification operations can be completed through pre-computation, thereby reducing the computational cost from O(n) to O(1). Attached Figure Description
[0035] Figure 1 A flowchart illustrating a BLS key negotiation method in a dynamically changing environment, provided as an embodiment of the present invention;
[0036] Figure 2 A schematic diagram of a BLS key negotiation device in a dynamically changing environment is provided as an embodiment of the present invention. Detailed Implementation
[0037] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0038] like Figure 1 As shown, embodiments of the present invention may include the following steps:
[0039] Parameter definition: Define an elliptic curve, the total number of participating nodes in the system, and the minimum number of participants required to reach consensus. Specifically, let G be a base point on the elliptic curve BN128, the total number of participating nodes in the system be n, and the minimum number of participants required to reach consensus be t.
[0040] Polynomial generation: Each participating node generates a polynomial through a secure random number generator.
[0041] Specifically, each participating node N i Choose a secure random number generator to generate t random polynomial coefficients. The independent variable of the polynomial is x, and the degree is t-1. For example, x... s Let represent a polynomial with independent variable x and degree s. The polynomial has the following form:
[0042]
[0043] Unlike the original DKG scheme, this invention, during polynomial construction, fixes t-2 random coefficients (excluding the constant term) of the t-1 polynomial coefficients to 1, thereby reducing the communication and computational overhead of the verification process. Where s∈Z t-1 , representing a randomly selected non-zero coefficient polynomial x s The number of times.
[0044] Key contribution calculation and distribution: Each participating node calculates its key contribution using the polynomial generated in the previous step and its ID, and then distributes it to the corresponding node.
[0045] Specifically, assuming each participating node N i The id is i, and each participating node N i Other nodes N j After incrementing the id value by 1, we substitute it into the polynomial to obtain f. i (j+1), then f i (j+1) is distributed to each node N. j , where i, j∈Z n-1 Then for each participating node N j The key contribution vector it receives can be represented as
[0046] SC j =[f0(j+1),f1(j+1),…,f n-1 (j+1)]
[0047] Validation vector calculation and distribution: Each participating node obtains a validation vector by mapping the polynomial coefficients onto an elliptic curve, and then distributes it to each node.
[0048] Specifically, in order to facilitate each participating node N i Verification from other node N j Key contribution f j The correctness of (i+1), N j It needs to broadcast its own verification vector. Technically, the verification vector is defined as node N. j The mapping of the corresponding polynomial coefficients to the elliptic curve BN128. Therefore, it can be expressed as:
[0049] V j =[a j ,0·G,G,…,a j,s ·G,…,G]
[0050] Among them, a j,0 ·G represents N j The mapping of the constant term coefficients of the corresponding polynomial on the elliptic curve BN128, specifically, the mapping of a j,0 Treating this as a scalar, a scalar multiplication operation is performed with the base point G of the elliptic curve, the result of which is a new point on the elliptic curve. Since the verification vector of length t contains t-2 terms that are constants 1·G, therefore N j Only need to broadcast a j,0 ·G and a j,s G can then assist other nodes in completing the verification. This significantly reduces the communication overhead during the verification vector distribution process. Note that steps three and four are performed in parallel.
[0051] Key contribution verification: Each participating node verifies the correctness of its key contribution based on the verification vectors sent by other nodes. In this phase, participating node N... i The correctness of the key contribution is verified using the collected verification vectors. The verification process is as follows:
[0052] X i,j =SC i [j]·G
[0053]
[0054] If X i,j =Y i,j Then participating node N i It is possible to prove node N j The sent f j (i+1) is the correct value. This invention simplifies the complexity of the verification vector V, therefore for each participating node N... i In terms of its calculation of Yi,j At that time, only a needs to be calculated. j,0 ·G+(i+1) s a j,s The value of G, It can be obtained through pre-computation, eliminating the need to execute it for each verification, which greatly reduces the computational overhead in the verification process.
[0055] Key generation: Each participating node sums the first element of the verification vector to obtain the system public key; the key contributions are summed and then Lagrange interpolation is performed to obtain the system private key.
[0056] In this phase, each participating node N i First, sum the first elements of the verification vectors corresponding to all successfully verified nodes to obtain the system public key. Assuming that the key contributions sent by all n nodes are correct, the system public key can be represented as...
[0057]
[0058] Then, each participating node N i Add all verified key contributions together to obtain the aggregated key contribution, denoted as:
[0059]
[0060] These aggregated key contributions are then forwarded to other nodes. Each participating node only needs to receive t S from other nodes. i The system private key SK can then be reconstructed using Lagrange interpolation, and represented as...
[0061]
[0062] in is the Lagrange multiplier.
[0063] Corresponding to the aforementioned embodiment of a BLS negotiation key generation method in a dynamically changing environment, the present invention also provides an embodiment of a BLS negotiation key generation apparatus in a dynamically changing environment.
[0064] See Figure 2 The present invention provides a BLS negotiation key generation device in a dynamically changing environment, comprising a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it is used to implement a BLS negotiation key generation method in a dynamically changing environment as described in the above embodiment.
[0065] The embodiment of the BLS negotiation key generation device in a dynamically changing environment provided by this invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 2 The diagram shown is a hardware structure diagram of any data processing-capable device where a BLS negotiation key generation device is located in a dynamically changing environment, as provided by the present invention. (Except for...) Figure 2 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0066] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0067] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0068] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a BLS negotiation key generation method in a dynamically changing environment as described in the above embodiments.
[0069] The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0070] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for generating BLS negotiation keys in a dynamically changing environment.
[0071] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0072] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. This application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for generating BLS negotiation keys in a dynamically changing environment, characterized in that, Includes the following steps: S1. Construct a polynomial for each participating node in the blockchain. In the polynomial, select a random number generator to generate a random constant term and a polynomial coefficient, and fix the polynomial coefficients other than the randomly generated ones to 1. S2. Each participating node increments the ID value of the other nodes by 1 and then distributes it to each node by entering its own polynomial. It calculates the key contribution vector received by each participating node and calculates and distributes the verification vector. S3. Verify the correctness of the key contribution based on the collected verification vector and contribution vector; S4. Add the first element of the verification vector corresponding to the verified node to obtain the system public key, and add the key contributions of the verified nodes to obtain the aggregated key contribution. Forward the aggregated key contribution to other nodes and reconstruct the system private key using Lagrange interpolation.
2. The method for generating BLS negotiation keys in a dynamically changing environment according to claim 1, characterized in that, The formula for the polynomial is as follows: Where x s This represents a polynomial with degree s and independent variable x, where s∈Z. t-1 The table shows a randomly selected non-zero coefficient polynomial x. s The number of times, for each participating node N i Choose a secure random number generator to generate t random polynomial coefficients; the degree of the polynomial is t-1. Fix t-2 random coefficients (excluding the constant term) of the t-1 polynomial coefficients to 1 to reduce the communication and computational overhead of the verification process.
3. The method for generating a BLS negotiation key in a dynamically changing environment according to claim 1, characterized in that, The key contribution specifically refers to: Each participating node N i The id is i, and each participating node N i Other nodes N j After incrementing the id value by 1, we substitute it into the polynomial to obtain f. i (j+1), then f i (j+1) is distributed to each node N. j , where i, j∈Z n-1 Then for each participating node N j The key contribution vector it receives can be represented as SC j =[f0(j+1),f1(j+1),…,f n-1 (j+1)]。 4. The method for generating a BLS negotiation key in a dynamically changing environment according to claim 1, characterized in that, The verification vector is node N. j The mapping of the corresponding polynomial coefficients on the elliptic curve BN128 is as follows: V j =[a j,0 ·G,G,…,a j,s ·G,…,G] Among them, a j,0 ·G represents N j The mapping of the constant term coefficients of the corresponding polynomial on the elliptic curve BN128; the verification vector of length t has t-2 terms that are constants 1·G.
5. A method for generating a BLS negotiation key in a dynamically changing environment according to claim 4, characterized in that, The specific contribution of the verification key is as follows: X i,j =SC i [j]·G If X i,j =Y i,j Then participating node N i It is possible to prove node N j The sent f j (i+1) is the correct value for each participating node N. i Calculate Y i,j At that time, only a needs to be calculated. j,0 ·G+(i+1) s a j,s The value of G, Obtained through pre-calculation.
6. The method for generating a BLS negotiation key in a dynamically changing environment according to claim 1, characterized in that, S4 specifically includes: Each participating node N i First, sum the first elements of the verification vectors corresponding to all successfully verified nodes to obtain the system public key; if the key contributions sent by n nodes are all correct, then the system public key is represented as follows: Then, each participating node N i Add all verified key contributions together to obtain the aggregated key contribution, denoted as: The aggregated key contribution is then forwarded to other nodes; each participating node receives t S from other nodes. i The system private key SK is reconstructed using Lagrange interpolation and is represented as: in is the Lagrange multiplier.
7. A BLS negotiation key generation apparatus for a dynamically changing environment, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that, When the processor executes the executable code, it implements a BLS negotiation key generation method in a dynamically changing environment as described in any one of claims 1-6.
8. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements a BLS negotiation key generation method in a dynamically changing environment as described in any one of claims 1-6.
Citation Information
Patent Citations
On-chain digital asset management method and device
CN112132560A
Decentralized key generation and distribution over a blockchain-based network
US20220038264A1