Hash-mask based anonymous data reporting method

CN121333684BActive Publication Date: 2026-08-11BEIJING INST OF COMP TECH & APPL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本发明要解决的技术问题是如何提供一种基于哈希掩码的匿名数据报送方法,以解决现有匿名数据报送技术依赖可信第三方的问题,解决现有匿名数据报送技术难以抵御部分节点合谋的问题,解决现有匿名数据报送技术计算开销较高的问题

Benefits of technology

[0012] This invention proposes an anonymous data transmission method based on hash masks, providing a method for anonymous data transmission in a trustless environment. Its main advantages are as follows:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121333684B_ABST
    Figure CN121333684B_ABST
Patent Text Reader

Abstract

This invention relates to an anonymous data transmission method based on hash masks, belonging to the field of data security technology. In this invention, all data senders, with the assistance of the data receiver, generate session keys in pairs. Each sender then randomly joins one of m groups. Without the involvement of a trusted third party, all data senders generate unique sequence numbers, ensuring that no other entity can deduce the value of each sequence number. Each data sender uses its own sequence number and session key sequence to package and protect its own data. The data receiver obtains all the packaged data and unpacks it to obtain the set of original plaintext data, but cannot deduce the source of the data. This invention enables the data receiver to obtain data reported by the data provider without the need for a trusted third party, and the data receiver cannot deduce the source of the data, thus ensuring the anonymity of the data provider.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data security technology, specifically relating to an anonymous data reporting method based on hash masks. Background Technology

[0002] Data reporting refers to the transmission of specific data from data senders such as terminal devices, smart sensors, or user node servers to data receivers such as regulatory agencies or data centers, according to established rules, to meet the latter's data collection, processing, and analysis needs. For example, in smart grids, a large number of distributed smart meters need to periodically report electricity consumption data to grid operators; in medical data sharing, hospitals or wearable medical devices need to report patient health data to research institutions. Currently, data reporting has become a key activity supporting daily office operations in sectors such as government, military, finance, telecommunications, and healthcare.

[0003] Traditional data reporting uses a "plaintext data + secure channel" transmission method. While this ensures the confidentiality, integrity, and authentication of data during the reporting process, data users can establish a one-to-one association between the collected data and the sender, leading to privacy risks such as the exposure of the sender's identity information. Some existing anonymized data reporting methods have considered privacy protection during the data reporting process, but problems remain: First, existing methods typically rely on trusted third parties or authoritative institutions to distribute key system parameters or assist in the execution of data reporting protocols, but in real-world scenarios, it is difficult to find a third party that all parties can fully trust. Second, existing methods rarely consider the potential risk of collusion between the data receiver and some senders. When collusion occurs, it can compromise the anonymity of the honest sender's data, causing privacy leaks. Third, existing methods often use homomorphic encryption to process the reported data. While this provides the security and flexibility of encrypted computation, it also introduces significant computational overhead, making it unsuitable for low-resource computing scenarios such as smart grids and vehicular ad hoc networks. Summary of the Invention

[0004] (a) Technical problems to be solved

[0005] The technical problem to be solved by this invention is how to provide an anonymous data reporting method based on hash mask, so as to solve the problem that existing anonymous data reporting technologies rely on trusted third parties, the problem that existing anonymous data reporting technologies are difficult to resist collusion by some nodes, and the problem that existing anonymous data reporting technologies have high computational overhead.

[0006] (II) Technical Solution

[0007] To address the aforementioned technical problems, this invention proposes an anonymous data transmission method based on hash masks, which comprises three stages:

[0008] Phase 1: Initialization Phase: With the assistance of the data receiver, all data senders generate session keys in pairs, and then each sender randomly joins one of m groups;

[0009] Phase Two: Serial Number Generation Phase: All data senders generate unique serial numbers without the need for a trusted third party, and ensure that no other entity besides themselves can deduce the value of the serial number;

[0010] Phase 3: Data Reporting Phase: All data senders use their own sequence numbers and session key sequences to package and protect their own data; the data receivers obtain all the packaged data and unpack it to obtain the set of original plaintext data, but cannot deduce the source of the data.

