[go: up one dir, main page]

CN119728091B - Covert Communication Model Based on Dynamic Time Binary Tree - Google Patents

Covert Communication Model Based on Dynamic Time Binary Tree

Info

Publication number
CN119728091B
CN119728091B CN202411594316.8A CN202411594316A CN119728091B CN 119728091 B CN119728091 B CN 119728091B CN 202411594316 A CN202411594316 A CN 202411594316A CN 119728091 B CN119728091 B CN 119728091B
Authority
CN
China
Prior art keywords
index
list
dist
code
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411594316.8A
Other languages
Chinese (zh)
Other versions
CN119728091A (en
Inventor
佘维
马佳伟
刘炜
田钊
冯海格
张淑慧
程孔
夏克冰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou University
Original Assignee
Zhengzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou University filed Critical Zhengzhou University
Priority to CN202411594316.8A priority Critical patent/CN119728091B/en
Publication of CN119728091A publication Critical patent/CN119728091A/en
Application granted granted Critical
Publication of CN119728091B publication Critical patent/CN119728091B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A method for generating a hidden communication model of a dynamic time binary tree includes selecting a certain determined time by a sender, generating a time binary tree under the determined time by utilizing a generation rule of the dynamic time binary tree, obtaining root hash from a root node of the determined time binary tree and extracting a random factor from the root hash, endowing each tree node with different path codes by utilizing the random factor, generating a corresponding path code and index node for each character in information to be coded according to the path code of each node, embedding the selected time into an empty bit in a path code field by the sender, splicing the path code field and the index node field and embedding the blank bit into a block chain transaction for transmission, and recovering the binary tree under the corresponding time by a receiver after extracting the selected time embedded by the sender. The invention improves the communication efficiency while ensuring the safety, and avoids the potential safety hazard brought by the pre-negotiation process.

Description

Hidden communication model based on dynamic time binary tree
Technical Field
The invention relates to a communication model, in particular to a hidden communication model based on a dynamic time binary tree.
Background
In recent years, the occurrence of interception and cracking of secret message transmission is frequently happened, and the concealment and confidentiality of message transmission and the detection resistance of encrypted messages are increasingly emphasized. The traditional communication modes are transmitted by direct plaintext transmission or by simple encryption into ciphertext, but the characteristics of the transmission modes are obvious, and after the attacker identifies, the attacker can directly intercept and try to crack or adopt replay attack to destroy the correctness and the integrity of the message. The above-mentioned problems can be solved by means of communication in which the message is not easily perceived by an attacker.
Covert communication refers to a manner of transmitting a secret message in normal communication behavior, which can greatly reduce the risk of being detected and attacked. The hidden communication adopts a public transmission medium, and is different from the traditional communication mode in that the hidden communication conceals secret information in normally transmitted information, and does not directly transmit original text or ciphertext as normal information. Only a specific communication party knows how to recognize the hidden information and the decrypted information, and an attacker needs to consume a large amount of computing resources to make a judgment on the hidden communication behavior that may exist.
The blockchain serves as a de-centralized platform, providing the user with an opportunity to hide the identity. In the public chain represented by bitcoin and ethernet, the information transmitted by the user can be indirectly received by the receiver even if not directly transmitted to the receiving address due to the existence of the broadcasting mechanism. The broadcasting mechanism enables the users to transmit the information without direct communication, so that the hidden communication in the public chain is found and cannot be traced to the actual users, thereby achieving the purpose of protecting privacy.
The earliest hidden communication channel of the blockchain is proposed by Partala (cryptography, 2018,2 (3): 18) which can be proved on the blockchain, information hiding is realized by changing the Least Significant Bit (LSB) of a transaction address, a receiver reads the least significant bit component encrypted information according to the transaction sequence and decrypts the information into an original message, tian et al (information and communication security, 2020: 814-830) discloses that a hidden channel is built on the basis of a dynamic tag, the private key of the ECDSA is replaced by the secret message, and a public key pk is generated on the basis of the new private key, so that statistical analysis and association attacks are effectively resisted and transaction traceability is prevented. She Wei et al in "Markov chain-based generation type blockchain hidden communication model" (communication academic report, 2022,43 (10): 121-132) propose a hidden communication technology based on Markov chain generation text, which effectively solves the problems of insufficient hidden property, information crossing and the like in blockchain communication by maintaining the same transition probability matrix and generating secret information hidden by a secret sentence conforming to natural language characteristics and high readability, and then ensuring anonymity by using a ring signature technology. Huang Dongyan et al, in research on multi-address time-type blockchain covert communication methods (journal of communication, 2023,44 (02): 148-159.), disclose proposing a time-type covert communication scheme based on time stamps in blockchains, encoded by the length of time that the transaction was sent. Unlike conventional storage-type covert communication, time-type covert communication techniques can improve the security performance against detection but the embedding efficiency can be correspondingly reduced. She Wei et al, in a blockchain covert communication model capable of concealing sensitive documents and sender identities, disclose that the use of a GAN network to generate images containing encrypted information, in combination with CP-ABE and ring signatures, enables the sender to anonymously improve security, stores the information in an infranar interstranar file system (IPFS), and ensures communication security and high transmission efficiency. With the increasing schemes for covert communication using blockchain networks, the following problems still need to be solved:
1) The method has the advantages that the coding and decoding efficiency is reduced when the information security is ensured by using the traditional coding method, the time consumption is long when the transmission information is large, and the communication efficiency is further reduced by transmitting the key information, the start identifier, the end identifier information and the fragment information in a pre-negotiation transaction mode.
2) The information coding scheme based on the blockchain network is mostly coded in a fixed mapping mode, so that the information in the blockchain network is easier to break, if the mapping rule of character-coding is broken, all sent information before the information can be traced and broken, the safety of the encrypted information is greatly reduced, and the original sending rule is broken by the mode of sending pre-negotiation transaction before each communication, so that the communication concealment is weakened, and the safety of the communication is further reduced.
Disclosure of Invention
In order to solve the problems, the invention provides an information coding scheme based on a time binary tree, wherein respective time binary trees are maintained among communication parties, character information is stored in a data field of each node in the tree, a root hash changing along with time is used as a random factor carrier, and path coding of each node is continuously changed. After each character in the information is converted into a path code and a corresponding index byte is generated by a sender, a selected moment is embedded in an empty bit of the path code, and an embedded transaction is sent to a block chain network after a path code field and an index node field are spliced. The receiver acquires the transaction from the network, extracts the selected moment and recovers the tree and root hash when the information is transmitted, searches the corresponding character in the local time binary tree according to the path code and the index node, and recovers the original message.
In order to solve the technical problems, the invention adopts the following technical scheme:
a hidden communication model based on a dynamic time binary tree comprises three parts, namely information coding, ciphertext embedding and information restoring, and specifically comprises the following steps:
Step 1, information encoding, namely firstly acquiring a root hash RootHash of a time binary tree at the current moment, extracting all numbers in the root hash RootHash as random factors seed, and recording, and continuing to perform hash operation on the root hash until the number bit is more than 5 bits or seed is uniquely used if the number bit is less than 5 bits or seed collides with the previous record in RootHash;
the method comprises the steps of coding each character in information to be coded by referring to random path coding, finding out a corresponding character char i in a node by adopting a layer sequence traversal method, recording a path dist i of the node where the character is located, generating a corresponding index field index i, wherein the length of the path dist i is not fixed but is less than or equal to 4 bits, and the length of the index field is fixed to 4 bits;
step 2, information embedding;
And 3, information extraction, namely maintaining a local time binary tree by adopting the same rule by a sender and a receiver of the message, and recovering the tree form conforming to the Bin_segment, wherein the message recovery steps are as follows:
1) Separating a path coding field and an index node field, namely firstly, a receiver acquires ciphertext data hex_secret_code 'from a data load field, converts binary secret_code', records the length of secret_code 'as N e', and finds separators E a and E b from back to front in a 4-bit traversal way so as to separate the path coding field and the index node field;
2) Extracting the Bin_segment ', wherein a receiver splits and restores index node index i ' in an index field into index_list ' every 4 bits, marks the first to fourth bits of index i in the index_list ' as { b i,0bi,1bi,2bi,3 }, and records b i,2bi,3 in each index i into index_list_temp by traversing the index_list ', and takes out the rest path information Bin_dist;
3) The selected moment of time of the sender's selection, selected _ segment ', is restored by Bin _ segment ' (b 0,b1,b2,…,b16), as shown in equation (3),
Based on the selected_segment ', the same tree type at the same time as the sender is restored by using a spanning tree rule, a random factor seed' is extracted from the root hash roothash ', and the time binary tree with the same path code as the sender is generated by applying the seed';
4) Traversing index_list and index_list_temp to obtain index_list [ i ] and index_list_temp [ i ], i=0, 1,2,., len (index_list ') -1, sequentially and sequentially extracting (index_list_temp [ i ] [0] ×2+index_list_temp [ i ] [1] +1) bit information in Bin_dist' to be recorded as a dist i, searching the binary tree bit by bit depth according to bits in dist i to find the node where the character is located, and determining the relative position and type of the character according to the index_list [ i ] [0] and index_list [ i ] [1 ].
The path coding random rule is as follows:
1) Setting the original code of each branch in the layer sequence of the basic tree as code= {0,1, & gt, 0,1}, and setting the random factor as seed;
2) Codes are divided into groups of codes, namely codes_ pairs i={0,1},code_pairsi [0] and cose _ pairs i [1] which correspond to the codes of the left branch and the right branch;
3) After seed is applied, code_ pairs i [0] is randomly flipped between 0/1 with a probability of 50%, if code_ pairs i [0] then code_ pairs i [0] = {1}, if code_ pairs i [0] = {1} then code_ pairs i [1] = {0}, until all codes_ pairs i are flipped, i.e. the path is random.
Step 2 the sender embeds the ciphertext as follows:
1) Generating an index field index i of 4 bits for the character char i by referring to the path encoding dist i length, and temporarily storing dist i and index i in a character string list, respectively, dist_list= (dist 0,dist1,…,disti) and index_list= (index 0,index1,…,indexi);
2) Let N be the number of all characters, len (dist_list) be l d, len (index_list) be l i, repeat 1) until len (dist_list) =len (index_list) =n;
3) Bit-wise embedding Bin_pieces into dis i, recording that the total number of char i of len (dis i) <4 is N a, if len (dis i) <4 can be embedded into 4-len (dis i) bits, then fully distributing Bin_pieces 17 bits into dis i, considering the limit that when len (dis i) =1 for each character or len (dis i) =3 for each character, 17/(4-1) N a is less than or equal to 17/(4-3), namely 6 is less than or equal to N a is less than or equal to 17, and when N a is less than or equal to 17, bin_pieces can be fully embedded into the fields of dis i;
4) Arbitrarily generating two path length codes {1,1}, wherein index node codes E a = {0/1, 1} and E b = {0/1, 1} of the character relative position random, and the sum of the lengths of E a and E b occupies 1B;
5) Will be Every four bits are converted into hexadecimal to form a hex_secret_code, and the lower bits less than four bits are filled with '0', and then the hexadecimal is converted;
6) Bit-wise embedding the bin_segment into the lower 17 bits of the monetary field of field length L amount, sending the transaction,
Because the maximum lengths of the data load fields of different blockchain platforms are different, the length of the data field is recorded as L data, and the two cases are classified according to the length of N e:
(1) When N e≤(Ldata -1) B, the embedding can be directly performed:
(2) When N e>(Ldata -1) B, uniformly dividing the original text into N pieces, and then embedding the N pieces in batches, wherein the original information content in each piece is almost the same, and each piece of embedded text is embedded in each transaction by selecting different Bin_segments to execute the step 3);
Wherein, the mk=min{(k×avg-1),Ne-1},avg=Ne/n。
In the step 3, 2) of extracting bin_segment', the method comprises the following steps:
(1) The lower 2 bits of all index nodes are decimal and added with 1, namely index_list_temp [ i ] =BIN2DEC (index_list_temp [ i ])+1 if { b i,2,bi,3 } in index_list_temp is not equal to {1,1}, the number N a'. Gtoreq.17:
if index_list_temp [ i ] =4, putting the corresponding 4-bit path data in Bin_dist indicated by the index node into dist_list';
If the index_list_temp [ i ] <4, then the bit data of the index_list_temp [ i ] is put into the dist_list ', the data of the 4-index_list_temp [ i ] bit after the current position is extracted and filled into the Bin_movement ' according to the bit, the information with the same bit quantity is deleted in the coding of the corresponding path of the index i ' in the Bin_list, and the path after the information is deleted is put into the dist_list ' for repeated execution until the length of the Bin_movement ' is 17 bits;
(2) If the number N a '<17 of { b i,2,bi,3 } noteq {1,1} in index_list_temp, then the last 17 bits of data are extracted from the transaction amount field to obtain bin_segment'.
Step 3, 4) is divided into two cases:
(1) If the third and fourth bits { b i,2,bi,3 } in index_list_temp [ i ] <4 or index i is not equal to {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 the decoded character is stored in char i;
(2) If index_list_temp [ i ] =4, b i,0bi,1 is two bits each indicating the relative position of the character at the node, and the decoded character is stored in char i.
The invention adopting the technical scheme has the following beneficial effects:
1) In addition, the invention designs a method for embedding key information into a path coding null bit, which does not need to send pre-negotiation transaction before each communication, further improves the communication efficiency and solves the problem that the communication efficiency can be ensured when the traditional coding method is used for ensuring the information security.
2) The hidden communication method based on the dynamic time binary tree is provided, character-path coding mapping can be changed according to different time, the safety of information transmission is improved, pre-negotiation transaction is canceled, hidden channel exposure probability and risk of key information leakage are reduced, the concealment and safety of communication are further improved, and the problem of insufficient safety caused by fixed coding and pre-negotiation transaction using the traditional hidden communication method is solved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the following description will briefly explain the drawings used as needed in the description of the embodiments or the prior art.
FIG. 1 is a diagram of a root hash generation process;
FIG. 2 is a time-based binary tree;
FIG. 3 is a model flow diagram of the present invention;
FIG. 4 is a binary representation of the encoding time;
FIG. 5 is a graph showing a comparison of the random front and back of the path;
FIG. 6 is an encoding and decoding timing diagram;
FIG. 7 is a diagram of a coding frequency statistics process;
FIG. 8 is a diagram showing the comparison of the ratio of the statistical coding to the actual coding;
FIG. 9 is a node path frequency statistics plot;
FIG. 10 is a normal co-address transaction interval;
FIG. 11 (a) directly sends a covert transaction for canceling a pre-negotiation transaction;
FIG. 11 (b) depicts a short time after pre-negotiation to resend a covert transaction;
FIG. 11 (c) depicts a concealed transaction being re-sent within a reasonable time after pre-negotiation;
fig. 11 (d) is a diagram of re-sending the covert transaction after pre-negotiation, all at the sending interval.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
The blockchain is used for storing data blocks in a chained structure according to a time sequence, ensuring the non-tamperable and non-counterfeitable decentralized shared account book in a cryptography mode, and has the characteristics of decentralized, anonymity, traceability, non-tamperable and non-counterfeitable and the like.
Decentralizing in a blockchain refers to the fact that the network architecture and data management do not rely on a single central authority, with each node in the network maintaining a complete or partial copy of the blockchain data.
Anonymity refers to the fact that when a user uses a blockchain network to conduct transactions, the user uses public and private key pairs to conduct operations instead of real identities, namely, the relationship between transaction activities and the real identities of the user is low, so that relative anonymity is achieved.
Traceability means that the user 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 publicly transparent.
Tamper-and non-counterfeitability refers to the fact that transaction data will not be altered, deleted or counterfeited after it has been written to a block and validated in a blockchain network.
The blockchain 2.0 technology is not limited to digital currency applications, but also introduces the concepts of smart contracts and distributed applications (Decentralized Applications, DApps) to enable smart contract-based decentralised application development. The smart contract is an event-driven, stateful computer program running on a replicable shared blockchain data ledger, representing a technology that is ethernet. The blockchain 3.0 is innovated in aspects of cross-chain operation, expandability and safety improvement and the like, and the cross-chain refers to the realization of interoperability among different blockchains, so that data can be safely exchanged and transferred among different chains.
The binary tree (binary tree) is an ordered tree with the degree of nodes in the tree not more than 2, and the time binary tree is based on the binary tree, and a tree leaf node mechanism, a node storage information mechanism and a root hash mechanism which are changed with time and continuously generate new are added.
Starting from a start time when the time-based binary tree has only one root node or one base tree, the tree generates a new leaf node every time interval (interval), i.e. the number of nodes and the depth of the tree change continuously with time.
Adding data fields in the original binary tree node data structure and adding hash fields in the data structure of the non-leaf nodes, each node in the tree can store arbitrary data information including null information, the non-leaf nodes can additionally store hash values after hash value splicing of left and right sub-nodes (non-leaf nodes) of the non-leaf nodes, and the change of information in the nodes does not cause the change of tree type.
The root hash value is fixedly stored in the root node of the time binary tree. The root hash concept is derived from the Merkle tree proposed by RALPH MERKLE, and is a binary tree constructed based on hash values, where hash values of all child nodes are stored in non-leaf nodes, and 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 a root hash value field of the Merkle tree. All users can verify whether the transaction is in the block using the root hash field and the hash path.
And the nodes with the depth of more than 4 do not store any data and continuously generate new nodes along with the time increase, wherein the nodes are only used for changing the root hash value of the tree, and the root hash value generation process is shown in figure 1.
From the leaf node of the right subtree, hash the data parts of the left and right leaf nodes to obtain H (data 1) and H (data 2), respectively, store the hash value H (a) =h (H (data 1) ||h (data 2)) of the node a in the parent node a, and store the hash value H (B) =h (H (data 3) ||h (data 4)) in the left subtree parent node B hash field, and store the hash value H (C) =h (H (a) ||h (B)) in the node C. The end of the recursive process results in RootHash =h (H (C) ||h (D)).
The depth of the tree node where the character is located depends on the size of the occurrence probability of the character, and a character set c= { C 1,c2,…,cn }, wherein the occurrence probability of each character C i is P (C i), and the occurrence probability statistics are shown in table 1.
TABLE 1 statistics of probability of occurrence of characters
Let D be the depth of the tree, node N contains probabilities that character sets C N,Phigh (C) and P low (C) are high frequency and low frequency characters.
Constructing a time binary tree for balancing character frequencies:
1) The elements in the character set C are ordered by probability of occurrence P (C 1)≥P(c2)≥...≥P(cn).
2) The C 1-4 characters are temporarily distributed to two nodes of d=1, the C 5-12 characters are temporarily distributed to four nodes of d=2, the C 13-28 characters are temporarily distributed to eight nodes of d=3, and the remaining characters are distributed to sixteen nodes of d=4.
3) The same character of D is divided into high-low frequency character pairs according to the occurrence frequency and is put into one node, for example, the character 'e','t', 'a', 'o' with the highest frequency and the lowest frequency of D=1 are put into the first node of the left subtree, N left={chigh1,clow1 } = { 'e', 'o',with the next highest frequency and the next lowest frequency are put into the other node N right={chigh2,clow2 = { 'a','t'. By balancing the frequencies of the characters contained in the nodes, the problem of too high frequency of occurrence of path codes of certain nodes can be avoided.
4) For the node at d=4, which contains 4 characters instead of 2 characters, the traversing depth and the index node structure proposed later can be reduced better, so that the model coding and decoding efficiency is improved.
5) The final structure after time-based binary tree balancing is shown in fig. 2. The nodes of D <4 constitute the basic tree structure and are not generated in time, and the nodes of D >4 are generated continuously from 00:00:00 in time and are only used for changing the root hash.
As shown in fig. 3, the method is based on a hidden communication model of a dynamic time binary tree, a time binary tree is maintained locally by generating rules of the time binary tree among communication parties, and a sender selects root hash at any moment and extracts random factors to change node paths. And after carrying out path coding on the original text, transmitting transaction information, and after acquiring the transaction information, restoring the tree form according to the embedded time by a receiver, and carrying out inverse operation to decode the information to obtain the original text, wherein the model flow is shown in figure 3.
The invention will be described with respect to a time-based binary tree model in terms of information encoding, ciphertext embedding, and information retrieval.
And step 1, information encoding, namely firstly acquiring a root hash RootHash of a time binary tree at the current moment by a sender, extracting all numbers in the root hash RootHash as random factors seed, and recording, and continuing to perform hash operation on the root hash until the number bit is more than 5 bits or seed is uniquely used if the number bit is less than 5 bits or seed collides with the previous record in RootHash. The current time or the sender-selected encoding time selected_segment is saved in decimal, the binary representation of which is shown in fig. 4.
The time, minute and second occupy the upper 5 bits, the middle 6 bits and the lower 6 bits respectively, the complete moment is represented by the length as short as possible, and the occupation of the path coding empty bit is reduced.
After the random factor is applied, the coding of each branch is changed, so that the path corresponding to each node is changed, the result is shown in fig. 5, and the specific mapping relation is shown in table 2.
Table 2 character-path mapping table
The path coding random rule is as follows:
1) Setting the original code of each branch in the layer sequence of the basic tree as code= {0,1, & gt, 0,1}, and setting the random factor as seed;
2) Codes of code packets code_ pairs i={0,1},code_pairsi [0] and code_ pairs i [1] correspond to the codes of the left branch and the right branch;
3) After seed is applied, code_ pairs i [0] is randomly flipped between 0/1 with a probability of 50%, if code_ pairs i [0] then code_ pairs i [0] = {1}, if code_ pairs i [0] = {1} then code_ pairs i [1] = {0}, until all codes_ pairs i are flipped, i.e. the path is random.
The coding is performed by referring to the random after-path coding, and each character in the information to be coded is coded respectively. And (3) finding out the corresponding character char i in the node by adopting a layer sequence traversal method, recording the path dist i of the node where the character is located, generating a corresponding index field index i, wherein the length of the path dist i is not fixed but is smaller than or equal to 4 bits, the length of the index field is fixed to 4 bits, and the structure of the index field is shown as follows.
1) When the depth of the node where the character is located is less than 4, i.e., the path length is less than 4, the index field structure is as follows.
Character relative position Letter case type Path length
1bit 1bit 2bit
The relative position section of the character represents the position of the character in the node, 2 different position relations can be indicated, the letter case type section indicates the case type of the English character, the path length section is used for representing the path length corresponding to the node where the character is located, and the path length is the key for extracting the path codes corresponding to the characters during decoding.
2) When the depth of the node where the character is located is equal to 4, the index field structure is as follows.
Character relative position Path length
2bit 2bit
All non-letter type characters are stored in the nodes with the depth of 4, at the moment, the letter case type section is invalid, the letter case type section is replaced by the character relative position section, the relative position section can indicate 4 different character relative positions, the number of characters in each corresponding node is increased to 4, the depth of the nodes containing the characters can be reduced, and the coding and decoding efficiency is improved. Path length segments function as 1). Since all of the nodes whose path length codes are {1,1} are stored as symbol-like characters, it is specified that no path length codes in two or more consecutive index nodes are {1,1} in the codes.
And 2, information embedding.
The steps for embedding ciphertext by the sender are as follows.
1) 4-Bit index fields index i are generated for character char i with reference to path encoding dist i length, and dist i and index i are temporarily stored in the string list dist_list= (dist 0,dist1,…,disti) and index_list= (index 0,index1,…,indexi), respectively.
2) Let N be the number of characters in total, let (dist_list) be l d, and let (index_list) be l i. Repeating 1) until len (dist_list) =len (index_list) =n.
3) Bit-wise embedding bin_movement into dist i, recording that the total number of char i of len (dist i) <4 is N a, if len (dist i) <4 can be embedded into 4-len (dist i) bits, then the bin_movement 17 bits are fully distributed into dist i, and considering the limit that when len (dist i) =1 for each character or len (dist i) =3 for each character, 17/(4-1) N a is not more than 17/(4-3), i.e. 6 is not more than N a is not more than 17. If N a is not less than 17, the Bin_segment must be completely embedded in each dist i field, and if the Bin_segment cannot be completely embedded, the step 6) is executed. The embedded algorithm pseudocode is shown in algorithm 1.
4) Arbitrarily generating two path length codes {1,1}, and index node codes E a = {0/1, 1} and E b = {0/1, 1} with the sum of the lengths of E a and E b accounting for 1B. Composing four parts of dist_list, E a,Eb and index_list into a code secret_code, and recording the secret_code code coding length
Since the maximum length of the Data Payload field (Data Payload) of different blockchain platforms is different, the length of the Data field is L data, and then the two cases are classified according to the length of N e.
(1) When N e≤(Ldata -1) B, the embedding can be directly performed.
(2) When N e>(Ldata -1) B, the original text is uniformly divided into N pieces and then embedded in batches, the original information content in each piece is almost the same, and different Bin_segments are selected to be embedded in each transaction in each embedding.
Wherein, the mk=min{(k×avg-1),Ne-1},avg=Ne/n。
5) Will beEvery four bits are converted into hexadecimal system to form hex_secret_code, the lower bits of less than four bits are filled with '0', and then hexadecimal system is converted. The hex_secret_code is embedded into the data payload field of the blockchain platform and the message embedding process ends.
6) Bit-wise embedding Bin_movement into the lower 17 bits of the amount field with the field length of L amount, and sending the transaction.
And 3, information extraction, namely maintaining a local time binary tree by adopting the same rule by a sender and a receiver of the message, and recovering the tree form conforming to the Bin_segment, wherein the message recovery steps are as follows:
1) Separating a path encoding field and an index node field. The receiver firstly acquires ciphertext data hex_secret_code ' from the data load field, converts the ciphertext data hex_code ' into binary secret_code ', marks the secret_code ' with the length of N e ', and finds separators E a and E b from back to front in a 4-bit traversal mode, so that the path coding field and the index node field are separated.
2) And extracting Bin_segment'. The receiving side splits and restores each index node index i 'in the index field into index_list' every 4 bits. Index i first to fourth bits in index_list' are { b i,0bi,1bi,2bi,3 }. Traversing index_list' records b i,2bi,3 in each index i into index_list_temp. The remaining path information bin_dist is fetched.
(1) The lower 2 bits of all index nodes are decimal and added with 1, namely index_list_temp [ i ] =BIN2DEC (index_list_temp [ i ])+1 if { b i,2,bi,3 } in index_list_temp is not equal to {1,1}, the number N a'. Gtoreq.17:
if index_list_temp [ i ] =4, putting the corresponding 4-bit path data in Bin_dist indicated by the index node into dist_list';
If index_list_temp [ i ] <4, then the bit data of index_list_temp [ i ] is put into dist_list ', and the data of 4-index_list_temp [ i ] bit after the current position is extracted and bit-filled into Bin_movement ', the information with the same bit quantity is deleted in the corresponding path code of index i ' in Bin_list, and the path after deleting the embedded information is put into dist_list ' for repeated execution until the length of Bin_movement ' is 17 bits. The pseudo code is shown in algorithm 2.
(2) If the number N a '<17 of { b i,2,bi,3 } noteq {1,1} in index_list_temp, then the last 17 bits of data are extracted from the transaction amount field to obtain bin_segment'.
3) The selected time instant of the sender's selection is restored by bin_segment' (b 0,b1,b2,…,b16) as shown in equation (3).
Based on the selected_segment ', the same tree form at the same time as the sender is restored using the spanning tree rules and a random factor seed' is extracted from the root hash roothash 'and the application seed' generates a time-based binary tree with the same path coding as the sender.
4) Decoding by adopting a method similar to the step 1) (1), traversing index_list and index_list_temp to obtain index_list [ i ] and index_list_temp [ i ], i=0, 1,2,., len (index_list ') -1, sequentially and orderly extracting (index_list_temp [ i ] [0] ×2+index_list_temp [ i ] [1] +1) bit information in Bin_dist' to be recorded as a dist i, searching the binary tree bit by bit depth in a dist i to find the node where the character is located, and determining the relative position and type of the character according to the index_list [ i ] [0] and the index_list [ i ] [1] at the moment.
(1) If index_list_temp [ i ] <4 or third and fourth bits { b i,2,bi,3 } in index i ++1, 1}, then:
The decoded character is stored in char i using an index field structure with a depth less than 4, i.e., b i,0 represents the relative position of the character in the node, b i,1 represents the case of the character.
(2) If index_list_temp [ i ] =4, the index field structure with depth equal to 4 is used, b i,0bi,1 two bits each represent the relative position of the character at the node, and the decoded character is stored in char i.
The invention analyzes the performance of the model through the simulation experiment result, wherein the experiment platform adopts a Windows system, the CPU is I9-13900H@5.40GHz,GPU, the memory size is Nvidia GeForce RTX and 4060, and the memory size is 16GB.
The message selected in the experiment is We had been wandering, indeed, IN THE LEAFLESS shrubbery an hour in the moving in Jane Eyr, and model flow is demonstrated.
And (3) transmitting, namely selecting 09:21:17 as the coding time selected_movement by the sender and recording. The meaning and value represented by the above symbols are shown in table 3, with bin_segment= (01001010101010001) obtained RootHash from the root node of the time-based binary tree at the time of selection and the random factor seed extracted from it.
Table 3 symbol meaning and value during transmission.
Sign symbol Meaning of Value of
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 encoding time 09:21:17
Bin_moment Binary coding time 01001010101010001
Coding the message refers to the path coding after the random factor is applied in the table 2, dist_list is generated, and corresponding index i is generated for each dist i according to the above method to obtain index_list. The bin_movement is embedded in the dist_list to obtain an inserted_dist_list embedded with the time information. Finally, performing to obtain secret_code (two separators are included), converting the secret_code into hexadecimal system from 4 bits to obtain hex_secret_code, embedding the hex_secret_code into a data load field of the block chain platform, and transmitting the embedded data load field. The specific correspondence values are shown in table 4.
Table 4 transmit process specific parameters
The symbol meaning correspondence table is shown in table 5. The receiver acquires the hex_secret_code 'from the transaction information, converts the hex_code' into binary secret_code ', then finds out the separator separation, extracts the index_list' composed of each index i ', and records the index_list_temp composed of each index i' lower 2. Element index i 'with the index of { b i,2,bi,3 } being equal to {1,1} is found out by traversing index_list_temp from the head, path codes corresponding to index nodes are found out in the Bin_disk, bit information about the Bin_movement' is extracted from the path codes and deleted until the extracted information enables the length of the Bin_movement 'to reach 17 bits, and the selected_movement' is obtained by decimal conversion. All paths are put into inserted_dist_list ', and both paths after deleting bit information and paths dist i without embedded bit information are put into dist_list'. The receiver uses the selected_segment 'to restore the time binary tree form of the sender at the selected moment, obtains roothash' and extracts the seed ', and obtains the tree form which is identical to the node path of the sender after the seed' is applied. Finally, the decoding operation is performed to decode the dist_list 'into the original text message by using the index_list', and the specific execution corresponding value is shown in table 6.
Table 5 receive process symbol meanings and values
TABLE 6 receiving process specific parameters
Sequence number index_list' index_list_temp inserted_dist_list' dist_list' Sign 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 .
The invention then makes a comprehensive assessment of the experimentally derived data of the performance of the model in terms of communication efficiency, influence of pre-negotiation cancellation and security.
1. Efficiency analysis
The embedding rate analysis, namely, the embedding rate of the hidden channel under the background of the blockchain is considered as the number of secret information bits which can be embedded in each transaction by bear and the like, and the model provided by the invention corresponds to the total number of the bits for embedding the secret information in all transactions sent by a sender in each communication. The invention adopts the information embedded model with higher reliability based on the block chain to be compared with the embedded model provided by the invention, thereby ensuring the rationality of the test.
Table 7 information embedding rate (Bitstock platform)
The model of the present invention uses the data load field of different blockchain platforms with length B and may use the amountfield with length L amount B in certain cases, so the maximum embedding rate is (L data+Lamount) B, i.e. 8 x (L data+Lamount) bit. Compared with the method, the model is applicable to various block chain platforms with data load fields instead of single platforms, if the bit coin platform used by the method is adopted, the maximum embedding rate of the model is the sum of the data load field 80B and the amount field 8B, namely 8 (80+8) =704 bit, and compared with the method, the embedding rate is respectively improved by 520bit, 255bit, 704-alpha bit, 152bit, 576/448bit and 192bit.
Transmission efficiency analysis-transmission time, which is defined as the total time required for a sender to start performing encryption operations on information until a receiver correctly decrypts the information and obtains the original information, is also one of the important indicators for evaluating the effect of the model. For the present invention, the transmission time is the encoding and transmitting time, and the blockchain broadcasting delay and the receiving and decoding time. The transaction of the blockchain network is issued to the transaction confirmation with a certain time delay, but when one node generates a transaction and uploads the transaction to the blockchain network, the whole network is broadcasted within a few seconds through a flooding mechanism. Therefore, the transaction confirmation time only affects the time required by the receiving side to receive the data, and the time of information code embedding and ciphertext decoding and extracting directly determines the time efficiency of the model.
Table 1 shows the statistics results of the occurrence probability of the alphabetic characters for about 1000000 characters in Jane Eyr, about 700000 characters in Pride And prejudice and about 880000 characters in Oliver Twist, and the distribution of the characters in the time binary tree of FIG. 2 at the nodes is determined according to the occurrence probability of the characters in the table. Meanwhile, the invention respectively carries out encoding and decoding tests on the three texts, and the average traversal node number and depth during encoding and decoding of the model can be known according to the statistical result, and the results are shown in tables 8 and 9.
Table 8 coding test
Table 9 decoding test
Since the decoding adopts a depth search mode, the average traversal depth is 2.10, 2.10 and 2.13 respectively, which are the same as the average traversal node number. The average traversal depth of the model is less than 3 under the condition of conforming to natural language habit, so that the encoding and decoding speeds are improved.
The transmission efficiency of the present model will be analyzed from both cases of transmitting small-capacity information and large-capacity information.
1) When transmitting small-capacity information:
The time efficiency is evaluated by using the model of the invention and other models, assuming that information of 1KB size is fixedly transmitted. The method comprises the steps of using secret information as a random number, broadcasting the secret information to a receiver only by a few seconds after a transaction is sent out, and not waiting for a block to generate, so that the transmission time is in the order of seconds, using a Markov model to embed and extract secret information in the document [8], wherein the embedding and extracting of 8 bits of information takes 3 seconds on average, so that the total transmission time exceeds 10 minutes, using a mode of combining image steganography and under-chain IPFS storage in the document [9], improving the embedding rate, reducing the transmission speed, enabling the transmission time to be in the order of minutes, using a mode of combining image steganography and under-chain IPFS storage in the document [9], enabling the document [16] to extract the embedded information after the block is generated, enabling each block to transmit K bits at most, and enabling K to be the transaction number to be far greater than 10 minutes, using RDSAC and DDSAC methods, wherein RDSAC uses private key encryption information as labels and places the transaction, and the receiver filters special transactions and uses pseudo random functions and elliptic curves to identify the secret-containing transaction. The total time is longer than 1min due to the need to calculate elliptic curves. DDSAC, directly embedding secret data into random factors in the transaction, sampling transaction amount from normal transaction as a label, avoiding transmission delay in RDSAC, identifying the transaction without elliptic curve, wherein the total duration is less than 1min, document [19] needs to scan the transaction in a block and compare the marks, and the transmission time is prolonged along with the increase of message segmentation, so that the transmission time is in the order of minutes in a test network and a main network.
The invention encodes and decodes 1KB information time in millisecond level, and the transmission time after adding broadcast time is in second level. The transmission time of the method of the invention is second level, but the coding and decoding efficiency is higher than that of the method of the invention, the transmission time of the method of the invention is minute level, and the transmission efficiency of the method of the invention is higher than that of the method of the invention. The order of time is shown in table 10.
Table 10 transmission time comparison
Experimental model Transmission time order
Literature [7] Second level
Literature [8] Minute grade
Literature [9] Minute grade
Literature [16] Minute grade
Literature [18] Minute/second scale
Literature [19] Minute grade
Model herein Second level
2) When transmitting large-capacity information:
Assuming that the random generation of texts with different sizes is used as a transmission test text, the general trend of the variation of the encoding and decoding time of the text model with the file size is shown in fig. 6, and the encoding and decoding time of the information within the size of 1000KB is less than 1s. Therefore, the transmission efficiency is higher than that of the method when transmitting large-capacity information.
2. Security analysis
Frequency analysis is a method for breaking encrypted information by counting the frequency of occurrence of letters or symbols, which is commonly used for fixed length coding, for the scheme of the invention, the code length of the characters is between 1 and 4 bits and the ciphertext contains index node fields, and the distribution between codes is frequency balanced, and these characteristics increase the complexity of the statistical analysis.
The attacker needs to count the code distribution frequency back-pushing information in the path code field, and theoretically if the attacker knows to adopt a tree code mode, a code frequency binary tree can be established according to the frequency distribution of all codes to back-push the possibly corresponding characters. However, the existence of the index node field in the ciphertext obtained by the attacker breaks the frequency distribution of the original path code, so that the attacker cannot analyze normally. The invention designs an attack experiment adopting frequency analysis, and assumes that an attacker knows that the code adopts a tree structure, but does not know the arrangement sequence of characters in a tree and cannot exclude index node fields, and the original message is' We had been wandering, indeed, IN THE LEAFLESS shrubbery an hour in the moving.
The attacker knows that the code adopts a tree structure, and then knows that the corresponding code length of the character is between 1 and 4 bits. Firstly, obtaining coding information from a block chain, converting the coding information into binary ciphertext secret_code ', using a window traversal secret_code' with the size of 1-4 bits to count the occurrence frequencies of all coding conditions, constructing a possible frequency binary tree through coding frequency distribution, and reversely pushing out possible characters, wherein the process is shown in figure 7. The statistical result is compared with the real coding duty ratio of the message, and the result is shown in fig. 8.
Using the K-S test, it can be determined whether the probability distributions of the two samples are different, the mathematical definition of the K-S statistic is d=max|f 1(x)-F2(x)|,F1 and F 2, which are the statistical and actual coding distribution cumulative distribution functions, respectively, using 0.05 as the significance level to determine the significance of the test result. The calculated d=0.45 and p=0.0025 <0.05, namely the statistical coding distribution and the actual coding distribution come from different distributions, and an attacker cannot decode the codes and reversely deduce the message in a frequency statistical mode.
In addition, the characters with the same depth are distributed by adopting the balanced frequency, so that the situation that the occurrence frequency of a certain node path with the same depth is obviously higher than that of other nodes with the same depth can be reduced, and the complexity of statistical analysis is increased. The left sub node number of the root node is 1, the layer sequence method sequentially numbers to obtain that the node numbers of all the nodes containing the alphabetic characters are sequentially 1-13, and the frequency of each node code occurrence when the statistic text Jane Eyr is coded is shown in figure 9.
The information entropy is a measure of uncertainty, and the larger the information entropy is, the higher the uncertainty is, and definition is given The probability of X i for the random event X is shown in table 11, which is the information entropy corresponding to the three cases of fig. 9.
Table 11 information entropy comparison
Frequency balance situation Information entropy
Before frequency balance 3.1850
After the frequency is balanced 3.2838
Ideal frequency 3.2912
The ideal frequency refers to the state that the frequency of occurrence of node codes with the same depth is the same by using the method of frequency statistics to determine the depth of the tree where the characters are located and exchanging the nodes distributed by the characters with the same depth. For example, node 1 is at the same depth as node 2, and the ideal encoding frequency is the same.
It can be seen that the difference between the information entropy after frequency balancing and the information entropy of ideal frequency is smaller and is larger than the information entropy before balancing, namely the uncertainty of the information after frequency balancing is higher and tends to the ideal state of the coding scheme of the invention, which is beneficial to enhancing the performance of resisting frequency analysis.
Anti-brute force cracking performance: character arrangement sharing of the first four layers of a time binary treeIt is possible that the character arrangement order is hardly broken by violence. The random factor is extracted from the root Ha Xizhong, new leaf nodes are continuously generated by changing the tree along with the time, the root hash is changed along with the time, namely the random factor is also changed along with the time, and the same character-path mapping relation is maintained through the random factor, so that the character-path mapping relation is changed along with the time. With the increase of the number of nodes, the decoding difficulty of the root hash rises exponentially, and when the SHA-256 is used for carrying out root hash operation each time, 2 128 more operations are needed for each node. When the attacker decoding time is larger than the node generation time, the mapping relation is indecipherable.
Message continuity analysis-when a message is to be sent in fragments, delay in blockchain broadcasting can cause time for multiple pieces of transaction information to arrive at a receiver to be unstable, resulting in disordered message receiving sequence. The sender selects consecutive or very short time instants, namely 0< selected_segment i-selected_momenti-1<Ts, when transmitting the message i, for example 0s < T s less than or equal to 5s, and embeds these time instants in each piece of information code respectively, so that the receiver recovers the ciphertext information in the correct order by using the time sequence. And when the selected_movement i-selected_momenti-1≥Tl with longer intervals is selected, if T l is more than or equal to 1h, the timeliness of the messages can be distinguished, and the clear time separation between the new message and the old message is ensured.
3. Pre-negotiation reduced analysis
The invention can cancel the effect of the pre-negotiation process on the safety and efficiency of communication from the two parts of concealment and communication efficiency.
Covert analysis-pre-negotiation transactions typically contain key information, such as keys, fragments, etc., and the transmission of pre-negotiation transactions affects the distribution of transaction intervals and causes changes in node traffic, thus the mechanism increases the probability that covert communications are detected.
The invention collects the transaction time of about 1500 ten thousand transactions recently in the bitcoin network, filters the transaction address which only appears once and the business transaction address which is too frequent in transaction, and obtains the interval statistics of the same address re-transaction within one hour.
If multiple transactions are sent within one hour at the same address, assuming that n transactions { T 1,T2,…,Tn } are sent, the same address sending transaction interval is formed by dividing 60000 by the difference between the time stamps (in the millisecond number format of the Unix time stamps) of two adjacent transactions, namely, equation (4).
Figure 10 shows statistics of 5 or less transactions sent with the address within one hour.
In order to verify that the pre-negotiation process will increase the probability of detection of the covert communication, the present invention generally follows the transmission interval distribution of fig. 10, wherein 1000 transactions cancel the pre-negotiation process by the method of the present invention, and 3000 transactions are one pre-negotiation transaction including an additional transmission before each formal communication transaction. Fig. 11 (a) shows 1000 hidden transaction transmission interval distribution cases in the cancel pre-negotiation process following the transaction transmission interval rule, and fig. 11 (b) - (d) show hidden transaction interval distribution cases adopting different transmission strategies, but all follow the transaction transmission interval rule. Fig. 11 (b) shows that the hidden transaction is started to be transmitted as soon as possible after the pre-negotiation transaction is transmitted, fig. 11 (c) shows that the hidden transaction is selected to be transmitted within 20 minutes after the pre-negotiation transaction is transmitted in order to ensure the communication efficiency and the hidden policy are both achieved, and fig. 11 (d) shows that the hidden transaction is completely achieved and is transmitted within 1 hour after the pre-negotiation transaction is transmitted.
Kullback-Leibler divergence is an asymmetry measure of the difference between two probability distributions, 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)). The K-L divergence can be used for measuring the distribution difference of the intervals of the transmission transactions before and after the pre-negotiation process is canceled, and the concealment degree of the transactions can be judged according to the difference.
The distribution of fig. 10 is denoted as Q, the distributions of fig. 11 (a) - (d) are P a,Pb,PC,Pd, respectively, and the corresponding K-L divergences obtained by definition are expressed as formulas (5) - (8), and the calculation results are shown in table 12.
Table 12K-L divergence for different transmission strategies
Distribution of transmission policies K-L divergence
Pa 0.00041
Pb 0.66987
PC 0.11434
Pd 0.00087
It can be seen from table 12 that, except that the transaction distribution of canceling the pre-negotiation mechanism has a smaller difference from the original transaction interval distribution, the transaction interval distributions P b and P C with the pre-negotiation mechanism have a larger difference from the original distribution, the concealment cannot be guaranteed, and the distributions of P d and P a are similar and have a smaller difference from the original distribution, but the amount of information transmitted by P d is only 50% of that of P a, so that canceling the pre-negotiation process before each transmission of the concealed transaction can improve the concealment of the communication process, i.e., the security.
Communication efficiency analysis transmission of pre-negotiated transactions not only reduces the concealment of communications but also increases the total time to transmit the real data amount, and table 13 shows the time required to transmit the message real data amount using the 4 transmission strategies described above.
TABLE 13 time required to send the same amount of information
Distribution of transmission policies Time(s)
Pa 22.34
Pb 24.04
PC 32.41
Pd 44.61
According to the measurement and calculation, if the same information quantity as the P a transmission mode is required to be transmitted, the P b and P C modes respectively take 7% and 45% more time, and the P d and P a are similar in distribution and have smaller difference from the original distribution, but only half of transactions of the P d are used for hidden communication, namely, the same information quantity as the P a mode can be transmitted only by taking nearly 100% more communication time. Therefore, the transmission time can be reduced and the communication efficiency can be improved by canceling the pre-negotiation process before each transmission of the hidden transaction.
Aiming at the problems of the prior blockchain hidden communication, the invention provides a hidden communication model based on a dynamic time binary tree. The model is mainly characterized in that 1) the coding and decoding efficiency is improved by using a tree data structure, the same tree shape can be restored between communication parties by using time as key information, certain safety is guaranteed, meanwhile, the embedding rate and the coding and decoding efficiency are improved, 2) the consistency of tree node path codes is guaranteed by using root hash as a random factor carrier, 3) the time is embedded into a space bit of the path codes for transmission, the pre-negotiation process before each communication is eliminated, the communication efficiency and the transaction concealment are further improved, and the effectiveness of the method is verified by experimental results.
It should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention, and not for limiting the same, and although the present invention has been described in detail with reference to the above-mentioned embodiments, it should be understood by those skilled in the art that the technical solution described in the above-mentioned embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not deviate from the essence of the corresponding technical solution from the scope of the present invention defined by the claims.

