Covert communication method based on block chain

By generating forged transaction sets and dynamic addresses on the blockchain, combined with ECDH and Kleptography technology, the problem of identity exposure and off-chain negotiation risks in blockchain covert communication is solved, and covert communication with high concealment and performance is achieved.

CN118764167APending Publication Date: 2024-10-11NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411000247.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Blockchain-based covert communication has the risk of identity exposure, the broadcast nature leads to high risks of off-chain negotiation, and the indelible traces make the covert communication data threaten the security of other communications after being cracked.

Method used

By generating a set of forged transactions on the blockchain, using the ECDH algorithm to generate shared secrets and hashes to obtain chain codes, dynamically generating and synchronizing addresses, designing a transaction feature camouflage mechanism, using random numbers in digital signatures as message carriers, and through Kleptography Technology and generative adversarial networks generate bearer transaction parameters, ensuring that communicating parties do not need to interact directly.

Benefits of technology

It achieves the concealment of message transmission on the blockchain, enhances the untraceability of the sender's address and the security of communication, reduces the difficulty for attackers to identify concealed transactions, and ensures the concealment and performance of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764167A_ABST
    Figure CN118764167A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain-based covert communication method, belongs to the technical field of encrypted communication, and designs a synchronization method without communication under a chain. The two communication parties only need to know the public key of the opposite party, the same secret key information can be generated without direct contact, and the opposite party is helped to find a covert communication carrier. The invention provides a brand new covert communication architecture based on the block chain, and the technical challenges brought to covert communication by asymmetry, broadcast characteristics and permanent storage characteristics of the block chain are systematically solved by realizing a communication identity (i.e., an address on the chain which cannot be associated) which cannot be tracked, negotiation synchronization without direct communication and transaction characteristics which cannot be distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of encrypted communication, and in particular to a covert communication method based on blockchain. Background Art

[0002] There are some obvious technical limitations of blockchain-based covert communication. First, the message sender must participate in the generation of blockchain transactions through the address controlled by it, which bears a high risk of identity exposure. Then, blockchain data is permanently stored on the chain. Once some blockchain-based covert communication information is leaked by internal attackers, the attackers will use these indelible traces to crack more covert communications. Finally, the broadcast nature of the blockchain's covert communication channel also brings challenges to the key negotiation and synchronization of the communicating parties. The blockchain-based covert communication proposed by the public research results has not yet broken through the above technical bottlenecks, and therefore cannot achieve a covert channel with high concealment and excellent performance.

[0003] Existing solutions mainly focus on message embedding technology. A common method is to use modifiable fields in the blockchain to carry covert messages. Although this type of method is straightforward, it lacks confidentiality. In order to enhance the confidentiality of blockchain-based covert communication, further research has introduced implicit embedding, such as using random numbers in the blockchain protocol or the interactive relationship of addresses to carry covert messages. Compared with explicit embedding methods, implicit embedding technology has better confidentiality. However, these methods do not solve the special problems brought about by blockchain covert communication.

[0004] The first problem is that the message sender has to explicitly participate in the generation of blockchain transactions, which puts him at a higher risk of identity exposure. Deanonymization research in the blockchain field has achieved considerable results, which can effectively track all on-chain behaviors of a suspected user. If the address used by the sender is detected, the covert channel will be exposed. Therefore, in order to protect the message sender, the sender address randomization technology must be introduced without affecting the construction of the next communication channel between the two communicating parties. None of the existing solutions consider the security issues brought about by this asymmetry.

[0005] The second problem is that the blockchain provides a covert communication channel of a broadcast nature. Before establishing covert communication, both parties need to exchange key information and synchronize. The existing solutions are that both parties solve the communication initialization problem through off-chain negotiation, and the negotiation process has nothing to do with the blockchain, which increases the risk of exposure. Therefore, even if the on-chain covert communication is secure, it will be exposed due to off-chain negotiation. However, the existing solutions do not reasonably assume that off-chain negotiation is secure.

[0006] The third problem is that all covert communication data will be permanently stored with the blockchain. Once some covert communication users betray or are hacked, the relevant transaction samples carrying covert communication will be mastered by the attacker. The attacker can use the indelible traces on the chain to crack more covert communications. The existing solutions do not consider how to ensure the security of other covert communications when some covert communications are exposed. However, in reality, covert communication is not a one-time thing, but a long-term use; and it is a collective behavior, so relevant possibilities must be considered. Summary of the invention