[0011] (III) Beneficial Effects

[0012] This invention proposes an anonymous data transmission method based on hash masks, providing a method for anonymous data transmission in a trustless environment. Its main advantages are as follows:

[0013] 1. A data packaging method using zero-shared mask is proposed, which enables the data receiver to obtain the data reported by the data provider without the need for a trusted third party, and the data receiver cannot infer the source of the data, thus ensuring the anonymity of the data provider.

[0014] 2. A hash mask generation method using session key pairs is proposed. When the number of data senders is n, the method can resist attacks by the data receiver manipulating at most n-2 data senders in an attempt to compromise the anonymity of the remaining honest senders.

[0015] 3. The method only involves hash operations and modular addition during real-time data reporting, without requiring any public key cryptographic operations. It has low computational overhead and is suitable for deployment on low-resource devices such as IoT devices and edge sensors. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall framework of the present invention.

[0017] Figure 2 Flowchart for the initialization phase;

[0018] Figure 3 Flowchart for the serial number generation stage;

[0019] Figure 4 This is a flowchart of the data reporting phase. Detailed Implementation

[0020] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0021] This invention proposes an anonymous data transmission method based on hash masks, primarily targeting scenarios with a single receiver and multiple senders, to protect the privacy of the sender's identity. The overall framework of the method is shown in Figure 1. It consists of three stages:

[0022] Phase 1: Initialization Phase. With the assistance of the data receiver, all data senders generate session keys in pairs. Then, each sender randomly joins one of m groups, providing the foundation for subsequent steps.

[0023] Phase Two: Serial Number Generation Phase. All data senders generate unique serial numbers without the need for a trusted third party, ensuring that no other entity besides themselves can deduce the value of the serial number.

[0024] Phase Three: Data Delivery Phase. All data senders use their own sequence numbers and session key sequences to package and protect their data. The data receiver receives all the packaged data and unpacks it to obtain the set of original plaintext data, but cannot deduce the source of the data.

[0025] (1) Symbol definition

[0026] The definitions of key symbols involved in this invention are given herein.

[0027]

[0028] (2) Function definition

[0029] In each stage, the data sender and receiver call a series of predefined function calls to achieve the protocol effect. This invention defines a total of 13 function calls, assuming the number of data senders is... The senders are respectively denoted as And initialize their respective flag bits. The data receiver initializes and maintains The definitions of all functions are as follows (all symbols mentioned here should be considered as formal parameters, which may express different meanings in different calling processes; please refer to the "Method Flow" for specific actual parameters).

[0030] ● The initialization function is executed by the data receiver. Input security parameters. Output public parameters ,in It is a large prime number (its number of digits is equal to the number of primes). Positive correlation (refer to relevant cryptographic standards). It is a multiplication group One of the original roots.

[0031] ● The key generation function is provided by each data sender. Execute. Input system parameters. Randomly select private key Calculate the public key Output key pair .

[0032] ● The key negotiation function is performed by each data sender. Execute. Input system parameters. , private key The public keys of other data senders. Calculate and output the session key set. ,in ,See and The meanings are the same.

[0033] ● The mask vector generation function is generated by each data sender. Execute. Input data sender identifier. (for Its identifier is ), Maintained set of online session keys Mask vector dimension and time step Using HMAC-SM3 as the pseudo-random function, denoted as... Calculate and output dimensional mask vector Among them, for :

[0034]

[0035] ● The wrapper function is provided by each data sender. Execution. Input mask vector dimension. Mask vector Data to be protected and insertion position Calculate and output. dimensional wrapper vector Among them, for :

[0036]

[0037] ● The unpacking function is executed by the data receiver. Input set size. The set of wrapper vectors and the dimension of the wrapper vector Calculate and output ,in , .

[0038] ● The sequence number pre-generation function is used by each data sender. Execute. Input Selected group number and Number of members in each group .like ,but The serial number cannot be determined at this time. No settings .like ,but set up and .

