Method and apparatus for protecting the privacy of message protocol metadata

By using hybrid key lists and blinded signature masking techniques, the problem of incomplete full-link metadata privacy coverage and weak privacy recovery capabilities in existing technologies is solved. This achieves metadata privacy protection and rapid recovery in both the link and storage dimensions, making it suitable for communication in multiple scenarios.

CN123122819APending Publication Date: 2026-11-17云账户技术(天津)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611397585.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies have problems in privacy protection, such as incomplete full-link metadata privacy coverage, weak privacy recovery capabilities, and lack of local state metadata privacy. Especially in group scenarios, the leakage of a single key can lead to privacy diffusion and is difficult to recover quickly.

Method used

A hybrid key list approach is adopted, including key lists for the current period, historical periods, and the next period. A periodically isolated key chain is constructed through two-stage key derivation, and privacy-protected ciphertext is generated using a blinded signature mask. This achieves indistinguishability between real keys and virtual data, blocks the risk of privacy spread after key leakage, and supports rapid recovery.

Benefits of technology

It achieves metadata privacy protection in both the link and storage dimensions, avoids metadata leakage caused by local state exposure, ensures that a single key leakage only affects privacy in the current period, and achieves rapid privacy recovery after compromise, adapting to communication in multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123122819A_ABST
    Figure CN123122819A_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for protecting the privacy of message protocol metadata. The method includes: invoking a pre-constructed hybrid key list; receiving privacy-protected ciphertext from the sender, querying the current period key list based on the location tag in the privacy-protected ciphertext, and obtaining the corresponding target message key; after successfully decrypting the privacy-protected ciphertext using the target message key, moving the target message key to a historical key list and dynamically updating the virtual data in the historical key list; and replacing the current period key list with the next period key list if the current period key list meets the key update conditions. This method avoids the risk of metadata leakage such as communication frequency and historical trajectory caused by local state exposure, avoids plaintext metadata exposure in the transmission link, ensures that a single key leakage only affects the privacy of the current period, and ultimately achieves dual-dimensional metadata privacy protection of the link and storage, as well as rapid privacy recovery after compromise.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, and in particular to a method and apparatus for protecting the privacy of message protocol metadata. Background Technology

[0002] Existing metadata privacy protection schemes are mostly designed for specific scenarios, and typical implementations can be divided into three categories.

[0003] The first category is a single-scenario metadata anonymous transmission scheme, represented by a signal sealing transmission mechanism. It uses the receiver's long-term public key to encrypt the ciphertext of the message to hide some metadata such as the sequence number and the sender's public key in the transmission link. However, in group scenarios, a separate encryption packet needs to be generated for each receiver, and the communication overhead increases linearly with the group size. Moreover, once the receiver's long-term key is leaked, the privacy of the sender's identity of all historical messages will be irreversibly destroyed, and there is a lack of privacy recovery capability after compromise.

[0004] The second category is group message metadata filtering schemes, represented by the private message mechanism of the MLS protocol. These schemes locate the decryption key by using the group session identifier and period number, and provide limited privacy protection for metadata related to the message body. However, the metadata of operations such as group key updates and member changes is still exposed in the link, and the message sequence number stored in the local state will reveal the number of unreceived messages, thus failing to achieve full-link metadata privacy protection.

[0005] The third category is temporary key interference schemes, represented by the mesh network metadata anonymization encapsulation protocol. It derives temporary keys to encrypt metadata through a two-way ratchet protocol and attaches random tags for key location. However, the receiver needs to store a large number of pre-computed key-tag pairs, resulting in excessive storage overhead. Furthermore, it lacks a sender authentication mechanism, making it vulnerable to forgery attacks and unable to be directly adapted to open group scenarios.

[0006] In summary, existing technologies generally suffer from four core defects: First, privacy protection is incomplete, focusing only on single-dimensional metadata protection for transmission links or local states. Attackers can obtain complete metadata through link eavesdropping and state leakage. Second, privacy recovery capabilities are weak, lacking isolation mechanisms between key chains and states. A single key leak can spread to the metadata privacy of historical or future sessions, making rapid privacy recovery impossible. Third, local state metadata privacy is lacking. Local states such as key lists and message indexes are directly associated with communication history. Once the state is exposed, sensitive features such as the number of senders, communication frequency, and the count of unreceived messages will be leaked.

[0007] Therefore, there is an urgent need for a message protocol metadata privacy protection solution that takes into account privacy coverage across the entire chain, enables rapid privacy recovery, and adapts to multiple scenarios. Summary of the Invention

[0008] This invention provides a method and apparatus for protecting the privacy of message protocol metadata, which solves the problems of lack of local state metadata privacy, weak privacy recovery capability due to single key leakage, and incomplete protection of receiver link-state dual-dimensional metadata in the prior art. It realizes the indistinguishability between the real key and virtual data of local state, prevents the risk of privacy spread from single key leakage to historical and future periods, and ultimately achieves metadata privacy protection in both link and storage dimensions.

[0009] On one hand, the present invention provides a method for protecting the privacy of message protocol metadata, applied to a receiver, comprising: invoking a pre-constructed hybrid key list, the hybrid key list including a current cycle key list, a historical key list, and a next cycle key list, wherein the current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data; receiving privacy-protected ciphertext from a sender, querying the current cycle key list according to the location tag in the privacy-protected ciphertext to obtain the corresponding target message key; after successfully decrypting the privacy-protected ciphertext using the target message key, moving the target message key into the historical key list and dynamically updating the virtual data in the historical key list; and, if the current cycle key list meets the key update conditions, replacing the current cycle key list with the next cycle key list, wherein the next cycle key list stores message keys derived from the next cycle root key.

[0010] Further, the steps for constructing the current cycle key list are as follows: receiving the shared key and verification key sent by the sender, and calling the previously stored update key; generating the current cycle root key based on the first key derivation function, according to the shared key, the verification key, and the previously stored update key; deriving a first preset number of message keys and corresponding location tags based on the current cycle root key, according to the second key derivation function; and constructing the current cycle key list based on the first preset number of message keys and location tags.

[0011] Furthermore, the steps for constructing the next cycle key list include: receiving a new shared key and a new verification key issued by the sender, and calling the currently stored current cycle update key; generating the next cycle root key based on a first key derivation function, according to the new shared key, the new verification key, and the current cycle update key; deriving a second preset number of message keys and corresponding location tags based on a second key derivation function, according to the next cycle root key; and constructing the next cycle key list based on the second preset number of message keys and location tags.

[0012] Furthermore, the key-tag storage structure of the current periodic key list includes a lookup table and a hierarchical counting Bloom filter; wherein, the lookup table is used to store the key-tag mapping relationship of a first usage frequency, and the hierarchical counting Bloom filter is used to store tags of a second usage frequency; the first usage frequency is higher than the second usage frequency.

[0013] Further, the step of querying the current cycle key list based on the location tags in the privacy-protected ciphertext includes: querying a lookup table storing key-tag mapping relationships in the current cycle key list based on the location tags in the privacy-protected ciphertext; if the lookup table matches, determining the retrieved message key as the target message key; if the lookup table does not match, querying a hierarchical counting Bloom filter storing tags in the current cycle key list, and determining the target message key based on the query result of the hierarchical counting Bloom filter.

[0014] Furthermore, dynamically updating the virtual data in the historical key list includes: replacing some of the real keys already stored in the historical key list with virtual data based on a preset ratio of real keys to virtual data; wherein the virtual data is generated based on the structural features of the real key-tag pairs in the current period key list and matches the structure of the real key-tag pairs.

[0015] Furthermore, the key update conditions include at least one of the following: the number of available keys in the current periodic key list is lower than a preset threshold; the time interval since the last key update reaches a preset duration, so that the available keys in the current periodic key list cannot meet the subsequent communication needs; a change in group members is detected, so that the available keys in the current periodic key list cannot adapt to the changed communication needs.