[0007] The purpose of the present invention is to overcome the defects of the prior art and provide a covert communication method based on blockchain. The communicating parties only need to know the public key of the other party to generate the same key information without direct contact and help the other party find the covert communication carrier; the sender is allowed to use a different random sending address for each transaction carrying covert communication, and the receiver can dynamically generate and synchronize these addresses as needed; a transaction feature camouflage mechanism is designed, and the random number in the digital signature is used as the message carrier.

[0008] The object of the present invention is achieved through the following technical solutions:

[0009] A covert communication method based on blockchain, the method is used for communication between a sender and a receiver, the sender has a first private key with a first signature algorithm, the first private key corresponds to a first public key and a Bitcoin address, the receiver has a second private key, the second private key corresponds to a second public key, the sender and the receiver know each other's public key but do not know each other's private key, the method comprises:

[0010] The sender generates a first complete transaction using the first private key, generates a second complete transaction using the second signature algorithm, and broadcasts the first complete transaction and the second complete transaction to the chain;

[0011] The receiver obtains the first complete transaction and the second complete transaction by querying the transaction of the Bitcoin address, and recovers the first private key by using the second signature algorithm;

[0012] The sender and the receiver generate a shared secret through the ECDH algorithm, and hash the shared secret to obtain the first chain code;

[0013] The sender generates a forged transaction set, which includes the input quantity, output quantity, total input amount, total output amount and transaction fee of the forged transaction;

[0014] The sender and the receiver use the first private key and the first chain code to construct an extended private key used by the HD wallet, and synchronously generate a public-private key pair using the extended private key according to the method of the HD wallet;

[0015] The sender splits the communication message into multiple message fragments and generates raw bytes of several covert communication transactions, wherein an input address in any complete transaction corresponding to the raw bytes is the Bitcoin address of the corresponding public key, and the transaction carrying parameters, the total output amount and the transaction fee are randomly selected from the forged transaction set;

[0016] The sender embeds each message fragment into the corresponding complete transaction, attaches the signature to the corresponding transaction, obtains a complete set of covert communication transactions, and broadcasts it on the chain;

[0017] The receiver obtains the complete set of covert communication transactions by querying the input address of each covert communication transaction, recovers the original bytes of each transaction, and extracts the corresponding signature;

[0018] The receiver recovers the message fragments from the corresponding signatures, and all the message fragments constitute the complete message.

[0019] Furthermore, the first signature algorithm includes:

[0020] Input the sender's private key and the first transaction raw bytes;

[0021] Hash the original bytes of the first transaction to obtain a first hash result z1;

[0022] Randomly select k1∈{1,…,n-1}, calculate the elliptic curve point (x1,y1)=k1·G, G is the generator of the elliptic curve of the blockchain cryptographic system, let r1=x1modn, n is the order of the Bitcoin elliptic curve;

[0023] Calculate s1=k1 -1 ·(z1+r1·sk Alice )modn,sk Alice is the sender's private key;

[0024] The signature σ1=(r1,s1) is obtained.

[0025] Furthermore, the second signature algorithm includes:

[0026] Input the sender's private key, k1, the receiver's public key and the second transaction raw bytes;

[0027] Hash the original bytes of the second transaction to obtain a second hash result z2;

[0028] Randomly select t∈{0,1} and calculate e=(k1-wt)·G+(-ak1-b)·pk Bob , pk Bob is the recipient's public key, w is a fixed odd integer, and a and b are two fixed constants.

[0029] Calculate k2 = Hash (e), calculate the elliptic curve point (x2, y2) = k2 G, let r2 = x2modn, calculate s2 = k2 -1 ·(z2+r2·sk Alice )modn;

[0030] The signature σ2=(r2,s2) is obtained.

[0031] Further, the recovering the first private key by the second signature algorithm specifically includes:

[0032] Input the recipient's private key, (r1, s1), (r2, s2) and the second raw transaction byte;

[0033] Use r1 and r2 as the horizontal coordinates of the elliptic curve to determine the corresponding vertical coordinates, and obtain the elliptic curve points (x1, y1) and (x2, y2);

[0034] Calculate e1 = (x1, y1) - sk Bob (a·(x1,y1)+b·G);

[0035] If (x2, y2) = Hash(e1)·G, then return k2 = Hash(e1), otherwise calculate e2 = e1-w·G, if (x2, y2) = Hash(e2)·G, then return k2 = Hash(e2);

[0036] Hash the second original transaction byte to obtain a second hash result;