[0039] ● The first state update function is executed by the data receiver to update the records of all groups that have completed sequence number assignment. It inputs and iterates through the number of members in each group. ,like or Then update Finally, output. . This is a set that records all group numbers (1~m) for which serial numbers have been generated.

[0040] ● The relative group order solution function is derived from each data sender. This function calculates the order of a data sender's group among all groups that have not yet completed sequence number generation. For example, if there are 5 groups, and groups 1 and 3 have already completed sequence number generation, and a data sender is in group 5, the result should be 3. Input: The set of group numbers for completed groups. and Group number Output , This is an indicator function.

[0041] ● The random number sequence generation function is used by each data sender. Execute. Enter group number. Completed flag and the number of members in the group Choose a common ratio of . Finite geometric sequence Its general term formula is .like Then randomly select the index of the sequence. Calculate the terms of the sequence Otherwise, if Then let Output and .

[0042] ● The sequence term decomposition function is executed by the data receiver. Input the addends to be decomposed. Total number of addends The algorithm calculates... Addends ,satisfy The addend factorization is unique, and its output is in Vector formed by subscripts in , .

[0043] ● The serial number generation function is provided by each data sender. Execute. Input Group number Number of members in the group Random number sequence index The set of indices for addend factorization and the set of members in each group .like If duplicate elements exist, sequence number allocation cannot be completed, and the algorithm terminates. Otherwise, find... make Calculate all group numbers less than The total number of members in the group Set serial number ,renew .

[0044] ● The second state update function is executed by the data receiver. It takes input and iterates through the addend factorization results of each incomplete group. ,like If there are no duplicate elements, then update. Finally, output. .

[0045] (3) Execution process

[0046] The execution process of the method will be explained in stages below:

[0047] Phase 1: Initialization Phase

[0048] In this stage, all data senders generate session keys between each other with the assistance of the receivers. Then, each sender randomly joins one of the m groups. The process of this stage is shown in Figure 2.

[0049] Step S11, Parameter Generation: The data receiver executes the algorithm. Generate system parameters And assign an identifier to each data sender, then Send to each data sender .

[0050] Step S12, Key Negotiation: Each data sender Execution Algorithm Obtain your own private key and public key and will Send to the data recipient. The data recipient then collects all public keys. And send it to each data sender. Then, Execution Algorithm To obtain oneself and others A vector of session keys of each data sender. Since no data sender is currently offline, an online session key set is set. .

[0051] Step S13, Member Grouping: Each data sender Randomly select a group number This indicates joining the group. When At that time, it is recommended to set Set the initial time step , implement ,get dimensional mask vector Update time step . implement ,get dimensional wrapper vector And send it to the data recipient. The data recipient executes... This will cause the masks added by all data senders to protect their own data to cancel each other out to zero, thus obtaining... A vector of the number of members in a group. ,in Indicates choosing to join the The number of data senders in the group. To ensure the correctness of subsequent steps, it is necessary to determine: if for any number greater than 1... All are satisfied Then it will Send to each data sender and end this phase; otherwise, repeat step S13.

[0052] Consider a scenario with a total of 6 data senders, resulting in 3 groups. Assume... Group 1 was selected. Group 2 was selected. If group 3 is selected, the data receiver will receive... ~ Unpacking yields This indicates the number of members in each group. During this process, the data receiver cannot deduce the group number selected by each data sender.

[0053] Phase Two: Serial Number Generation Phase

[0054] During this phase, all data senders Generate unique serial numbers without requiring a trusted third party. ,satisfy , guarantee except No one else could deduce that Specifically, each sender within a group selects a unique random number. The receiver, unaware of the choices made by each party, obtains their sum and uniquely decomposes it back into the original random numbers. These random numbers are then arranged into a non-decreasing sequence and sent to all participants. Each sender within a group checks the position of its own random number within the sequence. The method stipulates that participants whose numbers appear earlier in the sequence and whose group numbers are smaller have smaller sequence numbers. This stage of the process is shown in Figure 3.

[0055] Step S21, Serial Number Pre-generation: implement The data receiver executes... and will Send to all data senders.