[0016] Secondly, the present invention also provides a method for protecting the privacy of message protocol metadata, applied to the sender, comprising: generating a current period root key based on a first key derivation function, according to a shared key, a verification key, and a previous period update key; deriving a message key, a location tag, and a blinding factor based on a second key derivation function, according to the current period root key; encrypting the original message using the message key to generate ciphertext, and signing the location tag and the ciphertext using a private key to obtain an original signature; masking the original signature using the blinding factor to obtain a blinded signature, generating a privacy-protected ciphertext containing the location tag, the ciphertext, and the blinded signature; and sending the privacy-protected ciphertext to the receiver.

[0017] Thirdly, the present invention also provides a message protocol metadata privacy protection device applied to a receiver, comprising: a list retrieval module for retrieval of a pre-built hybrid key list, the hybrid key list including a current cycle key list, a historical key list, and a next cycle key list, the current cycle key list storing message keys derived from the current cycle root key, and the historical key list being filled with virtual data; a ciphertext receiving module for receiving privacy-protected ciphertext from the sender, querying the current cycle key list based on the location tag in the privacy-protected ciphertext, and obtaining the corresponding target message key; a decryption and update module for, after successfully decrypting the privacy-protected ciphertext using the target message key, moving the target message key into the historical key list, and dynamically updating the virtual data in the historical key list; and a cycle switching module for, when the current cycle key list meets the key update conditions, replacing the current cycle key list with the next cycle key list, the next cycle key list storing message keys derived from the next cycle root key.

[0018] Fourthly, the present invention also provides a message protocol metadata privacy protection device applied to the sender, comprising: a root key generation module, used to generate a current period root key based on a first key derivation function, according to a shared key, a verification key, and a previous period update key; a key derivation module, used to derive a message key, a location tag, and a blinding factor based on a second key derivation function and the current period root key; an encryption and signing module, used to encrypt the original message using the message key to generate ciphertext, and to sign the location tag and the ciphertext using a private key to obtain an original signature; a blinding processing module, used to mask the original signature using the blinding factor to obtain a blinded signature, generating privacy-protected ciphertext containing the location tag, the ciphertext, and the blinded signature; and a ciphertext sending module, used to send the privacy-protected ciphertext to the receiver.

[0019] Fifthly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the message protocol metadata privacy protection method as described above.

[0020] In a sixth aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the message protocol metadata privacy protection method as described above.

[0021] In a seventh aspect, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the message protocol metadata privacy protection method as described above.

[0022] The present invention provides a method for protecting the privacy of message protocol metadata applied to the receiver. This method involves calling a pre-built hybrid key list, which includes a current cycle key list, a historical key list, and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, while the historical key list is filled with virtual data. The method receives privacy-protected ciphertext from the sender, queries the current cycle key list based on the location tags in the ciphertext, and obtains the corresponding target message key. After successfully decrypting the privacy-protected ciphertext using the target message key, the target message key is moved to the historical key list, and the virtual data in the historical key list is dynamically updated. If the current cycle key list meets the key update conditions, it is replaced with the next cycle key list, which stores message keys derived from the next cycle root key. This method achieves indistinguishability between real keys and virtual data in local storage by calling a pre-built hybrid key list that includes virtual data to populate the historical key list. This effectively avoids the risk of metadata leakage, such as communication frequency and historical trajectory, caused by the exposure of local state. By querying and matching the target message key based on the location tag in the privacy-protected ciphertext, it avoids the exposure of plaintext metadata in the transmission link. At the same time, through the physical isolation of the key lists of the current period and the next period, it ensures that the leakage of a single key only affects the privacy of the current period. Ultimately, it achieves metadata privacy protection in both the link and storage dimensions and rapid privacy recovery after compromise.

[0023] The present invention provides a method for protecting the privacy of message protocol metadata applied to the sender. This method generates a root key for the current period based on a first key derivation function, using a shared key, a verification key, and the previous period update key. Then, based on a second key derivation function, a message key, a location tag, and a blinding factor are derived from the current period root key. The original message is then encrypted using the message key to generate ciphertext. The location tag and ciphertext are signed using a private key to obtain an original signature. Finally, the original signature is masked using the blinding factor to obtain a blinded signature, generating privacy-protected ciphertext containing the location tag, ciphertext, and blinded signature. This privacy-protected ciphertext is then sent to the receiver. This method constructs a periodically isolated key chain through two-stage key derivation, using only the current period key for encrypting messages in the current period. This not only prevents the risk of privacy diffusion after key leakage but also enables rapid privacy recovery after a 10ms compromise. By employing a blinded signature mask and a fixed-length 152-byte ciphertext design, it achieves coordinated sender authentication and metadata privacy protection without increasing additional communication overhead. Furthermore, a single ciphertext can be adapted for full group broadcasting, and the communication overhead remains constant regardless of the group size. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating the message protocol metadata privacy protection method applied to the receiver provided in an embodiment of the present invention.

[0026] Figure 2 This is a flowchart illustrating the message protocol metadata privacy protection method applied to the sender, as provided in an embodiment of the present invention.

[0027] Figure 3 This is a schematic diagram of the structure of the message protocol metadata privacy protection device applied to the receiver provided in the embodiment of the present invention.

[0028] Figure 4 This is a schematic diagram of the structure of a message protocol metadata privacy protection device applied to the sender, provided in an embodiment of the present invention.

[0029] Figure 5 This is a schematic diagram of the physical structure of the electronic device provided in the embodiment of the present invention. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0031] Figure 1 This diagram illustrates a flowchart of a message protocol metadata privacy protection method for the recipient provided in an embodiment of the present invention.

[0032] like Figure 1As shown, the method includes: S110, invoking a pre-constructed hybrid key list, the hybrid key list including a current cycle key list, a historical key list, and a next cycle key list, the current cycle key list storing message keys derived from the current cycle root key, and the historical key list being filled with virtual data; S120, receiving privacy-protected ciphertext from the sender, querying the current cycle key list based on the location tag in the privacy-protected ciphertext, and obtaining the corresponding target message key; S130, after successfully decrypting the privacy-protected ciphertext using the target message key, moving the target message key into the historical key list, and dynamically updating the virtual data in the historical key list; S140, if the current cycle key list meets the key update conditions, replacing the current cycle key list with the next cycle key list, the next cycle key list storing message keys derived from the next cycle root key.

[0033] The following will provide a detailed description of steps S110-S140 and related steps.

[0034] S110, invoke a pre-built hybrid key list, which includes a current cycle key list, a historical key list and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data.

[0035] This step is an execution action in the message transmission phase. The list of hybrid keys called has been pre-built in the protocol initialization phase and does not need to be generated in real time during message transmission.

[0036] The receiver invokes the hybrid key list, which is a fixed-capacity local storage architecture generated during the protocol initialization phase. It contains three logical partitions: the current cycle key list, the historical key list, and the next cycle key list. Each list can have a fixed capacity of 1800 items.

[0037] The current period key list is a container that stores the valid message keys in the current period. The 1800 message keys inside are all derived from the current period root key through the second key derivation function (KDF-1). Each message key is matched with a unique location tag for subsequent ciphertext lookup.

[0038] The historical key list is a container for storing used keys and obfuscated data. It is filled with full virtual data during the initialization phase. The virtual data matches the structure of the real key-tag pair and is generated based on the length, hash characteristics, and structure of the real key-tag pair. The hash similarity between the virtual data and the real key-tag pair is not less than 99%, so network attackers cannot distinguish between real data and virtual data through statistical analysis.

[0039] The next cycle key list is a silent container that stores the valid message keys for the next cycle. It is pre-built based on the initial next cycle root key during the initialization phase. It internally stores 1,800 message keys and corresponding location tags derived from the next cycle root key and is in standby mode to achieve zero-latency response for cycle switching.

[0040] The current cycle is the communication cycle that the receiver is currently processing, that is, the cycle to which the message being received and decrypted belongs; the next cycle is the communication cycle that immediately follows the current cycle, that is, the cycle to which the receiver will switch after the current cycle ends. In this embodiment, the communication process is divided according to communication cycles, and each cycle corresponds to an independent cycle root key. The triggering conditions for cycle switching are configurable, such as reaching a preset number of messages, a time interval, or a change in group members.

[0041] Next, proceed to step S120.

[0042] S120: Receive the privacy-protected ciphertext from the sender, query the current period key list based on the location tag in the privacy-protected ciphertext, and obtain the corresponding target message key.