[0037] Recover the sender's private key sk Alice =r2 -1 ·(s2k2-z2).

[0038] Furthermore, the generating of the forged transaction set specifically includes:

[0039] Download the real transaction data of Bitcoin and generate transaction parameters and transaction fee sets. The transaction parameters include input quantity, output quantity and total input amount.

[0040] The sender selects a corresponding transaction fee set for each forged transaction according to the transaction carrying parameters of the forged transaction, and randomly selects a transaction fee from the transaction fee set;

[0041] The sender determines the total output amount parameter for each forged transaction.

[0042] Furthermore, the method for generating the transaction bearer parameters includes:

[0043] The sender divides the real transaction data set into a training set and a test set;

[0044] The sender extracts the parameters of the training set transactions and constructs a transaction table, where each column corresponds to a parameter and each row corresponds to a specific transaction.

[0045] In the ABC-Channel scheme, the input quantity, output quantity and total input amount are extracted and generated, where the total input amount is a continuous random variable, and the input quantity and output quantity are two discrete random variables;

[0046] Use a one-hot vector to represent each discrete value in the table;

[0047] Normalize each continuous value in the table;

[0048] Concatenate the normalized continuous and discrete values ​​in each row of the table;

[0049] The samples are trained in a Training-by-sampling manner.

[0050] Furthermore, the method for generating the transaction fee includes:

[0051] The sender groups the real transaction set according to the input quantity and the output quantity to obtain a first grouping set;

[0052] Then the first grouping set is grouped according to the output total amount to obtain a second grouping set;

[0053] Using Gaussian distribution to fit the transaction fee distribution of each group in the second grouping set, to obtain a first Gaussian distribution;

[0054] N data are sampled from the first Gaussian distribution, where n is the total number of transactions in each group in the second grouping set, and data that are not between the maximum and minimum transaction fees in the second grouping set are removed to obtain a first transaction fee set.

[0055] Furthermore, the synchronously generating a public-private key pair by using the extended private key according to the HD wallet method specifically includes:

[0056] Let I = HMAC-SHA512(chaincode AB , 0x00||pk Alice ||i), chaincode AB Indicates the first chain code, which is the key of HMAC_SHA512, 0x00||pkAlice ||i is the corresponding data, pk Alice The sender's private key is serialized into a byte representation using the Bitcoin compressed public key method. i is a 32-bit integer and is serialized into a 4-byte sequence.

[0057] Split I into two 32-byte sequences I L and I R ;

[0058] Will I L Interpreted as a 256-bit number parse 256 (I L ), then the private key sk i =parse 256 (I L )+sk Alice (modn), public key pk i =parse 256 (I L )*G+pk Alice .

[0059] Furthermore, the second signature algorithm is a Kleptography algorithm.

[0060] Furthermore, in the method, each transaction uses a unique address as a sending address, and the sender can generate additional receiving addresses, each of which is unique.

[0061] The beneficial effects of the present invention are:

[0062] (1) In the present invention, the sender uses blockchain transactions to transmit messages, generates simulated transaction features and addresses specific to the transaction. Once generated, the transaction will be sent to the blockchain. After receiving the transaction, the receiver can extract the message from it. It should be noted that only the receiver can identify the transaction, and the attacker cannot distinguish it from other transactions on the blockchain. In addition, the present invention uses Kleptography technology, so that the communicating parties can complete negotiation synchronization without direct communication, and the confidentiality will not be reduced in the process.

[0063] (2) In order to enhance the similarity between covert communication transactions and normal transactions, the present application designs a generative adversarial network for generating tabular data to generate key parameters of bearer transactions. In order to train the model, the present invention uses historical real transactions (i.e., real data) as training data sets. Next, a Gaussian distribution is used to simulate the fee distribution observed in real data, so that attackers cannot distinguish between covert communication bearer transactions and other transactions through any characteristics of the transaction.

[0064] (3) In order to enhance the untraceability of the sending address, the present invention adopts dynamic address generation instead of using fixed addresses. Each transaction will use a unique address as the sending address. The sender can generate additional receiving addresses as long as each receiving address is unique. By dynamically generating an address for each transaction, an attacker cannot associate multiple transactions through a single address. At the same time, the address used by the transaction is unpredictable. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a schematic diagram of a system model and a threat model of covert communication based on blockchain in an embodiment of the present invention;

[0066] Figure 2 It is a flowchart of generating transaction bearing parameters according to an embodiment of the present invention. DETAILED DESCRIPTION

