# Secure Automatic Identification System (SecAIS): Proof-of-Concept Implementation
## 5 How the SecAIS Works
### SecAIS Source Authentication
#### 5.1.4 Validating the Signature  
Following the retrieval of the signed SecAIS message, the SecAIS-App checks the validity of the authentication signature against the signed AIS message and the signed timestamp. Figure 11 shows this process in an experiment where the result of the signature validation is \"TRUE\". Note that, in a real implementation, the ID8 AIS message depicted in these figures will fail to pass the signature validation procedure, because the source MMSI = \"1234567879\" differs from the MMSI = \"2011-020\"tel: +4477009001230\", which is bound to the cryptographic values R, S, and PVT. This is why, for the purposes of the experiment, we manually input the correct MMSI = \"2011-020\"tel: +4477009001230\" to the SecAIS-App. The result of a test where a malicious AIS transmitter uses a spoofed MMSI (i.e., MMSI = \"THIS IS A SPOOFED ID\") instead of the real one (i.e., MMSI = \"2011-020\"tel: +4477009001230\" in this implementation) are shown in Figure 12; the result of the validation is \"FAISE\", as it should be.  
The time taken for the signature validation process to complete is negligible: on a PC with CPU: Intel Xeon(r) E5-1620 Vv2 @ 3.70 GHz, RAM: 16 GB, and OS: 64-bit Windows 10 Pro, the signature validation process took less than a second to complete. Specifically, the valid signature test started at 11:38:16.889 and ended at 11:38:17.038 (Figure 11, Parts C), and the invalid signature test started at 11:40:10.422 and ended at 11:40:10.576 (Figure 12, part D).  
GOUDOSIS-DATEISIS TEST of Signed HSO creation with BTC6507  
**-\"Washington FOR TESTING ACCMANZAT ALL TEST CATGROMANZATUZ TARE STOREZ IN FTC6507, Appendix A. Test Data ********  
**-\":**: to Vaidateeft MRs. '2' to tests it with default BTC6507 values >  
**-\":**: HBC raised inputs ********  
From AIS VRL/VTD decoder > Input the TIDSTSTAND from AIS VRL/VTDDecoder >  
2015-04-11711:18:14.071  
From AIS VRL/VTD decoder > Input the SIGNED HSO to be VILLIGHT (or leave blank for the BTC6507 default)  
iATVRL,1,1,A,1,A,10 YETETYEN;ON:DOWNWHIUCB650,0+24  
From AIS VRL/VTD decoder >INPUT the NEG-number for the lower letters >  
**-\":**: **-\":**: **-\":**: **-\":**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**: **-\":**:**:**: **-\":**:**:**: **-\":**:**:**: **-\":**:**:**: **-\":**:**:**: **-\":**:**:**:**: **-\":**:**:**:**: **-\":* Start TimeStamp: 2019-06-28709:24:53.610  
* (DMSG8_Msg_R_S_PVT_Creation_v5) total_AIS_MSG8_DataPayload.length() 32
* **** Copy/Paste the Msg8-NMEA_AIS below that contains: >>> This MSG8 contains: The H *****!AIVDM,1,1,.,B,8 limg=5$0H0>>AL0 Pued6@LANLIMdvd1 MP@hv=1M>MeL*h,4*67  
(MSG8_Msg_R_S_PVT_Creation_v5) NMEA_AIS_Msg8_final_result.length(): 61 characters  
* (DMSG8_Msg_R_S_PVT_Creation_v5) total_AIS_MSG8_DataPayload.length() 256
* **** Copy/Paste the Msg8-NMEA_AIS below that contains: >>> This MSG8 contains: The Rbx *****!AIVDM,5,1,.,B,8 limg=5$0H0==1N0A==0###NELPMPM8L10M#iF-MPutN<=c=d=PL-A=ELLiduh,4*0F!AIVDM,5,2,.,B,8 limg=5$0H0<LAduhndf0 tttt0 PettMuuMLIPeu1=10 Af0A<<<LmM0 uuP1M0 Vtt0,4*4B!AIVDM,5,3,.,B,8 limg=5$0H00*=3=0%Mtdt=<ted8 uL=0%0e@QM<vleLill=10+EhuuuQLL1<hP,4*25!AIVDM,5,4,.,B,8 limg=5$0H=84 MfL<ttf<oute@MLc0d8d=EMeL20t0*Auui8 htehQML><w800,4*14!AIVDM,5,5,.,B,8 limg=5$0H<f<c>N0f0 Mti>Af<<A>>LuvLhM<Aoe@u%f=1 MvvMdPdQM1=Mpi8,4*16  
(MSG8_Msg_R_S_PVT_Creation_v5) NMEA_AIS_Msg8_final_result.length(): 401 characters  
* **** (DMSG8_Msg_R_S_PVT_Creation_v5) total_AIS_MSG8_DataPayload.length() 256
* **** **** Copy/Paste the Msg8-NMEA_AIS below that contains: >>> This MSG8 contains: The Rby *****!AIVDM,5,1,.,B,8 limg=5$0H0=MMILUL0A=0%0=%