[0043] In this step, the receiver receives the privacy-protected ciphertext sent by the sender via the transmission link. The privacy-protected ciphertext is a fixed-length 152-byte structured data set, specifically a triple consisting of a location tag, encrypted ciphertext, and a blinded signature. The location tag is a unique identifier used to index the message key. The encrypted ciphertext is obtained by authenticating and encrypting the original message and the metadata to be protected. The blinded signature is the result of processing the original signature with a blinding factor mask, which prevents the plaintext signature from revealing the sender's identity, group association, and other metadata.

[0044] For the received privacy-protected ciphertext, the receiver extracts the location tags from the ciphertext and queries the current period key list based on the location tags to obtain the corresponding target message key. Specifically, the current period key list adopts a hierarchical storage structure. During the query, it first queries a lookup table storing 120 frequently used key-tag mapping relationships. If a match is found, the target message key is directly obtained; if not, it queries a hierarchical counting Bloom filter, and the target message key is derived based on the query result of the hierarchical counting Bloom filter.

[0045] The hierarchical counting Bloom filter is a compressed storage structure that supports element deletion operations. It is used to store the remaining 1680 low-frequency access tags in the current period key list. The configuration parameters are a false positive rate of 0.8%, 7 hash functions, and an 8-bit wide counter, which can reduce the single-session storage overhead from 280KB to 31.3KB.

[0046] Further, proceed to step S130.

[0047] S130, after successfully decrypting the privacy-protected ciphertext using the target message key, the target message key is moved into the historical key list, and the virtual data in the historical key list is dynamically updated.

[0048] In this step, the receiver uses the target message key obtained in step S120 to decrypt the privacy-protected ciphertext, obtaining the original message, the key to be verified, and a random factor. The key to be verified is the sender's public verification key, and the random factor is a derived parameter used to verify the hash commitment. Simultaneously, the receiver uses the blinding factor derived from the target message key to perform inverse masking on the blinded signature, removing the blinding mask from the privacy-protected ciphertext to recover the original signature. Then, the receiver uses the key to be verified to verify the recovered original signature, confirming the message's authenticity.

[0049] The random factor is used to assist the receiver in verifying the consistency between the key to be verified and the pre-stored hash commitment, while the blinding factor is used to mask the original signature to generate a blinded signature. Both can be derived from the second key derivation function (KDF-1) in the following embodiments. Although they are from the same source, their functions are completely independent.

[0050] After decryption and verification are completed, the receiver performs a state privacy update. Specifically, the target message key is first moved from the current period key list to the historical key list. Then, the ratio of real key to virtual data in the historical key list is dynamically adjusted based on the current communication frequency. For example, when communication is frequent, the ratio of real key to virtual data is 3:7, and when communication is sparse, the ratio of real key to virtual data is 7:3.

[0051] This step maintains the indistinguishability between real and virtual data in the historical key list by dynamically replacing some of the real keys with virtual data, which can effectively prevent the leakage of metadata such as communication frequency and historical trajectory after the local state is exposed.

[0052] Next, proceed to step S140.

[0053] S140, if the current period key list meets the key update conditions, the current period key list is replaced with the next period key list, and the next period key list stores message keys derived from the next period root key.

[0054] In this step, the receiver continuously monitors the status of the current periodic key list. When the current periodic key list meets the preset key update conditions, the period is switched. The key update conditions include at least one of the following: the number of available keys in the current periodic key list is lower than a preset threshold; the time interval since the last key update reaches a preset duration; or a change in group members is detected.

[0055] Once the key update conditions are met, the receiver directly uses the pre-built next-cycle key list as the new current-cycle key list, and the original current-cycle key list is either archived or securely destroyed. After the replacement is complete, the receiver immediately pre-builds a new next-cycle key list based on the newly received shared key and verification key, maintaining the dynamic updating of the hybrid key list.

[0056] It should be noted that in group scenarios, if an update is triggered due to a member change, the receiver, upon receiving a new shared key from the sender that does not contain the historical keys of the newly added member, updates its local key list for the next cycle based on this new shared key. When a new member initializes its local state, it cannot access the metadata prior to joining because it cannot obtain the historical keys from before joining, thus achieving forward privacy protection. If a member is removed, the removed member cannot obtain the new shared key from the sender that removes the key corresponding to the removed member. Therefore, it cannot update its local key list for the next cycle, nor can it decrypt subsequently generated privacy-protected ciphertext based on the new key, achieving backward privacy protection. This comprehensively safeguards metadata privacy in group scenarios.

[0057] It should also be noted that the message protocol metadata privacy protection method applied to the receiver provided in this embodiment of the invention refers to the associated information generated during message communication that is different from the message content itself. Specifically, it includes, but is not limited to, communication subject association information (such as sender identity, receiver identity, group size, member identity), message timing information (such as message sequence number, sending timestamp, communication frequency), session identification information (such as group session identifier, period number), key derivative trajectory information (such as period root key, update key usage clues), and features reflected in the local state such as the number of unreceived messages, historical communication trajectory, key list size, etc.

[0058] The aforementioned metadata and the message content itself form a complementary dimension of privacy protection. Traditional end-to-end encryption protocols only protect the message content, while this invention provides full lifecycle privacy protection for the aforementioned metadata through a link-state dual-dimensional protection.

[0059] In this embodiment, a pre-built hybrid key list is invoked. This hybrid key list includes a current cycle key list, a historical key list, and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data. The system receives privacy-protected ciphertext from the sender, queries the current cycle key list based on the location tags in the ciphertext, and obtains the corresponding target message key. After successfully decrypting the privacy-protected ciphertext using the target message key, the target message key is moved to the historical key list, and the virtual data in the historical key list is dynamically updated. If the current cycle key list meets the key update conditions, it is replaced with the next cycle key list, which stores message keys derived from the next cycle root key. This method achieves indistinguishability between real keys and virtual data in local storage by calling a pre-built hybrid key list that includes virtual data to populate the historical key list. This effectively avoids the risk of metadata leakage, such as communication frequency and historical trajectory, caused by the exposure of local state. By querying and matching the target message key based on the location tag in the privacy-protected ciphertext, it avoids the exposure of plaintext metadata in the transmission link. At the same time, through the physical isolation of the key lists of the current period and the next period, it ensures that the leakage of a single key only affects the privacy of the current period. Ultimately, it achieves metadata privacy protection in both the link and storage dimensions and rapid privacy recovery after compromise.

[0060] Based on the above embodiments, the following will further describe in detail the construction process of the mixed key list in the initialization phase of step S110.

[0061] The hybrid key list is a fixed-capacity local storage architecture pre-built by the receiver during the protocol initialization phase. It consists of three fixed-capacity tables: the current cycle key list, the historical key list, and the next cycle key list, each with a fixed capacity of 1800 entries. After initialization, it enters a silent standby state and is directly invoked during the message transmission phase without needing to be built in real time.

[0062] In one specific embodiment, the process of constructing the current periodic key list is described in detail.

[0063] It is easy to understand that the current cycle key list is used to store the valid message keys and corresponding location tags within the current communication cycle, and its construction process strictly follows the two-stage key derivation logic. Specifically, in the initialization phase, the sender autonomously generates an initial shared key and calls the sender initialization interface to generate an initial verification key, and then sends the initial shared key and verification key to the receiver through a secure channel.

[0064] The receiver first receives the shared key and verification key for the current period from the sender, and then calls the update key of the previous period stored locally. Based on the first key derivation function (KDF-2), the receiver generates the root key and the update key for the current period according to the shared key, verification key, and update key of the previous period. Then, based on the second key derivation function (KDF-1), the receiver derives a first preset number of message keys, such as 1800, and a location tag corresponding to each message key, using the root key of the current period as input. Finally, the receiver constructs the key list for the current period based on the aforementioned 1800 message keys and location tags.

[0065] The current periodic key list is configured with a hierarchical storage structure to optimize query efficiency and reduce multi-session storage overhead. Specifically, a lookup table is set to store the 120 most frequently used key-tag mappings, supporting fast queries with O(1) complexity. A hierarchical counting Bloom filter (H-CBF) is set to store the 1680 most frequently used tags, with configuration parameters of 0.8% false positive rate, 7 hash functions, and 8-bit counter width. This reduces the single-session storage overhead from 280KB to 31.3KB, a reduction of 88.8%. During subsequent decryption, the lookup table is queried first. If no match is found, the hierarchical counting Bloom filter is queried to deduce the corresponding message key. The entire process does not expose session metadata associations.