[0067] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0068] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0069] Existing blockchain-based covert communications have the following three problems.

[0070] The first problem is that the message sender bears a higher risk of identity exposure because he must explicitly participate in the generation of blockchain transactions.

[0071] The second problem is that blockchain provides a broadcast-based covert communication channel. Before establishing covert communication, both parties need to exchange key information and synchronize.

[0072] The third problem is that all covert communication data will be permanently stored with the blockchain. Once some covert communication users rebel or are hacked, the relevant transaction samples carrying covert communications will be controlled by the attacker.

[0073] In order to solve the above technical problems, the following embodiments of a covert communication method based on blockchain are proposed in the present invention.

[0074] Reference Figure 1 ,like Figure 1 The figure shows a schematic diagram of the system model and threat model of the covert communication based on blockchain in this embodiment. The covert communication system considered in this embodiment includes the sender Alice, the receiver Bob and the attacker Eve.

[0075] The attacker's goal is to identify transactions containing hidden messages and the identities of the sender and receiver of the communication. The attacker can take the following attack actions:

[0076] Off-chain eavesdropping: attackers can eavesdrop on the communication between the sender and the receiver. They know about any interactive communication and can use various methods. To avoid being discovered, the communicating parties should try to avoid any form of direct interaction.

[0077] On-chain data analysis: Attackers also have the ability to analyze transactions on the blockchain. They can use historical data of on-chain transactions, use address clustering, build transaction graphs and other analytical methods to try to identify transactions containing hidden messages and the identities of the senders.

[0078] In particular, this embodiment assumes that the recipient of the message may leak the transaction containing the hidden message, which may be caused by the betrayal of a participant or the compromise of his terminal. In this case, the attacker can obtain part of the transaction containing the hidden message. The attacker can use these transactions as labeled samples to learn the transaction features generated by the sender, thereby trying to identify other undisclosed covert communication transactions. The attacker can also perform address clustering analysis based on these transactions, thereby trying to identify other unexposed addresses of the sender, and combine other off-chain information to try to restore the sender's real identity in the real world.

[0079] Sender Alice's private key sk Alice , whose corresponding public key is pk Alice , the corresponding Bitcoin address is addr Alice . The recipient Bob's private key sk Bob , whose corresponding public key is pk Bob The two parties in the covert communication only know each other's public key. G is the generator of the elliptic curve of the blockchain cryptographic system, and n is the order of the Bitcoin elliptic curve.

[0080] The specific process of a covert communication method based on blockchain provided in this embodiment is as follows:

[0081] Step 1: Alice generates the raw bytes of the transaction The transaction input address is addr Alice There are no special requirements for other parameters.

[0082] Step 2: Alice uses her private key skAlice sign Get the full transaction Alice saves the random number k1 used for this signature.

[0083] Specific signature algorithm (ie ECDSA signature algorithm):

[0084] Input: sk Alice ,

[0085] ①Yes Perform hashing and use z1 to represent the hashed result.

[0086] ②Randomly select k1∈{1,…,n-1}.

[0087] ③ Calculate the elliptic curve point (x1, y1) = k1·G, and let r1 = x1modn.

[0088] ④Calculate s1=k1 -1 ·(z1+r1·sk Alice )modn.

[0089] ⑤Get ​​the signature σ1=(r1,s1).

[0090] Step 3: Alice generates transaction raw bytes The transaction input address is addr Alice There are no special requirements for other parameters.

[0091] Step 4: Alice uses the ECDSA signature algorithm modified by Kleptography to Sign and get the complete transaction

[0092] The ECDSA signature algorithm modified by Kleptography is as follows:

[0093] w is a fixed odd integer, a and b are two fixed constants.

[0094] Input: sk Alice , k1, pk Bob ,

[0095] ①Yes Perform hashing and use z2 to represent the hash result.

[0096] ②Randomly select a t∈{0,1}.

[0097] ③ Calculate e = (k1-wt)·G+(-ak1-b)·pk Bob .

[0098] ④Calculate k2=Hash(e).

[0099] ⑤ Calculate the elliptic curve point (x2,y2) = k2·G, and let r2 = x2modn.

[0100] ⑥Calculate s2=k2 -1 ·(z2+r2·sk Alice )modn.

[0101] ⑦Get the signature σ2=(r2,s2).

[0102] Step 5: Alice will and Broadcast on the chain.

