Covert communication model based on dynamic time type binary tree
By adopting a dynamic time-type binary tree model in blockchain hidden communication, the problem of insufficient information encoding and decoding efficiency in the prior art is solved, higher security and concealment are achieved, and communication efficiency is improved.
Patent Information
- Application Number
- CN202411594316.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-09
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-09
AI Technical Summary
The existing blockchain hidden communication methods have shortcomings in information encoding and decoding efficiency, and traditional encoding methods are easily cracked, affecting the security and concealment of communication.
A hidden communication model based on a dynamic time-type binary tree is adopted. By maintaining the time-type binary tree, character information is stored in the tree. The data field of each node is used to change the root hash over time as a random factor carrier to continuously change the path encoding of each node. After the sender converts each character in the information into path encoding and generates the corresponding index byte, the selected moment is embedded in the empty bit of the path encoding, and the path encoding field and the index node field are spliced and embedded in the transaction is sent to the blockchain network.
It improves the security of information transmission and encoding and decoding efficiency, reduces the probability of hidden channel exposure and the risk of key information leakage, and enhances the concealment and security of communication.
Smart Images

Figure CN119728091A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a communication model, in particular to a covert communication model based on a dynamic time-type binary tree. Background Art
[0002] In recent years, the interception and cracking of secret message transmission has occurred frequently, and the concealment and confidentiality of message transmission and the anti-detection of secret messages have become increasingly important. Traditional communication methods are transmitted through direct plain text or simple encryption into ciphertext. However, the characteristics of these transmission methods are relatively obvious. After the attacker identifies them, they can directly intercept and try to crack or use replay attacks to destroy the correctness and integrity of the message. Therefore, a communication method that makes the message difficult for attackers to detect can solve the above problems.
[0003] Covert communication refers to the transmission of secret messages in normal communication behavior, which can greatly reduce the risk of detection and attack. Covert communication uses public transmission media. Unlike traditional communication methods, covert communication hides secret information in normal information instead of directly sending the original text or ciphertext as normal information. Only specific communication parties know how to identify hidden information and decrypt information, while attackers need to spend a lot of computing resources to make judgments on possible covert communication behaviors.
[0004] As a decentralized platform, blockchain provides users with an opportunity to hide their identities. In public chains represented by Bitcoin and Ethereum, due to the existence of the broadcast mechanism, even if the information sent by the user is not directly sent to the receiving address, the recipient can indirectly receive the information. The broadcast mechanism allows users to transmit messages without direct communication. Therefore, even if the covert communication in the public chain is discovered, it cannot be traced back to the real user, achieving the purpose of protecting privacy.
[0005] The earliest blockchain covert communication channel was proposed by Partala in "Provable Secret Communication Security on Blockchain" (Cryptology, 2018, 2(3): 18). The information is hidden by changing the least significant bit (LSB) of the transaction address. The receiver reads the least significant bit according to the transaction order to form an encrypted message and then decrypts it to the original message. Tian et al. published a covert channel based on dynamic tags in "Covered Channel on Blockchain Based on Dynamic Tags" (Information and Communication Security, 2020: 814-830). The private key of ECDSA is replaced with a secret message, and the public key pk is generated based on the new private key, which effectively resists statistical analysis and correlation attacks and prevents transaction tracing. She Wei et al. proposed a covert communication technology based on Markov chain generated text in "Generative Blockchain Covert Communication Model Based on Markov Chain" (Journal of Communications, 2022, 43(10):121-132). By maintaining the same transition probability matrix and generating secret statements that conform to natural language characteristics and high readability to hide secret information, and then using ring signature technology to ensure anonymity, it effectively solves the problems of insufficient concealment and information cross-talk in blockchain communication. Huang Dongyan et al. proposed a time-based covert communication scheme based on the timestamp in the blockchain in "Research on Time-based Blockchain Covert Communication Methods for Multi-Addresses" (Journal of Communications, 2023, 44(02):148-159.), which encodes the time length of the transaction. Different from the usual storage-based covert communication, the time-based covert communication technology can improve the security performance against detection, but the embedding efficiency will also be reduced accordingly. In "A blockchain covert communication model that can hide sensitive documents and sender identities", She Wei et al. disclosed the use of GAN networks to generate images containing confidential information, combined with CP-ABE and ring signatures to make senders anonymous and improve security, and stored the information in the off-chain Interstellar File System (IPFS), ensuring the security of communication and high transmission efficiency. As the number of solutions for using blockchain networks for covert communication continues to increase, the following problems still need to be solved:
[0006] 1) Using traditional encoding methods to ensure information security will reduce the encoding and decoding efficiency. When the transmitted information is large, it takes a long time. In addition, the use of pre-negotiated transactions to transmit key information, start identifier and end identifier information, and fragmentation information further reduces communication efficiency.
[0007] 2) Most information encoding schemes based on blockchain networks use fixed mapping methods for encoding, which are easier to crack. In addition, the information in the blockchain network is permanently stored. If the character-code mapping rules are cracked, all previously sent information can be traced back and deciphered, which will greatly reduce the security of encrypted information; and the method of sending pre-negotiated transactions before each communication will destroy the original sending rules, resulting in the weakening of the concealment of communication, further reducing the security of communication. Summary of the invention
[0008] In order to solve the above problems, the present invention proposes an information encoding scheme based on a time-based binary tree. The communicating parties maintain their own time-based binary trees, store character information in the data field of each node in the tree, use the root hash that changes over time as a random factor carrier, and continuously change the path code of each node. After the sender converts each character in the information into a path code and generates the corresponding index byte, it embeds the selected moment in the vacant position of the path code, splices the path code field and the index node field, and embeds the transaction and sends it to the blockchain network. The receiver obtains the transaction from the network, extracts the selected moment, and restores the tree type and root hash when the information is sent. According to the path code and index node, the corresponding character is searched in the local time-based binary tree to restore the original message.
[0009] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0010] A covert communication model based on a dynamic time-based binary tree includes three parts: information encoding, ciphertext embedding, and information restoration. Specifically:
[0011] Step 1, information encoding: The sender first obtains the root hash RootHash of the time-type binary tree at the current moment, and extracts all the numbers in it as the random factor seed and records them. If the number of digits in RootHash is less than 5 or the seed collides with the previous record, the root hash continues to be hashed until the number of digits is greater than 5 or the seed is the only one used;
[0012] When encoding, refer to the path encoding after randomization, encode each character in the information to be encoded separately; use the layer-order traversal method to find the corresponding character char in the node i , record the path dist of the node where the character is located i , and generate the corresponding index field index i , path dist i The length is not fixed but is less than or equal to 4 bits. The length of the index field is fixed to 4 bits.
[0013] Step 2: Information embedding;
[0014] Step 3, information extraction: The sender and receiver of the message use the same rules to maintain the local time-based binary tree, and can restore the tree type that conforms to Bin_moment. The message restoration steps are as follows:
[0015] 1) Separate the path code field and the index node field: The receiver first obtains the ciphertext data hex_secret_code' from the data payload field, converts it to binary secret_code', and records the length of secret_code' as N e', traverse 4 digits from the back to the front to find the separator E a and E b , thereby separating the path encoding field and the index node field;
[0016] 2) Extract Bin_moment': The receiver extracts each index node index in the index field i 'Split every 4 bits and restore them to index_list', remember the index in index_list' i The first to fourth bits are {b i,0 b i,1 b i,2 b i,3}; Traverse index_list' and convert each index i b i,2 b i,3 Record into index_list_temp, and take out the remaining path information Bin_dist;
[0017] 3)Bin_moment'(b0,b1,b2,…,b 16 ) Recover the moment selected_moment' selected by the sender, as shown in formula (3),
[0018]
[0019] Based on selected_moment', use the spanning tree rule to restore the same tree type as the sender at the same time and extract the random factor seed' from the root hash roothash', and use seed' to generate a time-type binary tree with the same path encoding as the sender;
[0020] 4) Traverse index_list and index_list_temp to obtain index_list[i] and index_list_temp[i], i = 0, 1, 2, ..., len(index_list')-1, and then take out (index_list_temp[i][0] × 2 + index_list_temp[i][1] + 1) bits of information in Bin_dist' in order and record them as dist i , press dist i The bits in the binary tree are searched bit by bit to find the node where the character is located, and then the relative position and type of the character are determined based on index_list[i][0] and index_list[i][1].
[0021] The path encoding random rules are as follows:
[0022] 1) Assume that the original code of each branch in the basic tree is code = {0, 1, 0, 1, ..., 0, 1}, and the random factor is seed;
[0023] 2) Group the codes into pairs i ={0,1},code_pairs i [0] and cose_pairs i [1] corresponds to the encoding of the left and right branches;
[0024] 3) After applying the seed, code_pairs i [0] randomly flips between 0 / 1 with a probability of 50%. If code_pairs i [0] code_pairs i [0] = {1}, if code_pairs i [0] = {1} then code_pairs i [1] = {0}, until all code_pairs i Once the flipping is completed, the path randomization is completed.
[0025] Step 2 The steps for the sender to embed ciphertext are as follows:
[0026] 1) Character char i Reference path encoding dist i Generates a 4-bit index field i , dist i and index i Temporarily store them in the string list dist_list=(dist0, dist1,…, dist i ) and index_list=(index0,index1,…,index i )middle;
[0027] 2) Let N be the number of all characters, and len(dist_list) be l d , len(index_list) is l i ; Repeat 1) until len(dist_list) = len(index_list) = N;
[0028] 3) Embed Bin_moment bit by bit into dist i In the above example, let len(dist i )<4 char i The total number is N a , if len(dist i)<4 can be embedded in 4-len(dist i ) bits, then Bin_moment17 bits are fully distributed into each dist i Consider the limit case: len(dist i )=1 or len(dist i )=3, then 17 / (4-1)≤N is required a ≤17 / (4-3), that is, 6≤N a ≤17; only N a ≥17, Bin_moment can be fully embedded in each dist i In the field;
[0029] 4) Generate two random path length codes, both of which are {1, 1}, and the relative position of the characters is random index node code E a ={0 / 1,0 / 1,1,1} and E b ={0 / 1,0 / 1,1,1}, where E a With E b The total length occupies 1B;
[0030] 5) Convert every four digits into hexadecimal to form hex_secret_code, fill the lower digits less than four digits with '0', and then convert it into hexadecimal again; embed the hex_secret_code into the data payload field of the blockchain platform, and the message embedding process is completed;
[0031] 6) Embed Bin_moment bit by bit into the field length L amount The transaction is sent in the lower 17 bits of the amount field.
[0032]
[0033] Since the maximum length of the data payload field varies on different blockchain platforms, the length of the data field is recorded as L data , then according to N e There are two lengths:
[0034] (1) When N e ≤(L data —1)B, you can embed directly:
[0035]
[0036] (2) When N e >(L data—1)B, the original text is divided into n pieces and then embedded in batches. The amount of original information contained in each piece is almost the same, and a different Bin_moment is selected for each piece to execute step 3) and embed it into each transaction;
[0037]
[0038] in, m k =min{(k×avg-1), N e -1}, avg = N e / n.
[0039] Step 3 of 2) extracting Bin_moment' includes the following steps:
[0040] (1) Convert the lower 2 bits of all index nodes to decimal and add 1, that is, index_list_temp[i] = BIN2DEC(index_list_temp[i]) + 1. If {b i,2 , b i,3}≠{1,1}N a '≥17:
[0041] If index_list_temp[i]=4, the corresponding 4-bit path data in Bin_dist indicated by the index node is placed in dist_list';
[0042] If index_list_temp[i] < 4, put the data of index_list_temp[i] bits into dist_list', extract the data of 4 bits after the current position - index_list_temp[i] bits and fill them into Bin_moment' bit by bit, and index in Bin_dist i 'Delete the information of the same value in the corresponding path encoding, and put the path after deleting the embedded information into dist_list' and repeat until the length of Bin_moment' is 17 bits;
[0043] (2) If {b i,2 , b i,3}≠{1,1}N a '<17, extract the last 17 digits of the transaction amount field to get Bin_moment'.
[0044] Step 3 of 4) is divided into two cases:
[0045] (1) If index_list_temp[i] < 4 or index i The third and fourth bits {b i,2 , b i,3}≠{1,1}, then b i,0 Indicates the relative position of the character in the node, b i,1 Indicates the case of the character and stores the decoded character in char i middle;
[0046] (2) If index_list_temp[i] = 4, then: b i,0 b i,1 Both bits represent the relative position of the character in the node. The decoded character is stored in char i middle.
[0047] The present invention adopting the above technical solution has the following beneficial effects:
[0048] 1) The index node is used to minimize the tree height, the probability of character occurrence is counted, and the node position of the character is allocated according to the probability, thereby improving the encoding and decoding efficiency; in addition, the present invention designs a method for embedding key information into the vacant position of the path encoding, which does not require sending a pre-negotiation transaction before each communication, further improving the communication efficiency and solving the problem of communication efficiency when using traditional encoding methods to ensure information security.
[0049] 2) A covert communication method based on a dynamic time-based binary tree is proposed. The character-path code mapping can change according to time, thereby improving the security of information transmission. The pre-negotiation transaction is cancelled, reducing the probability of covert channel exposure and the risk of key information leakage, further improving the concealment and security of communication, and solving the problem of insufficient security caused by fixed encoding and the use of pre-negotiation transactions in traditional covert communication methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0051] Figure 1 Generate process graph for root hash;
[0052] Figure 2 It is a time-based binary tree type;
[0053] Figure 3 is a model flow chart of the present invention;
[0054] Figure 4 is the binary representation of the encoding moment;
[0055] Figure 5This is a comparison chart before and after the path is randomized;
[0056] Figure 6 is the encoding and decoding time diagram;
[0057] Figure 7 It is a schematic diagram of the coding frequency statistics process;
[0058] Figure 8 This is a comparison chart of the statistical coding and actual coding ratio;
[0059] Fig. 9 It is the node path frequency statistics diagram;
[0060] Fig.10 It is the normal transaction interval with the same address;
[0061] Figure 11(a) shows canceling the pre-negotiation transaction and directly sending the hidden transaction;
[0062] Figure 11(b) shows the shielded transaction being sent again within a short period of time after the pre-negotiation;
[0063] Figure 11(c) shows the shielded transaction being sent again within a reasonable time after the pre-negotiation;
[0064] Figure 11(d) shows that the hidden transaction is sent again according to the sending interval rule after pre-negotiation. DETAILED DESCRIPTION
[0065] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0066] The concept of blockchain was proposed by Satoshi Nakamoto in his paper Bitcoin: A Peer-to-Peer Electronic Cash System published in 2008. Blockchain is a decentralized shared ledger that stores data blocks in a chain structure in chronological order and uses cryptography to ensure that it cannot be tampered with or forged. It has the characteristics of decentralization, anonymity, traceability, non-tamperability, and non-forgeability.
[0067] Decentralization in blockchain means that the network architecture and data management do not rely on a single central organization, and each node in the network stores a complete or partial copy of the blockchain data.
[0068] Anonymity means that when users use the blockchain network to conduct transactions, they use public and private key pairs to perform operations instead of their real identities. That is, the transaction activities are less correlated with the user's real identity, thus achieving relative anonymity.
[0069] Traceability means that users can view complete records and detailed information of all transactions. Transaction information is permanently stored on the chain as one of the blockchain data, and the information on the blockchain is open and transparent.
[0070] Immutability and non-forgeability mean that once transaction data is written into a block and confirmed in the blockchain network, the data cannot be changed, deleted or forged.
[0071] Blockchain 2.0 technology is not limited to the application of digital currency, but also introduces the concepts of smart contracts and distributed applications (DApps), realizing the development of decentralized applications based on smart contracts. Smart contracts are event-driven, stateful computer programs that run on a replicable shared blockchain data ledger, and the representative technology is Ethereum. Blockchain 3.0 is innovative in cross-chain operations, improving scalability and security. Cross-chain refers to achieving interoperability between different blockchains to ensure that data can be safely exchanged and transferred between different chains.
[0072] A binary tree is an ordered tree whose nodes have a degree no greater than 2. A time-based binary tree is a binary tree that adds a mechanism for continuously generating new leaf nodes over time, a node information storage mechanism, and a root hash mechanism.
[0073] Starting from a starting time, the time-based binary tree has only one root node or a basic tree type. After each time interval, the tree will generate a new leaf node, that is, the number of nodes and the depth of the tree will change over time.
[0074] A data field is added to the original binary tree node data structure and a hash field is added to the data structure of non-leaf nodes. Each node in the tree can store arbitrary data information including empty information. Non-leaf nodes can additionally store the hash value of the hash value of its left and right child nodes (non-leaf nodes), and changes in the information in the node will not cause changes in the tree type.
[0075] The root hash value is fixedly stored in the root node of the time-based binary tree. The concept of root hash comes from the Merkle tree proposed by Ralph Merkle, which is a binary tree built based on hash values. The hash values of all child nodes are stored in non-leaf nodes, and the hash values of data blocks are stored in leaf nodes. In the blockchain, all transaction hash values in the block form a Merkle tree, and the block header contains the root hash value field of the Merkle tree. All users can use the root hash field and hash path to verify whether the transaction is in the block.
[0076] The data field in the nodes with a depth less than or equal to 4 in the time-based binary tree stores characters; nodes with a depth greater than 4 do not store any data and new nodes are continuously generated as time goes by. Such nodes are only used to change the root hash value of the tree. The root hash value generation process is as follows: Figure 1 shown.
[0077] Starting from the leaf node of the right subtree, the data parts of the left and right leaf nodes are hashed to obtain H(data1) and H(data2), and the hash value H(A)=H(H(data1)||H(data2)) of node A is stored in the parent node A. Similarly, the hash value H(B)=H(H(data3)||H(data4)) is stored in the hash field of the parent node B of the left subtree, and the hash value H(C)=H(H(A)||H(B)) is stored in node C. The recursive process ends and RootHash=H(H(C)||H(D)) is obtained.
[0078] The depth of the tree node where the character is located depends on the probability of the character appearing. Define the character set C = {c1, c2, ..., c n}, where each character c i The probability of occurrence is P(c i ), the occurrence probability statistics are shown in Table 1.
[0079] Table 1 Character occurrence probability statistics
[0080]
[0081]
[0082] Let D be the depth of the tree, and node N contains the character set C N , P high (c) and P low (c) is the probability of high-frequency and low-frequency characters.
[0083] Construct a time-based binary tree that balances character frequencies:
[0084] 1) The elements in the character set C are sorted by their probability of occurrence P(c1)≥P(c2)≥...≥P(c n ).
[0085] 2) C 1-4 The characters are temporarily distributed to the two nodes of D=1, C 5-12 The characters are temporarily distributed to the four nodes of D = 2, C 13-28 The characters are temporarily distributed to the eight nodes of D=3, and the remaining characters are distributed to the sixteen nodes of D=4.
[0086] 3) Divide the characters with the same D into high-frequency and low-frequency character pairs according to their frequency of occurrence and put them into a node. For example, for the characters 'e', 't', 'a', and 'o' with D = 1, the characters with the highest and lowest frequencies are put into the first node of the left subtree, N left ={c high1 , c low1}={'e','o'} The second highest and second lowest frequency characters are placed in another node N in the right subtree right ={c high2 , c low2}={'a', 't'}, and continue to perform the same operation on characters with 1<D<4 until all nodes contain a pair of high-low frequency characters. By balancing the frequencies of characters contained in the nodes, the problem of too high frequencies in the path encoding of some nodes can be avoided.
[0087] 4) For the node with D=4, which contains 4 characters instead of 2 characters, the traversal depth can be better reduced and the index node structure proposed later can be matched, thereby improving the model encoding and decoding efficiency.
[0088] 5) The final structure of the time-based binary tree after balancing the frequency is as follows Figure 2 As shown in the figure, nodes with D < 4 form the basic tree structure and are not generated over time; nodes with D > 4 are continuously generated over time starting from 00:00:00 and are only used to change the root hash.
[0089] like Figure 3 As shown, the present invention is based on a covert communication model of a dynamic time-based binary tree. The communication parties use the generation rules of the time-based binary tree to maintain a time-based binary tree locally. The sender selects the root hash at any time and extracts a random factor to change the node path. The original text is path-encoded and then the transaction information is sent. After the receiver obtains the transaction information, the tree is restored according to the embedded time, and the original text is obtained after the inverse operation is performed to decode the information. The model process is as follows: Figure 3 shown.
[0090] The present invention will explain the temporal binary tree model from three aspects: information encoding, ciphertext embedding and information restoration.
[0091] Step 1: Information encoding: The sender first obtains the root hash RootHash of the time-based binary tree at the current moment, and extracts all the numbers from it as the random factor seed and records them. If the number of digits in RootHash is less than 5 or the seed collides with the previous record, the root hash is continued to be hashed until the number of digits is greater than 5 or the seed is the only one used. The current moment or the coded moment selected_moment selected by the sender is saved in decimal, and its binary representation is as follows Figure 4 shown.
[0092] The hour, minute, and second occupy the upper 5 bits, middle 6 bits, and lower 6 bits respectively, and the complete moment is represented in the shortest possible length to reduce the occupation of the vacant bits of the path code.
[0093] After applying the random factor, the encoding of each branch is changed, thereby changing the path corresponding to each node. The result is as follows Figure 5 The specific mapping relationship is shown in Table 2.
[0094] Table 2 Character-path mapping table
[0095]
[0096] The path encoding random rules are as follows:
[0097] 1) Assume that the original code of each branch in the basic tree is code = {0, 1, 0, 1, ..., 0, 1}, and the random factor is seed;
[0098] 2) Group the codes into pairs i ={0,1},code_pairs i [0] and code_pairs i [1] corresponds to the encoding of the left and right branches;
[0099] 3) After applying the seed, code_pairs i [0] randomly flips between 0 / 1 with a probability of 50%. If code_pairs i [0] code_pairs i [0] = {1}, if code_pairs i [0] = {1} then code_pairs i [1] = {0}, until all code_pairs i Once the flipping is completed, the path randomization is completed.
[0100] When encoding, refer to the path encoding after randomization, and encode each character in the information to be encoded separately. Use the layer-order traversal method to find the corresponding character char in the node i , record the path dist of the node where the character is located i , and generate the corresponding index field index i , path dist i The length is not fixed but is less than or equal to 4 bits. The length of the index field is fixed to 4 bits. The index field structure is as follows.
[0101] 1) When the node depth of the character is less than 4, that is, the path length is less than 4, the index field structure is as follows.
[0102] Character relative position Letter case type Path length 1bit 1bit 2bit
[0103] The character relative position segment represents the position of the character in the node and can indicate two different positional relationships. The letter case type segment indicates the case type of English characters. The path length segment is used to indicate the path length corresponding to the node where the character is located. During decoding, the path length is the key to extracting the path encoding corresponding to each character.
[0104] 2) When the depth of the node where the character is located is equal to 4, the index field structure is as follows.
[0105] Character relative position Path length 2bit 2bit
[0106] All non-letter characters are stored in nodes with a depth of 4. At this time, the letter case type segment is invalid and is replaced by the character relative position segment. The relative position segment can indicate 4 different relative positions of characters. The number of characters in each node is also increased to 4, which can reduce the depth of character nodes and improve the efficiency of encoding and decoding. The path length segment has the same function as 1). Since the nodes with path length encoding {1, 1} store symbolic characters, it is stipulated that there will not be a situation in the encoding where the path length encodings of two or more consecutive index nodes are all {1, 1}.
[0107] Step 2: Information embedding.
[0108] The steps for the sender to embed ciphertext are as follows.
[0109] 1) Character char i Reference path encoding dist i Generates a 4-bit index field i , dist i and index i Temporarily store them in the string list dist_list=(dist0, dist1,…, dist i ) and index_list=(index0,index1,…,index i )middle.
[0110] 2) Let N be the number of all characters, and len(dist_list) be l d , len(index_list) is l i . Repeat 1) until len(dist_list)=len(index_list)=N.
[0111] 3) Embed Bin_moment bit by bit into dist i In the above example, let len(disti )<4 char i The total number is N a , if len(dist i )<4 can be embedded in 4-len(dist i ) bits, then Bin_moment17 bits are fully distributed into each dist i Consider the limit case: len(dist i )=1 or len(dist i )=3, then 17 / (4-1)≤N is required a ≤17 / (4-3), that is, 6≤N a ≤17. Only N a ≥17, Bin_moment can be fully embedded in each dist i In the field, if Bin_moment cannot be completely embedded, execute step 6). The embedding algorithm pseudo code is shown in Algorithm 1.
[0112]
[0113] 4) Generate two random path length codes, both of which are {1, 1}, and the relative position of the characters is random index node code E a ={0 / 1,0 / 1,1,1} and E b ={0 / 1,0 / 1,1,1}, where E a With E b The total length is 1B. a , E b The four parts of index_list and secret_code are encoded, and the length of secret_code is recorded.
[0114] Since the maximum length of the data payload field (Data Payload) varies on different blockchain platforms, the length of the data field is recorded as L data , then according to N e There are two types of length.
[0115] (1) When N e ≤(L data —1)B, it can be embedded directly.
[0116]
[0117] (2) When N e >(L data—1)B, the original text is divided into n pieces and then embedded in batches. The amount of original information contained in each piece is almost the same, and a different Bin_moment is selected for each piece to execute step 3) and embed it into each transaction.
[0118]
[0119] in, m k =min{(k×avg-1), N e -1}, avg = N e / n.
[0120] 5) Every four bits are converted to hexadecimal to form hex_secret_code, and the low bits less than four bits are filled with '0', and then converted to hexadecimal. The hex_secret_code is embedded in the data payload field of the blockchain platform, and the message embedding process is completed.
[0121] 6) Embed Bin_moment bit by bit into the field length L amount The transaction is sent with the lower 17 bits of the amount field.
[0122]
[0123] Step 3: Information extraction: The sender and receiver of the message use the same rules to maintain the local time-based binary tree, and can restore the tree type that conforms to Bin_moment. The steps for message restoration are as follows:
[0124] 1) Separate the path code field and the index node field. The receiver first obtains the ciphertext data hex_secret_code' from the data payload field and converts it to binary secret_code'. The length of secret_code' is N. e ', traverse 4 digits from the back to the front to find the separator E a and E b , thus separating the path encoding field and the index node field.
[0125] 2) Extract Bin_moment'. The receiver indexes each index node in the index field i 'Every 4 bits are split and restored to index_list'. Remember the index in index_list' i The first to fourth bits are {b i,0 b i,1 b i,2 b i,3}. Traverse index_list' and set each index i bi,2 b i,3 Record into index_list_temp. Take out the remaining path information Bin_dist.
[0126] (1) Convert the lower 2 bits of all index nodes to decimal and add 1, that is, index_list_temp[i] = BIN2DEC(index_list_temp[i]) + 1. If {b i,2 , b i,3}≠{1,1}N a '≥17:
[0127] If index_list_temp[i]=4, the corresponding 4-bit path data in Bin_dist indicated by the index node is placed in dist_list';
[0128] If index_list_temp[i] < 4, put the data of index_list_temp[i] bits into dist_list', extract the data of 4 bits after the current position - index_list_temp[i] bits and fill them into Bin_moment' bit by bit, and index in Bin_dist i ' Delete the information of the same value in the corresponding path encoding, and put the path after deleting the embedded information into dist_list' Repeat until the length of Bin_moment' is 17 bits. The pseudo code is shown in Algorithm 2.
[0129]
[0130] (2) If {b i,2 , b i,3}≠{1,1}N a '<17, extract the last 17 digits of the transaction amount field to get Bin_moment'.
[0131] 3)Bin_moment'(b0,b1,b2,…,b 16 ) Restore the moment selected_moment' selected by the sender, as shown in formula (3).
[0132]
[0133] Based on selected_moment', use the spanning tree rule to restore the same tree type as the sender at the same moment and extract the random factor seed' from the root hash roothash', and apply seed' to generate a time-type binary tree with the same path encoding as the sender.
[0134] 4) Decode using a method similar to step 1) (1), traverse index_list and index_list_temp to obtain index_list[i] and index_list_temp[i], i = 0, 1, 2, ..., len(index_list')-1, and then take out (index_list_temp[i][0] × 2 + index_list_temp[i][1] + 1) bits of information in Bin_dist' in order and record it as dist i , press dist i The bits in the binary tree are searched bit by bit to find the node where the character is located, and then the relative position and type of the character are determined according to index_list[i][0] and index_list[i][1]. There are two cases at this time.
[0135] (1) If index_list_temp[i] < 4 or index i The third and fourth bits {b i,2 , b i,3}≠{1,1} then:
[0136] Use an index field structure with a depth less than 4, i.e. b i,0 Indicates the relative position of the character in the node, b i,1 Indicates the case of the character and stores the decoded character in char i middle.
[0137] (2) If index_list_temp[i] = 4, then: use the index field structure with a depth of 4, b i,0 b i,1 Both bits represent the relative position of the character in the node. The decoded character is stored in char i middle.
[0138] The present invention analyzes the model performance through simulation experiment results: the experimental platform adopts Windows system, the CPU is I9-13900H@5.40GHz, the GPU is Nvidia GeForce RTX 4060, and the memory size is 16GB.
[0139] The message selected in the experiment of the present invention is "We had been wandering, indeed, in the leafless shrubbery an hour in the morning." from "Jane Eyre" for model process demonstration.
[0140] Sending process: The sender selects 09:21:17 as the encoding time selected_moment and records it. Get RootHash from the root node of the time-type binary tree of the selected moment and extract the random factor seed from it, then Bin_moment = (01001010101010001) The meanings and values of the above symbols are shown in Table 3.
[0141] Table 3 Meaning and value of symbols during sending.
[0142] symbol meaning value message Ciphertext information We had been wandering,indeed,in the leafless shrubbery an hour in the morning. RootHash Root Hash 70ee1e626c88616e6a600589732ddc27afe6a38dfdf4af0392ae90b2e6037eae seed Random Factor 70162688616660058973227638403929026037 selected_moment Selected coding moment 09:21:17 Bin_moment Binary Coded Moments 01001010101010001
[0143] Refer to Table 2 above for the encoding of message, "Path encoding after applying random factors", to generate dist_list, for each dist i Generate the corresponding index according to the above method i Get index_list. Embed Bin_moment into dist_list to get inserted_dist_list with embedded moment information. Finally, execute to get secret_code (which contains two separators), convert secret_code 4 digits at a time into hexadecimal to get hex_secret_code, embed it into the blockchain platform data payload field and send it. The specific corresponding values are shown in Table 4.
[0144] Table 4 Specific parameters of the sending process
[0145]
[0146] Receiving process: The symbol meaning correspondence table is shown in Table 5. The receiver obtains the hex_secret_code' from the transaction information, converts it to binary secret_code', finds the separator, and extracts each index i 'Form index_list' and record each index i 'The lower 2 bits form index_list_temp. Traverse index_list_temp from the beginning to find {b i,2 , b i,3}≠{1,1} i', and find the path code corresponding to the index node in Bin_dist, extract the bit information about Bin_moment' and delete it, until the extracted information makes Bin_moment' length reach 17 bits, convert it to decimal to get selected_moment'. Put all the paths into inserted_dist_list', and put the paths after deleting the bit information and the paths without embedded bit information into dist i All are put into dist_list'. The receiver uses selected_moment' to restore the time-type binary tree of the sender's selected moment, obtains roothash' and extracts seed', and after applying seed', obtains a tree that is exactly the same as the sender's tree node path. Finally, the decoding operation will use index_list' to decode dist_list' into the original message. The specific execution corresponding values are shown in Table 6.
[0147] Table 5 Meaning and value of receiving process symbols
[0148]
[0149] Table 6 Specific parameters of the receiving process
[0150] Serial number index_list' index_list_temp inserted_dist_list' dist_list' symbol 0 0110 10 1100 110 W 1 0000 00 1100 1 e 2 0010 10 0001 000 3 0001 01 1101 11 h 4 0000 00 0010 0 a 5 1001 01 1110 01 d 6 0010 10 0001 000 7 1010 10 1110 111 b 8 0000 00 1001 1 e 9 0000 00 1 1 e … … len(message)—1 0011 11 1010 1010 .
[0151] Next, the present invention comprehensively evaluates the performance of the model from the aspects of communication efficiency, the impact of pre-negotiation cancellation, and security through experimentally obtained data.
[0152] 1. Efficiency analysis
[0153] Embedding rate analysis: Xiong et al. believe that the covert channel embedding rate in the context of blockchain is the number of bits of secret information that can be embedded in each transaction. The corresponding model proposed in this invention is the total number of bits of secret information embedded in all transactions sent by the sender in each communication. This invention uses an information embedding model based on blockchain with strong reliability to compare with the embedding model proposed in this invention to ensure the rationality of the test.
[0154] Table 7 Information embedding rate (Bitcoin platform)
[0155]
[0156] The model of the present invention uses the data payload field of different blockchain platforms with a length of B and may use a data payload field of length L in certain cases. amount The amount field of B, so the maximum embedding rate is (L data +L amount )B is 8*(L data +L amount)bit. Compared with the above methods, the model of the present invention is applicable to a variety of blockchain platforms with data payload fields rather than a single platform. If the Bitcoin platform used by the above method is adopted, the maximum embedding rate of the model of the present invention is the sum of the data payload field 80B and the amount field 8B, that is, 8*(80+8)=704bit. The embedding rate is increased by 520bit, 255bit, 704-αbit, 152bit, 576 / 448bit and 192bit respectively compared with the above methods.
[0157] Transmission efficiency analysis: Transmission time is also one of the important indicators for evaluating the effectiveness of the model. The transmission time is defined as the total time required from the sender starting to perform the encryption operation on the information to the receiver correctly decrypting the information and obtaining the original information. For the present invention, the transmission time is the encoding and sending time, the blockchain broadcast delay, and the receiving and decoding time. There is a certain delay from the publication of transactions on the blockchain network to the confirmation of transactions. However, when a node generates a transaction and uploads it to the blockchain network, it will be broadcast to the entire network within a few seconds through the flooding mechanism. Therefore, the transaction confirmation time will only slightly affect the time required for the receiver to receive the data, and the length of time for information encoding embedding and ciphertext decoding extraction directly determines the quality of the model's time efficiency.
[0158] Table 1 is the statistical result of the probability of occurrence of letter characters in the present invention for about 1,000,000 characters in Jane Eyre, about 700,000 characters in Pride And Prejudice, and about 880,000 characters in Oliver Twist. The probability of occurrence of characters in the table determines the probability of occurrence of letter characters. Figure 2 The distribution of characters in nodes in a time-based binary tree. At the same time, the present invention performs encoding and decoding tests on three texts, and according to the statistical results, the average number of nodes and depth traversed during encoding and decoding of the model can be known, and the results are shown in Tables 8 and 9.
[0159] Table 8 Coding test
[0160]
[0161] Table 9 Decoding test
[0162]
[0163] Since the decoding adopts the deep search method, the average traversal depth and the average number of traversal nodes are 2.10, 2.10 and 2.13 respectively. It can be seen that the average traversal depth of the proposed model is less than 3 in accordance with the natural language habits, which improves the encoding and decoding speed.
[0164] The following will analyze the transmission efficiency of this model from the perspective of transmitting small-capacity information and large-capacity information.
[0165] 1) When transmitting small-capacity information:
[0166] The model of the present invention and other models are used to evaluate the time efficiency, assuming that the information of fixed size of 1KB is transmitted. Reference [7] uses the secret information as a random number. After the transaction is issued, it can be broadcast to the receiver in just a few seconds without waiting for the block generation, so the transmission time is in seconds; Reference [8] uses the Markov model to embed and extract secret information. It takes an average of 3 seconds to embed and extract 8 bits of information, so the total transmission time exceeds 10 minutes; Reference [9] combines image steganography with off-chain IPFS storage to improve the embedding rate while reducing the transmission speed, and the transmission time is in minutes; Reference
[16] needs to generate blocks before the embedded information can be extracted. Each block transmits at most Kbit, K is the number of transactions, so the transmission time is much longer than 10 minutes; Reference
[18] has two methods, RDSAC and DDSAC. RDSAC uses a private key to encrypt information and uses random factors as tags and puts them into transactions. The receiver filters special transactions and uses pseudo-random functions and elliptic curves to identify confidential transactions. Due to the need to calculate the elliptic curve, the total time is greater than 1 minute. DDSAC embeds secret data directly into the random factors in the transaction and samples the transaction amount from normal transactions as a label, avoiding the transmission delay in RDSAC and not using elliptic curves to identify transactions. The total duration is less than 1 minute. Reference
[19] needs to scan the transactions in the block and compare the tags, and the transmission time increases with the increase in message segmentation. Therefore, the transmission time is in the order of minutes in both the test network and the main network.
[0167] The encoding and decoding time of the information of 1KB size in the present invention is both in milliseconds, and the transmission time is in seconds after adding the broadcast time. Although the transmission time of the present invention and the methods of references [7] and
[18] is in seconds, the encoding and decoding efficiency is higher than that of the methods of the present invention. The time of the other models is in minutes, so the transmission efficiency of the present invention is higher than that of all the above methods. The comparison of time order of magnitude is shown in Table 10.
[0168] Table 10 Transmission time comparison
[0169] Experimental model Transmission time magnitude References[7] Seconds References[8] Minute level References[9] Minute level References
[16] Minute level References
[18] Minutes / seconds References
[19] Minute level This article model Seconds
[0170] 2) When transmitting large amounts of information:
[0171] Assuming that randomly generated texts of different sizes are used as transmission test texts, the overall trend of the encoding and decoding time of the model in this paper with the change of file size is as follows: Figure 6 As shown in the figure, it can be seen that the encoding and decoding time of information within 1000KB is less than 1s. Therefore, when transmitting large-capacity information, the transmission efficiency is higher than the above method.
[0172] 2. Security Analysis
[0173] Frequency analysis is a method of cracking encrypted information by counting the frequency of occurrence of letters or symbols. It is usually used for fixed-length encoding. For the scheme of the present invention, the encoding length of the character is between 1-4 bits and the ciphertext contains an index node field. In addition, the distribution between the codes is frequency balanced. These characteristics increase the complexity of statistical analysis.
[0174] The attacker needs to count the frequency of the code distribution in the path coding field to infer the information. Theoretically, if the attacker knows that the tree-type coding method is used, a binary tree of code frequencies can be established based on the frequency distribution of all codes to infer the possible corresponding characters. However, the existence of the index node field in the ciphertext obtained by the attacker destroys the frequency distribution of the original path coding, making it impossible for the attacker to analyze normally. The present invention designs an attack experiment using frequency analysis. It is assumed that the attacker knows that the coding adopts a tree structure, but does not know the order of the characters in the tree and cannot exclude the index node field. The original message is "We had been wandering, indeed, in the leafless shrubbery an hour in the morning.".
[0175] The attacker knows that the encoding adopts a tree structure, and knows that the length of the character corresponding encoding is between 1 and 4 bits. First, the encoding information is obtained from the blockchain and converted into binary ciphertext secret_code'. A window of size 1-4 bits is used to traverse secret_code' to count the frequency of all encoding situations. The process is as follows: Figure 7 As shown in , a possible frequency binary tree is constructed through the encoding frequency distribution, and the possible characters are deduced. The statistical results are compared with the actual encoding ratio of the message, and the results are as follows Figure 8 shown.
[0176] The KS test can be used to determine whether the probability distributions of two samples are different. The mathematical definition of the KS statistic is D = max|F1(x)-F2(x)|, where F1 and F2 are the cumulative distribution functions of the statistical code distribution and the actual code distribution, respectively. 0.05 is used as the significance level to determine the significance of the test result. After calculation, we get D = 0.45, p = 0.0025 < 0.05, that is, the statistical code distribution and the actual code distribution come from different distributions, and the attacker cannot decipher the code and infer the message through frequency statistics.
[0177] In addition, using balanced frequency distribution for characters at the same depth can not only reduce the situation where the frequency of a node path at the same depth is significantly higher than that of other nodes at the same depth, but also increase the complexity of statistical analysis. Note that the left child node of the root node in the above text is 1, and the hierarchical method is used to number all nodes containing letter characters in sequence from 1 to 13. The frequency of each node code when counting the text "Jane Eyre" is as follows Fig. 9 shown.
[0178] Information entropy is a measure of uncertainty. The greater the information entropy, the higher the uncertainty. Definition Denotes random event X as x i The probability of Fig. 9 Information entropy corresponding to the three situations.
[0179] Table 11 Comparison of information entropy
[0180] Frequency balance Information Entropy Before frequency balancing 3.1850 After frequency balancing 3.2838 Ideal frequency 3.2912
[0181] The ideal frequency refers to the depth of the tree where the character is located determined by the frequency statistics method in this paper. The characters of the same depth can reach the same state of node encoding appearance frequency at the same depth by exchanging the nodes of distribution. For example, if node 1 and node 2 are at the same depth, the ideal encoding frequency is the same.
[0182] It can be seen that the information entropy after frequency balancing is smaller than the information entropy of the ideal frequency and both are greater than the information entropy before balancing, that is, the uncertainty of the information after frequency balancing is higher and tends to the ideal state of the coding scheme of the present invention, which is beneficial to enhancing the performance of anti-frequency analysis.
[0183] Anti-brute force cracking performance: The character arrangement of the first four layers of the time-based binary tree is There are many possibilities. It is almost impossible to crack the character arrangement order by brute force. And the random factor is extracted from the root hash. As time changes, the tree will continuously generate new leaf nodes. The root hash will change with time, that is, the random factor will also change with time. The same character-path mapping relationship is maintained by the random factor, so the character-path mapping relationship will change with time. As the number of nodes increases, the difficulty of cracking the root hash increases exponentially. When using SHA-256 for each root hash operation, each additional node requires 2 more 128 When the attacker's decryption time is greater than the node generation time, the mapping relationship is unbreakable.
[0184] Message continuity analysis: When messages are sent in fragments, the delay of blockchain broadcasting will cause the time for multiple transaction messages to arrive at the receiver to be irregular, causing the order of message reception to be chaotic.i When the time is selected, continuous or very short interval moments will be selected, that is, 0 < selected_moment i -selected_moment i-1 <T s , such as 0s<T s ≤5s, and embed these moments in each piece of information code, so that the receiver can use the timing to restore the correct order of the ciphertext information. i -selected_moment i-1 ≥T l , such as T l ≥1h, the timeliness of messages can be distinguished, ensuring a clear time separation between new messages and old messages.
[0185] 3. Pre-negotiation simplifies analysis
[0186] The present invention will analyze the effect of canceling the pre-negotiation process on further improving the security and efficiency of communication from the perspectives of concealment and communication efficiency.
[0187] Concealment analysis: Pre-negotiation transactions usually contain key information such as keys and shards. The sending of pre-negotiation transactions will affect the distribution of transaction intervals and cause changes in node traffic. Therefore, this mechanism increases the probability of covert communication being detected.
[0188] The present invention collects the transaction time of about 15 million transactions in the recent Bitcoin network, filters the transaction addresses that appear only once and the large merchant transaction addresses with too frequent transactions, and obtains the interval statistics of the same address's transactions again within one hour.
[0189]
[0190] If the same address sends multiple transactions within an hour, assuming that n transactions {T1, T2, …, T n}, then the interval between transactions sent to the same address is the difference between the timestamps of two adjacent transactions (in milliseconds format of Unix timestamps) divided by 60,000 and rounded up, i.e., formula (4).
[0191] Fig.10 The statistics displayed are the number of transactions sent by the same address within one hour is less than or equal to 5 times.
[0192] In order to verify that the pre-negotiation process increases the probability of covert communication being detected, the present invention generally follows Fig.104000 transactions were sent according to the sending interval distribution, of which 1000 were transactions that canceled the pre-negotiation process using the method of the present invention, and the other 3000 transactions were pre-negotiation transactions that were sent once before each formal communication transaction. Figure 11(a) shows the sending interval distribution of 1000 concealed transactions that canceled the pre-negotiation process following the transaction sending interval rule, and Figures 11(b) to (d) show the concealed transaction interval distribution using different sending strategies, but all follow the transaction sending interval rule. Figure 11(b) shows that after sending the pre-negotiation transaction, concealed transactions are sent as quickly as possible to ensure communication efficiency; Figure 11(c) is a communication strategy that takes into account both communication efficiency and concealment, and chooses to start sending concealed transactions within 20 minutes after the pre-negotiation transaction is sent; Figure 11(d) takes into account concealment completely, and sends concealed transactions within 1 hour after the pre-negotiation transaction is sent.
[0193] The Kullback-Leibler divergence is a measure of the asymmetry between two probability distributions, where P represents the true distribution of the data and Q represents the theoretical distribution of the data. It is defined as D KL (P||Q) = ∑P(x)log(P(x) / Q(x)). KL divergence can be used to measure the difference in the distribution of transaction intervals before and after the cancellation of the pre-negotiation process. The degree of concealment of the transaction can be determined based on the size of the difference.
[0194] remember Fig.10 The distribution of is Q, and the distribution of Figure 11(a) to (d) is P a , P b , P C , P d , then the corresponding KL divergence can be expressed as formula (5)~(8) by definition, and the calculation results are shown in Table 12.
[0195]
[0196] Table 12 KL divergence corresponding to different sending strategies
[0197] Distribution of sending strategies KL divergence <![CDATA[P a ]]> 0.00041 <![CDATA[P b ]]> 0.66987 <![CDATA[P C ]]> 0.11434 <![CDATA[P d ]]> 0.00087
[0198] From Table 12, we can see that except for the fact that the transaction distribution after the pre-negotiation mechanism is cancelled is slightly different from the original transaction interval distribution, the transaction interval distribution P b and P C There are large differences from the original distribution, and the concealment cannot be guaranteed. d and P a Although the distributions are similar and differ little from the original distribution, P d The amount of information transmitted is only P aTherefore, canceling the pre-negotiation process before sending each shielded transaction can improve the confidentiality of the communication process and improve security.
[0199] Communication efficiency analysis: The sending of pre-negotiation transactions will not only reduce the confidentiality of communication but also increase the total time for transmitting the real data. Table 13 shows the time required to send the real data of the message using the above four sending strategies.
[0200] Table 13 Time required to send the same amount of information
[0201] Distribution of sending strategies Time(s) <![CDATA[P a ]]> 22.34 <![CDATA[P b ]]> 24.04 <![CDATA[P C ]]> 32.41 <![CDATA[P d ]]> 44.61
[0202] It is calculated that if the transmission is to be a The amount of information sent in the same way, P b and P C The P method takes 7% and 45% more time respectively; d and P a Although the distributions are similar and differ little from the original distribution, P d Only half of the transactions are used for covert communication, which means that it takes nearly 100% more communication time to transmit the P a Therefore, canceling the pre-negotiation process before sending each hidden transaction can reduce the sending time and improve communication efficiency.
[0203] Aiming at the problems existing in the covert communication of the existing blockchain, the present invention proposes a covert communication model based on a dynamic time-based binary tree. The main features of the model are: 1) the use of tree data structure improves the efficiency of encoding and decoding, and uses time as key information to ensure that the same tree type can be restored between the communicating parties, while ensuring a certain degree of security, while improving the embedding rate and encoding and decoding efficiency; 2) using the root hash as a random factor carrier to ensure the consistency of the tree node path encoding; 3) embedding time into the vacant position of the path encoding for transmission, eliminating the pre-negotiation process before each communication, and further improving the efficiency of communication and the concealment of transactions. The experimental results verify the effectiveness of the method.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.
Claims
1. A covert communication model based on a dynamic time binary tree, characterized in that: It includes three parts: information encoding, ciphertext embedding and information restoration, specifically: Step 1, information encoding: The sender first obtains the root hash RootHash of the time-type binary tree at the current moment, and extracts all the numbers in it as the random factor seed and records them. If the number of digits in RootHash is less than 5 or the seed collides with the previous record, the root hash continues to be hashed until the number of digits is greater than 5 or the seed is the only one used; When encoding, refer to the path encoding after randomization, encode each character in the information to be encoded separately; use the layer-order traversal method to find the corresponding character char in the node i , record the path dist of the node where the character is located i , and generate the corresponding index field index i , path dist i The length is not fixed but is less than or equal to 4 bits. The length of the index field is fixed to 4 bits. Step 2: Information embedding; Step 3, information extraction: The sender and receiver of the message use the same rules to maintain the local time-based binary tree, and can restore the tree type that conforms to Bin_moment. The message restoration steps are as follows: 1) Separate the path code field and the index node field: The receiver first obtains the ciphertext data hex_secret_code′ from the data payload field and converts it to binary secret_code'. The length of secret_code' is N. e ', traverse 4 digits from the back to the front to find the separator E a and E b , thereby separating the path encoding field and the index node field; 2) Extract Bin_moment′: The receiver extracts the index nodes in the index field. i Every 4 bits are split and restored to indexlist', and the index in index_list' is recorded. i The first to fourth bits are {b i,0 b i,1 b i,2 b i,3 }; Traverse index_list′ and add b in each indexi i,2 b i,3 Record into index_list_temp, and take out the remaining path information Bin_dist; 3)Bin_moment'(b0, b1, b2, ..., b 16 ) Recover the moment selected_moment' selected by the sender, as shown in formula (3), Based on selected_moment', use the spanning tree rule to restore the same tree type as the sender at the same time and extract the random factor seed' from the root hash roothash', and use seed' to generate a time-type binary tree with the same path encoding as the sender; 4) Traverse index_list and index_list_temp to get index_list[i] and index_list_temp[i], i = 0, 1, 2, ..., len(index_list′)-1, and then take them out in order in Bin_dist' The (index_list_temp[i][0]×2+index_list_temp[i][1]+1) bits of information are recorded as disti. The binary tree is searched bit by bit in disti to find the node where the character is located, and then the relative position and type of the character are determined based on index_list[i][0] and index_list[i][1].
2. A covert communication model based on a dynamic time binary tree according to claim 1, characterized in that: The path encoding random rules are as follows: 1) Assume that the original code of each branch in the basic tree is code = {0, 1, 0, 1, ..., 0, 1}, and the random factor is seed; 2) Group the codes into pairs i ={0,1},code_pairs i [0] and code_pairs i [1] corresponds to the encoding of the left and right branches; 3) After applying the seed, code_pairs i [0] randomly flips between 0 / 1 with a probability of 50%. If code_pairs i [0] code_pairs i [0] = {1}, if code_pairs i [0] = {1} then code_pairs i [1] = {0}, until all code_pairs i Once the flipping is completed, the path randomization is completed.
3. According to claim 1, a covert communication model based on a dynamic time binary tree is characterized in that: Step 2 The steps for the sender to embed ciphertext are as follows: 1) Character char i Reference path encoding dist i Generates a 4-bit index field i , dist i and index i Temporarily store them in the string list dist_list=(dist0, dist1, ..., dist i ) and index_list=(index0,index1,...,index i )middle; 2) Let N be the number of all characters, and len(dist_list) be l d , len(index_list) is l i ; Repeat 1) until len(dist_list) = len(index_list) = N; 3) Embed Bin_moment bit by bit into dist i In the above example, let len(dist i )<4 char i The total number is N a , if len(dist i )<4 can be embedded in 4-len(dist i ) bits, then Bin_moment17 bits are completely distributed into each disti, considering the extreme case: len(dist i )=1 or len(dist i )=3, then 17 / (4-1)≤N is required a ≤17 / (4-3), that is, 6≤N a ≤17; only N a ≥17, Bin_moment can be fully embedded in each dist i In the field; 4) Generate two random path length codes, both of which are {1, 1}, and the relative position of the characters is random index node code E a ={0 / 1, 0 / 1, 1, 1} and E b ={0 / 1,0 / 1,1,1}, where E a With E b The total length occupies 1B; 5) Convert every four digits into hexadecimal to form hex_secret_code, fill the lower digits less than four digits with '0', and then convert it into hexadecimal again; embed the hex_secret_code into the data payload field of the blockchain platform, and the message embedding process is completed; 6) Embed Bin_moment bit by bit into the field length L amount The transaction is sent in the lower 17 bits of the amount field.
4. A covert communication model based on a dynamic time binary tree according to claim 3, characterized in that: Since the maximum length of the data payload field varies on different blockchain platforms, the length of the data field is recorded as L data , then according to N e There are two lengths: (1) When N e ≤(L data -1)B, you can embed directly: (2) When N e >(L data -1)B, the original text is divided into n pieces and then embedded in batches. The amount of original information contained in each piece is almost the same, and a different Bin moment is selected for each piece to perform step 3) and embed it into each transaction; in, k=1,2,...,n,m k =min{(k×avg-1), N e -1}, avg = N e / n.
5. The covert communication model based on a dynamic time binary tree according to claim 1, characterized in that: Step 3 (2) extracting Bin_moment′ includes the following steps: (1) Convert the lower 2 bits of all index nodes to decimal and add 1, that is, index_list_temp[i] = BIN2DEC(index_list_temp[i]) + 1. If {b i,2 , b i,3 }≠{1,1}N a ′≥17: If index_list_temp[i]=4, the corresponding 4-bit path data in Bin_dist indicated by the index node is put into dist_list'; If index_list_temp[i] < 4, put the data of index_list_temp[i] bits into dist_list′, extract the data of 4-index_list_temp[i] bits after the current position and fill them into Bin_moment′ bit by bit, and index in Bin_dist i ' Delete the information of the same value in the corresponding path encoding, and put the path after deleting the embedded information into dist_list' and repeat until the length of Bin_moment' is 17 bits; (2) If {b i,2 , b i,3 }≠{1,1}N a '<17, extract the last 17 digits of data from the transaction amount field to obtain Bin_moment'.
6. A covert communication model based on a dynamic time-based binary tree according to claim 2, characterized in that: Step 3 of 4) is divided into two cases: (1) If index_list_temp[i]<4 or index i The third and fourth bits {b i,2 , b i,3 }≠{1,1}, then b i,0 Indicates the relative position of the character in the node, b i,1 Indicates the case of the character and stores the decoded character in char i middle; (2) If index_list_temp[i] = 4, then: b i,0 b i,1 Both bits represent the relative position of the character in the node. The decoded character is stored in char i middle.
Citation Information
Patent Citations
Voice information hiding algorithm for dynamic codebook based on complete binary tree grouping
CN107527621A
Covert communication method based on block chain
CN117955687A
Error Correction Code-based Embedding in Adaptive Rate Communication Systems
US20210227384A1