## 1 Introduction  
With the rapid development of modern atomic clock technology, the uncertainty of the strontium atomic clock can reach 10\({}^{-18}\) magnitude and the stability can reach 10\({}^{-19}\) magnitude [1, 2, 3, 4]. In order not to deteriorate the performance of high-precision time-frequency standards, a more precise time-frequency transfer technique is needed [5, 6]. The existing time transfer system includes a network, global navigation satellite systems (GNSS), optical fiber, and other schemes [7, 8]. Network timing is the most common application, but the synchronization level is in the microsecond level, which cannot meet the needs of high-precision time users. Although GNSS can be used across continents, the synchronization accuracy is only at the nanosecond. The synchronization precision of the optical fiber can reach the picosecond level, and it also has the advantages of a stable transmission medium and anti-electromagnetic interference [9]. Time transfer via optical fiber is one of the most accurate timing technologies at present [10, 11]. It is also an important research direction of high-precision time transfer technology, and many scientific research institutions around the world have carried out research and testing in this field. In 2009, the Swedish SP Institute achieved a long-term average result of optical timing with less than 1 ns for over a 560 km optical link [12]. The time synchronization accuracy of PLA University of Science and Technology was less than 500 ps at 125 km [13]. In 2013, The long-term stability was less than 20 ps in the 540 km fiber link test at Paris Observatory,France [14]. In 2014, Tsinghua University achieved a peak-to-peak time synchronization of less than 100 ps over an 80 km field fiber link [15]. In 2020, the National Time Service Center completed the optical fiber time transfer test on the 1085 km field optical fiber link. Additionally, the time synchronization stability was about 5.4 ps/40,000 s [16]. In 2021, the time synchronization system of two-way time-division multiplexing on the same fiber and same wave transmission was used on a field optical fiber link with a length of about 60 km and stability of less than 16 ps/s and 7 ps/10,000 s in Shanghai Jiaotong University [17]. National security departments reported that attacks and theft of secrets in the field of key information infrastructure occur from time to time. Although optical fiber has the advantages of a stable transmission medium and anti-electromagnetic interference, the developing optical fiber timing technology also faces certain information security challenges, such as attacks, deception, etc. Some technologies of time transfer via optical fiber rely on the transmission of physical signals, but they also require a certain amount of information transmission, for example, the transmission of information such as the real-time measurement of the time delay between the time source and the user. A method of transferring time information is to use the WDM technique [18]. The improved IRIG-B time code carries the IRIG code information, as well as the delay difference information [19]. Two-way time transfer via optical fiber also needs to transfer the time difference between two optical fiber links, which can complete the calculation and compensation of the time difference between the clock of two sites [20]. These methods have the risk of being cracked and attacked. It will inevitably affect the control of time delay if the information is tampered with. This will be an unavoidable problem for the wide application of optical fiber time synchronization systems in the future. However, there is relatively little research in this area at present. Based on this security risk, in order to prevent the attacker from tampering with the link transmission delay information, this paper introduces the asymmetric encryption SM2 algorithm [21] to form a security strategy on the basis of two-way time transfer via an optical fiber scheme.