[0103] Step 6: Bob enters the address addr by querying Alice Transaction acquisition and

[0104] Step 7: Bob extracts and The signatures σ1=(r1,s1) and σ2=(r2,s2).

[0105] Step 8: Bob Restores The raw bytes

[0106] Step 9: Bob recovers Alice's private key sk through the Kleptography algorithm Alice The specific algorithm is as follows:

[0107] Input: sk Bob ,(r1,s1),(r2,s2),

[0108] ① Use r1 and r2 as the horizontal coordinates of the elliptic curve to determine the corresponding vertical coordinates and obtain the elliptic curve points (x1, y1) and (x2, y2).

[0109] ②Calculate e1=(x1,y1)-sk Bob (a·(x1,y1)+b·G).

[0110] ③If (x2, y2) = Hash(e1)·G, then return k2 = Hash(e1)

[0111] ④ Otherwise, calculate e2=e1-w·G.

[0112] ⑤If (x2,y2)=Hash(e2)·G, then return k2=Hash(e2).

[0113] ⑥Pair Perform hashing and use z2 to represent the hash result.

[0114] ⑦Recover Alice’s private key sk Alice =r2 -1 ·(s2k2-z2).

[0115] Step 10: Alice and Bob generate a shared secret using Elliptic-curve Diffie–Hellman (ECDH). The specific steps are as follows:

[0116] Assume Alice has private key a and public key g a , Bob has private key b and public key g b . Both parties know each other's public key.

[0117] Then Alice calculates (g b ) a , Bob calculates (g a ) b , both parties obtain a shared secret g ab .

[0118] Step 11: G ab After hashing, Alice and Bob obtain a 32-byte shared secret called chaincode AB .

[0119] Step 12: Alice downloads Bitcoin’s real transaction data.

[0120] Step 13: Alice generates three parameters that carry the transaction: input quantity (inputCnt), output quantity (outputCnt), and input total amount (inputsAmount). Figure 2 ,like Figure 2 The flowchart of generating transaction bearer parameters in this embodiment is shown as follows:

[0121] (1) Alice divides the real transaction dataset into a training set and a test set.

[0122] (2) Alice extracts the parameters of the training set transactions and constructs a transaction table. Each column corresponds to a parameter. Assume that N c Continuous columns and N d Discrete columns Each row corresponds to a specific transaction. In this solution, three parameters are extracted and generated: inputCnt, outputCnt, and inputsAmount. Among them, inputsAmount is a continuous random variable (corresponding to a continuous column), and inputCnt and outputCnt are two discrete random variables (corresponding to discrete columns).

[0123] (3) Use a one-hot vector to represent each discrete value d in the table i,j .

[0124] (4) Normalize each continuous value in the table. Specifically, for the continuous column C i , using the variational Gaussian mixture model (VGM) to fit. The learned Gaussian mixture model is Where n refers to the number of modes, η k Refers to the mean of the modes, μ k and φ k are the weight and standard deviation of the mode respectively. Calculate c i,j The probability density from each mode And select the mode with the highest probability density and use it to calculate c i,j For example, suppose C i It consists of three modes, c i,j The probability density of the third mode is the largest. Then use a one-hot vector β i,j = [0,0,1] means selecting the third mode, using a scalar Indicates c i,j Values ​​normalized within this mode.

[0125] (5) Using vectors Represents each row of the transactions table. represents the connection vectors x and y, d i,j is a one-hot vector representation of discrete values.

[0126] (6) Train the data using the Training-by-sampling method:

[0127] ① Randomly select one of the discrete columns with the same probability. Let i* be the index of the selected column.

[0128] ②In D i* A probability mass function (PMF) is constructed over the range of values ​​of , such that the probability mass of each value is the logarithm of its frequency in the column.

[0129] ③ Randomly select a value k* based on the above PMF.

[0130] ④Calculation expression D i*= k* conditional vector. The conditional vector is as follows: define a mask vector for each discrete column Indicates D i* =k*The mask vector is

[0131]

[0132] Then the conditional vector is defined as For example, D1={1,2,3}, D2={1,2}, the condition D2=1 is represented by mask vector m1=[0,0,0], m2=[1,0], and condition vector cond=[0,0,0,1,0].

[0133] ⑤Will represent D i* = k* condition vector and random noise input condition generator, condition generator output generated samples

[0134] ⑥Select a D from the real sample i* = k* samples

[0135] ⑦ Input the two samples into the discriminator, and the discriminator gives the corresponding discrimination results.