[0056] Step S22, Group Sorting: Each data sender implement Obtain the index of the random number sequence and the corresponding sequence terms .set up , implement ,get dimensional mask vector Update time step .implement Execute again ,get dimensional wrapper vector And send it to the data recipient. The data recipient executes... Let the output result be... dimensional accumulation vector (The masks of each data sender cancel each other out to zero.) It stores the sum of random number sequences selected by all members in each incomplete group. .set up The data receiver for each Execute sequentially ,constitute And send it to all data senders.

[0057] Step S23, Serial Number Generation: Data Sender The group number is ,examine If there are duplicate elements, the order of members in that group cannot be determined in this round. If there are no duplicates, then each... Data sender implement The data receiver executes simultaneously .like Then the serial number generation phase ends. If Then return to step S22.

[0058] Continuing from the example scenario presented at the end of Phase 1, all data senders learn the number of members in each group from the sender. ,because The second group contains only one member, therefore the serial number can be obtained during the serial number pre-generation step. ("3" represents the sum of the number of members in groups with group numbers less than 2, and "1" represents...) (Regarding the order within its group), other senders cannot obtain the sequence number temporarily and need to be sorted within the group. Assume they belong to group 1. From finite geometric sequences respectively The sequence terms 729, 2187, and 729 were randomly selected and belong to the third group. From respectively The sequence terms 512 and 16 were randomly selected from the data. The data receiver will receive the sum of the sequence terms for each incomplete group. ,use The function can be known and These are the sums of random number sequences for members in groups 1 and 3, respectively. The data receiver can uniquely decompose them to obtain... and In the first group, there are repeated sequence items, so the sequence number cannot be obtained in this round. Therefore, only the sequence items of the third group are placed in the corresponding sequence ( The subscript in ) is broadcast to , You can get the serial number , get Next, let's assume... New sequence terms 6561, 81, and 243 were randomly selected respectively. The data receiver will then receive... Decomposition yields No repetition occurred, therefore get , get , get From this point on, each data sender receives a unique sequence number. During this process, the data receiver cannot deduce the correspondence between each sequence item and the data sender, and therefore cannot deduce the latter's sequence number.

[0059] Phase 3: Data Reporting Phase

[0060] At this stage, each data sender There may be multiple sets of data that need to be reported, therefore the aggregation process needs to be executed in multiple rounds. Let the round counter be... And initialize it to 1, and record the first... Wheel The data provided is In each round, the sender protects its own data using a mask and sequence number and sends it to the receiver. The receiver aggregates all the original data from all senders, which can then be used to perform arbitrary operations. Let there be a round counter. The process for this stage is shown in Figure 4.

[0061] Step S31, Anonymous Data Packaging: Each data sender Holding the data to be reported in this round ,implement ,get dimensional mask vector Update time step .implement ,get Anonymized data vectors of dimension And send it to the data recipient.

[0062] Step S32, Anonymous Data Unpacking: The data receiver executes... ,get Original data vector of dimension , , The serial number is The data sent by the data sender. If all data has been aggregated, the algorithm ends. Otherwise, it increments... Return to step S31.

[0063] Continuing from the example scenario presented at the end of Phase Two, the data sender The serial numbers are 3, 6, 1, 4, 2, and 5 respectively. In the... During the round of data reporting, the data receiver will receive However, the source of each data point cannot be determined.

[0064] (4) Method description

[0065] This method uses a function based on HMAC-SM3 hashing. Generate a mask with zero-shared property, meaning the modulo addition of the masks from all data senders results in 0. Then, use the function... All data that might reveal the sender's identity and privacy information during method execution is packaged and protected using functions. Secure unpacking is performed. The entire process ensures the anonymity of the data sender and requires no trusted third-party intervention; this method uses a function. , and Generate session keys between each pair of data senders; the resulting session keys will be used to execute... When the data receiver manipulates at most n-2 data users, based on the discrete logarithm problem and the security of the one-way pseudo-random function, the receiver cannot infer the data content packaged by the honest sender from the information it obtains. In phases two and three, the computation process of all data senders and receivers in this method only involves hash operations and modular addition, without any public key cryptographic operations, thus the computational overhead is low.

