## 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  
During the communication process between VDES base stations and ship stations, incomplete message content transmission due to radio interference within the data link can significantly impact the safety of vessel navigation. Consequently, assessing message content integrity is imperative for identifying potential threats posed by this interference. The use of hash algorithms, recognized as robust methods for validating message integrity, provides a viable mechanism for scrutinizing the integrity of VDES message content. The MD5 algorithm, a prevalent hashing technique, can transform messages of varying lengths into uniform 128-bit hash values, uniquely characterizing each message. By employing this algorithm to compute the hash value of parsed messages and comparing it with the hash value of authentic messages dispatched by ship stations and received by the base station within the VDES original message repository, discrepancies in the hash values signal deficiencies in message completeness attributable to radio interference during transmission. Thus, by juxtaposing the hash values of messages, the integrity of VDES messages during transmission can be effectively corroborated. The schematic representation of the MD5 algorithm utilized in this study is illustrated in Figure 4, offering a visual depiction of the computational process involved in ensuring the integrity of VDES messages amid potential radio interference challenges. Initially, the data parsed from VDES messages undergo padding and segmentation by the MD5 algorithm. Subsequently, each block is subjected to iterative processing, ultimately yielding a 128-bit hash value for the VDES message. The specific computational process is outlined as follows:  
Step 1 VDES Message Padding: A digit \"1\" is appended to the end of the VDES message to signal its conclusion, followed by the addition of \"0\" to ensure that the message length is congruent to 448 when divided by 512. At this stage, the message length is N \(\times\) 512 + 448, where N is a positive integer. Step 2 Appending Message Length: Following the initial step, 64 bits of the original message data are added after the final \"0\". If the length of the original message data exceeds the limit, it is adjusted using modulo. Consequently, the padded VDES message achieves a length of N \(\times\) 512 + 448 + 64 = (N + 1) \(\times\) 512N \(\times\) 512 + 448 + 64 = (N + 1) \(\times\) 512N \(\times\) 512 + 448 + 64 = (N + 1) \(\times\) 512 bits. Step 3 Initialization of Chaining Variables: After the preceding two steps, the VDES message is effectively partitioned into \(q\) groups of 512-bit message blocks. Simultaneously, four 32-bit registers, denoted as \(A\), \(B\), \(C\) and \(D\), are internally defined within the algorithm. These registers serve the purpose of storing and updating intermediate values and final outcomes during the computation process. The initial chaining variable values for these four registers are set as \(A=0\)X01234567, \(B=0\)X89 ABCDEF, \(C=0\)XFEDCBA98, and \(D=0\)X76543210. Step 4 Message Grouping and Four-Round Iterative Computation: Following the aforementioned procedures, the message is segmented into individually processed 512-bit blocks. Each VDES message block is then subdivided into sixteen 32-bit blocks, with each group processed through the compression function HMD5. HMD5 consists of four rounds of iterative processes, each involving the calculation of logical function values denoted as F, G, H, and I. Each round includes 16 iterations, necessitating a total of 64 iterations for each VDES message block. Initially, four fundamental logical functions are defined, where \(X\), \(Y\), and \(Z\) are 32-bit integers [37]. \[\left\{ \begin{array}{l}F(X,Y,Z)=(X\;\text{and}\;Y)\;\text{or}\;((not\;(X)) \;\text{and}\;Z)\\ G(X,Y,Z)=(X\;\text{and}\;Z)\;\text{or}\;(Y\;\text{and}\;(not(Z)))\\ H(X,Y,Z)=X\;\text{xor}\;Y\;\text{xor}\;Z\\ I(X,Y,Z)=Y\;\text{xor}\;(X\;\text{or}\;(not(Z)))\end{array} \right.