Claims (5)

1.一种基于动态时间型二叉树的隐蔽通信模型,其特征在于,包括信息编码、密文嵌入和信息还原三部分,具体为:1. A covert communication model based on a dynamic time-based binary tree, characterized by comprising three parts: information encoding, ciphertext embedding, and information restoration, specifically: 步骤1、信息编码:发送方首先获取当前时刻下时间型二叉树的根哈希RootHash,并从中提取其中的所有数字作为随机因子seed并记录,若RootHash中数字位数不足5位或seed与之前记录有碰撞,则对根哈希继续进行哈希运算,直至数字位大于5位或seed是唯一使用的;Step 1: Information encoding: The sender first obtains the root hash of the current time-based binary tree, extracts all the digits from it as the random factor seed, and records them. If the number of digits in the root hash 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. 编码时参考随机过后的路径编码,将要编码的信息中的每个字符分别进行编码;采用层序遍历法找出结点中对应字符chari,记录字符所在结点的路径disti,同时生成相应的索引字段indexi,路径disti长度不固定但小于等于4bit,索引字段长度固定为4bit;During encoding, refer to the randomized path encoding and encode each character in the information to be encoded separately. Use the layer-order traversal method to find the corresponding character char i in the node, record the path dist i of the node where the character is located, and generate the corresponding index field index i . The length of the path dist i is not fixed but is less than or equal to 4 bits. The length of the index field is fixed to 4 bits. 步骤2、信息嵌入;Step 2: Information embedding; 步骤3、信息提取:消息的发送方和接受方采用同样的规则维护本地的时间型二叉树,并且可恢复出符合Bin_moment时的树型,消息还原步骤如下: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 the Bin_moment. The message restoration steps are as follows: 1)分隔路径编码字段和索引结点字段:接收方首先从数据载荷字段中获取密文数据hex_secret_code′,转二进制secret_code',记secret_code'长度为Ne',从后往前逐4位遍历找出分隔符Ea和Eb,从而分隔路径编码字段和索引结点字段;1) Separating 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 denotes the length of secret_code' as Ne '. Then, it traverses 4 bits at a time from the back to the front to find the separators Ea and Eb , thereby separating the path code field and the index node field. 2)提取Bin_moment′:接收方将索引字段中的各索引结点indexi′每4位拆分还原为index_list′,记index_list′中的indexi第一到第四比特为{bi,0bi,1bi,2bi,3};遍历index_list′将每个indexi中的bi,2bi,3记录进index_list_temp,取出剩余的路径信息Bin_dist;2) Extract Bin_moment′: The receiver splits each index node index i ′ in the index field into 4-bit increments and restores it to index_list′. The first to fourth bits of index i in index_list′ are recorded as {bi , 0bi , 1bi , 2bi , 3 }. The receiver traverses index_list′ and records bi , 2bi , 3 in each index i into index_list_temp, and extracts the remaining path information Bin_dist. 3)由Bin_moment'(b0,b1,b2,…,b16)恢复发送方选择的时刻selected_moment',如公式(3)所示,3) Restore the moment selected_moment' selected by the sender from Bin_moment'(b 0 ,b 1 ,b 2 ,…,b 16 ), as shown in formula (3), 基于selected_moment',使用生成树规则还原出与发送方在同时刻下的相同树型并从根哈希roothash′中提取随机因子seed′,应用seed′生成与发送方有相同路径编码的时间型二叉树;Based on selected_moment', use the spanning tree rule to restore the same tree as the sender at the same time and extract the random factor seed' from the root hash roothash'. Apply seed' to generate a time-type binary tree with the same path encoding as the sender; 4)遍历index_list和index_list_temp取index_list[i]和index_list_temp[i],i=0,1,2,…,len(index_list′′)-1,随后在Bin_dist′中按顺序依次取出(index_list_temp[i][0]×2+idnex_list_temp[i][1]+1)位信息记为disti,按disti中的比特位逐位深度搜索二叉树找到字符所在结点,再根据index_list[i][0]与index_list[i][1]确定字符相对位置以及类型;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, then sequentially take out (index_list_temp[i][0]×2+idnex_list_temp[i][1]+1) bits of information in Bin_dist′ and record them as dist i , search the binary tree bit by bit according to the bit in dist i to find the node where the character is located, and then determine the relative position and type of the character according to index_list[i][0] and index_list[i][1]; 步骤2发送方嵌入密文的步骤如下:Step 2: The sender embeds the ciphertext as follows: 1)为字符chari参照路径编码disti长度生成4bit的索引字段indexi,将disti和indexi分别暂存放在字符串列表中dist_list=(dist0,dist1,…,disti)和index_list=(index0,index1,…,indexi)中;1) Generate a 4-bit index field index i for character char i based on the length of the path code dist i , and temporarily store dist i and index i in the string lists dist_list = (dist 0 , dist 1 , …, dist i ) and index_list = (index 0 , index 1 , …, index i ) respectively; 2)记N为所有字符数,len(dist_list)为ld,len(index_list)为li;重复执行1),直到len(dist_list)=len(index_list)=N;2) Let N be the total number of characters, len(dist_list) be l d , and len(index_list) be l i ; repeat 1) until len(dist_list) = len(index_list) = N; 3)将Bin_moment按比特嵌入disti中,记len(disti)<4的chari总数为Na,若len(disti)<4则可嵌入4—len(disti)位,则将Bin_moment17位完全分布进各disti中,考虑极限情况:每个字符对应的len(disti)=1或每个字符对应的len(disti)=3时,则需要17/(4-1)≤Na≤17/(4-3),即6≤Na≤17;只有Na≥17时,Bin_moment一定可以完全嵌入进各disti字段中;3) Embed Bin_moment bit by bit into dist i . Let the total number of char i with len(dist i ) < 4 be Na . If len(dist i ) < 4, 4-len(dist i ) bits can be embedded. Then, Bin_moment 17 bits are completely distributed into each dist i . Consider the extreme case: when len(dist i ) = 1 for each character or len(dist i ) = 3 for each character, 17/(4-1)≤N a ≤17/(4-3) is required, i.e., 6≤N a ≤17. Only when Na 17 can Bin_moment be completely embedded into each dist i field. 4)任意生成两个路径长度编码均为{1,1},字符相对位置随机的索引结点编码Ea={0/1,0/1,1,1}和Eb={0/1,0/1,1,1},其中Ea与Eb长度之和共占1B;4) Generate two arbitrary index node codes E a = {0/1, 0/1, 1, 1} and E b = {0/1, 0/1, 1, 1}, both of which have path length codes {1, 1} and random character relative positions, where the sum of the lengths of E a and E b is 1B; 5)将每四位转换为十六进制构成hex_secret_code,不足四位的低位填‘0’,再转十六进制;将hex_secret_code嵌入到区块链平台的数据载荷字段中,消息嵌入过程结束;5) Convert every four digits into hexadecimal to form the hex_secret_code. Fill the lower digits of the digits less than four with '0' and convert it back into hexadecimal. Embed the hex_secret_code into the data payload field of the blockchain platform. The message embedding process is complete. 6)将Bin_moment按比特嵌入到字段长度为Lamount的金额字段的低17位中,发送交易,6) Embed Bin_moment bit by bit into the lower 17 bits of the amount field with a field length of L amount and send the transaction. 2.根据权利要求1所述的一种基于动态时间型二叉树的隐蔽通信模型,其特征在于:路径编码随机规则如下:2. A covert communication model based on a dynamic time-based binary tree according to claim 1, characterized in that the path encoding random rule is as follows: 1)设基础树型中层序每个分支的原编码为code{0,1,0,1,...,0,1},随机因子为seed;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)将code两两分组code_pairsi={0,1},code_pairsi[0]和code_pairsi[1]对应左右分支的编码;2) Group the codes into pairs code_pairs i = {0, 1}, where code_pairs i [0] and code_pairs i [1] correspond to the codes of the left and right branches; 3)应用seed后,code_pairsi[0]在0/1之间随机翻转,概率为50%,若code_pairsi[0]则code_pairsi[0]={1},若code_pairsi[0]={1}则code_pairsi[1]={0},直到所有code_pairsi翻转完毕即路径随机完毕。3) After applying the seed, code_pairs i [0] is randomly flipped between 0/1 with a probability of 50%. If code_pairs i [0], then code_pairs i [0] = {1}; if code_pairs i [0] = {1}, then code_pairs i [1] = {0}, until all code_pairs i are flipped, that is, the path is randomized. 3.根据权利要求1所述的一种基于动态时间型二叉树的隐蔽通信模型,其特征在于,由于不同区块链平台数据载荷字段最大长度不同,记数据字段长度为Ldata,则根据Ne长度分为两种情况:3. A covert communication model based on a dynamic time-based binary tree according to claim 1, characterized in that, since the maximum length of the data payload field varies across different blockchain platforms, the data field length is denoted as L data , and then the length Ne is divided into two cases: (1)当Ne≤(Ldata—1)B时,可以直接进行嵌入:(1) When Ne ≤ (L data — 1) B, embedding can be performed directly: (2)当Ne>(Ldata—1)B时,将原文均分成n片后分批次嵌入,每片中包含的原始信息量几乎相同,并且每片嵌入时均要选择不同的Bin_moment执行步骤3)嵌入到每个交易中;(2) When Ne > (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 when embedding. Step 3) is performed to embed it into each transaction. 其中,k=1,2,...,n,mk=min{(k×avg-1),Ne-1},avg=Ne/n。in, k=1, 2, ..., n, m k =min{(k×avg-1), Ne -1}, avg=N e /n. 4.根据权利要求1所述的一种基于动态时间型二叉树的隐蔽通信模型,其特征在于:步骤3的2)提取Bin_moment′中,包括如下步骤:4. The covert communication model based on a dynamic time-based binary tree according to claim 1, wherein the step 2) extracting Bin_moment′ in step 3 comprises the following steps: (1)将所有索引结点低2位转十进制后加1,即index_list_temp[i]=BIN2DEC(index_list_temp[i])+1若index_list_temp中{bi,2,bi,3}≠{1,1}的数量Na′≥17则:(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 the number of {bi ,2 , bi ,3 }≠{1,1} in index_list_temp is N a ′≥17, then: 若index_list_temp[i]=4,则将索引结点指示的Bin_dist中相应的4位路径数据放入dist_list′;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′; 若index_list_temp[i]<4,则将index_list_temp[i]位数据放入dist_list′,并提取位于当前位置后4—index_list_temp[i]位的数据并按比特填充进Bin_moment′,在Bin_dist中indexi′对应路径编码中删除同比特量的信息,并将删除嵌入信息后的路径放入dist_list′复执行直到Bin_moment′长度为17比特位;If index_list_temp[i] is less than 4, then put the data of index_list_temp[i] bits into dist_list′, extract the data located 4 bits after the current position - index_list_temp[i] bits and fill them into Bin_moment′ bit by bit, delete the information of the same value in the path encoding corresponding to index i ′ in Bin_dist, and put the path after deleting the embedded information into dist_list′. Repeat until the length of Bin_moment′ is 17 bits; (2)若index_list_temp中{bi,2,bi,3}≠{1,1}的数量Na′<17则,从交易的金额字段中提取后17位的数据得到Bin_moment'。(2) If the number Na of { bi,2 , bi ,3 }≠{1,1} in index_list_temp is less than 17, the last 17 digits of the transaction amount field are extracted to obtain Bin_moment′. 5.根据权利要求1所述的一种基于动态时间型二叉树的隐蔽通信模型,其特征在于:步骤3的4)分为两种情况:5. The covert communication model based on a dynamic time-based binary tree according to claim 1, wherein step 3) is divided into two cases: (1)若index_list_temp[i]<4或indexi中的第三与第四位比特{bi,2,bi,3}≠{1,1}则,bi,0表示字符在结点中的相对位置,bi,1表示字符的大小写,将解码后的字符存入chari中;(1) If index_list_temp[i] < 4 or the third and fourth bits in index i {bi ,2 , bi ,3 } ≠ {1, 1}, then bi ,0 represents the relative position of the character in the node, bi ,1 represents the case of the character, and the decoded character is stored in char i ; (2)若index_list_temp[i]=4则:bi,0bi,1两位均表示字符在结点的相对位置,将解码后的字符存入chari中。(2) If index_list_temp[i]=4, then: bi ,0 and bi ,1 both represent the relative position of the character in the node, and the decoded character is stored in char i .
CN202411594316.8A 2024-11-09 2024-11-09 Covert Communication Model Based on Dynamic Time Binary Tree Active CN119728091B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411594316.8A CN119728091B (en) 2024-11-09 2024-11-09 Covert Communication Model Based on Dynamic Time Binary Tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411594316.8A CN119728091B (en) 2024-11-09 2024-11-09 Covert Communication Model Based on Dynamic Time Binary Tree

Publications (2)

Publication Number Publication Date
CN119728091A CN119728091A (en) 2025-03-28
CN119728091B true CN119728091B (en) 2025-09-23

Family

ID=95097524

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411594316.8A Active CN119728091B (en) 2024-11-09 2024-11-09 Covert Communication Model Based on Dynamic Time Binary Tree

Country Status (1)

Country Link
CN (1) CN119728091B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107527621A (en) * 2017-08-29 2017-12-29 中国民航大学 The speech hiding algorithm that dynamic code is grouped based on complete binary tree
CN117955687A (en) * 2023-12-14 2024-04-30 东南大学 Block chain-based hidden communication method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11785452B2 (en) * 2020-01-22 2023-10-10 The Government Of The United States Of America, As Represented By The Secretary Of The Navy Error correction code-based embedding in adaptive rate communication systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107527621A (en) * 2017-08-29 2017-12-29 中国民航大学 The speech hiding algorithm that dynamic code is grouped based on complete binary tree
CN117955687A (en) * 2023-12-14 2024-04-30 东南大学 Block chain-based hidden communication method

Also Published As

Publication number Publication date
CN119728091A (en) 2025-03-28

Similar Documents

Publication Publication Date Title
US12412171B2 (en) Short transaction identifier collision detection and reconciliation
US20090031135A1 (en) Tamper Proof Seal For An Electronic Document
CN112070496B (en) Block chain hidden information transmission method and system based on dynamic marking
CN1716855B (en) Call signs
US20010042206A1 (en) System and method of uniquely authenticating each replication of a group of soft-copy documents
CN117792761A (en) Safe data management method and system based on time-staggered key distribution
CN111666575B (en) A Textless Information Hiding Method Based on Lexical Encoding
Iftikhar et al. A survey on reversible watermarking techniques for relational databases
CN116781419A (en) Security data security management method and system
CN118741436B (en) SMS signature title real-name automation method and system
Guan et al. A novel coverless text steganographic algorithm based on polynomial encryption
Mason et al. A natural language approach to automated cryptanalysis of two-time pads
CN119728091B (en) Covert Communication Model Based on Dynamic Time Binary Tree
US9313021B2 (en) Secret communication method with self-authentication capability
Rafat et al. Secure digital steganography for ASCII text documents
JP2002135247A (en) Digital information storing method
CN116305294B (en) Data leakage tracing method and device, electronic equipment and storage medium
CN118014742A (en) A method and system for protecting insurance identity information transmission
CN111866134A (en) Method and system for generating hash value and address of block chain transaction and storage medium
Ueno et al. Rejection sampling schemes for extracting uniform distribution from biased pufs
CN114169888B (en) Universal type cryptocurrency custody method supporting multiple signatures
CN108512659B (en) A quantum secret information sharing method and system suitable for corporate property management
Köhler et al. Protecting information with subcodstanography
Bauer et al. Leveraging generative models for covert messaging: Challenges and tradeoffs for" dead-drop" deployments
Khanduja et al. Fragile watermarking of decision system using rough set theory

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant