# An Efficient Framework for Secure Communication in Internet of Drone Networks Using Deep Computing
## 3 Materials and Methods
### System Model and Problem Formulation
#### 3.1.6 Protocol Phases
```
Input: DroneID, Response = [challenge, telemetryData, signature] Output: AuthSuccess with encrypted session key or failure
1:dronePK \(\leftarrow\) DroneRegistry.getPK(DroneID)
2:if not VerifyECC(dronePK, signature, {challenge, telemetryData}) then
3:returnAuthFailure(\"Invalid drone response\")
4:endif
5:telemetryFeatures \(\leftarrow\) ExtractTelemetryFeatures(telemetryData)
6:seq \(\leftarrow\)FormatTelemetryAsSequence(telemetryFeatures)
7:predicted \(\leftarrow\) droneLSTM.Forward(seq)
8:seqScore \(\leftarrow\)CalculateSequenceSimilarity(predicted, seq)
9:vector \(\leftarrow\)FormatTelemetryAsFeatureVector(telemetryFeatures)
10:prob \(\leftarrow\) droneRF.PredictProbabilities(vector)
11:anomaly \(\leftarrow\) 1 - prob[1]
12:authScore \(\leftarrow\) 0.5 \(\times\) seqScore + 0.5 \(\times\) (1 - anomaly)
13:if authScore < DroneAuthThreshold then
14:Log(DroneID, \"Compromised drone\", authScore)
15:returnAuthFailure(\"Telemetry mismatch\")
16:end if
17:droneLSTM.Update(seq)
18:droneRF.Update(vector, isNormal = TRUE)
19:DroneModelDB.update(DroneID, droneLSTM, droneRF)
20:sessionKey \(\leftarrow\)GenerateRandomKey(128)
21:encryptedKey \(\leftarrow\) EncryptECC(dronePK, sessionKey)
22:returnAuthSuccess, encryptedKey
```

**Algorithm 6**Verify Drone Response

Explanation:

Verify Drone Response--The system authenticates drones based on the examination of telemetry data gathered in response to a challenge. It confirms the signature of the drone and extracts telemetry features like command timing of execution, sensor values, and power utilization. The LSTM model calculates a sequence similarity score against known drone behavior patterns and the RF model calculates the probability of an anomaly. These scores are combined to calculate the authenticity of the drone. The models are updated if accepted with the new telemetry and a session key is issued to authenticate communication between the ground station and the drone. #### 3.1.7 Security Analysis and Verification

The security verification and analysis of the SecureDrone authentication protocol were performed using the AVISPA tool that comprises OFMC, CL-AtSe, SATMC, and TA4 SP to ensure a thorough evaluation of security properties against a precisely defined threat model. The results are shown in Table 1. The protocol was described in HLPSL with designated roles like User/Controller, edge server, Ground Control Station, and drone, and the verification process focused on the secrecy of session keys, entity authentication, replay attack resistance, and message integrity. The outcome validated that the protocol fulfills all described security properties without any attacks discovered. The protocol exhibited man-in-the-middle attack resistance based on mutual authentication with digital signatures, maintaining message integrity as well as blocking unauthorized key establishment. Replay attacks were also prevented by using timestamps, nonces, and sequence numbers so that the attackers could not reuse intercepted messages. Impersonation attacks were also averted through a two-factor authentication procedure with cryptographic credentials and behavioral analysis, yielding adaptive credential loss protection. Termination, reachability, and liveness properties of the protocol were maintained through additional correctness testing, ensuring proper functioning under adversarial and normal settings. The cryptographic and behavioral defenses combined constitute a robust security framework well-suited for IoD applications. The choice of AVISPA for formal verification adheres to standard security protocol analysis methodologies in resource-constrained contexts [68]. The use of all four back-ends (OFMC, CL-AtSe, SATMC, and TA4 SP) instead of a subset was influenced by [PERSON] et al. 's [69] research that show that thorough multi-tool verification impacts severely on false negatives in security proofs.