[0066] The first usage frequency refers to the high-frequency access frequency of the message key, which corresponds to the message key that is more likely to be called during the communication process; the second usage frequency refers to the low-frequency access frequency of the message key, which corresponds to the message key that is less likely to be called during the communication process. The first usage frequency is significantly higher than the second usage frequency.

[0067] It should be noted that during the initialization phase, the first and second usage frequencies are determined according to preset rules to distribute the key-tag to different storage structures to optimize query performance. During the message transmission phase, as messages are continuously sent and received, the actual usage frequency differences will naturally emerge, and the key distribution between the query table and the hierarchical counting Bloom filter can be dynamically adjusted based on the actual frequency.

[0068] This embodiment constructs a current-cycle key list containing 1800 message keys and location tags through a two-stage key derivation. It employs a hierarchical structure using a lookup table to store 120 high-frequency key-tag mappings and an H-CBF to store 1680 low-frequency tags, reducing single-session storage overhead from 280KB to 31.3KB, a reduction of 88.8%. This significantly reduces storage overhead while maintaining query efficiency. The entire query process derives keys based on location tags, without exposing session identifiers or other metadata. Furthermore, it supports initial preset traffic splitting and dynamic adjustment of transmission stages based on actual call frequency, allowing the storage structure to adapt to actual communication modes while balancing performance and privacy protection.

[0069] In another specific embodiment, the process of constructing the historical periodic key list is described in detail.

[0070] The historical key list is used to store used keys and virtual data. It is configured with a fixed capacity of 1800 items during initialization and is fully populated with virtual data. The virtual data is generated based on the length, hash characteristics, and structure of the real key-tag pairs in the current period's key list. It is homologous to the real key-tag pairs but heterogeneous, with a hash similarity of no less than 99%.

[0071] During message transmission, the ratio of real keys to virtual data in the historical key list is dynamically adjusted by default based on the communication frequency. For example, in sparse communication scenarios, the ratio of real keys to virtual data is configured as 7:3, and in frequent communication scenarios, the ratio is configured as 3:7. This ensures that after the local state is exposed, attackers cannot distinguish between real communication records and virtual data through statistical analysis, thus avoiding the leakage of metadata such as communication frequency and historical trajectory.

[0072] In another specific embodiment, the process of constructing the key list for the next cycle is described in detail.

[0073] The next cycle key list is a pre-built silent storage container used to store the valid message key and corresponding location tag for the next communication cycle, ensuring zero-latency response and metadata privacy continuity during cycle switching.

[0074] Specifically, the sender generates a new shared key and a new verification key based on the receiver's key generation request or independently, and sends the new shared key and new verification key to the receiver through a secure channel. The receiver receives the new shared key and new verification key for the next cycle from the sender and calls the currently stored update key. Based on the first key derivation function (KDF-2), it generates the root key and the update key for the next cycle according to the new shared key, the new verification key, and the current cycle update key. Then, based on the second key derivation function (KDF-1), it derives a second preset number of message keys, such as 1800, and corresponding location tags based on the root key for the next cycle. Finally, based on the aforementioned 1800 message keys and location tags, it constructs the key list for the next cycle. After initialization, it enters a standby state, ready to be activated when the current cycle key meets the key update conditions.

[0075] Once the current period key list, historical key list, and next period key list are constructed, the hybrid key list initialization process is complete. During the message transmission phase, the receiver can directly call the hybrid key list to perform subsequent message reception, query, decryption, and status update operations.

[0076] This embodiment pre-constructs a next-cycle key list containing 1800 message keys and location tags and keeps it in silent standby mode, allowing it to be directly activated during cycle switching, achieving zero-latency response and uninterrupted communication. The next-cycle key list is generated through a two-stage key derivation based on the new shared key, the new verification key, and the current cycle update key, and is physically isolated from the current cycle key, ensuring that the leakage of a single cycle key does not affect the privacy of metadata in future cycles, thus guaranteeing privacy continuity.

[0077] Based on the above embodiments, the following will further describe in detail the process of querying the current period key list based on the location tag in the privacy-protected ciphertext in step S120.

[0078] The process involves querying the current cycle key list based on the location tags in the privacy-protected ciphertext, including: querying a lookup table that stores the key-tag mapping relationships in the current cycle key list based on the location tags in the privacy-protected ciphertext; if the lookup table matches, determining the retrieved message key as the target message key; if the lookup table does not match, querying a hierarchical counting Bloom filter that stores tags in the current cycle key list, and determining the target message key based on the query results of the hierarchical counting Bloom filter.

[0079] It is easy to understand that the current period key list invoked by the receiver has been pre-built during the initialization phase. Its key-tag storage structure is configured according to the following rules: the lookup table stores the complete key-tag mapping relationship of 120 high-frequency used keys, and the hierarchical counting Bloom filter stores 1680 low-frequency used tags. The configuration parameters of the hierarchical counting Bloom filter are a false positive rate of 0.8%, a number of hash functions of 7, and a counter bit width of 8 bits, which can reduce the storage overhead of a single session from 280KB to 31.3KB, a reduction of 88.8%.

[0080] During the actual query, the receiver first extracts the location tag carried in the privacy-protected ciphertext. This location tag is derived by the sender from the current period root key using the second key derivation function (KDF-1) and is bound one-to-one with the corresponding message key. The receiver then uses the extracted location tag as an index to query a pre-built lookup table in the current period key list. Since the lookup table stores the complete mapping relationship of frequently used keys, the query process is a fast, seamless local operation that does not expose any session metadata association information. If a record matching the input location tag exists in the lookup table, the message key corresponding to that record is directly determined as the target message key, and the query process ends.

[0081] If no match is found in the lookup table, the receiver inputs the location tag into the hierarchical counting Bloom filter for matching. The hierarchical counting Bloom filter stores a set of 1680 low-frequency used tags in the current period key list. During the query, the array value of the location tag is calculated by seven hash functions, and the counter values ​​of these seven positions are checked to see if they are all greater than 0.

[0082] If all 7 location counter values ​​are greater than 0, the tag is determined to exist. The corresponding target message key is determined based on the one-to-one mapping relationship between the location tag and the message key. Even if there is a very small false positive probability of 0.8%, the subsequent decryption steps will verify the validity of the message key. False positives will only lead to decryption failure and will not leak any metadata information. If any location counter value is 0, the tag is determined to not exist. The received privacy-protected ciphertext is confirmed to be an illegal message and is discarded.

[0083] In this embodiment, the entire query process is completed locally without transmitting any query requests to the outside world, and without exposing metadata such as session identifiers and communication subject associations, thus achieving metadata privacy protection in both link and state dimensions.

[0084] Based on the above embodiments, the process of dynamically updating the virtual data in the historical key list in step S130 will be described in detail below.

[0085] Dynamically updating the virtual data in the historical key list includes: replacing some of the real keys already stored in the historical key list with virtual data based on a preset ratio of real keys to virtual data; wherein, the virtual data is generated based on the structural features of the real key-tag pairs in the current period key list and matches the structure of the real key-tag pairs.

[0086] It is easy to understand that the historical key list is configured with a fixed capacity of 1,800 items during initialization to store used keys and virtual data. The update process strictly maintains the fixed capacity of 1,800 items, without expansion or contraction, in order to ensure the overall stability of the hybrid key list.

[0087] Specifically, the receiver first determines the current communication frequency based on the number of messages received per unit time according to local statistics: if the number of messages received per unit time is higher than or equal to the set threshold, it is determined to be a frequent communication scenario, and the preset ratio of real key to virtual data of 3:7 is retrieved; if it is lower than the set threshold, it is determined to be a sparse communication scenario, and the preset ratio of real key to virtual data of 7:3 is adjusted.

[0088] Subsequently, the receiver checks the actual ratio of real keys to virtual data in the historical key list. If it does not match the preset ratio, it can use a first-in-first-out replacement strategy to select the earliest real key moved into the historical key list as the replacement target; or it can use a random selection strategy to determine the real key to be replaced.