[0136] ⑧The condition generator and discriminator calculate the loss function and update the parameters. Then return to step ①. Step 14: Alice generates a transaction fee set. The specific steps are as follows:

[0137] (1) Let K represent the set of real transactions. Alice groups them according to the input quantity and output quantity. K ij Represents a set of transactions with i inputs and j outputs.

[0138] (2) Alice sets K ij Divide into 10 groups according to inputsAmount, and the transaction set of the nth group is:

[0139] The subscript m refers to the transaction index (e.g., T m Refers to the mth transaction, inputsAmount m refers to the total input amount of the mth transaction), start n =p n ×|A|,end n =(p n +0.1)×|A|, A={inputsAmount m ∈T m :(T m∈K ij ∧inputsAmount m ≤inputsAmount m+1 )}.

[0140] Using Gaussian distribution right Fitting the fee distribution:

[0141]

[0142] (3) Use express The total number of transactions in and Respectively The maximum and minimum transaction fees in . Alice Medium Sampling data, and remove

[0143] and The value between gets the transaction fee set Since the transaction fee is a positive integer,

[0144] Values ​​are rounded.

[0145] Step 15: Alice selects the corresponding inputCnt, outputCnt, and inputsAmount for each forged transaction. And randomly select a transaction fee from them.

[0146] Step 16: Alice determines the total output amount (outputsAmount) parameter of each forged transaction. outputsAmount m =inputsAmount m -fee m At this point, Alice has generated a forged transaction set containing five parameters: inputCnt, outputCnt, inputsAmount, outputsAmount, and fee.

[0147] Step 17: Alice and Bob use sk Alice and chaincode AB Construct the extended private key Esk used by the HD wallet AB =(sk Alice ,chaincode AB ). where sk AliceIt is leaked by Alice to Bob in step 9, chaincode AB It is generated by both parties in step 11.

[0148] Step 18: Alice and Bob via Esk AB , according to the HD wallet method, a series of public and private key pairs are generated synchronously. The i-th public and private key pair (sk i ,pk i )'s specific generation process:

[0149] (1) Let I = HMAC-SHA512(chaincode AB , 0x00||pk Alice ||i), here is the chaincode AB As the key for HMAC_SHA512, 0x00||pk Alice ||i is the corresponding data. pk Alice It is a point on the elliptic curve, which needs to be serialized into a byte representation (using the Bitcoin compressed public key method). i is a 32-bit integer, which is serialized into a 4-byte sequence here.

[0150] (2) Split I into two 32-byte sequences, namely I L and I R

[0151] (3) Will I L Interpreted as a 256-bit number parse 256 (I L ), then the private key sk i =parse 256 (I L )+sk Alice (modn), public key pk i =parse 256 (I L )*G+pk Alice .

[0152] Step 19: Alice splits the communication message msg into 32-byte segments, msg = {msg1, msg2, ..., msg N}.

[0153] Step 20: Alice generates the raw bytes of N shielded communication transactions One of the input addresses is pk i The corresponding Bitcoin address, its input quantity, output quantity, input total amount, output total amount, and transaction fee are randomly selected from the set of forged transactions generated in step 16. There are no special requirements for the remaining transaction parameters.

[0154] Note that in the previous operation, Alice used two transactions to transfer her private key sk Alice Leaked to Bob (corresponding to steps 1-9 above), the input address of these two transactions is addr Alice Then Alice and Bob conduct real covert communication, using pk i The corresponding addresses, that is, Alice and Bob through sk Alice Synchronously generate N pairs of public and private key pairs (sk i ,pk i ), pk i The corresponding address is used as the input address of N covert communication transactions.

[0155] Step 21: Alice signs each transaction raw byte with the modified ECDSA, thereby signing msg i Embed The specific steps are as follows:

[0156] Let i = 1;

[0157] For(i≤N)

[0158] {Generate a noncek i =msg i ;

[0159] Compute the elliptic curve point (x i ,y i ) = k i G, let r i =x i modn;

[0160] right Hash, use z i Indicates the result after hashing;

[0161] Calculate i =k i -1 ·(z i +r i ·sk i )modn;

[0162] Return signature σ i =(r i ,s i );

[0163] i++}

[0164] Alice obtains the signatures of all N transactions {σ1,σ2,…,σ N}.

[0165] Step 22: Alice appends the signature to the corresponding transaction to obtain the complete set of covert communication transactions And broadcast it on the chain.