[0066] This invention provides a method for anonymous data reporting in a trustless environment. Its main advantages are as follows:

[0067] 1. A data packaging method using zero-shared mask is proposed, which enables the data receiver to obtain the data reported by the data provider without the need for a trusted third party, and the data receiver cannot infer the source of the data, thus ensuring the anonymity of the data provider.

[0068] 2. A hash mask generation method using session key pairs is proposed. When the number of data senders is n, the method can resist attacks by the data receiver manipulating at most n-2 data senders in an attempt to compromise the anonymity of the remaining honest senders.

[0069] 3. The method only involves hash operations and modular addition during real-time data reporting, without requiring any public key cryptographic operations. It has low computational overhead and is suitable for deployment on low-resource devices such as IoT devices and edge sensors.

[0070] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for anonymous data transmission based on hash masks, characterized in that, This method consists of three stages: Phase 1: Initialization Phase: With the assistance of the data receiver, all data senders generate session keys in pairs, and then each sender randomly joins one of m groups; Phase Two: Serial Number Generation Phase: All data senders generate unique serial numbers without the need for a trusted third party, and ensure that no other entity besides themselves can deduce the value of the serial number; Phase 3: Data Reporting Phase: All data senders use their own sequence numbers and session key sequences to package and protect their own data; the data receivers obtain all the packaged data and unpack it to obtain the set of original plaintext data, but cannot deduce the source of the data; in, Phase one includes: Step S11, Parameter Generation: The data receiver executes the algorithm. Generate system parameters And assign an identifier to each data sender, then Send to each data sender ; Step S12, Key Negotiation: Each data sender Execution Algorithm Obtain your own private key and public key and will Send to the data recipient; the data recipient collects all public keys. And send it to each data sender; then, Execution Algorithm To obtain oneself and others A vector of session keys of each data sender. Since no data sender is currently offline, an online session key set is set. ; Step S13, Member Grouping: Each data sender Randomly select a group number , indicates joining the group; when At that time, it is recommended to set Set the initial time step , implement ,get dimensional mask vector Update time step ; implement ,get dimensional wrapper vector And send it to the data recipient; the data recipient executes... This will cause the masks added by all data senders to protect their own data to cancel each other out to zero, thus obtaining... A vector of the number of members in a group. ,in Indicates choosing to join the The number of data senders in the group; to ensure the correctness of subsequent steps, it is necessary to determine: if for any number greater than 1... All are satisfied Then Send to each data sender and end this phase; otherwise, repeat step S13. Let the number of data senders be . The senders are respectively denoted as And initialize their respective flag bits. The data receiver initializes and maintains ,but: The initialization function is executed by the data receiver; input security parameters. Output public parameters ,in It is a large prime number. It is a multiplication group One of the original roots; The key generation function is provided by each data sender. Execute; Input system parameters Randomly select private key Calculate the public key Output key pair ; Represents a set ; Indicates from a certain range A number is randomly selected from the middle. ; The key negotiation function is performed by each data sender. Execute; Input system parameters , private key Public keys from other data senders; calculate and output the session key set. ,in ,See and The meanings are the same; The mask vector generation function is generated by each data sender. Execute; Input data sender identifier , Maintained set of online session keys Mask vector dimension and time step HMAC-SM3 is used as the pseudo-random function, denoted as . Calculate and output dimensional mask vector Among them, for : The wrapper function is provided by each data sender. Execution; Input mask vector dimension Mask vector Data to be protected and insertion position ; Calculate and output dimensional wrapper vector Among them, for : The unpacking function is executed by the data receiver; input set size. The set of wrapper vectors and the dimension of the wrapper vector Calculate and output ,in , , It is the modulus.

2. The anonymous data transmission method based on hash mask as described in claim 1, characterized in that, The second stage includes: each sender in each group selects a special random number, and the receiver, without knowing the selections of each party, obtains their sum and uniquely decomposes them into the original multiple random numbers, arranges them into a non-decreasing sequence, and sends them to all participants; each sender in a group checks the position of its own random number in the sequence, and the participant that is earlier and has a smaller group number has a smaller sequence number.