[0089] For each real key to be replaced, the receiver generates local virtual data based on the structural characteristics of the real key-tag pairs in the current periodic key list. The virtual data contains virtual keys and virtual tags, and its length, encoding format, and hash entropy distribution are completely consistent with the real key-tag pairs in the current periodic key list. It is homogeneous data with heterogeneous origin and has a hash similarity of no less than 99% with the real key-tag pairs. Attackers cannot distinguish between the two through statistical analysis, hash collisions, or other methods.

[0090] The receiver removes the real key to be replaced from its storage location and fills the corresponding position with the generated virtual data, completing the dynamic update of the virtual data. After the update, the ratio of real key to virtual data in the historical key list matches the preset ratio perfectly, and this process does not change the total number of items in the historical key list.

[0091] It should be noted that the dynamic update process in this embodiment only adjusts the ratio of real keys to virtual data within the historical key list, and does not modify the pre-stored content of the current period's key list or the key list for the next period. The updated historical key list can effectively prevent the leakage of metadata such as communication frequency and historical trajectory after the local state is exposed by obfuscating real communication records with a high proportion of virtual data.

[0092] Based on the above embodiments, the method further decrypts the privacy-protected ciphertext using the target message key to obtain the key to be verified and a random factor; correspondingly, the method also includes: using the random factor to verify the consistency between the key to be verified and the pre-stored hash commitment; the pre-stored hash commitment is generated based on the verification key; removing the blinding mask in the privacy-protected ciphertext to recover the original signature, and using the verified key to be verified to verify the recovered original signature.

[0093] It is easy to understand that the privacy-protected ciphertext consists of three parts: location tag, encrypted ciphertext, and blinded signature. The encrypted ciphertext is obtained by the sender encrypting the original message, the key to be verified, and the random factor together for authentication; the key to be verified is the sender's verification key, and in a group scenario, it is the group's public verification key; the random factor is the randomization parameter derived from the current period root key by the second key derivation function (KDF-1).

[0094] The receiver first calls the target message key to authenticate and decrypt the privacy-protected ciphertext. After decryption, the original message, the key to be verified, and the random factor can be obtained directly, with no plaintext metadata exposed throughout the process.

[0095] Subsequently, hash commitment consistency verification is performed. During the initialization phase, the receiver generates a pre-stored hash commitment based on the verification key issued by the sender, combined with the corresponding random factor, using a hash commitment algorithm. Only this hash commitment is stored locally; the plaintext verification key is not stored, avoiding direct association between the verification key and the session duration. The pre-stored hash commitment is generated entirely based on the verification key. The receiver calls the commitment verification algorithm, inputting the decrypted key to be verified, the pre-stored hash commitment, and the decrypted random factor for verification. If the verification passes, it confirms that the key to be verified has not been tampered with and is completely consistent with the verification key bound to the pre-stored commitment. The entire verification process does not expose the metadata associated with the verification key and the session duration, preventing link eavesdropping from obtaining the usage trajectory of the verification key.

[0096] Next, blinding mask removal and signature verification are performed. The receiver derives the blinding factor from the target message key using the second key derivation function (KDF-1). This blinding factor is completely consistent with the blinding factor used by the sender when constructing the privacy-preserving ciphertext. Subsequently, the blinded signature in the privacy-preserving ciphertext is XORed and inversely operated to remove the blinding mask and restore the original signature. This process can prevent the plaintext signature from leaking metadata such as the sender's identity and group association.

[0097] Then, the signature verification algorithm is invoked to verify the legality of the recovered original signature using the verified key. If the verification passes, it is confirmed that the sender's identity is genuine and valid, and the message has not been tampered with during transmission.

[0098] Specifically, in group communication scenarios, all group members pre-store the group's public hash commitment during the initialization phase. There is no need to store the independent plaintext verification keys of each sender. After receiving the group message, the receiver extracts the group verification key and corresponding random factor carried by the sender, verifies the consistency between the group verification key and the pre-stored group hash commitment, and verifies the original signature recovered by using the group verification key after successful verification. Throughout the process, the receiver only stores the public commitment locally, and the verification process does not expose metadata such as group size and member identity.

[0099] In this embodiment, the overall length of the privacy-protected ciphertext is only 152 bytes, which is significantly reduced compared to existing solutions and can effectively reduce the risk of metadata exposure in the transmission link.

[0100] Based on the above embodiments, the message protocol metadata privacy protection method provided by the embodiments of the present invention is applicable to group communication scenarios, and both the hybrid key list and the privacy-protected ciphertext support concurrent access by multiple members.

[0101] During the initialization phase, the group creator, as the sender, generates an initial shared key and distributes it to all group members through a secure channel. Each member, as the receiver, independently initializes a hybrid key list locally. The hybrid key list contains three logical partitions: the current cycle key list, the historical key list, and the next cycle key list, with each partition having a fixed capacity of 1800 items.

[0102] Meanwhile, the current periodic key list is configured with a lookup table and a hierarchical counting Bloom filter. The lookup table stores the mapping relationship between frequently used key tags, while the hierarchical counting Bloom filter stores frequently used tags. Its false positive rate is 0.8%, the number of hash functions is 7, and the counter bit width is 8 bits, which can reduce the storage overhead of a single session to 31.3KB. Each member's historical key list is initially filled with full virtual data. The structural features of the virtual data are matched with those of the real key-tag pairs, and the hash similarity is not less than 99%.

[0103] During message transmission, when the group sender needs to send a message, it derives the message key, location tag, and blinding factor based on the current period root key. It then uses an authentication encryption algorithm to encrypt the original message and the metadata to be protected, generating encrypted ciphertext. After signing the location tag and encrypted ciphertext using the group verification key, it masks the signature using the blinding factor to obtain a blinded signature. Finally, it generates privacy-protected ciphertext containing the location tag, encrypted ciphertext, and blinded signature. The total length of the privacy-protected ciphertext is only 152 bytes, requiring only one copy to be sent to all group members. There is no need to generate separate encryption packets for different members, and the communication overhead does not increase with the size of the group.

[0104] During the multi-member concurrent reception and processing phase, multiple group members simultaneously receive the privacy-protected ciphertext and each independently executes its local processing flow without interfering with the others. Each member extracts the location tags from the privacy-protected ciphertext, queries the location tag mapping relationship in its local current periodic key list, prioritizes querying the local lookup table, and if no match is found, queries the local hierarchical counting Bloom filter to derive the corresponding target message key. The encrypted payload is decrypted using the target message key to obtain the original message, group verification key, and random factor. The consistency between the group verification key and the locally pre-stored group hash commitment is verified using the random factor. After removing the blinding mask to restore the original signature, the verified group verification key is used to verify the original signature.

[0105] After successful verification, each member independently updates their local hybrid key list, moving used target message keys to their local historical key list and replenishing the current period's key list with the corresponding number of keys from the next period's key list. Simultaneously, the ratio of real keys to virtual data in the historical key list is dynamically adjusted based on local communication frequency: 3:7 during frequent communication and 7:3 during sparse communication, maintaining local state privacy. Throughout the process, each member's operations are completed independently locally, without interaction with other members, supporting any number of members simultaneously performing decryption and state update operations.

[0106] During the dynamic member change phase, when a new member is added to the group, the group creator generates a new shared key. This new shared key ensures that the new member cannot access historical data from before joining. The new shared key is then distributed to all existing group members. After receiving the new shared key, each existing member independently calls the update interface to build a new key list for the next cycle based on the new shared key, without needing to coordinate the update rhythm. The new member can join the group after initializing the local hybrid key list, but cannot obtain historical keys from before joining, and therefore cannot access metadata from before joining.

[0107] When a member is removed from a group, the group creator generates a new shared key that excludes the removed member's key and distributes it to all existing group members. The removed member cannot obtain the new shared key and cannot update its local mixed key list, thus preventing it from decrypting subsequent messages. Throughout the entire member change process, the status update operations for each member are executed asynchronously, supporting concurrent processing and ensuring that the group's normal message sending and receiving process is not interrupted.