[0166] Step 23: Bob enters the address pk1, pk2, ..., pk by querying N Transaction acquisition

[0167] Step 24: Bob recovers the original bytes of each transaction and extracts the signature of the transaction {σ1,σ2,…,σ N}.

[0168] Step 25: Bob recovers the message from the signature. The specific steps are as follows:

[0169] Let i = 1;

[0170] For(i≤N)

[0171] {right Hash, use z i Indicates the result after hashing;

[0172] Calculate k i =s i -1 ·(z i +r i ·sk i )modn;

[0173] command msg i =k i ;

[0174] i++}

[0175] Bob recovers the complete message msg = {msg1, msg2, ..., msg N}.

[0176] In this embodiment, the sender Alice uses blockchain transactions to transmit messages. The solution of this embodiment generates simulated transaction features and addresses specific to the transaction. Once generated, the transaction will be sent to the blockchain. Bob can extract the message from the transaction after receiving it. It should be noted that only Bob can identify the transaction, and the attacker cannot distinguish it from other transactions on the blockchain. This embodiment uses Kleptography technology, so that the communicating parties can complete the negotiation synchronization without direct communication, and the confidentiality will not be reduced in the process.

[0177] In order to enhance the similarity between the transaction and the normal transaction, this embodiment uses CTGAN, a generative adversarial network (GAN) specially designed for generating tabular data, to generate key parameters of the bearer transaction. In order to train the model, this embodiment uses historical real transactions (i.e., real data) as the training data set. Next, this embodiment uses Gaussian distribution to simulate the fee distribution observed in the real data. This makes it impossible for attackers to distinguish the bearer transaction of covert communication from other transactions by any characteristics of the transaction.

[0178] In order to enhance the untraceability of the sending address, this embodiment uses dynamic address generation instead of fixed addresses. Each transaction will use a unique address as the sending address. Alice can generate additional receiving addresses as long as she ensures that each receiving address is unique. By dynamically generating addresses for each transaction, attackers cannot associate multiple transactions through a single address. At the same time, the addresses used by transactions are unpredictable.

[0179] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A covert communication method based on blockchain, the method is used for communication between a sender and a receiver, characterized in that: The sender has a first private key with a first signature algorithm, the first private key corresponds to a first public key and a Bitcoin address, the receiver has a second private key, the second private key corresponds to a second public key, the sender and the receiver know each other's public key but do not know each other's private key, and the method includes: The sender generates a first complete transaction using the first private key, generates a second complete transaction using the second signature algorithm, and broadcasts the first complete transaction and the second complete transaction to the chain; The receiver obtains the first complete transaction and the second complete transaction by querying the transaction of the Bitcoin address, and recovers the first private key by using the second signature algorithm; The sender and the receiver generate a shared secret through the ECDH algorithm, and hash the shared secret to obtain the first chain code; The sender generates a forged transaction set, which includes the input quantity, output quantity, total input amount, total output amount and transaction fee of the forged transaction; The sender and the receiver use the first private key and the first chain code to construct an extended private key used by the HD wallet, and synchronously generate a public-private key pair using the extended private key according to the method of the HD wallet; The sender splits the communication message into multiple message fragments and generates raw bytes of several covert communication transactions, wherein an input address in any complete transaction corresponding to the raw bytes is the Bitcoin address of the corresponding public key, and the transaction carrying parameters, the total output amount and the transaction fee are randomly selected from the forged transaction set; The sender embeds each message fragment into the corresponding complete transaction, attaches the signature to the corresponding transaction, obtains a complete set of covert communication transactions, and broadcasts it on the chain; The receiver obtains the complete set of covert communication transactions by querying the input address of each covert communication transaction, recovers the original bytes of each transaction, and extracts the corresponding signature; The receiver recovers the message fragments from the corresponding signatures, and all the message fragments constitute the complete message.

2. The covert communication method based on blockchain as claimed in claim 1, characterized in that: The first signature algorithm includes: Input the sender's private key and the first transaction raw bytes; Hash the original bytes of the first transaction to obtain a first hash result z1; Randomly select k1∈{1,…,n-1}, calculate the elliptic curve point (x1,y1)=k1·G, G is the generator of the elliptic curve of the blockchain cryptographic system, let r1=x1modn, n is the order of the Bitcoin elliptic curve; Calculate s1=k1 -1 ·(z1+r1·sk Alice )mod n,sk Alice is the sender's private key; The signature σ1=(r1,s1) is obtained.

