## 3 Identity Authentication and Secure Transmission Based on Blockchain
### Secure Transmission of UAV Data Based on Blockchain  
To solve the security of data transmission, a secure communication architecture based on blockchain is proposed. This architecture is mainly composed of three parts, including the data sender, the data receiver, and the blockchain. In this paper, UAVs are abstracted as data senders, and any devices that communicate with UAVs are abstracted as data receivers, such as ground stations, tactical clouds, and other UAVs in the swarm. Blockchain provides tamper-proof storage of key information, identity management of both communication parties, and distributed identity authentication. In Figure 3, \(PK_{R}\) indicates the private key of the sender. \(AuResult\) represents the result of identity authentication, and \(Information_{S}\) is the communication data. If \(AuResult\) = True, the identity authentication is passed, otherwise it fails. When two UAVs want to communicate with each other, the sender requests the public key of the receiver from the blockchain. After receiving the information sent by the sender, the receiver requests the blockchain to authenticate the identity of the sender. Compared with the traditional communication architecture, the innovation of the architecture proposed is that the identity information of communication parties no longer depends on a trusted third party, but is stored by blockchain tamper-proof and their distribution identity authentication is completed by the blockchain. A reliable and secure communication protocol is proposed based on the above architecture. to prevent attackers from forging and tampering with communication information, this paper also adds the identifier of the drone on the basis of signature encryption to mark the receiver and the sender. In addition, considering the replay attack, all entities will obtain the current time \(\mathit{Timestamp}\) after receiving the message, and compare it with the time when the message was sent. If the time difference between the two is less than \(d\) (the threshold of the time interval from sending the message to receiving the message), the next processing will be executed. Protocol details are as follows. * The sender sends message; \[S\to R/B:C_{S}=\{E_{PK_{R}/PK_{B}}(DID_{S},DID_{R},E_{SK_{S}}(Hash(DID_{S},DID_{ R},\mathit{Timestamp}_{1},\] \[\mathit{Information}_{S}/PKRequest)),\mathit{Timestamp}_{1}, \mathit{Information}_{S}/PKRequest)\}\] where \(S\) is sender, \(B\) is blockchain, \(C_{S}\) means ciphertext sent by the sender, \(E_{PK_{R}}\) is used to indicate encryption with \(PK_{R}\), \(PK_{B}\) indicates the public key of the blockchain, \(SK_{S}\) is the private key of the sender, \(DID_{S}\) and \(DID_{R}\) represent the DID of sender and receiver, respectively, \(Hash\) represents the function that generates a hash value, \(\mathit{Timestamp}_{1}\) indicates the time when the sender sends the current information, and \(\mathit{PKRequest}\) represents the public key request information. * The receiver requests blockchain for identity authentication; \[R\to B:C_{R}=\{E_{PK_{B}}(DID_{R},DID_{S},E_{SK_{R}}(Hash(DID_{R},DID_{S},Sign _{S},\mathit{Timestamp}_{2},\] \[\mathit{AuRequest},M_{S})),\mathit{Sign}_{S},\mathit{Timestamp}_{2}, \mathit{AuRequest},M_{S})\}\] where \(C_{R}\) means ciphertext sent by the receiver, \(Sign_{S}\) indicates the sender's signature, \(\mathit{Timestamp}_{2}\) indicates the time when the request message was sent, \(\mathit{AuRequest}\) is the request information of identity authentication, and \(M_{S}=Hash(DID_{S},DID_{R},\mathit{Timestamp}_{1},\)\(\mathit{Information}_{S})\) is the hash value of the information sent by the sender. The receiver will mainly receive two types of information, one is the communication information sent by the sender, and the other is the response information of the blockchain to the identity authentication request. If the received message is \(C_{S}\), the receiver decrypts it and makes a timestamp comparison.