[0108] In this embodiment, an attacker can only obtain the same privacy-protected ciphertext through link eavesdropping. This ciphertext consists of three parts: a location tag, encrypted ciphertext, and a blinded signature, with a fixed total length of 152 bytes. The location tag is a pseudo-random value generated by the second key derivation function, not an incrementing sequence number. The encrypted ciphertext hides the verification key and session association using authentication encryption. The blinded signature eliminates plaintext features through a blinding factor mask. Therefore, attackers cannot extract metadata such as sender identity, group size, and communication frequency. Even if a single member's local state is leaked, the attacker cannot distinguish between the real key and virtual data in the historical key list, thus not affecting the privacy and security of other members. This fully verifies the ability of the hybrid key list and privacy-protected ciphertext to support concurrent access by multiple members, achieving constant-level privacy protection overhead in group scenarios.

[0109] Based on the above embodiments, the key update conditions will be described in detail below.

[0110] The key update conditions include at least one of the following: the number of available keys in the current period key list is less than a preset threshold; the time interval since the last key update reaches a preset duration, so that the available keys in the current period key list cannot meet the subsequent communication needs; or a change in group members is detected, so that the available keys in the current period key list cannot adapt to the changed communication needs.

[0111] If the current period key list meets the key update conditions, the current period key list will be replaced with the next period key list.

[0112] In one specific embodiment, the receiver continuously monitors the remaining available keys in the current period's key list. When the number of available keys falls below a preset threshold, it is determined that the current period's key list cannot meet subsequent communication needs, triggering a key update condition. The preset threshold can be dynamically configured according to the communication frequency to reserve sufficient key buffer space to cope with sudden high-frequency message transmissions and avoid communication interruption due to key exhaustion.

[0113] In another specific embodiment, the receiver has a built-in timing module that records the time interval since the last key update. When the time interval reaches a preset duration, even if there are still many available keys in the current period key list, it is determined that the key update condition is met and the period is switched. This scheme can effectively limit the usage window of a single period key and reduce the impact of key leakage.

[0114] In another specific embodiment, in a group communication scenario, the receiver listens for group member change notifications in real time. When a new member is detected to have joined or an old member is removed, it determines that the original key distribution system cannot adapt to the changed communication requirements and immediately triggers the key update condition to ensure that the new member cannot access historical messages and the removed member cannot access future messages.

[0115] Once any of the above key update conditions is detected, the receiver immediately performs a cycle switching operation. The receiver directly replaces the pre-built next-cycle key list, which is in a silent standby state, with the local current-cycle key list. The original current-cycle key list is then archived or securely destroyed. The entire replacement process is completed instantly locally without interrupting ongoing communication, ensuring the continuity of metadata privacy protection. After the replacement is complete, the receiver immediately calls the first key derivation function based on the newly received shared key and verification key, combining it with the locally stored current-cycle update key to generate a brand-new next-cycle root key and the next-next-cycle update key. Based on the second key derivation function, 1800 new message keys and location tags are derived to construct a new next-cycle key list, thus maintaining the dynamic updating of the hybrid key list.

[0116] This embodiment employs periodic key chain isolation to ensure that each communication cycle corresponds to an independent chain key. Historical cycle keys are physically isolated through key updates, preventing attackers from deriving historical keys from the current cycle key, thus protecting the privacy of historical metadata. In the extreme case of key leakage, the sender and receiver only need to obtain a new shared key through the protocol key update mechanism and derive a new chain key using the first key derivation function to complete privacy recovery. This process is typically completed within 10 milliseconds and only affects the metadata privacy of the current communication cycle; metadata outside the leaked cycle remains private, achieving efficient privacy recovery capabilities after compromise.

[0117] Corresponding to the message protocol metadata privacy protection method applied to the receiver described in the above embodiments, the present invention also provides a message protocol metadata privacy protection method applied to the sender.

[0118] Specifically, Figure 2 This diagram illustrates a flowchart of a message protocol metadata privacy protection method for the sender, provided by an embodiment of the present invention.

[0119] like Figure 2As shown, the method includes: S210, generating a current period root key based on a first key derivation function, according to a shared key, a verification key, and a previous period update key; S220, deriving a message key, a location tag, and a blinding factor based on a second key derivation function and the current period root key; S230, encrypting the original message using the message key to generate ciphertext, and signing the location tag and the ciphertext using a private key to obtain an original signature; S240, masking the original signature using the blinding factor to obtain a blinded signature, generating a privacy-protected ciphertext containing the location tag, the ciphertext, and the blinded signature; S250, sending the privacy-protected ciphertext to the receiver.

[0120] The following will provide a detailed description of steps S210-S250 and related steps.

[0121] S210, based on the first key derivation function, generate the current period root key according to the shared key, verification key and the previous period update key.

[0122] In this step, the sender generates an initial shared key during the initialization phase and calls the sender initialization interface (MPPS.initS) to generate a signature key pair, obtaining a private key and a verification key, and pre-stores the verification key locally. At the same time, if the current period is the first period, the sender obtains the initial update key pre-set during the protocol initialization phase, which is used as the update key for the previous period of the first period. If the current period is not the first period, the sender directly calls the update key output by the first key derivation function of the previous period stored locally, and uses it as the update key for the previous period of the current period.

[0123] Subsequently, the sender calls the first key derivation function (KDF-2), using the effective shared key, verification key, and previous cycle update key as inputs, to calculate the current cycle root key; this derivation also outputs the next cycle update key, which the sender stores locally for use as the previous cycle update key in the next communication cycle.

[0124] It should be noted that the current cycle root key is unique to the current communication cycle and is physically isolated from the historical cycle keys through key updates. Attackers cannot deduce the historical cycle keys based on the current cycle root key, thus ensuring that the privacy of historical metadata is not traced back.

[0125] Next, proceed to step S220.

[0126] S220, based on the second key derivation function, the message key, location tag and blinding factor are derived according to the current period root key.

[0127] In this step, the sender calls the second key derivation function (KDF-1), using the current period root key obtained in step S210 as the only input, to perform the key derivation operation and simultaneously obtain the message key, location tag, and blinding factor.

[0128] The message key is used for subsequent message encryption, the location tag is used by the receiver to index and query the corresponding message key, and the blinding factor is used for subsequent signature masking. These three components are bound one-to-one through a second key derivation function and can only be used together to avoid cross-associations of keys, tags, and blinding parameters from different messages, which could lead to metadata leakage.

[0129] Next, proceed to step S230.

[0130] S230, the original message is encrypted using the message key to generate ciphertext, and the location tag and the ciphertext are signed using the private key to obtain the original signature.

[0131] In this step, the sender calls the authentication encryption algorithm and uses the message key derived in step S220 to encrypt the original message and the metadata to be protected, generating encrypted ciphertext. When constructing the encrypted ciphertext, the sender encapsulates its own verification key and the corresponding random factor together inside the encrypted ciphertext for the receiver to use in subsequent hash commitment verification.

[0132] Subsequently, the sender invokes the signature algorithm, using its local private key to digitally sign the location tag and the encrypted ciphertext, obtaining the original signature. In group communication scenarios, the sender uses the group's public private key to perform the signature operation, ensuring that the generated signature can be verified by all group members using their corresponding public verification keys.

[0133] Next, proceed to step S240.

[0134] S240, the original signature is masked using the blinding factor to obtain a blinded signature, and privacy-protected ciphertext containing the positioning tag, the ciphertext, and the blinded signature is generated.

[0135] In this step, the sender invokes a masking algorithm, using the blinding factor derived in step S220 to perform an XOR operation on the original signature obtained in step S230, removing the plaintext features of the original signature to obtain a blinded signature. This masking process effectively prevents the plaintext signature from exposing metadata such as the sender's identity and group association relationships, achieving a synergistic optimization of identity authentication and metadata privacy protection.

[0136] Subsequently, the sender assembles the location tag, encrypted ciphertext, and blinded signature into privacy-preserving ciphertext. The privacy-preserving ciphertext employs a fixed-length structure, with a total length of 152 bytes, resulting in a compact structure that helps reduce metadata exposure during transmission.

[0137] Finally, proceed to step S250.

[0138] S250, send the privacy-protected ciphertext to the recipient.