3. The anonymous data transmission method based on hash mask as described in claim 1, characterized in that, Phase two specifically includes: Step S21, Serial Number Pre-generation: implement ; Data receiver execution and will Send to all data senders; Step S22, Group Sorting: Each data sender implement Obtain the index of the random number sequence and the corresponding sequence terms ;set up , implement ,get dimensional mask vector Update time step ;implement Execute again ,get dimensional wrapper vector And send it to the data recipient; the data recipient executes... Let the output result be... dimensional accumulation vector ;right ;set up The data receiver for each Execute sequentially ,constitute And send it to all data senders; Step S23, Serial Number Generation: Data Sender The group number is ,examine If there are duplicate elements, the order of members in that group cannot be determined in this round; if there are no duplicates, then each... Data sender implement The data receiver executes simultaneously ;like Then the serial number generation phase ends; if Then return to step S22.

4. The anonymous data transmission method based on hash mask as described in claim 3, characterized in that, The sequence number pre-generation function is used by each data sender. Execute; Input Selected group number and Number of members in each group ;like ,but The serial number cannot be determined at this time. No settings ;like ,but set up and ; The first state update function is executed by the data receiver and is used to update all groups that have completed sequence number allocation. Input and iterate through the number of members in each group. ,like or Then update Finally, output ; This is a set that records all group numbers 1 to m for which sequence numbers have been generated; The relative group order solution function is derived from each data sender. Execution is used to calculate the order of its group among all groups whose sequence numbers have not yet been generated; input is the set of group numbers for completed groups. and Group number Output , For indicator functions; The random number sequence generation function is used by each data sender. Execute; Enter group number Completed flag and the number of members in the group ; Select the common ratio as finite geometric sequence Its general term formula is ;like Then randomly select the index of the sequence. Calculate the terms of the sequence Otherwise, if Then let Output and ; It is a finite geometric sequence; The sequence term decomposition function is executed by the data receiver; input the addends to be decomposed. Total number of addends The algorithm calculates... Addends ,satisfy The addend factorization is unique, and its output is in Vector formed by subscripts in , ; The serial number generation function is provided by each data sender. Execute; Input Group number Number of members in the group Random number sequence index The set of indices for addend factorization and the set of members in each group ;like If duplicate elements exist, sequence number allocation cannot be completed, and the algorithm terminates; otherwise, a duplicate element is found. make Calculate all group numbers less than The total number of members in the group Set serial number ,renew ; The second state update function is executed by the data receiver; it inputs and iterates through the addend factorization results of each incomplete group. ,like If there are no duplicate elements, then update. Finally, output .

5. The anonymous data reporting method based on hash mask as described in claim 4, characterized in that, In the third stage, each data sender There may be multiple sets of data that need to be reported, so the aggregation process needs to be executed in multiple rounds.

6. The anonymous data transmission method based on hash mask as described in claim 4, characterized in that, In stage three, the round counter is set as follows: And initialize it to 1, and record the first... Wheel The data provided is In each round, the sender protects its own data using a mask and sequence number and sends it to the receiver. The receiver aggregates all the original data from all the senders and then uses it to perform arbitrary operations.

7. The anonymous data transmission method based on hash mask as described in claim 4, characterized in that, Set up a round counter Phase Three specifically includes: Step S31, Anonymous Data Packaging: Each data sender Holding the data to be reported in this round ,implement ,get dimensional mask vector Update time step ;implement ,get Anonymized data vectors of dimension And send it to the data recipient; Step S32, Anonymous Data Unpacking: The data receiver executes... ,get Original data vector of dimension , , The serial number is The data sender reports the data; if all data has been aggregated, the algorithm ends; otherwise, it increments. Return to step S31.

8. The anonymous data transmission method based on hash mask as described in claim 7, characterized in that, When the data receiver manipulates at most n-2 data users, based on the discrete logarithm problem and the security of the one-way pseudo-random function, the receiver cannot infer the data content packaged by the honest sender from the information it obtains; in phases two and three, the calculation process of all data senders and receivers only involves hash operations and modulo addition.