## 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
Conversely, if the formats match, allowing for successful parsing of the received message, the system proceeds to verify the legitimacy of the message parameters. It extracts and stores the message field parameters, then cross-references these with the legitimate message parameters previously sent by the base station and stored in the AIS/VDES message distributed database. If discrepancies exist between the VDES message parameters and the legitimate AIS/VDES message parameters, it is concluded that the content of the VDES message has been disrupted by interference, resulting in an untrusted monitoring outcome for the VDES data link. Should all parameters align, the system verifies the integrity of the message content. Figure 22: Algorithmic flowchart for a VDES data link credibility monitoring system based on a combined detection method. This integrity verification process utilizes the MD5 algorithm to calculate the hash values of the received VDES message and the legitimate messages previously received from the ship station, as stored in the VDES raw message database. If the hash values do not match, indicating incomplete content in the VDES message due to radio interference, the system outputs an untrusted monitoring result. Conversely, if the hash values match, the system proceeds to verify the consistency of the message content, entering the subsequent step of checking consistency between sent and received messages. This consistency check utilizes the HMAC algorithm to calculate the HMAC values of the TDB statement message and the VEM statement broadcast message. If the HMAC values do not match, it is inferred that the message content has been tampered with due to interference, indicating the presence of radio interference in the VDES data link, and resulting in an untrusted monitoring outcome. Conversely, if the HMAC values match, the system continues to the consistency check of sent and received messages, initiating the spoofing source identification process. Spoofing source identification employs an analysis method comparing the distance between ships and shore with the propagation distance of VDES signals. The ship-to-shore distance is calculated using the Haversine formula, based on the vessel position information reported by the VDES onboard terminal and the base station's position. Simultaneously, the VDES signal propagation distance is calculated using a model of VHF signal propagation losses in complex maritime environments and received power calculations. The analysis determines if the ship-to-shore distance falls within the tolerance range of the propagation distance. If it is within this range, it signifies the absence of a spoofing source in the VDES data link, resulting in a trusted monitoring outcome. If it exceeds this range, the presence of a spoofing source within the VDES data link is concluded, leading to an untrusted monitoring result and initiating the spoofing source localization process. Through the spoofing source localization algorithm, the position or range of the spoofing source is determined. Following the algorithmic processes outlined above, this study utilized Visual Studio 2019 as the development software, based on the SQL Server database, and employed C# as the primary programming language to design the VDES data link integrity monitoring system. Built on the C/S model, the system features a layered architecture comprising the data acquisition layer, business logic layer, and frontend display layer, as depicted in Figure 23.

As illustrated in Figure 23, the C/S model facilitates communication between VDES base stations and ship stations. The data acquisition layer integrates components such as web crawlers, power detectors, VDES receivers, and communication networks, forming the entire data collection segment. At the core of the system is the business logic layer, which encompasses modules for data storage, data processing, and VDES data link integrity monitoring.