## 2 VDES Data Link Credibility Monitoring Approach
### Radio Interference Detection Based on Message Characteristics
#### 2.1.1 VDES Message Integrity Verification Method Based on the MD5 Algorithm
\tag{1}\]  
Figure 4: Flowchart of the MD5 algorithm computation. Let \(M_{j}\) represent the \(j\)-th message block of the VDES message, where j ranges from 0 to 15, \(<<<<s\) denotes a circular left shift by \(s\) bits; then, the logical function for each round of computation is as follows [37]:  
\[ \begin{array}{l}FF\big{(}a,b,c,d,M_{j},s,t_{i}\big{)}:a=b+\big{(}\big{(}a+F(b, c,d)+M_{j}+t_{i}\big{)}<<s\big{)}\\ GG(a,b,c,d,M_{j},s,t_{i}):a=b+\big{(}\big{(}a+G(b,c,d)+M_{j}+t_{i}\big{)}<<s \big{)}\\ HH\big{(}a,b,c,d,M_{j},s,t_{i}\big{)}:a=b+\big{(}\big{(}a+H(b,c,d)+M_{j}+t_{i} \big{)}<<s\big{)}\\ II\big{(}a,b,c,d,M_{j},s,t_{i}\big{)}:a=b+\big{(}\big{(}a+I(b,c,d)+M_{j}+t_{i} \big{)}<<s\big{)}\end{array}  \tag{2}\]  
Step 5 Outputting the Hash Value: Once all message blocks in the original VDES message have undergone computation, the calculated value from the iteration of the final HMD5 output message block serves as the VDES message hash value. The pseudocode implementation of the MD5 algorithm utilized in this paper is presented in Algorithm 1. ```
1:Initialize variables:
2: A \(\leftarrow\) 0x67452301
3: B \(\leftarrow\) 0 xEFCDAB89
4: C \(\leftarrow\) 0x98 BADCFE
5: D \(\leftarrow\) 0x10325476
6: Pre-processing:
7: append \"1\" bit to message
8: append \"0\" bits until message length in bits \(\equiv\) 448 (mod 512)
9: append bit length of message as 64 bits little-endian integer to message
10:for each 512 bits chunk of message do
11: break chunk into sixteen 32 bits little-endian words \(w[i]\), 0 \(\leq\) i \(\leq\) 15
12: Initializa hash value for this chunk:
13: a \(\leftarrow\) A
14: b \(\leftarrow\) B
15: c \(\leftarrow\) C
16: d \(\leftarrow\) D
17:for i from 0 to 63 do
18: if 0 \(\leq\) i \(\leq\) 15 then
19: f \(\leftarrow\) (b & c) (\(\sim\) b & d)
20: g \(\leftarrow\) i
21: else if 16 \(\leq\) i \(\leq\) 31 then
22: f \(\leftarrow\) (d & b) (\(\sim\) d & c)
23: g \(\leftarrow\) (5 \(\times\) i + 1) mod 16
24: else if 32 \(\leq\) i \(\leq\) 47 then
25: f \(\leftarrow\) b \(\oplus\) c \(\oplus\) d
26: g \(\leftarrow\) (3 \(\times\) i + 5) mod 16
27: else if 48 \(\leq\) i \(\leq\) 63 then
28: f \(\leftarrow\) c (b (1/\(\sim\) d))
29: g \(\leftarrow\) (7 \(\times\) i) mod 16
30:endif
31: temp \(\leftarrow\) d
32: d \(\leftarrow\) c
33: c \(\leftarrow\) b
34: b \(\gets leftrotate((a+f+k[i]+w[g]),r[i])+b\)
35: a \(\leftarrow\) temp
36: endfor
37: Add this chunk's hash to result so far:
38: A \(\leftarrow\) A + a
39: B \(\leftarrow\) B + b
40: C \(\leftarrow\) C + c
41: D \(\leftarrow\) D + d
42:endfor
43:\(digest\)\(\leftarrow\)\(In conclusion, following the procedural sequence encompassing Steps 1 through 5, the computation of the hash value for the deciphered message from the VDES base station is compared with the hash value of legitimate messages dispatched by ship stations and received by the base station within the VDES original message repository. If the hash values of these messages align, verification of message completeness occurs, thereby affirming the integrity of the message content. Conversely, a discrepancy in hash values implies potential tampering with the contents of VDES messages during transmission, resulting in incomplete message data. By adhering to the evaluative criteria outlined above, a robust mechanism for effectively monitoring the integrity of VDES message content is established. To corroborate the efficacy of the VDES message integrity validation technique reliant on the MD5 algorithm in overseeing the integrity of VDES message content, this section undertakes validation and scrutiny of the design methodology utilizing authentic link management messages received by the VDES base station. For instance, in an illustrative scenario, the VDES base station may receive a message such as \"AIVEM,1,1,0,A,403 sooQvMSfR0'Jah H=Tdp400D0E,0*5D\", while the legitimate message sent by a ship station and received by the base station in the VDES original message database is \"IAVEM,1,1,0,A,403 sooQvLoh h<'dD=LF?M3U00D0G,0*3C\".