[0139] In this step, the sender transmits the privacy-protected ciphertext assembled in step S240 to the receiver. Only one copy of the privacy-protected ciphertext needs to be generated and broadcast to all receivers; there is no need to generate separate encryption packets for different receivers, and the communication overhead does not increase linearly with the group size. Throughout the entire transmission process, only three types of fields are exposed in the link: location tag, encrypted ciphertext, and blinded signature. No other plaintext metadata is leaked, and attackers cannot obtain metadata information such as the sender's identity, group size, or communication frequency by monitoring the link.

[0140] In a group scenario, when the key update condition is triggered, the sender generates a new shared key and repeats the above steps S210-S250 to generate privacy-protected ciphertext for the new cycle, achieving key cycle isolation and rapid privacy recovery. The key update process can be completed within 10 milliseconds, affecting only the metadata privacy of the current communication cycle, while data from other cycles remains unaffected.

[0141] In this embodiment, a root key for the current period is generated based on a first key derivation function, using the shared key, verification key, and the previous period update key. Then, based on a second key derivation function, a message key, location tag, and blinding factor are derived from the current period root key. The original message is then encrypted using the message key to generate ciphertext. The location tag and ciphertext are signed using the private key to obtain the original signature. Finally, the original signature is masked using the blinding factor to obtain a blinded signature, generating privacy-protected ciphertext containing the location tag, ciphertext, and blinded signature. This privacy-protected ciphertext is then sent to the recipient. This method constructs a periodically isolated key chain through two-stage key derivation, using only the current period key for encrypting the current period's message. This not only prevents the risk of privacy diffusion after key leakage but also enables rapid privacy recovery after a 10ms compromise. By employing a blinded signature mask and a fixed-length 152-byte ciphertext design, sender authentication and metadata privacy protection are achieved collaboratively without increasing communication overhead. Furthermore, a single ciphertext can be used for full group broadcasting, and the communication overhead remains constant regardless of the group size.

[0142] In other embodiments, group creator C is used as the sender and group member D is used as the receiver. The main interaction diagram of the message protocol metadata privacy protection method provided in the embodiments of the present invention describes the overall interaction process between the sender and the receiver.

[0143] During the initialization phase, sender C autonomously generates an initial shared key, calls the sender initialization interface (MPPS.initS) to generate a group signature key pair, pre-sets the initial update key, and sends the initial shared key to receiver D through a secure channel; receiver D calls the receiver initialization interface (MPPS.initR) to construct a hybrid key list containing the current period key list, the historical key list, and the next period key list, enables a hierarchical counting Bloom filter to optimize storage, and pre-stores the hash commitment of the group verification key.

[0144] During a single message transmission phase, when sender C triggers message transmission, it calls the first key derivation function, taking the initial shared key, group verification key, and preset initial update key as inputs, to generate the current cycle root key and the next round update key, which are then stored locally. It then calls the second key derivation function to derive the message key, location tag, and blinding factor from the current cycle root key. Using the message key, it authenticates and encrypts the original message and the metadata to be protected to obtain encrypted ciphertext. After signing the location tag and encrypted ciphertext using the group private key, it masks the original signature using the blinding factor to obtain a blinded signature. Finally, it assembles a privacy-protected ciphertext of 152 bytes in length. Sender C then broadcasts the privacy-protected ciphertext to receiver D via a public link.

[0145] After receiving the ciphertext, receiver D invokes a pre-built hybrid key list to extract the current period key list. It then queries the location tag mapping relationship of the current period key list using the location tags in the privacy-preserving ciphertext to deduce the target message key. Using the target message key, it decrypts the encrypted ciphertext to obtain the original message, group verification key, and random factor. It first verifies the consistency between the group verification key and the locally stored hash promise, then removes the mask of the blinded signature using the blinding factor derived from the target message key to recover the original signature and verify its legitimacy. After successful verification, the target message key is moved to the historical key list, and the ratio of real keys to virtual data in the historical key list is dynamically adjusted to maintain state privacy.

[0146] During the key cycle iteration update phase, sender C detects key update trigger conditions, such as when 150 messages have been sent in the current cycle, more than 24 hours have passed since the last update, or when group members change. In non-group member change scenarios, sender C generates a new shared key without member removal information and distributes the new shared key to all existing members through a secure channel. At the same time, sender C generates a new cycle root key and an update key based on the new shared key through a two-stage key derivation.

[0147] After receiving the new shared key, receiver D synchronously derives a key to construct a new key list for the next cycle, directly replacing the original key list for the next cycle with the key list for the current cycle. The original key list for the current cycle is archived or destroyed. Simultaneously, the corresponding used tags are removed from the hierarchical counting Bloom filter that supports dynamic deletion. After adjustment, the ratio of real keys to virtual data in the historical key list is dynamically adjusted according to the communication frequency, and the Bloom filter parameters and update thresholds are optimized as needed. The entire update process runs in the background without interrupting communication. Privacy recovery is completed within 10 milliseconds after a key leak, affecting only the privacy of the current cycle's metadata. If the update is triggered by a change in group members, the new shared key will remove the corresponding member's key; see the handling of the dynamic member change phase described later.

[0148] After each key update, the sender and receiver jointly evaluate the current privacy protection effect. Based on the field characteristics of the adapted message protocol and the scope of metadata protection required by compliance, they dynamically adjust parameters such as the false positive rate of the hierarchical counting Bloom filter, the ratio threshold of real key to virtual data, and the key update triggering conditions to achieve an adaptive balance between privacy protection strength and communication performance.

[0149] During the dynamic member change phase, when a new member E is added, the sender C generates a new shared key that removes E's historical key and distributes it to the existing members. The existing members call the update interface to refresh the key list for the next cycle. E is added after initializing its local mixed key list and cannot obtain the historical key before joining. When a member F is removed, the sender C generates a new shared key that removes F's key and distributes it to the existing members. F cannot obtain the new shared key, cannot update the key list for the next cycle, and cannot decrypt messages subsequently.

[0150] In the interaction process provided in this embodiment, a single privacy-protected ciphertext can be adapted to the entire group broadcast, the communication overhead is constant and does not increase with the group size, no plaintext metadata is exposed on the link, the local state is protected by virtual data obfuscation, and privacy recovery can be completed within 10 milliseconds after key leakage.

[0151] Corresponding to the message protocol metadata privacy protection method applied to the receiver described in the above embodiments, the present invention also provides a message protocol metadata privacy protection device applied to the receiver.

[0152] Specifically, Figure 3 A schematic diagram of the structure of the message protocol metadata privacy protection device for the recipient provided in an embodiment of the present invention is shown.

[0153] like Figure 3As shown, the device includes: a list retrieval module 310, used to retrieve a pre-built hybrid key list, the hybrid key list including a current cycle key list, a historical key list, and a next cycle key list, the current cycle key list storing message keys derived from the current cycle root key, and the historical key list being filled with virtual data; a ciphertext receiving module 320, used to receive privacy-protected ciphertext from the sender, query the current cycle key list based on the location tag in the privacy-protected ciphertext, and obtain the corresponding target message key; a decryption and update module 330, used to successfully decrypt the privacy-protected ciphertext using the target message key, move the target message key into the historical key list, and dynamically update the virtual data in the historical key list; and a cycle switching module 340, used to replace the current cycle key list with the next cycle key list when the current cycle key list meets the key update conditions, the next cycle key list storing message keys derived from the next cycle root key.

[0154] In this embodiment, the list call module 310 calls a pre-built hybrid key list, which includes a current cycle key list, a historical key list, and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data. The ciphertext receiving module 320 receives the privacy-protected ciphertext from the sender, queries the current cycle key list based on the location tag in the privacy-protected ciphertext, and obtains the corresponding target message key. After successfully decrypting the privacy-protected ciphertext using the target message key, the decryption and update module 330 moves the target message key into the historical key list and dynamically updates the virtual data in the historical key list. When the current cycle key list meets the key update conditions, the cycle switching module 340 replaces the current cycle key list with the next cycle key list, which stores message keys derived from the next cycle root key. This device achieves indistinguishability between real keys and virtual data in local storage by calling a pre-built hybrid key list that includes virtual data to populate the historical key list. This effectively avoids the risk of metadata leakage, such as communication frequency and historical trajectory, caused by the exposure of local state. By querying and matching the target message key based on the location tag in the privacy-protected ciphertext, it avoids the exposure of plaintext metadata in the transmission link. At the same time, through the physical isolation of the key lists of the current period and the next period, it ensures that the leakage of a single key only affects the privacy of the current period. Ultimately, it achieves metadata privacy protection in both the link and storage dimensions and rapid privacy recovery after compromise.