3. The covert communication method based on blockchain as claimed in claim 2, characterized in that: The second signature algorithm includes: Input the sender's private key, k1, the receiver's public key and the second transaction raw bytes; Hash the original bytes of the second transaction to obtain a second hash result z2; Randomly select t∈{0,1} and calculate e=(k1-wt)·G+(-ak1-b)·pk Bob , pk Bob is the recipient's public key, w is a fixed odd integer, and a and b are two fixed constants. Calculate k2 = Hash (e), calculate the elliptic curve point (x2, y2) = k2 G, let r2 = x2modn, calculate s2 = k2 -1 ·(z2+r2·sk Alice )modn; The signature σ2=(r2,s2) is obtained.

4. The covert communication method based on blockchain as claimed in claim 3, characterized in that: The recovering of the first private key by the second signature algorithm specifically includes: Input the recipient's private key, (r1, s1), (r2, s2) and the second raw transaction byte; Use r1 and r2 as the horizontal coordinates of the elliptic curve to determine the corresponding vertical coordinates, and obtain the elliptic curve points (x1, y1) and (x2, y2); Calculate e1 = (x1, y1) - sk Bob (a·(x1,y1)+b·G); If (x2, y2) = Hash(e1)·G, then return k2 = Hash(e1), otherwise calculate e2 = e1-w·G, if (x2, y2) = Hash(e2)·G, then return k2 = Hash(e2); Hash the second original transaction byte to obtain a second hash result; Recover the sender's private key sk Alice =r2 -1 ·(s2k2-z2).

5. The covert communication method based on blockchain as claimed in claim 1, characterized in that: The generating of the forged transaction set specifically includes: Download the real transaction data of Bitcoin and generate transaction parameters and transaction fee sets. The transaction parameters include input quantity, output quantity and total input amount. The sender selects a corresponding transaction fee set for each forged transaction according to the transaction carrying parameters of the forged transaction, and randomly selects a transaction fee from the transaction fee set; The sender determines the total output amount parameter for each forged transaction.

6. The covert communication method based on blockchain as claimed in claim 5, characterized in that: The method for generating the transaction bearing parameters includes: The sender divides the real transaction data set into a training set and a test set; The sender extracts the parameters of the training set transactions and constructs a transaction table, where each column corresponds to a parameter and each row corresponds to a specific transaction. In the ABC-Channel scheme, the input quantity, output quantity and total input amount are extracted and generated, where the total input amount is a continuous random variable, and the input quantity and output quantity are two discrete random variables; Use a one-hot vector to represent each discrete value in the table; Normalize each continuous value in the table; Concatenate the normalized continuous and discrete values ​​in each row of the table; The samples are trained in a Training-by-sampling manner.

7. The covert communication method based on blockchain as claimed in claim 1, characterized in that: The method for generating the transaction fee includes: The sender groups the real transaction set according to the input quantity and the output quantity to obtain a first grouping set; Then the first grouping set is grouped according to the output total amount to obtain a second grouping set; Using Gaussian distribution to fit the transaction fee distribution of each group in the second grouping set, to obtain a first Gaussian distribution; N data are sampled from the first Gaussian distribution, where n is the total number of transactions in each group in the second grouping set, and data that are not between the maximum and minimum transaction fees in the second grouping set are removed to obtain a first transaction fee set.

8. The covert communication method based on blockchain as claimed in claim 1, characterized in that: The method of synchronously generating a public-private key pair by using the extended private key according to the HD wallet method specifically includes: Let I = HMAC-SHA512(chaincode AB , 0x00||pk Alice ||i), chaincode AB Indicates the first chain code, which is the key of HMAC_SHA512, 0x00||pk Alice ||i is the corresponding data, pk Alice The sender's private key is serialized into a byte representation using the Bitcoin compressed public key method. i is a 32-bit integer and is serialized into a 4-byte sequence. Split I into two 32-byte sequences I L and I R ; Will I L Interpreted as a 256-bit number parse 256 (I L ), then the private key sk i =parse 256 (I L )+sk Alice (modn), public key pk i =parse 256 (I L )*G+pk Alice .

9. The covert communication method based on blockchain as claimed in claim 1, characterized in that: The second signature algorithm is a Kleptography algorithm.

10. The covert communication method based on blockchain as claimed in claim 1, characterized in that: In the method, each transaction uses a unique address as the sending address, and the sender can generate additional receiving addresses, each of which is unique.