## 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
The longitude, converted to 121.529038, corresponds to 121 deg31.74228' E, while the latitude, converted to 38.869782, corresponds to 38 deg52.18692' N. The VDES base station has a position accuracy of 1, a message type of 4, a forwarding indicator of 0, and UTC time set to 15 March 2023, at 16:48:12. Additionally, the electronic position fixing device type is 5, with all transmission control bits and RAIM flags set to 0. This information is consistent with the content sent by the base station and encapsulated in the VDES message by the VDES message encapsulation module, as shown in Figure 20.0 This validation confirms the functionality of the VDES message parsing module. #### 3.1.3 VDES Data Link Credibility Monitoring Module

The VDES data link integrity monitoring module comprises two key components: the radio interference detection module, which monitors radio interference within the VDES data link, and the ship-to-shore distance and propagation distance matching analysis module, which aims to identify and locate spoofing sources within the VDES data link. The radio interference detection module includes four submodules: VDES message format compliance verification, VDES message parameter validity verification, VDES message content integrity verification, and transmit-receive message consistency verification. This section primarily focuses on the VDES message content integrity verification and transmit-receive message consistency verification submodules, while the VDES message format compliance verification and VDES message parameter validity verification have been extensively discussed in reference [36]. (1) VDES Message Integrity Verification Module

Figure 20.1 Functionality verification results for the VDES message parsing module. The VDES message integrity verification module utilizes the MD5 algorithm to compare the received VDES message with the legitimate message content previously sent by ships and stored in the VDES original message database. This process verifies the integrity of the received message content. First, the ProcessVDESMessage(string VDESMessages) function calls the DivideIntoBlocksByField(string data) function to divide the parsed message into multiple blocks. Next, the ValidateIntegrity() function performs an integrity check on the message. This function calculates the hash values of the received VDES message and the legitimate message from the VDES original message database using the MD5 algorithm through the CalculateHash() subfunction. It then updates the hash chain and compares the two hash values. If the hash values do not match, indicating potential radio interference in the data link, the VDES data link integrity monitoring system outputs an unreliable monitoring result. If the hash values match, the integrity of the message content is confirmed. VDES Transmission and Reception Message Consistency Verification Module

The VDES message consistency verification module employs the HMAC algorithm to verify the consistency of TDB statement messages and VEM statement messages, ensuring that data integrity is maintained during the transmission of VDES messages. The ComputeHMAC(receivedVDES, sharedKey) function calculates the HMAC values for both the TDB and VEM statement messages. A discrepancy in the HMAC values indicates the presence of radio interference in the data link, resulting in unreliable monitoring results for the VDES data link. If the HMAC values match, the module proceeds with the transmit-receive message consistency verification. Through the verification of VDES message integrity and consistency, the VDES data link integrity monitoring system effectively detects data anomalies caused by radio interference. To facilitate this process and serve as a precursor to module programming, the following pseudocode is designed as shown in Algorithm 3:

To validate the functionality of the VDES message integrity verification module, a verification of message content integrity was conducted at a specific moment.