Data processing method, apparatus, device, medium, and product
Patent Information
- Application Number
- CN202310091232.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-20
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-01-20
AI Technical Summary
[0004]本申请实施例提供一种数据处理方法、装置、设备、介质及产品,能够解决聚合签名验证的使用局限性较高的问题
[0017]This application provides a data processing method, apparatus, device, medium, and product. In a scenario where M first data points and their corresponding M digital signatures are obtained, and batch authentication of the M first data points is required, a Merkle tree aggregation is performed on the M digital signatures to obtain the first signatures of each layer of the Merkle tree nodes. Each layer of the Merkle tree nodes may include a root node, intermediate nodes, and M leaf nodes. The first signatures of the root node and intermediate nodes are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. Based on this, this application first verifies the first signature of the root node. If the first signature of the root node fails verification, it indicates that there is a failed digital signature among the M digital signatures, and problematic data exists among the M first data points. Therefore, in this scenario, based on the characteristics of the Merkle tree, when it is determined that the first signature of the root node obtained from the aggregation of the M digital signatures has failed verification, this application then verifies the first signatures of the intermediate nodes and leaf nodes layer by layer downwards, ultimately locating the leaf node among the M leaf nodes where the first signature has failed verification. This leaf node is the problematic node, and the first data corresponding to this problematic node is the problematic data. Thus, this application can combine Merkle tree and aggregate signature technology. When aggregate signature verification fails, Merkle tree technology can be used to quickly locate problematic data and realize the batch verification function of data. Therefore, even when using aggregate signature, problematic data in batch data can be successfully located, effectively reducing the limitations of aggregate signature technology.
Smart Images