[0155] Corresponding to the message protocol metadata privacy protection method applied to the sender described in the above embodiments, the present invention also provides a message protocol metadata privacy protection device applied to the sender.

[0156] Specifically, Figure 4 A schematic diagram of the structure of the message protocol metadata privacy protection device applied to the sender provided in an embodiment of the present invention is shown.

[0157] like Figure 4 As shown, the device includes: a root key generation module 410, used to generate a current period root key based on a first key derivation function, according to a shared key, a verification key, and a previous period update key; a key derivation module 420, used to derive a message key, a location tag, and a blinding factor based on a second key derivation function and the current period root key; an encryption and signing module 430, used to encrypt the original message using the message key to generate ciphertext, and to sign the location tag and the ciphertext using a private key to obtain an original signature; a blinding processing module 440, used to mask the original signature using the blinding factor to obtain a blinded signature, generating privacy-protected ciphertext containing the location tag, the ciphertext, and the blinded signature; and a ciphertext sending module 450, used to send the privacy-protected ciphertext to a receiver.

[0158] In this embodiment, the root key generation module 410 generates the current period root key based on the first key derivation function, according to the shared key, the verification key, and the previous period update key. The key derivation module 420 derives the message key, the location tag, and the blinding factor based on the current period root key using the second key derivation function. Then, the encryption and signing module 430 uses the message key to encrypt the original message to generate ciphertext, and uses the private key to sign the location tag and the ciphertext to obtain the original signature. Then, the blinding processing module 440 uses the blinding factor to mask the original signature to obtain a blinded signature, generating privacy-protected ciphertext containing the location tag, ciphertext, and blinded signature. Finally, the ciphertext sending module 450 sends the privacy-protected ciphertext to the receiver. This device constructs a periodically isolated key chain through two-stage key derivation, with only the key for the current period used for encrypting messages in the current period. This not only blocks the risk of privacy spread after key leakage, but also enables rapid privacy recovery after a compromise within 10ms. By adopting a blinded signature mask and a fixed-length 152-byte ciphertext design, it achieves sender authentication and metadata privacy protection in tandem without increasing additional communication overhead. Moreover, a single ciphertext can be adapted to full group broadcast, and the communication overhead remains constant and is not affected by the group size.

[0159] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a message protocol metadata privacy protection method.

[0160] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0161] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the message protocol metadata privacy protection method provided by the above methods.

[0162] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the message protocol metadata privacy protection method provided by the methods described above.

[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for protecting the privacy of message protocol metadata, applied to the receiver, characterized in that, include: Invoke a pre-built hybrid key list, which includes a current cycle key list, a historical key list, and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data. Receive the privacy-protected ciphertext from the sender, query the current period key list based on the location tag in the privacy-protected ciphertext, and obtain the corresponding target message key; After successfully decrypting the privacy-protected ciphertext using the target message key, the target message key is moved into the historical key list, and the virtual data in the historical key list is dynamically updated. If the current period key list meets the key update conditions, the current period key list is replaced with the next period key list, which stores message keys derived from the next period root key.

2. The message protocol metadata privacy protection method of claim 1, wherein, The steps for constructing the current period key list are as follows: Receive the shared key and verification key sent by the sender, and retrieve the update key from the previous cycle stored locally; Based on the first key derivation function, the current period root key is generated according to the shared key, the verification key, and the previous period update key; Based on the second key derivation function, a first preset number of message keys and corresponding location tags are derived according to the current period root key; The current period key list is constructed based on the first preset number of message keys and location tags.

3. The message protocol metadata privacy protection method of claim 1, wherein, The steps for constructing the next cycle key list include: Receive the new shared key and new verification key issued by the sender, and call the currently stored period update key locally; Based on the first key derivation function, the next cycle root key is generated according to the new shared key, the new verification key, and the current cycle update key; Based on the second key derivation function, a second preset number of message keys and corresponding location tags are derived according to the next cycle root key; The next cycle key list is constructed based on the second preset number of message keys and location tags.

4. The message protocol metadata privacy protection method of claim 2, wherein, The key-tag storage structure of the current period key list includes a lookup table and a hierarchical counting Bloom filter; wherein... The lookup table is used to store the key-tag mapping relationship of the first frequency of use, and the hierarchical counting Bloom filter is used to store the tags of the second frequency of use. The first usage frequency is higher than the second usage frequency.

5. The message protocol metadata privacy protection method according to claim 4, characterized in that, The step of querying the current periodic key list based on the location tags in the privacy-protected ciphertext includes: Based on the location tag in the privacy-protected ciphertext, query the lookup table that stores the key-tag mapping relationship in the current period key list; If a match is found in the query table, the message key obtained from the query will be determined as the target message key; If the query table does not match, a hierarchical counting Bloom filter that stores the tags in the current periodic key list is queried, and the target message key is determined based on the query result of the hierarchical counting Bloom filter.

6. The message protocol metadata privacy protection method of claim 1, wherein, Dynamically updating the virtual data in the historical key list includes: Based on a preset ratio of real keys to virtual data, some of the real keys already stored in the historical key list are replaced with virtual data; The virtual data is generated based on the structural features of the real key-tag pairs in the current periodic key list and matches the structure of the real key-tag pairs.

7. The method for protecting the privacy of message protocol metadata according to any one of claims 1-6, characterized in that, The key update conditions include at least one of the following: The number of available keys in the current periodic key list is lower than a preset threshold; The time interval since the last key update has reached a preset duration, so that the available keys in the current periodic key list cannot meet the subsequent communication requirements; A change in group members was detected, causing the available keys in the current periodic key list to be unable to adapt to the changed communication requirements.

8. A message protocol metadata privacy protection method applied to a sender, comprising: include: Based on the first key derivation function, the root key for the current period is generated according to the shared key, the verification key and the update key of the previous period; Based on the second key derivation function, the message key, location tag, and blinding factor are derived according to the current period root key; The original message is encrypted using the message key to generate ciphertext, and the location tag and the ciphertext are signed using the private key to obtain the original signature; The original signature is masked using the blinding factor to obtain a blinded signature, and privacy-protected ciphertext containing the positioning tag, the ciphertext, and the blinded signature is generated. Send the privacy-protected ciphertext to the recipient.

9. A message protocol metadata privacy protection device, applied to a receiver, characterized in that, include: The list call module is used to call a pre-built hybrid key list, which includes a current cycle key list, a historical key list, and a next cycle key list. The current cycle key list stores message keys derived from the current cycle root key, and the historical key list is filled with virtual data. The ciphertext receiving module is used to receive the privacy-protected ciphertext from the sender, query the current period key list based on the location tag in the privacy-protected ciphertext, and obtain the corresponding target message key; The decryption and update module is used to move the target message key into the historical key list after successfully decrypting the privacy-protected ciphertext using the target message key, and dynamically update the virtual data in the historical key list. The cycle switching module is used to replace the current cycle key list with the next cycle key list when the current cycle key list meets the key update conditions. The next cycle key list stores message keys derived from the next cycle root key.

10. A message protocol metadata privacy protection device, applied to the sender, characterized in that, include: The root key generation module is used to generate the root key for the current period based on the first key derivation function, the shared key, the verification key, and the previous period update key. The key derivation module is used to derive the message key, location tag, and blinding factor based on the second key derivation function and the current period root key. The encryption and signing module is used to encrypt the original message using the message key to generate ciphertext, and to sign the location tag and the ciphertext using the private key to obtain the original signature; The blinding processing module is used to mask the original signature using the blinding factor to obtain a blinded signature, and generate privacy-protected ciphertext containing the positioning tag, the ciphertext, and the blinded signature; The encrypted text sending module is used to send the privacy-protected encrypted text to the recipient.