Figure CN116070288B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a data processing method, apparatus, equipment, medium and product. Background Technology
[0002] Currently, digital signature technology is generally used to verify the authenticity and validity of data. However, when dealing with large amounts of data, verifying each digital signature individually is time-consuming and inefficient. Therefore, aggregate signature technology is often used to verify the authenticity and validity of data in batches. Aggregate signature combines the digital signatures of any number of data points into a single aggregate signature. By verifying this aggregate signature, the authenticity and validity of the data can be verified in batches, which can significantly reduce the time and cost of verifying the authenticity and validity of data.
[0003] In related technologies, when using aggregated signatures to verify data in batches, it is impossible to locate the problematic data in the batch data after the aggregated signature verification fails. Therefore, the use of aggregated signature verification has high limitations. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, medium, and product that can solve the problem of high limitations in the use of aggregated signature verification.
[0005] In a first aspect, embodiments of this application provide a data processing method, the method comprising:
[0006] Obtain M initial data points and their corresponding M digital signatures;
[0007] Merkle tree aggregation is performed on M digital signatures to obtain the first signature of each Merkle tree node at each level. Each Merkle tree node at each level includes a root node, intermediate nodes, and M leaf nodes. The first signature of the root node and intermediate nodes is the aggregated signature, and the first signature of the M leaf nodes is the digital signature.
[0008] Verify the first signature of the root node. If the first signature of the root node fails verification, verify the first signatures of the intermediate nodes and leaf nodes layer by layer downwards. Identify the problematic nodes among the M leaf nodes whose first signatures fail verification, and determine the first data corresponding to the problematic nodes as the problematic data.
[0009] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0010] The acquisition module is used to acquire M initial data points and their corresponding M digital signatures.
[0011] The aggregation module is used to perform Merkle tree aggregation on M digital signatures to obtain the first signature of each Merkle tree node. Each Merkle tree node includes a root node, an intermediate node, and M leaf nodes. The first signature of the root node and the intermediate node is the aggregated signature, and the first signature of the M leaf nodes is the digital signature.
[0012] The verification module is used to verify the first signature of the root node. If the first signature of the root node fails verification, the first signatures of the intermediate nodes and leaf nodes are verified layer by layer downwards. The module identifies the problematic nodes among the M leaf nodes whose first signatures have failed verification and determines the first data corresponding to the problematic nodes as problematic data.
[0013] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the steps of the data processing method shown in the first aspect.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the data processing method as described in the first aspect are implemented.
[0015] Fifthly, embodiments of this application provide a computer program product stored in a non-volatile storage medium, which, when executed by at least one processor, implements the steps of the data processing method as described in the first aspect.
[0016] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the data processing method as described in the first aspect.
[0017] This application provides a data processing method, apparatus, device, medium, and product. In a scenario where M first data points and their corresponding M digital signatures are obtained, and batch authentication of the M first data points is required, a Merkle tree aggregation is performed on the M digital signatures to obtain the first signatures of each layer of the Merkle tree nodes. Each layer of the Merkle tree nodes may include a root node, intermediate nodes, and M leaf nodes. The first signatures of the root node and intermediate nodes are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. Based on this, this application first verifies the first signature of the root node. If the first signature of the root node fails verification, it indicates that there is a failed digital signature among the M digital signatures, and problematic data exists among the M first data points. Therefore, in this scenario, based on the characteristics of the Merkle tree, when it is determined that the first signature of the root node obtained from the aggregation of the M digital signatures has failed verification, this application then verifies the first signatures of the intermediate nodes and leaf nodes layer by layer downwards, ultimately locating the leaf node among the M leaf nodes where the first signature has failed verification. This leaf node is the problematic node, and the first data corresponding to this problematic node is the problematic data. Thus, this application can combine Merkle tree and aggregate signature technology. When aggregate signature verification fails, Merkle tree technology can be used to quickly locate problematic data and realize the batch verification function of data. Therefore, even when using aggregate signature, problematic data in batch data can be successfully located, effectively reducing the limitations of aggregate signature technology. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic diagram illustrating an example application scenario of the data processing method provided in this application embodiment;
[0020] Figure 2 A flowchart of an embodiment of the data processing method provided in the first aspect of this application;
[0021] Figure 3 A flowchart of another embodiment of the data processing method provided in the first aspect of this application;
[0022] Figure 4 A flowchart of yet another embodiment of the data processing method provided in the first aspect of this application;
[0023] Figure 5 A schematic diagram illustrating an example of a Merkle tree provided for the first aspect of this application;
[0024] Figure 6A flowchart of yet another embodiment of the data processing method provided in the first aspect of this application;
[0025] Figure 7 A flowchart of yet another embodiment of the data processing method provided in the first aspect of this application;
[0026] Figure 8 A flowchart of yet another embodiment of the data processing method provided in the first aspect of this application;
[0027] Figure 9 A schematic diagram of the structure of an embodiment of the data processing apparatus provided in the second aspect of this application;
[0028] Figure 10 A schematic diagram of the structure of an embodiment of the electronic device provided in the third aspect of this application. Detailed Implementation
[0029] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0030] Currently, digital signature technology is generally used to verify the authenticity and validity of data. However, when dealing with large amounts of data, verifying each digital signature individually is time-consuming and inefficient. Therefore, aggregated signature technology is often used for batch verification of data authenticity and validity. Aggregated signatures combine the digital signatures of any number of data points into a single aggregated signature. By verifying this aggregated signature, the authenticity and validity of the data can be verified in batches, significantly reducing the time and cost of data verification. However, in scenarios where aggregated signatures are used for batch verification of data, if the aggregated signature verification fails, it is impossible to pinpoint the problematic data within the batch. Therefore, the use of aggregated signature verification has significant limitations.
[0031] In view of the above-mentioned problems, this application provides a data processing method, apparatus, device, medium and product that can combine Merkle tree and aggregate signature technology. When aggregate signature verification fails, Merkle tree technology can be used to quickly locate the problematic data and realize the batch verification function of data. Therefore, even if aggregate signature is used, problematic data in batch data can be successfully located, effectively reducing the limitations of aggregate signature technology.
[0032] It should be noted that the data processing methods in this application embodiment can be applied to fields including but not limited to the following: blockchain, certificate chains in public key infrastructure (PKI), radio frequency identification (RFID) technology for item tracking, secure routing protocols for wireless sensor networks (WSN), WSN data fusion, secure email, digital currency and secure transactions, electronic signatures, database outsourcing, dynamic content distribution, vehicle network information aggregation, log auditing, cloud computing and distributed systems.
[0033] The data processing method in this application embodiment can be applied to scenarios involving batch data verification in any of the aforementioned fields, and this data processing method may involve a blockchain system. The following is in conjunction with... Figure 1 The architecture in the embodiments of this application will be described in detail.
[0034] Figure 1 This is a schematic diagram illustrating an example of the application scenario of the data processing method provided in the embodiments of this application.
[0035] like Figure 1 As shown, the blockchain system includes multiple participating nodes 110 and an audit node 120. The audit node 120 is used to receive the data to be stored sent by the participating nodes 110, aggregate the digital signatures carried by the data to be stored to generate an aggregate signature, and then determine whether to save the data to be stored to the blockchain based on the verification result of the aggregate signature.
[0036] Among them, the participating node 110 can be an electronic device or server with digital signature function, and the auditing node 120 can be an electronic device or server with digital signature and aggregate signature verification functions.
[0037] In this embodiment of the application, the server can be a high-performance electronic calculator used to store and process data; the electronic device includes, but is not limited to, mobile phones, tablets, laptops, handheld computers, vehicle terminals, wearable devices, and pedometers.
[0038] The data processing method provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] The first aspect of this application provides a data processing method that can be applied to an audit node, meaning that the data processing method can be executed by the audit node. It should be noted that the aforementioned executing entity does not constitute a limitation on this application.
[0040] Figure 2A flowchart illustrating an embodiment of the data processing method provided in the first aspect of this application. (See flowchart for example.) Figure 2 As shown, the data processing method may include steps 210-230.
[0041] Step 210: Obtain M first data points and their corresponding M digital signatures.
[0042] Step 220: Perform Merkle tree aggregation on the M digital signatures to obtain the first signature of each Merkle tree node.
[0043] Each Merkle tree node consists of a root node, intermediate nodes, and M leaf nodes. The first signature of the root node and intermediate nodes is an aggregate signature, and the first signature of the M leaf nodes is a digital signature.
[0044] Step 230: Verify the first signature of the root node. If the first signature of the root node fails verification, verify the first signatures of the intermediate nodes and leaf nodes layer by layer downwards. Identify the problematic nodes among the M leaf nodes whose first signatures fail verification, and determine the first data corresponding to the problematic nodes as the problematic data.
[0045] The data processing method provided in this application, in a scenario where M first data items and their corresponding M digital signatures are obtained, and batch authentication of the M first data items is required, performs Merkle tree aggregation on the M digital signatures to obtain the first signatures of each layer of Merkle tree nodes. Each layer of Merkle tree nodes may include a root node, intermediate nodes, and M leaf nodes, wherein the first signatures of the root node and intermediate nodes are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. Based on this, this application first verifies the first signature of the root node. If the first signature of the root node fails verification, it indicates that there is a digital signature that has failed verification among the M digital signatures, and there is problematic data among the M first data items. Therefore, in this scenario, based on the characteristics of the Merkle tree, when it is determined that the first signature of the root node obtained by aggregating the M digital signatures has failed verification, this application then verifies the first signatures of the intermediate nodes and leaf nodes layer by layer downwards, finally locating the leaf node among the M leaf nodes where the first signature has failed verification. This leaf node is the problematic node, and the first data corresponding to this problematic node is the problematic data. Thus, this application can combine Merkle tree and aggregate signature technology. When aggregate signature verification fails, Merkle tree technology can be used to quickly locate problematic data and realize the batch verification function of data. Therefore, even when using aggregate signature, problematic data in batch data can be successfully located, effectively reducing the limitations of aggregate signature technology.
[0046] The specific implementation of the above steps will be described in detail below with reference to the embodiments.
[0047] Step 210 involves obtaining M first data points and their corresponding M digital signatures.
[0048] The audit node can receive M first data points and their corresponding M digital signatures sent by the participating nodes, where M is a positive integer. Each first data point can correspond to a digital signature, which can be generated by the participating node based on the first data point.
[0049] In some embodiments of this application, the first data obtained by the audit node may be preprocessed data.
[0050] In some embodiments of this application, the audit node can directly obtain the M first data and the digital signature corresponding to each first data when the number of M first data reaches a preset number.
[0051] In some other embodiments of this application, the audit node can directly obtain M first data and the digital signature corresponding to each first data if the reception time of the first first data reaches a preset time. The preset time can be set according to specific needs, and this application does not make specific limitations on it.
[0052] In some other embodiments of this application, the audit node can directly obtain the M first data and the digital signature corresponding to each first data if the reception time of the first first data reaches a preset time and the data quantity of the M first data reaches a preset quantity.
[0053] In some other embodiments of this application, the audit node can obtain M first data and the digital signature corresponding to each first data at preset time intervals.
[0054] In some embodiments of this application, in order to improve the verification efficiency of aggregated signatures, Figure 3 A flowchart of another embodiment of the data processing method provided in the first aspect of this application. Step 210 may specifically include... Figure 3 Steps 310-340 are shown.
[0055] Step 310: Obtain multiple first data points, as well as the data digest and digital signature corresponding to each first data point.
[0056] In some embodiments of this application, step 310 may include any of the following: the audit node may directly obtain multiple first data and the digital signature corresponding to each first data when the data quantity of multiple first data reaches a preset quantity; the audit node may directly obtain multiple first data and the digital signature corresponding to each first data when the reception duration of the first first data reaches a preset duration, wherein the preset duration can be set according to specific needs, and this application does not specifically limit it; the audit node may directly obtain multiple first data and the digital signature corresponding to each first data when the reception duration of the first first data reaches a preset duration and the data quantity of multiple first data reaches a preset quantity; the audit node may obtain multiple first data and the digital signature corresponding to each first data every preset time period.
[0057] Step 320: Verify the data digest of each first data point to obtain the verification result of each first data point.
[0058] Step 330: Obtain the first data that passes the verification, and get M first data.
[0059] Step 340: Obtain M first data points and their corresponding M digital signatures and M data digests.
[0060] In this embodiment, a complete verification process includes data digest verification and Merkle tree aggregate signature verification. Taking an electronic contract as the first data, the audit node does not use the digital signatures of all electronic contracts to generate a Merkle tree aggregate signature. Instead, it first obtains the data digests of all electronic contracts and performs data digest verification to obtain the target electronic contracts (i.e., M first data) that have passed data digest verification. Since the data digest verification process is faster, all electronic contracts can be preprocessed through a simple data digest verification process to quickly filter out the target electronic contracts (i.e., M first data) that have passed preliminary verification. Based on this, the blockchain system only needs to perform batch verification on the digital signatures of all the target electronic contracts that have passed preliminary verification, without needing to perform batch verification on the digital signatures of all electronic contracts. Therefore, this application performs data digest verification before Merkle tree aggregate signature verification, which can effectively reduce the number of digital signature verifications and improve the efficiency of aggregate signature verification in the blockchain system.
[0061] In some embodiments of this application, the method by which participating node 110 generates a data digest for each first data may include the following steps:
[0062] Obtain system parameters, including a preset first additive cyclic group and a preset cryptographic hash function. The first additive cyclic group is an additive cyclic group of order of a preset large prime number. The input value of the cryptographic hash function is a binary bit string, and the output value of the cryptographic hash function belongs to the first additive cyclic group.
[0063] Input the binary bit string corresponding to the first data into the cryptographic hash function to obtain the second data digest.
[0064] Specifically, taking the first data as an electronic contract and the data digest as a contract digest as an example, the participating node can be represented as Participant A. i Where 1 ≤ i ≤ n, and n is the total number of participants. Participant A i The binary bit string corresponding to the sent electronic contract can be represented as mi∈{0,1} * The premise is that a large prime number can be represented as q, the first additive cyclic group can be represented as G1, and the cryptographic hash function H1 can be represented as H1: {0, 1}. * →G1. Therefore, we can obtain participant A. i Contract summary h i The expression is h i =H1(m i ).
[0065] In some embodiments of this application, step 320 above, which verifies the data digest of each first data to obtain a verification result for each first data, may specifically include the following steps: for each first data, inputting the binary bit string corresponding to the first data into a cryptographic hash function to obtain a first function value corresponding to the first data, wherein the first function value belongs to a first additive cyclic group; comparing the first function value corresponding to each first data with the data digest to obtain a verification result for the first data.
[0066] Specifically, for each piece of first data, if the first function value corresponding to the first data is the same as the data digest corresponding to the first data, the verification result of the first data is "verification passed"; if the first function value corresponding to the first data is different from the data digest corresponding to the first data, the verification result of the first data is "verification failed".
[0067] Continuing with the example of the first data being the electronic contract and the data summary being the contract summary, the review node will re-enter participant A... i Send m i Input H1 to get participant A i The corresponding first function value, and then participant A i The corresponding first function value and participant A i Send h i Comparison, if participant Ai Send h i With Participant A i If the corresponding first function values are the same, the verification result is "verification passed". If participant A... i Send h i With Participant A i If the corresponding first function values are different, the verification result is "verification failed".
[0068] In this embodiment of the application, if the verification result is "verification passed", it means that the first data and the data digest have not been tampered with or damaged during the process of being sent from the participating node to the auditing node. Therefore, the first data with the verification result "verification passed" can be used as the first data.
[0069] In these embodiments, optionally, in S210, the M first data obtained by the audit node may include first data whose data digest has been verified.
[0070] In other embodiments of this application, participating nodes may also use other digest generation methods to generate data digests corresponding to the first data. Regardless of the digest generation method used by the participating nodes, as long as the auditing node regenerates the digest of the first data using the same digest generation method and compares the generated digest with the data digest, the data digest can be verified.
[0071] In some embodiments of this application, after verifying the data digest of each first data in step 320 and obtaining the verification result of each first data, the data processing method may further include:
[0072] Among multiple sets of first data, the second data that failed the verification was determined;
[0073] A second notification message is sent to the data source of the second data, wherein the second notification message is used to characterize that the data digest of the second data has failed validation.
[0074] Specifically, if the verification result is unsuccessful, it indicates that the first data and data digest were tampered with or corrupted during the transmission from the participating node to the auditing node. Therefore, it can be determined that the second data has failed verification, and this second data will be rejected. A second notification message will be sent to the data source of the second data. If the data source is a participating node, the second notification message can be used to notify the participating node that the data digest of the second data it sent failed verification. This will cause the participating node to respond to the second notification message, regenerate the data digest of the second data, and resend the regenerated data digest along with the second data to the auditing node.
[0075] Step 220 involves Merkle tree aggregation of the M digital signatures to obtain the first signature of each Merkle tree node.
[0076] The Merkle tree nodes, from top to bottom, are the root node, intermediate nodes, and leaf nodes. The value of each node is the first signature. Leaf nodes typically contain the basic data; therefore, in this application, the leaf node value is the digital signature corresponding to the first data. The first signatures of the intermediate and root nodes are obtained by aggregating the first signatures of their two child nodes. The root node is also obtained by aggregating the first signatures of its two child nodes, representing the top of the Merkle tree.
[0077] Merkle trees are calculated layer by layer from bottom to top. The first signature of a node in the first layer is obtained by aggregating the digital signatures of its two adjacent leaf nodes (i.e., the two child nodes of the first layer's intermediate nodes). The first signature of each intermediate node in each subsequent layer is obtained by aggregating the signatures of its two adjacent leaf nodes (i.e., the two child nodes of the intermediate node), and so on. The first signature of the root node is obtained by aggregating the signatures of its two adjacent leaf nodes (i.e., the two child nodes of the root node). Therefore, leaf nodes are the foundation; the aggregated signature of the root node is ultimately obtained by aggregating the digital signatures of M leaf nodes. If the digital signature of a leaf node fails verification, the aggregated signature of the root node will inevitably fail verification.
[0078] In some embodiments of this application, intermediate nodes may include R layers, where R is a positive integer greater than 1. Figure 4 A flowchart of another embodiment of the data processing method provided in the first aspect of this application. Step 220 may specifically include... Figure 4 Steps 410-430 are shown.
[0079] Step 410: Multiply the M digital signatures pairwise to obtain the aggregate signature of the first-level intermediate nodes.
[0080] Step 420: Multiply the aggregate signatures of the first-level intermediate nodes pairwise to obtain the aggregate signatures of the second-level intermediate nodes. Repeat the iterative operation until the aggregate signatures of the (R-1)th-level intermediate nodes are multiplied pairwise to obtain the aggregate signatures of the Rth-level intermediate nodes.
[0081] Step 430: Multiply the aggregate signatures of the intermediate nodes of the Rth layer to obtain the aggregate signature of the root node.
[0082] For example, M is 8 and R is 2, such as Figure 5 As shown, the eight leaf nodes a1-a8 at the bottom of the Merkle tree correspond to eight digital signatures σ1 to σ8. Multiplying each pair of digital signatures σ1 to σ8 yields the aggregate signature σ of the four intermediate nodes a9-a12 at the first level.1-2 σ 3-4 σ 3-4 σ 5-6 Based on this, the aggregated signature σ of the four intermediate nodes in the first layer is... 1-2 σ 3-4 σ 3-4 σ 5-6 By multiplying each pair, we can obtain the aggregate signature σ of the two intermediate nodes a13 and a14 in the second layer. 1-4 , σ 5-8 Finally, the aggregate signature σ of the two intermediate nodes is... 1-4 , σ 5-8 Multiplying them together yields the aggregate signature σ of the root node a15. 1-8 .
[0083] In some embodiments, the aggregate signature of the root node can be the product of M digital signatures in sequence.
[0084] Continuing with the example of generating a digital signature above, the aggregate signature can be represented as σ, and the formula for calculating σ is as follows:
[0085] In this embodiment, Merkle trees and aggregate signature technology are combined. A Merkle tree is constructed based on M digital signatures. Except for the bottom leaf nodes, which are the original digital signatures, all other Merkle tree nodes are aggregate signatures composed of combinations of digital signatures. Thus, if the aggregate signature verification of the root node fails, the aggregate signature verification is performed along the child nodes of the root node and the child nodes of that child node. By identifying all the problematic intermediate nodes whose aggregate signature verification failed, the leaf nodes whose digital signatures failed verification can be accurately determined. Finally, the problematic node is located from the bottom leaf nodes, thereby accurately locating the problematic data in the batch of data.
[0086] In step 230, the first signature of the root node is verified. If the first signature of the root node fails to pass verification, the first signatures of the intermediate nodes and leaf nodes are verified layer by layer downwards. The problem nodes whose first signatures fail to pass verification among the M leaf nodes are identified, and the first data corresponding to the problem nodes is identified as the problem data.
[0087] In some embodiments of this application, intermediate nodes may include R layers, where R is a positive integer greater than 1. Figure 6 A flowchart of another embodiment of the data processing method provided in the first aspect of this application. Step 230 may specifically include... Figure 6 Steps 610 and 620 are shown.
[0088] Step 610: Verify the aggregate signature of the intermediate nodes layer by layer from the Rth layer down to obtain the target intermediate nodes of each layer.
[0089] The target intermediate node is the intermediate node whose aggregate signature failed verification.
[0090] In some embodiments, each intermediate node is associated with two child nodes. Step 610 may specifically include the following steps: verifying the aggregate signature of the intermediate node in layer R to obtain the target intermediate node in layer R; verifying the aggregate signature of the child node associated with the target intermediate node in layer R to obtain the target intermediate node in layer R-1; repeating the iterative operation until the target intermediate node in layer R is obtained.
[0091] See also Figure 5 As an example, if the aggregate signature σ of root node a15 1-8 If the verification fails, it is necessary to verify the aggregate signature σ of the child nodes of the root node a15, namely the intermediate nodes a13 and a14 at the second level. 1-4 and σ 5-8 If the aggregate signature σ 1-4 If the verification fails, then a13 is the target intermediate node, and the verification of the child nodes of intermediate node a13, namely the aggregate signature σ of the first-level intermediate nodes a9 and a10, needs to continue downwards. 1-2 σ 3-4 This continues until the target intermediate node of the first layer is obtained.
[0092] Step 620: Verify the digital signatures of the two leaf nodes associated with the first-level target intermediate node, and determine the leaf node whose digital signature fails verification as the problem node.
[0093] Among them, the two leaf nodes associated with the intermediate node of the first-level target are its associated child nodes.
[0094] Continuing with the example above, if the aggregate signature σ 3-4 If the verification fails, then a10 is the first-level target intermediate node, and the child nodes associated with intermediate node a10 need to be verified further down, namely the digital signatures σ3 and σ4 of leaf nodes a3 and a4. If σ4 fails the verification, then it proves that leaf node a4 is a problematic node, and the first data corresponding to σ4 is the problematic data.
[0095] In this application embodiment, when using aggregated signatures to batch verify data, if the aggregated signature verification fails, reverting to verifying each individual digital signature to locate the problematic data in the batch would result in low verification efficiency. Therefore, this application combines Merkle trees and aggregated signature technology to generate Merkle tree aggregated signatures, improving the traditional method of batch verification using aggregated signatures. When the aggregated signature verification of batch data fails, the time complexity of locating the problematic data using the traditional method is O(n), which this application can reduce to O(2log2n). This significantly improves data verification efficiency when dealing with a large amount of data requiring verification.
[0096] In some embodiments of this application, step 210 may specifically include: obtaining M first data and their corresponding M digital signatures and M data digests.
[0097] The digital signature is generated based on the data digest of the corresponding first data and the private key of the data source.
[0098] In the above embodiments, since the digital signature is generated based on the data digest and the private key of the data source, when the participating node sends the first data to the auditing node, it can send the data digest of the first data and the digital signature generated using the data digest to the auditing node together, so that the auditing node can verify the digital signature and the aggregated signature after the digital signature is aggregated based on the data digest.
[0099] In some embodiments of this application, in order to verify each first signature using a data digest, Figure 7 A flowchart of another embodiment of the data processing method provided in the first aspect of this application. Step 230 may specifically include... Figure 7 Steps 710-740 are shown.
[0100] Step 710: Obtain the public key of the data source corresponding to each first data.
[0101] Step 720: Determine the N first data associated with each first signature.
[0102] In this system, N initial data points correspond to N digital signatures, and the N digital signatures constitute the first signature. N is a positive integer. For the first signature of a leaf node, N is 1, and for the first signature of a root node, N = M.
[0103] For example, for Figure 5 The first signature σ of the root node shown 1-8 It is obtained by multiplying 8 digital signatures σ1 to σ8, therefore the first signature σ 1-8 It consists of 8 digital signatures, therefore the first signature σ 1-8 Associate 8 primary data points.
[0104] Step 730: Determine the verification information for each first signature based on the N first data associated with each first signature.
[0105] The verification information includes the public key of the data source corresponding to each of the N first data points, and the N data digests corresponding to each of the N first data points.
[0106] Step 740: Verify each first signature based on the verification information of each first signature.
[0107] In this embodiment of the application, since the public key of the data source is generally generated based on the private key of the data source, and there is a certain correlation between the public key and the private key, and the digital signature is generated based on the user's private key and the data digest, the audit node can verify the digital signature sent by the data source or the aggregate signature generated by the data source based on the public key and the data digest of the data source.
[0108] In some embodiments of this application, the method by which participating nodes generate digital signatures for the first data may be:
[0109] Obtain system parameters, including a preset first additive cyclic group, a preset second additive cyclic group, a preset generator, a preset dataset, and a preset cryptographic hash function. The first and second additive cyclic groups are additive cyclic groups of order of a preset large prime number, the preset generator is the generator of the second additive cyclic group, the data in the preset dataset are non-negative integers less than or equal to the preset large prime number, the input value of the cryptographic hash function is a binary bit string, and the output value of the cryptographic hash function belongs to the first additive cyclic group.
[0110] Input the binary bit string corresponding to the first data into the cryptographic hash function to obtain the data digest;
[0111] Select the first preset data in the preset dataset as the private key of the data source corresponding to the first data;
[0112] Using the preset generator as the base, and the private key of the data source corresponding to the first data as the exponent of the preset generator, the public key of the data source corresponding to the first data is obtained by exponentiation.
[0113] Using the data digest as the base and the private key of the data source corresponding to the first data as the exponent of the data digest, a power operation is performed to obtain the digital signature corresponding to the first data.
[0114] For example, taking the first data as an electronic contract and the data digest as a contract digest, the participating node can be represented as Participant A. i Participant A i The binary bit string corresponding to the sent electronic contract can be represented as m i ∈{0,1} * The large prime number can be represented as q, the first additive cyclic group can be represented as G1, the second additive cyclic group can be represented as G2, the generator can be represented as g2, g2 can be any one of the multiple generators of G2, the generator of G1 can be represented as g1, and the cryptographic hash function H1 can be represented as H1: {0, 1}. * →G1, the preset dataset can be represented as Therefore, we can obtain the information from participant A. i Contract summary h i The expression is h i =H1(m i Participant A i The private key STi can be used in The first preset data x is randomly selected from the data. i ,Right now Participant A i The formula for calculating the public key PKI is as follows: Participant A i Digital signature of electronic contracts i The calculation formula is:
[0115] like Figure 5 As shown,
[0116] After the participating node generates a digital signature for the electronic contract, it can send the electronic contract, its summary, and the digital signature together to the audit node.
[0117] Based on the above, in some embodiments of this application, in order to utilize verification information to verify each first signature... Figure 8 A flowchart of another embodiment of the data processing method provided in the first aspect of this application. Step 740 may specifically include... Figure 8 Steps 810-830 are shown.
[0118] Step 810: For each first signature, input the data digest and public key corresponding to each first data in the verification information into a preset bilinear mapping function to obtain N first output values corresponding to N first data.
[0119] The first output value belongs to a preset multiplication cyclic group, which is a multiplication cyclic group of a preset large prime number.
[0120] Step 820: Input the first signature and the preset generator into the bilinear mapping function to obtain the second output value.
[0121] The second output value belongs to the multiplication cycle group.
[0122] Step 830: Compare the product of the N first output values with the second output value to obtain the verification result of the first signature.
[0123] Specifically, if the product of the N first output values is the same as the second output value, the verification result is "verification passed"; if the product of the N first output values is not the same as the second output value, the verification result is "verification failed".
[0124] In the above embodiments, the data digest is generated based on the binary bit string corresponding to the first data and a preset cryptographic hash function, and the data digest belongs to a preset first additive cyclic group; the public key is determined based on the private key of the data source to which the public key belongs and a preset generator, the private key belongs to a preset dataset, the data in the preset dataset are non-negative integers less than or equal to a preset large prime number, the preset generator is the generator of a preset second additive cyclic group, and the public key belongs to the second additive cyclic group; the first additive cyclic group and the second additive cyclic group are additive cyclic groups of order of a preset large prime number.
[0125] Continuing with the example of generating digital signatures above, the multiplicative cyclic group can be represented as G. T A bilinear mapping function can be represented as e, where the first input value of e belongs to G1 and the second input value of e belongs to G2. The expression for e is e: G1 × G2 → G T .
[0126] Due to PK i It is generated based on g2, therefore PK i Since the output value of H1 belongs to G2, h i Since it belongs to G1, H1 can be used as the first input value of e, and PK can be used as the first input value of e. i As the second input value of e, inputting e yields the first output value. Since σ is based on σ... i Generated, σ i It is based on h i Generated, h i Since σ belongs to G1, we can use σ as the first input value of e and g2 as the second input value of e. Inputting e yields the second output value. Finally, we can determine the first verification equation. If the equation is true, then σ passes the verification; if the equation is false, then σ fails the verification.
[0127] In this embodiment, since the public key PKI of the data source is generally generated based on the private key SKI of the data source, there is a certain correlation between the public key PKI and the private key SKI. The digital signature σi of the first data is generated based on the user's private key SKI and the data digest hi. The aggregate signature σ is obtained by multiplying multiple digital signatures σi sequentially. Therefore, the auditing node can verify the aggregate signature σ based on the public key PKI and the data digest hi of the data source. Specifically, for each piece of first data, its corresponding data digest hi and public key PKI are input into a preset bilinear mapping function e (expression: G1×G2→GT) to obtain the first output value e(hi, PKI) belonging to the preset multiplicative cyclic group G1 corresponding to each piece of first data. At the same time, the generated aggregate signature σ and the preset generator g2 are input into the bilinear mapping function e to obtain the second output value e(σ, g2) belonging to the multiplicative cyclic group G2. Therefore, both the first output value e(hi, PKI) and the second output value e(σ, g2) are obtained by inputting data into the bilinear mapping function e, both belong to the multiplicative cyclic group GT, and the aggregate signature σ is obtained by multiplying the N digital signatures σi of the N first data in sequence (that is... Therefore, the product of the first output values corresponding to the N digital signatures σi The second output value corresponding to the aggregate signature σ is directly comparable, for example, by directly comparing the product with the second output value. The system checks whether the equation holds true, obtains the verification result, completes the verification process of the aggregate signature σ generated from multiple digital signatures σi, realizes batch verification of digital signatures, and improves data verification efficiency.
[0128] In some embodiments of this application, after step 230, the method may further include the following steps: uploading the first data, excluding the problematic data, from the M first data to the blockchain; and sending a first notification message to the data source of the problematic data.
[0129] In the first notification message, the digital signature used to represent the problematic data failed verification.
[0130] For example, if Figure 5 The aggregate signature σ of the root node a15 shown 1-8 If verification fails, it can be verified layer by layer downwards to obtain the failed digital signature σ4, and the leaf node a4 is identified as the problematic node. The first data corresponding to σ4 is the problematic data. In this way, a second notification message can be sent to the source of the problematic data.
[0131] In this embodiment of the application, the audit node can send a first notification message to the data source of the problematic data, so that the participating node corresponding to the data source can regenerate new data, as well as the data digest and digital signature of the new data, and resend the new data, the data digest and digital signature of the new data to the audit node to correct the problematic data in a timely manner.
[0132] Based on the same inventive concept, a second aspect of this application provides a data processing apparatus. Figure 9 A schematic diagram of the structure of an embodiment of the data processing apparatus provided in the second aspect of this application.
[0133] like Figure 9 As shown, the data processing device 900 may specifically include: an acquisition module 910, an aggregation module 920, and a verification module 930.
[0134] Among them, the acquisition module 910 is used to acquire M first data and their corresponding M digital signatures;
[0135] The aggregation module 920 is used to perform Merkle tree aggregation on M digital signatures to obtain the first signature of each Merkle tree node. Each Merkle tree node includes a root node, an intermediate node, and M leaf nodes. The first signature of the root node and the intermediate node is the aggregated signature, and the first signature of the M leaf nodes is the digital signature.
[0136] The verification module 930 is used to verify the first signature of the root node. If the first signature of the root node fails verification, the first signatures of the intermediate nodes and leaf nodes are verified layer by layer downwards to identify the problematic nodes among the M leaf nodes whose first signatures have failed verification, and to determine the first data corresponding to the problematic node as the problematic data.
[0137] The data processing apparatus provided in this application, in a scenario where M first data items and their corresponding M digital signatures are obtained, and batch authentication of the M first data items is required, performs Merkle tree aggregation on the M digital signatures to obtain the first signatures of each layer of Merkle tree nodes. Each layer of Merkle tree nodes may include a root node, intermediate nodes, and M leaf nodes, wherein the first signatures of the root node and intermediate nodes are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. Based on this, this application first verifies the first signature of the root node. If the first signature of the root node fails verification, it indicates that there is a digital signature that has failed verification among the M digital signatures, and there is problematic data among the M first data items. Therefore, in this scenario, based on the characteristics of the Merkle tree, when it is determined that the first signature of the root node obtained by aggregating the M digital signatures has failed verification, this application then verifies the first signatures of the intermediate nodes and leaf nodes layer by layer downwards, and finally locates the leaf node among the M leaf nodes where the first signature has failed verification. This leaf node is the problematic node, and the first data corresponding to this problematic node is the problematic data. Thus, this application can combine Merkle tree and aggregate signature technology. When aggregate signature verification fails, Merkle tree technology can be used to quickly locate problematic data and realize the batch verification function of data. Therefore, even when using aggregate signature, problematic data in batch data can be successfully located, effectively reducing the limitations of aggregate signature technology.
[0138] In some embodiments of this application, the intermediate nodes include an R-layer. The aggregation module 920 is specifically used to: multiply the M digital signatures pairwise to obtain the aggregated signature of the first-layer intermediate nodes; multiply the aggregated signatures of the first-layer intermediate nodes pairwise to obtain the aggregated signature of the second-layer intermediate nodes, repeating the iterative operation until the aggregated signatures of the (R-1)th-layer intermediate nodes are multiplied pairwise to obtain the aggregated signature of the R-th-layer intermediate nodes; and multiply the aggregated signatures of the R-th-layer intermediate nodes to obtain the aggregated signature of the root node.
[0139] In some embodiments of this application, the intermediate nodes include an R layer, and the verification module 930 includes: a verification unit, used to verify the aggregate signature of the intermediate nodes layer by layer from the R layer down to obtain the target intermediate nodes of each layer, wherein the target intermediate nodes are intermediate nodes whose aggregate signatures have not passed verification; the verification unit is also used to verify the digital signatures of two leaf nodes associated with the first layer target intermediate nodes, and determine that the leaf nodes whose digital signatures have not passed verification are problem nodes.
[0140] In some embodiments of this application, each intermediate node is associated with two child nodes. The verification unit is specifically used to: verify the aggregate signature of the intermediate node of the Rth layer to obtain the target intermediate node of the Rth layer; verify the aggregate signature of the child nodes associated with the target intermediate node of the Rth layer to obtain the target intermediate node of the R-1th layer; repeat the iterative operation until the target intermediate node of the first layer is obtained.
[0141] In some embodiments of this application, the acquisition module 910 is specifically used to: acquire M first data and their corresponding M digital signatures and M data digests; wherein, the digital signatures are generated based on the data digests of the corresponding first data and the private key of the data source.
[0142] In some embodiments of this application, the verification module 930 includes: an acquisition unit, configured to acquire the public key of the data source corresponding to each first data; a determination unit, configured to determine N first data associated with each first signature, wherein the N first data correspond to N digital signatures, the N digital signatures are digital signatures constituting the first signature, and N is a positive integer; the determination unit is further configured to determine verification information for each first signature based on the N first data associated with each first signature, wherein the verification information includes the public key of the data source corresponding to the N first data, and N data digests corresponding to the N first data; and a verification unit, configured to verify each first signature based on the verification information for each first signature.
[0143] In some embodiments of this application, the verification unit is specifically used for: for each first signature, inputting the data digest and public key corresponding to each first data in the verification information into a preset bilinear mapping function to obtain N first output values corresponding to N first data, wherein the first output values belong to a preset multiplicative cyclic group, and the multiplicative cyclic group is a multiplicative cyclic group of order of a preset large prime number; inputting the first signature and a preset generator into the bilinear mapping function to obtain a second output value, wherein the second output value belongs to the multiplicative cyclic group; comparing the product of the N first output values with the second output value to obtain the verification result of the first signature.
[0144] In some embodiments of this application, the data digest is generated based on the binary bit string corresponding to the first data and a preset cryptographic hash function, and the data digest belongs to a preset first additive cyclic group; the public key is determined based on the private key of the data source to which the public key belongs and a preset generator, the private key belongs to a preset dataset, the data in the preset dataset are non-negative integers less than or equal to a preset large prime number, the preset generator is the generator of a preset second additive cyclic group, and the public key belongs to the second additive cyclic group; the first additive cyclic group and the second additive cyclic group are additive cyclic groups of order of a preset large prime number.
[0145] In some embodiments of this application, the acquisition module 910 includes: an acquisition unit, configured to acquire a plurality of first data, and a data digest and digital signature corresponding to each first data; a verification unit, configured to verify the data digest of each first data to obtain a verification result for each first data; the acquisition unit is further configured to acquire the first data whose verification result is passed, to obtain M first data; the acquisition unit is further configured to acquire the M first data and their corresponding M digital signatures and M data digests.
[0146] In some embodiments of this application, the verification unit is specifically used to: for each first data, input the binary bit string corresponding to the first data into a cryptographic hash function to obtain the first function value corresponding to the first data, wherein the first function value belongs to a first additive cyclic group; compare the first function value corresponding to each first data with the data digest to obtain the verification result of the first data.
[0147] In some embodiments of this application, the apparatus further includes: an upload module, configured to upload, after determining that the first data corresponding to the problem node is problem data, the first data other than the problem data among the M first data to the blockchain; and a send module, configured to send a first notification message to the data source of the problem data, the first notification message being used to indicate that the digital signature of the problem data has failed verification.
[0148] A third aspect of this application also provides an electronic device. Figure 10 A schematic diagram of the structure of an embodiment of the electronic device provided in the third aspect of this application. (See attached diagram.) Figure 10 As shown, the electronic device 1000 includes a memory 1001, a processor 1002, and a computer program stored in the memory 1001 and executable on the processor 1002.
[0149] In one example, the processor 1002 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0150] Memory 1001 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the data processing method in the embodiments according to the first aspect of this application.
[0151] The processor 1002 runs a computer program corresponding to the executable program code stored in the memory 1001 to implement the data processing method in the first aspect embodiment described above.
[0152] In some examples, the electronic device 1000 may also include a communication interface 1003 and a bus 1004. For example, Figure 10 As shown, the memory 1001, processor 1002, and communication interface 1003 are connected through bus 1004 and complete communication with each other.
[0153] The communication interface 1003 is mainly used to realize communication between various modules, systems, units and / or devices in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 1003.
[0154] Bus 1004 includes hardware, software, or both, that couples components of electronic device 1000 together. For example, and not limitingly, bus 1004 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 1004 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0155] A fourth aspect of this application provides a computer-readable storage medium storing a program or instructions. When executed by a processor, the program or instructions can implement the data processing method described in the first aspect and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.
[0156] The fifth aspect of this application provides a computer program product stored in a non-volatile storage medium. When executed by at least one processor, the computer program product implements the steps of the data processing method as shown in the first aspect. The specific content of the data processing method can be found in the relevant descriptions in the above embodiments, and will not be repeated here.
[0157] The sixth aspect of this application provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement various processes of the data processing method embodiments shown in the first aspect, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0158] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0159] It should be clarified that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For system embodiments, user terminal embodiments, device embodiments, system embodiments, and computer-readable storage medium embodiments, relevant parts can be referred to the description section of the method embodiments. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application. Furthermore, for the sake of brevity, detailed descriptions of known method techniques are omitted here.
[0160] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing system to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing system, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0161] Those skilled in the art will understand that the above embodiments are exemplary and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, specification, and claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other systems or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to identify names and not to indicate any particular order. Any reference numerals in the claims should not be construed as limiting the scope of protection. The functionality of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A data processing method, characterized by, The method includes: Obtain M first data points and their corresponding M digital signatures and M data digests, wherein the digital signatures are generated based on the data digests of the corresponding first data points and the private key of the data source. Merkle tree aggregation is performed on the M digital signatures to obtain the first signature of each Merkle tree node at each level. Each Merkle tree node at each level includes a root node, an intermediate node, and M leaf nodes. The first signatures of the root node and the intermediate node are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. Verify the first signature of the root node. If the first signature of the root node fails verification, verify the first signatures of the intermediate nodes and the leaf nodes layer by layer downwards. Determine the problematic nodes among the M leaf nodes whose first signatures fail verification, and determine the first data corresponding to the problematic nodes as problematic data. The intermediate nodes include an R-layer, and the Merkle tree aggregation of the M digital signatures to obtain the first signature of each Merkle tree node includes: Multiply the M digital signatures pairwise to obtain the aggregate signature of the first-level intermediate node; Multiply the aggregate signatures of the first-level intermediate nodes pairwise to obtain the aggregate signatures of the second-level intermediate nodes. Repeat the iterative operation until the aggregate signatures of the (R-1)th-level intermediate nodes pairwise are multiplied to obtain the aggregate signatures of the Rth-level intermediate nodes. Multiply the aggregate signatures of the intermediate nodes of the Rth layer to obtain the aggregate signature of the root node; The verification of the first signature of the root node, if the first signature of the root node fails verification, involves verifying the first signatures of the intermediate nodes and the leaf nodes layer by layer downwards, including: Obtain the public key of the data source corresponding to each of the first data items; Determine N first data associated with each first signature, wherein the N first data correspond to N digital signatures, and the N digital signatures are the digital signatures that constitute the first signature, where N is a positive integer; Based on the N first data associated with each first signature, the verification information of each first signature is determined, wherein the verification information includes the public key of the data source corresponding to the N first data, and the N data digests corresponding to the N first data; Based on the verification information of each first signature, each first signature is verified using a preset bilinear mapping function.
2. The method of claim 1, wherein, The intermediate nodes include an R-layer. The step-by-step verification of the first signatures of the intermediate nodes and the leaf nodes, to determine the problematic nodes among the M leaf nodes whose first signatures have failed verification, includes: The aggregate signature of the intermediate nodes is verified layer by layer from the Rth layer down to obtain the target intermediate nodes of each layer, wherein the target intermediate node is the intermediate node whose aggregate signature fails verification; Verify the digital signatures of the two leaf nodes associated with the target intermediate node in the first layer, and determine the leaf node whose digital signature fails verification as the problem node.
3. The method of claim 2, wherein, Each intermediate node is associated with two child nodes. The aggregate signature of the intermediate nodes is verified layer by layer from the Rth layer down to obtain the target intermediate nodes at each layer, including: Verify the aggregate signature of the intermediate node in the Rth layer to obtain the target intermediate node in the Rth layer; Verify the aggregate signature of the child nodes associated with the target intermediate node in the Rth layer to obtain the target intermediate node in the (R-1)th layer. Repeat the iterative operation until the target intermediate node in the first layer is obtained.
4. The method of claim 1, wherein, The verification of each first signature based on the verification information of each first signature, using a preset bilinear mapping function, includes: For each first signature, the data digest and public key corresponding to each first data in the verification information are input into a preset bilinear mapping function to obtain N first output values corresponding to the N first data, wherein the first output value belongs to a preset multiplicative cyclic group, and the multiplicative cyclic group is a multiplicative cyclic group of order of the preset large prime number; The first signature and the preset generator are input into the bilinear mapping function to obtain a second output value, wherein the second output value belongs to the multiplication cyclic group; The product of the N first output values is compared with the second output value to obtain the verification result of the first signature.
5. The method according to claim 1 or 4, characterized in that, The data digest is generated based on the binary bit string corresponding to the first data and a preset cryptographic hash function, and the data digest belongs to a preset first additive cyclic group; The public key is determined based on the private key of the data source to which the public key belongs and a preset generator. The private key belongs to a preset dataset, and the data in the preset dataset are non-negative integers less than or equal to a preset large prime number. The preset generator is the generator of a preset second additive cyclic group, and the public key belongs to the second additive cyclic group. The first additive cyclic group and the second additive cyclic group are additive cyclic groups of order of a preset large prime number.
6. The method of claim 1, wherein, The process of obtaining M first data points and their corresponding M digital signatures and M data digests includes: Obtain multiple first data points, as well as the data digest and digital signature corresponding to each first data point; The data digest of each first data is verified to obtain the verification result of each first data. The first data that passes the verification is obtained, and M first data are obtained; Obtain the M first data points and their corresponding M digital signatures and M data digests.
7. The method of claim 6, wherein, The step of verifying the data digest of each first data to obtain the verification result of each first data includes: For each of the first data, the binary bit string corresponding to the first data is input into a cryptographic hash function to obtain the first function value corresponding to the first data, wherein the first function value belongs to the first additive cyclic group; The first function value and data digest corresponding to each first data are compared to obtain the verification result of the first data.
8. The method of claim 1, wherein, After determining that the first data corresponding to the problem node is problem data, the method further includes: Upload the first data, excluding the problematic data, from the M first data to the blockchain; A first notification message is sent to the data source of the problematic data, the first notification message being used to indicate that the digital signature of the problematic data has failed verification.
9. A data processing apparatus, characterized by, The device includes: The acquisition module is used to acquire M first data items and their corresponding M digital signatures and M data digests, wherein the digital signatures are generated based on the data digests of the corresponding first data items and the private key of the data source. An aggregation module is used to perform Merkle tree aggregation on the M digital signatures to obtain the first signature of each Merkle tree node at each level. Each Merkle tree node at each level includes a root node, an intermediate node, and M leaf nodes. The first signatures of the root node and the intermediate node are aggregated signatures, and the first signatures of the M leaf nodes are digital signatures. The verification module is used to verify the first signature of the root node. If the first signature of the root node fails to pass verification, the first signatures of the intermediate nodes and the leaf nodes are verified layer by layer downwards to determine the problematic nodes among the M leaf nodes whose first signatures fail to pass verification, and to determine the first data corresponding to the problematic node as problematic data. The intermediate node includes an R layer, and the aggregation module is specifically used for: Multiply the M digital signatures pairwise to obtain the aggregate signature of the first-level intermediate node; Multiply the aggregate signatures of the first-level intermediate nodes pairwise to obtain the aggregate signatures of the second-level intermediate nodes. Repeat the iterative operation until the aggregate signatures of the (R-1)th-level intermediate nodes pairwise are multiplied to obtain the aggregate signatures of the Rth-level intermediate nodes. Multiply the aggregate signatures of the intermediate nodes of the Rth layer to obtain the aggregate signature of the root node; The verification module includes: The acquisition unit is used to acquire the public key of the data source corresponding to each of the first data. A determining unit is used to determine N first data associated with each first signature, wherein the N first data correspond to N digital signatures, the N digital signatures are digital signatures constituting the first signature, and N is a positive integer; The verification unit is used to determine the verification information of each first signature based on the N first data associated with each first signature, wherein the verification information includes the public key of the data source corresponding to the N first data, and the N data digests corresponding to the N first data; Based on the verification information of each first signature, each first signature is verified using a preset bilinear mapping function.
10. An electronic device, comprising: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data processing method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that, when executed by a processor, implement the data processing method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product is stored in a non-volatile storage medium, and when executed by at least one processor, the computer program product implements the data processing method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing method, device, equipment and medium
CN111147249A
Verification method and device based on multiple signatures, equipment and storage medium
CN114666058A