Method and system for encrypting fiber channel data based on mode multiplexing and frequency hopping

By negotiating a default encryption mode through fiber optic transceivers and fixing the channel at the physical layer, combined with frequency hopping and mode switching, physical layer security threats in fiber optic communication systems are resolved, enabling dynamic encrypted transmission, enhancing system security and adaptability, and making it suitable for frequent short session scenarios.

CN123184746APending Publication Date: 2026-11-27CASCO SIGNAL LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611379215.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Optical fiber communication systems face physical layer security threats, such as optical splitter eavesdropping, bending coupling eavesdropping, and pattern filtering attacks. Existing encryption schemes are difficult to resist targeted attacks and key distribution and updates are difficult. Traditional upper-layer encryption cannot cope with the "naked" security weakening of the physical layer.

Method used

A fiber channel data encryption method based on mode multiplexing and frequency hopping is adopted. A unique default encryption mode is generated through negotiation between optical transceivers, and the default encryption channel is fixed at the physical layer. Combined with the frequency hopping algorithm and mode switching sequence generation method, dynamic encrypted transmission is realized, switching to the formal encrypted transmission mode and performing joint mode and frequency hopping in each time slot.

Benefits of technology

It effectively resists upper-layer software attacks, enhances system adaptability, blocks eavesdroppers' cross-mode inference, and achieves physical layer secure transmission that is resistant to passive eavesdropping, pattern filtering, and statistical analysis. It also supports efficient initialization and forward security in frequent short session scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184746A_ABST
    Figure CN123184746A_ABST
Patent Text Reader

Abstract

The application provides a fiber channel data encryption method and system based on mode multiplexing and frequency hopping, physical mode matching of optical transceivers of a sending end and a receiving end, negotiation to generate a default encryption mode corresponding to the current session and solidification at a hardware level, formal encryption parameter negotiation and estimated session duration information transmission of both sides on the default encryption channel, determination of mode-frequency combination by the sending end according to the formal encryption parameter to generate corresponding optical pulses from original data and coupling to the fiber channel in each time slot of formal data transmission, independent calculation of mode-frequency combination of each time slot by the receiving end according to the formal encryption parameter and a synchronous clock, synchronous demodulation and hopping by a mode demodulator and a tunable local oscillator to recover the original data, and emptying of temporary states and resetting of the hardware by the optical transceiver after the session ends. The application realizes secure transmission against eavesdropping, mode filtering and statistical analysis at the physical layer through joint dynamic hopping of modes and frequencies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to optical fiber communication encryption technology, and in particular to an optical fiber channel data encryption method and system based on mode multiplexing and frequency hopping. Background Technology

[0002] Optical fiber communication, with its advantages of high bandwidth, low loss, and resistance to electromagnetic interference, has become a core technology for modern information infrastructure and is widely used in backbone networks, metropolitan area networks, and high-security scenarios such as 5G fronthaul / backhaul, data center interconnection, and dedicated communications for rail transit. However, the physical openness of optical fiber channels (such as eavesdropping via optical splitters and bending coupling) exposes them to serious security threats.

[0003] Currently, the security protection of fiber optic communication systems mainly relies on upper-layer cryptographic mechanisms (such as IPsec, MACsec, TLS, etc.) to encrypt data packets or bitstreams. These methods have the following inherent limitations: First, the encrypted object is disconnected from the physical channel. Upper-layer encryption protects bit-level content, but the physical parameters of the optical signal itself (frequency, phase, amplitude, mode, etc.) are transmitted transparently within the optical fiber. Attackers do not need to crack the cryptographic algorithm; they can intercept the original modulation waveform simply through beam splitting, pattern analysis, or coherent eavesdropping, and then perform offline decryption on the captured ciphertext data. This "exposed" physical layer significantly weakens the security of upper-layer encryption.

[0004] Secondly, it is difficult to resist targeted attacks at the physical layer. Existing eavesdropping techniques targeting optical fibers (such as bending coupling, mode filtering, and photon number splitting attacks) can directly extract signal features from the physical layer. When a fixed wavelength or fixed mode transmission is used, attackers only need to perform narrowband filtering on a specific frequency or mode to obtain high-quality channel eavesdropping signals, which traditional encryption cannot counter.

[0005] Third, key distribution and updates are difficult. Upper-layer encryption typically requires independent key exchange protocols (such as Diffie-Hellman or PKI). In high-speed fiber optic links, the key update rate is limited by protocol overhead, making it difficult to keep pace with the data flow. Using the same key for extended periods increases the risk of cumulative analysis.

[0006] In recent years, physical layer security technologies proposed by researchers, such as secure communication based on chaotic lasers, optical code division multiple access (OCDMA), and quantum key distribution (QKD), have their own shortcomings: chaotic synchronization is susceptible to channel disturbances; OCDMA faces codeword collisions and multi-user interference; QKD equipment is expensive and has a limited code generation rate, making it difficult to directly apply to long-distance, high-capacity fiber optic transmission systems. Furthermore, most existing physical layer encryption schemes are limited to a single dimension (such as changing only the frequency or only the mode), and the transition patterns are mostly fixed pseudo-random sequences without dynamic dependencies. Once intercepted and analyzed, the transition patterns can be easily deduced. Summary of the Invention

[0007] To address the aforementioned problems, the present invention aims to provide a fiber optic channel data encryption method and system based on mode multiplexing and frequency hopping. Through joint dynamic hopping of mode and frequency, secure transmission resistant to eavesdropping, mode filtering, and statistical analysis is achieved at the physical layer.

[0008] To achieve the above objectives, one technical solution of the present invention is to provide a fiber optic channel data encryption method, wherein the method is applied between an optical transceiver at the transmitting end and an optical transceiver at the receiving end connected via an optical fiber channel. The optical transceiver at the transmitting end and the optical transceiver at the receiving end enter a pairing state, negotiate to generate a default encryption mode unique to this session, and solidify the default encryption mode at the physical layer, establishing a default encryption channel between the two optical transceivers; the default encryption mode includes a default transmission mode, a default transmission frequency, a default encryption algorithm, and a default key. The optical transceivers at both ends encrypt messages on the default encryption channel using the default encryption algorithm and the default key to negotiate and determine the formal encryption parameters; the formal encryption parameters include the frequency hopping algorithm and the method for generating the mode switching sequence; The optical transceivers at both ends switch to the formal encrypted transmission mode; in each time slot, the optical transceiver at the transmitting end determines the transmission mode of the current time slot according to the mode switching sequence, calculates the transmission frequency of the optical pulse in the current time slot according to the frequency hopping algorithm, and generates the corresponding optical pulse based on the transmission mode and transmission frequency determined in the current time slot and couples it into the optical fiber channel. In each time slot, the optical transceiver at the receiving end uses the negotiated formal encryption parameters and synchronization clock to independently calculate the combination of transmission mode and transmission frequency for the current time slot, synchronize and de-bounce the received optical pulses, and recover the original data.

[0009] Optionally, before entering the mode pairing state, both the optical transceiver at the transmitting end and the optical transceiver at the receiving end are in an open state, and the mode converter, tunable laser and tunable optical filter inside each optical transceiver are not locked for any combination of transmission mode and transmission frequency. When the session ends or an anomaly occurs, the optical transceivers at both ends clear all keys and algorithm parameters of the session and trigger a hardware reset of the mode converter, tunable laser and tunable optical filter, so that the optical transceivers at both ends return to the open state.

[0010] Optionally, the optical transceiver at the transmitting end emits an optical signal at the physical layer as a mode matching request. After the optical transceiver at the receiving end detects the optical signal of the mode matching request, both parties synchronously enter the mode matching state.

[0011] Optionally, the optical signal used for mode request is a pulse sequence with a fixed wavelength and a fixed pattern.

[0012] Optionally, in the mode-matching state, the optical transceiver at the transmitting end and the optical transceiver at the receiving end each generate random parameters about the transmission mode, transmission frequency and key and interact with optical signals to negotiate and generate the default encryption mode.

[0013] Optionally, each of the two optical transceivers uses its internal pseudo-random number generator to generate a set of random parameters as candidate parameters for its own end, and negotiates the candidate parameters by exchanging unencrypted optical signals to determine the default encryption mode.

[0014] Optionally, the optical transceiver at the transmitting end and the optical transceiver at the receiving end are physically layered with the default encryption mode, including configuring their respective mode converters, tunable lasers and tunable optical filters to allow only optical signals corresponding to the combination of the default transmission mode and the default transmission frequency to pass through, and enabling encryption / decryption logic using the default encryption algorithm and the default key.

[0015] Optionally, the optical transceiver at the transmitting end and the optical transceiver at the receiving end exchange test frames encrypted with the default encryption algorithm through the default encryption channel for verification; Once the verification is successful, the optical transceivers at both ends continue negotiating the formal encryption parameters; If the verification fails and the preset limit for the number of retries has not been reached, the optical transceivers at both ends will re-negotiate the default encryption mode. If the verification still fails after the preset limit for the number of retries has been reached, the optical transceivers at both ends will clear all keys and algorithm parameters for this session, trigger a hardware reset and restore the system to an open state.

[0016] Optionally, after completing the data transmission of a preset length, the optical transceiver at the transmitting end sends a session end frame encrypted with the formal encryption parameters after the last time slot; the optical transceivers at both ends clear all keys and algorithm parameters of this session according to the session end frame, triggering a hardware reset and restoring to the open state.

[0017] Optionally, the optical transceiver at the transmitting end parses the header of the data to be transmitted, extracts the data length information from it to estimate the duration of the current session, and encrypts the estimated duration using the default encryption algorithm before sending it to the optical transceiver at the receiving end via the default encryption channel. The optical transceivers at both ends each set a session timeout timer based on the estimated duration for timeout protection. If a session timeout occurs during the actual encrypted transmission, the optical transceivers at both ends clear all keys and algorithm parameters of this session, triggering a hardware reset and restoring the system to an open state.

[0018] Optionally, the optical transceiver at the transmitting end sends a switching preparation command encrypted with a default key on the default encryption channel, indicating that the formal encryption parameters determined through negotiation will be enabled at the beginning of the next time slot boundary; after receiving the command, the optical transceiver at the receiving end replies with an acknowledgment message encrypted with the default key through the default encryption channel.

[0019] Optionally, the optical transceivers at both ends simultaneously perform the following operations at the agreed time slot boundaries: Hardware-based shutdown of the default encryption channel; The respective mode converters, tunable lasers, and tunable optical filters are reconfigured according to the formal encryption parameters negotiated. Initiate the formal "mode-frequency" joint switching logic so that the optical transceivers at both ends synchronously switch a combination of transmission mode and transmission frequency for data transmission and reception in each time slot during the formal encrypted transmission process.

[0020] Optionally, in the formal encryption parameters, the frequency hopping algorithm includes a chaotic mapping type and initial chaotic parameters; the mode switching sequence generation method includes the type and initial state of the mode switching sequence generator; The formal encryption parameters also include an initial seed key, time slot width, frequency hopping range, center frequency, mode set, modulation format, and forward error correction coding; the mode set includes several supported transmission modes.

[0021] Optionally, during the formal encrypted transmission, the optical transceiver at the transmitting end performs the following operations in each time slot t according to the formal encryption parameters agreed upon through negotiation: The mode number i(t) of the current time slot is calculated using the mode switching sequence generator, and the corresponding mode Mi(t) is obtained; the transmission frequency ν(t) of the optical pulse in the current time slot is calculated according to the frequency hopping algorithm. ν(t) = ν0 + Δν·h(Mi(t), t, Seed) Where h is the chaotic mapping function with mode Mi(t) as independent variable, Seed is the initial seed key, Δν is the frequency jump range, ν0 is the center frequency, and t is the sequence number of the current time slot; The hardware parameters of the optical transceiver at the transmitting end are configured in real time, so that the modulator loads the current data bits for modulation, the tunable laser emits an optical pulse with a frequency of ν(t), which is converted to mode Mi(t) by the mode converter, and the optical pulse is coupled into the optical fiber channel for transmission.

[0022] Optionally, during each time slot of the formal encrypted transmission process, the optical transceiver at the receiving end calculates the combination of transmission mode and transmission frequency to configure the local mode decomposer and tunable local oscillator in real time for coherent detection or direct detection, and uses pilot signals to compensate for phase error and timing error in order to recover the original data.

[0023] Another technical solution of the present invention is to provide a fiber optic channel data encryption system, which is applied to the fiber optic channel data encryption method of any of the above-mentioned methods. The system includes an optical transceiver at the transmitting end and an optical transceiver at the receiving end connected through a fiber optic channel. The optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to: negotiate and generate a default encryption mode uniquely corresponding to this session in the mode-pairing state, and solidify the default encryption mode at the physical layer, and establish a default encryption channel between the optical transceivers at both ends; the default encryption mode includes a default transmission mode, a default transmission frequency, a default encryption algorithm and a default key. The optical transceiver at the transmitting end and the optical transceiver at the receiving end encrypt the message on the default encryption channel using the default encryption algorithm and the default key to negotiate and determine the formal encryption parameters; the formal encryption parameters include the frequency hopping algorithm and the method for generating the mode switching sequence; During each time slot of the formal encrypted transmission process, the optical transceiver at the transmitting end determines the transmission mode of the current time slot according to the mode switching sequence, calculates the transmission frequency of the optical pulse in the current time slot according to the frequency hopping algorithm, generates corresponding optical pulses for the original data to be transmitted in the current time slot according to the transmission mode and transmission frequency determined in the current time slot, and couples them into the optical fiber channel; the optical transceiver at the receiving end uses the formal encryption parameters and synchronization clock determined through negotiation to independently calculate the combination of transmission mode and transmission frequency in the current time slot, performs synchronous de-hopping on the received optical pulses, and recovers the original data.

[0024] Optionally, the optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to: in the mode-matching state, each generate random parameters about the transmission mode, transmission frequency and key and perform optical signal interaction to negotiate and generate the default encryption mode. Both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a pseudo-random number generator; the pseudo-random number generator is used to generate the random parameters.

[0025] Optionally, both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a mode converter, a tunable laser, a tunable optical filter, and a hardware reset circuit. Before entering the mode pairing state, both the optical transceiver at the transmitting end and the optical transceiver at the receiving end are in an open state, and their respective mode converters, tunable lasers and tunable optical filters are not locked to any combination of transmission mode and transmission frequency. When the default encryption mode is fixed at the physical layer, the mode converter, tunable laser, and tunable optical filter are configured to allow only optical signals corresponding to the combination of the default transmission mode and the default transmission frequency to pass through; and the optical transceivers at both ends are configured to perform encryption / decryption logic using the default encryption algorithm and the default key.

[0026] Optionally, the optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to clear all keys and algorithm parameters of the current session when the session ends or an abnormality occurs. Both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a hardware reset circuit. The hardware reset circuit is used to send a reset signal to the local mode converter, tunable laser, and tunable optical filter when the session ends or an abnormality occurs, so that the optical transceiver is restored to the open state.

[0027] Optionally, at least the optical transceiver at the receiving end includes a mode decomposer and a tunable local oscillator laser; when the optical transceiver at the receiving end calculates the combination of transmission mode and transmission frequency for the current time slot, the mode decomposer and the tunable local oscillator laser are configured in real time according to the transmission mode and transmission frequency in the combination to synchronously de-bounce the received optical pulses to recover the original data.

[0028] The fiber optic physical layer encryption method and system based on mode multiplexing and frequency hopping provided by this invention has at least the following beneficial effects: The optical transceiver of this invention has a parameter-resettable physical structure and is designed with a hardware-level physical mode matching mechanism. Before each session, a unique default encryption mode (mode, frequency, key) is negotiated and generated, a default encryption channel is established and the channel is fixed at the physical layer, so that the default channel of each session is independent and random, effectively resisting upper-layer software attacks; it can be repeatedly matched, providing efficient physical layer initialization for short session scenarios.

[0029] This invention encrypts all negotiation messages (jumping algorithm, pattern sequence, seed key, time slot width, etc.) related to the encryption parameters used in the formal transmission through a default encryption channel, thus separating the negotiation from the formal transmission channel and reducing the risk of eavesdropping; moreover, the negotiation parameters are flexibly adjustable, enhancing the system's adaptability.

[0030] In this invention, during formal encrypted transmission, the transmission mode and optical pulse frequency are strongly coupled through chaotic mapping, with dynamic mode switching and high-speed frequency transitions dependent on the current mode. The legitimate receiver can synchronously de-bounce based on the negotiated encryption parameters, recovering the original data. This invention involves simultaneous transitions in both mode and frequency dimensions, requiring eavesdroppers to search in the joint space of mode and frequency, significantly expanding their attack search space and effectively resisting mode filtering attacks and narrowband eavesdropping targeting a single dimension. Furthermore, the frequency transition sequences of each mode are independent yet interdependent, preventing eavesdroppers from inferring the transition patterns of other modes from signals intercepted in a single mode, thus blocking cross-mode inference. Moreover, the transition rate reaches gigahertz levels, and the transition parameters of each time slot are dynamically generated by chaotic mapping, exhibiting near-random characteristics. The signals intercepted by eavesdroppers have noise-like characteristics, making it difficult to extract effective signals.

[0031] The devices and parameters used in this invention are all within the conventional range of existing high-speed optical communication systems, and can be implemented without introducing special hardware. This invention immediately clears all temporary keys and transition parameters after a session ends, and restores the optical transceiver from a fixed state to an open state through hardware reset, achieving strict forward security. Thus, even if a single session is compromised or the key is leaked, it does not affect other sessions; the hardware state leaves no residue after a session ends, preventing eavesdroppers from launching attacks using residual information from past sessions; and the optical transceiver can immediately accept new mode matching requests after returning to the open state, thereby supporting unlimited repeated secure initializations, suitable for frequent short session scenarios.

[0032] This invention achieves timeout protection through a session duration estimation mechanism. If a session cannot be completed normally within the estimated duration due to link abnormalities, interference, or attacks, both the sender and receiver can promptly determine that the session has failed and actively trigger the parameter clearing and hardware reset process. In this way, the session will not be suspended indefinitely due to abnormalities, avoiding invalid occupation of the encrypted channel and shortening the exposure time of the key for a single session, thereby improving the security of optical fiber communication. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating the fiber optic channel data encryption method described in this invention.

[0034] Figure 2 This is a schematic block diagram illustrating the optical signal interaction between the optical transceivers at the transmitting and receiving ends of this invention.

[0035] Figure 3 This is a schematic block diagram of the structure of the optical transceiver of the present invention.

[0036] Figure 4 This is a flowchart illustrating an example of the fiber optic channel data encryption method described in this invention. Detailed Implementation

[0037] To achieve fiber optic communication in scenarios with high security requirements, this invention provides a fiber optic channel data encryption method based on mode multiplexing and frequency hopping.

[0038] like Figure 1 As shown, the method involves the following four aspects: (1) Physical pairing of optical transceivers and establishment of the default encrypted channel. Establish the hardware-level initialization process between the paired optical transceivers. Before initialization, the two optical transceivers A and B located at the transmitting and receiving ends respectively ( Figure 2Both optical transceivers A and B are initially in an open state. When secure communication is required, they enter a pairing state, each using random parameters generated by its hardware pseudo-random number generator (PRNG) to exchange optical signals and negotiate a default encryption mode unique to this session. This default encryption mode includes a default transmission mode, a default transmission frequency, a default encryption algorithm, and a key. Each party solidifies this default encryption mode at the physical layer, thereby establishing a default encrypted channel between the two optical transceivers A and B to protect subsequent negotiation messages.

[0039] (2) Negotiation of encryption parameters and estimation of session duration based on the default encryption channel. On the default encryption channel, both parties negotiate the encryption parameters required for formal communication using a public-key cryptosystem. The negotiation content includes the frequency hopping algorithm, the generation method of the mode switching sequence (such as the type and initial state of the mode switching sequence generator), the initial seed key, the time slot width, the frequency hopping range, etc. At the same time, the optical transceiver A at the sending end obtains the data length by parsing the packet header of the data to be transmitted, and estimates the duration of this session accordingly, and informs the optical transceiver B at the receiving end of the duration through the default encryption channel. All the above messages are encrypted and transmitted using the default encryption algorithm.

[0040] (3) Formal encrypted transmission based on dynamic mode and frequency switching. After negotiation and duration estimation, both parties switch to formal encrypted transmission mode. In each time slot, the optical transceiver A at the transmitting end dynamically selects the current transmission mode according to the mode switching sequence determined by negotiation, and calculates the optical pulse transmission frequency of the time slot based on the chaotic mapping algorithm strongly correlated with the mode; the optical transceiver B at the receiving end holds the same parameters (such as the initial seed key, the type and initial state of the frequency switching algorithm and the mode switching sequence generator), and can independently predict the mode-frequency pair of each time slot, and configure the mode decomposer and tunable local oscillator for synchronous de-hopping, thereby recovering the original data. The above process realizes dual high-speed switching encryption in both the spatial dimension (mode) and the frequency domain dimension (frequency).

[0041] (4) Hardware reset and restoration of open state after session end. When the optical transceiver A at the sending end completes the preset length of data transmission and sends the session end frame, or in the event of an abnormal situation such as transmission timeout, both parties clear all temporary keys and algorithm parameters of this session, and the physical structure of optical transceivers A and B is restored to the open state according to the reset signal. Each session is independent and repeatable, ensuring forward security; even if the key of a certain session is leaked, it will not affect other sessions.

[0042] The method of this invention achieves deep integration of the spatial dimension (transmission mode) and the frequency domain dimension (optical pulse frequency) in optical fiber communication through a process of "mode-frequency" joint dynamic mapping and real-time synchronous encryption and decryption. This makes the transmission frequency of the optical pulse not fixed and dependent on the currently selected mode, and changes rapidly according to the encryption algorithm. This blocks the path for eavesdroppers to extract and analyze valid signals from the physical layer source, thereby constructing a physical layer secure transmission mechanism that is resistant to passive eavesdropping, mode filtering, and statistical analysis.

[0043] like Figure 4 As shown, in one embodiment of the fiber optic channel data encryption method based on mode multiplexing and frequency hopping described in this invention, the following process is included: Step S1: Initialize the optical transceiver hardware, perform physical pairing, negotiate and solidify the default encryption mode; Step S2: Negotiate the formal encryption parameters based on the default encryption channel; Step S3, Session length estimation, transmit the estimated session duration information through the default encrypted channel; Step S4: Switch to the official encrypted transmission mode; In step S5, during formal data transmission, the transmitting end performs mode selection, frequency switching, optical pulse generation, and transmission. Step S6: The receiving end synchronizes and de-skips the data to recover the original data; Step S7: After the session ends, the hardware is reset and the optical transceiver returns to an open state.

[0044] Step S1 further includes the following steps S1.1 to S1.4.

[0045] S1.1 Initial Open State: Optical transceivers A and B are in an open state before initialization. Their internal physical devices, such as mode converters and tunable optical filters, are not locked to any specific mode-frequency pair (i.e., a combination of a specific transmission mode and a specific transmission frequency), and encrypted communication is not possible.

[0046] S1.2 Mode Pairing Trigger: When the transmitting and receiving ends need to establish a secure session, the transmitting end's optical transceiver A sends a specific optical signal (e.g., a pulse sequence with a fixed wavelength and mode) at the physical layer as a mode pairing request. After the receiving end's optical transceiver B detects the mode pairing request, both ends synchronously enter the mode pairing state. If no mode pairing request is received, optical transceiver B continues to wait within a set period; if the wait times out, it enters an abnormal termination mode (e.g., triggering a hardware reset to restore optical transceivers A and B to the open state).

[0047] S1.3 Hardware-level solidification of the default encryption mode: In the paired state, optical transceivers A and B each use their internal hardware pseudo-random number generators to generate a set of random parameters, and negotiate a default encryption mode that uniquely corresponds to this session through optical signal interaction (such as sending a random pulse sequence to each other and comparing and confirming it).

[0048] The default encryption mode includes: The default transport mode is Mdef, which is randomly selected from the set of supported modes. The default transmission frequency νdef is randomly selected from a preset frequency range; The default encryption algorithm and default key Kdef (e.g., a 128-bit AES key or a simple XOR mask, used to protect subsequent negotiation messages).

[0049] Optical transceivers A and B then solidify the above parameters at the hardware level: configure their respective mode converters, tunable lasers, tunable optical filters, etc., so that these devices only allow optical signals of (Mdef, νdef) to pass through, and enable the default encryption / decryption logic (i.e. enable the encryption / decryption engine configured with the above default encryption algorithm and default key Kdef).

[0050] The aforementioned solidification process is completed at the hardware level, unaffected by upper-layer software interference. This establishes a default encrypted channel between the sender and receiver, defined by the default transmission mode Mdef and the default transmission frequency νdef, and protected by the default encryption algorithm and the default key Kdef.

[0051] S1.4 Module Verification: Both parties exchange encrypted test frames through the established and fixed default encryption channel to confirm that the physical layer and default encryption functions are normal. If the verification fails, proceed to S1.3 to re-perform module verification. As an example, after a module verification failure, a maximum of 3 retries can be made; if all 3 re-verification attempts fail, an abnormal termination mode is entered (e.g., triggering a hardware reset to restore optical transceivers A and B to the open state).

[0052] The default encryption mode determined in step S1 is only valid for this session; after the session ends, all fixed parameters will be erased, and transceivers A and B will be restored to the open state.

[0053] In step S2, after the default encryption channel is established, the sending end and the receiving end conduct a formal key and algorithm negotiation on the channel. All messages transmitted in step S2 are encrypted and protected using the default encryption algorithm and default key Kdef generated in step S1.

[0054] The negotiation in step S2 uses a public-key cryptography system, and the negotiation content includes the following formal encryption parameters: The frequency jump algorithm used in this session (such as the chaotic mapping type and initial chaotic parameters); The method of generating the mode switching sequence, such as the type and initial state of the mode switching sequence generator (e.g., the type and initial state of the pseudo-random sequence generator used). Initial seed key Seed (length ≥ 256 bits); The frequency jump range Δν and the center frequency ν0; Time slot width ΔT; The mode set S (several supported transmission modes); and, Other optional parameters (modulation format, forward error correction coding, etc.).

[0055] After the negotiation is completed, both parties retain the aforementioned formal encryption parameters, but do not activate them for the time being. The default encrypted channel will remain in place for the next step of session length estimation. That is, the session duration information estimated in subsequent step S3 will still be transmitted through the default encrypted channel.

[0056] In step S3, when estimating the session length, the sending end parses the header of the data stream to be transmitted, extracts data length information (such as file size, streaming media duration, or number of data packets), and calculates the estimated duration of the session based on the data length and the physical layer line rate. Tsession = Ldata × 8R + Toverhead, where Ldata is the number of data bytes, R is the physical layer rate, and Toverhead is the overhead for preamble, inter-frame gaps, etc. This estimated session duration information is also encrypted using the default encryption algorithm and the default key Kdef, and sent to the receiving end through the default encrypted channel. Both parties then set their respective session timeout timers accordingly (e.g., Tsession + Δmargin, where Δmargin represents the time margin). At this point, formal data transmission has not yet begun, and the default encrypted channel remains active.

[0057] In step S4, after the session duration is estimated, both parties perform a mode switching handshake: the sending end sends a "switching preparation" command on the default encryption channel and encrypts it with the default key, indicating that the formal encryption parameters negotiated in step S2 will be enabled at the beginning of the next time slot boundary; the receiving end replies with an acknowledgment message through the default encryption channel and also encrypts it with the default key.

[0058] At the agreed-upon time slot boundary (e.g., the next integer microsecond), both parties simultaneously perform the following operations: disable the hardware fixation of the default encryption channel; reconfigure the physical structures such as the mode converter, tunable laser, and tunable optical filter according to the negotiated formal encryption parameters; and initiate the formal "mode-frequency" joint switching logic (i.e., each time slot will synchronously switch to a different "mode-frequency" combination for data transmission). Thereafter, all data transmissions will no longer use the default encryption channel but will instead employ the formally negotiated algorithm.

[0059] In step S5, after the formal data transmission begins, the sending end executes the following in each time slot t according to the formal encryption parameters agreed upon during negotiation: S5.1 Mode Selection: Based on the mode switching sequence generator (whose type and initial state have been negotiated and determined in step S2), calculate the mode number i(t) of the current time slot to obtain the mode Mi(t); S5.2 Frequency Jump: The optical pulse transmission frequency of this time slot is calculated according to the frequency jump algorithm ν(t) = ν0 + Δν·h(Mi(t), t, Seed), where h is a chaotic mapping function strongly correlated with the mode; S5.3 Optical Pulse Generation and Transmission: The tunable laser is set to the frequency ν(t), the modulator loads the current data bits, the mode converter converts the optical field into mode Mi(t), and couples it into the optical fiber.

[0060] Thus, the transmission mode and transmission frequency of the optical pulse dynamically change within each time slot, and the frequency calculation uses the currently selected mode as input, achieving dual high-speed jump encryption in both the spatial and frequency domain dimensions.

[0061] In step S6, the legitimate receiver holds the same formal encryption parameters and synchronization clock as the transmitter, independently calculates the (Mi(t), ν(t)) pair for each time slot, and uses it to configure the mode decomposer and tunable local oscillator in real time for coherent or direct detection; and uses the pilot signal to compensate for synchronization error, recovering the original data transmitted by the transmitter (which was encoded and modulated by the transmitter in S5).

[0062] In step S7, after the sending end completes the transmission of data of a preset length, the sending end sends a session end frame (EOS) after the last formal data time slot. This end frame is still sent using the formal encryption parameters, and this is the last time the formal encryption parameters are used.

[0063] After the receiving end receives the session end frame, both parties execute the following: S7.1 Clear Temporary State: Delete the default key Kdef, seed key Seed, all temporarily generated transition parameters, chaotic mapping state, etc. for this session; S7.2 Hardware Reset: Sends a reset signal to the physical structure of the optical transceiver to switch the optical transceiver from the hardened state of formal encryption back to the open state. At this time, the previously hardened default mode-frequency pair and default encryption logic are all invalidated. S7.3 Waiting for the next session: The reset optical transceiver can receive new pairing requests and start a new round of session initialization.

[0064] If an anomaly occurs during the actual transmission process, such as the session timeout timer expiring without data transmission or reception being completed or the session end frame being received, or anomalies such as synchronization loss or bit error rate exceeding the threshold during transmission, the sending or receiving end can actively trigger a reset process to clear the temporary state of each party, perform a hardware reset, and record the log.

[0065] The present invention also provides a fiber optic channel data encryption system, comprising two optical transceivers A and B connected via a transmission channel formed by optical fibers (hereinafter referred to as a fiber optic channel), for performing the aforementioned fiber optic channel data encryption method. Figure 3 As shown, optical transceivers A and B each contain physical structures such as a pseudo-random number generator, a mode converter, a tunable laser, a tunable optical filter, a modulator, a mode decomposer, a local oscillator laser, and a hardware reset circuit.

[0066] The two optical transceivers A and B are symmetrical in structure and can serve as the transmitter and receiver for each other (in this example, optical transceivers A and B are defined as the transmitter and receiver, respectively).

[0067] When optical transceivers A and B are in the open state, they can respond to mode pairing requests and their corresponding optical signals to enter mode pairing state. Each transceiver uses its built-in pseudo-random number generator to generate random parameters and negotiates a default encryption mode (default transmission mode Mdef, default transmission frequency νdef, default encryption algorithm, and default key Kdef) uniquely corresponding to this session through optical signal interaction. Subsequently, these parameters are used to solidify the mode converter, tunable laser, tunable optical filter, etc. at the hardware level, so that only optical signals of (Mdef, νdef) can pass through and the default encryption / decryption logic is enabled, thereby establishing a default encryption channel between optical transceivers A and B. The solidification process is not affected by upper-layer software.

[0068] On the default encrypted channel, optical transceivers A and B encrypt the transmitted messages using the default encryption algorithm and the default key Kdef, and negotiate the formal encryption parameters. The formal encryption parameters include the frequency hopping algorithm, the type and initial state of the mode switching sequence generator, the initial seed key Seed, the time slot width ΔT, the frequency hopping range Δν and the center frequency ν0, the mode set S, and optional parameters (modulation format, forward error correction coding, etc.).

[0069] The transmitting optical transceiver A parses the header of the data stream to be transmitted, extracts the data length information to estimate the session duration, and sends this estimated session duration information to the receiving optical transceiver B so that both parties can set a session timeout timer based on the estimated session duration. The transmitting optical transceiver A also sends a handover preparation command to the receiving optical transceiver B and receives a confirmation message from B. Both parties agree to enable the formal encryption parameters at the beginning of the next time slot boundary. All the aforementioned messages, including the estimated session duration information, handover preparation command, and confirmation message, are encrypted using the default encryption algorithm and the default key Kdef and transmitted on the default encrypted channel.

[0070] At the agreed time slot boundary, the optical transceiver A at the transmitting end calculates the mode number i(t) of the current time slot according to the negotiated formal encryption parameters in each time slot, and obtains the mode Mi(t); the optical pulse transmission frequency of this time slot is calculated according to the frequency hopping algorithm ν(t), and the optical pulse is generated, modulated and mode-converted by the tunable laser, modulator and mode converter, and then coupled into the optical fiber.

[0071] The optical transceiver B at the receiving end uses the same formal encryption parameters and synchronization clock as the transmitting end to independently calculate the (Mi(t),ν(t)) pair for each time slot, configure the mode decomposer and tunable local oscillator in real time for coherent or direct detection, and use pilot signals for synchronization error compensation to recover the original data.

[0072] When data transmission is complete, both parties send and receive an End of Session (EOS) frame. Alternatively, when a timeout is detected, both parties clear the default key Kdef, seed key Seed, temporary transition parameters, and chaotic mapping state. The hardware reset circuits of optical transceivers A and B send reset signals to their respective mode converters, tunable lasers, tunable optical filters, and other physical structures, restoring optical transceivers A and B from their fixed state during formal encryption to their open state, awaiting the next session initialization.

[0073] This embodiment takes an optical fiber communication scenario as an example to describe the process of executing the encryption method described in this invention between optical transceiver A at the transmitting end and optical transceiver B at the receiving end.

[0074] In this example of a fiber optic channel data encryption system, the fiber type is two-mode fiber, supporting two transmission modes: LP01 and LP11. Optical transceivers A and B have hardware support for mode selection / conversion and feature a tunable laser (frequency adjustable range ±10GHz), a tunable optical filter, a built-in pseudo-random number generator, and hardware reset circuitry. The line rate is 10 Gbps (using PAM4 modulation, 100 bits per time slot); the time slot width ΔT is 1 ns.

[0075] Assume that optical transceiver A at the transmitting end wants to send a 1GB file to optical transceiver B at the receiving end. In step S1, optical transceivers A and B are initially in an open state, and the mode converter, tunable laser, etc., are not locked with any specific parameters. When mode pairing is triggered, the upper-layer application of optical transceiver A notifies the lower-layer driver to initiate a secure session. The optical signal emitted by the physical layer of optical transceiver A is a pulse sequence with a fixed wavelength (1550 nm) and a fixed mode (LP01), which is used as a mode pairing request. Optical transceiver B continuously listens, and after detecting the mode pairing request, both parties synchronously enter the mode pairing state.

[0076] The pseudo-random number generator of optical transceiver A generates random numbers with the following settings: selection mode LP11, frequency offset +3.2 GHz (i.e., νdef = 193.1 THz + 3.2 GHz = 193.1032 THz), and default key Kdef is a 128-bit AES key (0xA7F3...). Optical transceiver A sends this candidate parameter to optical transceiver B via an unencrypted raw optical signal. Optical transceiver B's pseudo-random number generator also generates its own candidate parameter. After interaction, both parties reach a consensus on the default encryption mode through a simple consensus protocol (e.g., using a smaller value): the default mode is LP11, the default frequency is 193.1032 THz, and the default key Kdef is a 128-bit AES key (0xA7F3...).

[0077] Optical transceivers A and B are each hardware-defined, configured so that the mode converter can only operate in the default mode LP11. The tunable laser and optical filter are locked to a default frequency of 193.1032 THz, and the AES-128 encryption / decryption engine is enabled, using the default key Kdef. Transceiver A sends a test frame 0x5A5A using the default encrypted channel. Transceiver B decrypts the frame and replies with 0xA5A5, indicating successful mode verification.

[0078] In step S2, both parties negotiate the formal encryption parameters on the default encrypted channel (LP11 mode, 193.1032 THz frequency, AES-128 encryption) established in S1. The negotiation protocol adopts ECDH (using P-256 curves). Optical transceiver A sends the encrypted public key Pub_A, and optical transceiver B replies with the encrypted public key Pub_B. Both parties calculate the shared secret and derive the encryption parameters for the formal session: the frequency hopping algorithm adopts Logistic chaotic mapping, with the formula x_{n+1} = r * x_n * (1 - x_n), and the state is maintained independently for each mode; the type and initial state of the mode switching sequence generator are negotiated to generate a pseudo-random sequence based on AES-CTR, with seed Seed_mode = 0x3F2A... (256 bits); the initial chaotic state: the initial value of LP01 mode is x0_LP01 = 0.301, the initial value of LP11 mode is x0_LP11 = 0.782, and the parameter r = 3.99. Center frequency ν0 = 193.1 THz, hopping range Δν = ±5 GHz, time slot width ΔT = 1 ns, modulation format is PAM4, FEC encoding is LDPC(7 / 8), official key seed Seed_data = 0x8C7D... (256 bits). All negotiation messages in step S2 are transmitted encrypted using the default key Kdef; after negotiation, both parties save these encryption parameters, but do not enable them for the time being.

[0079] In step S3, optical transceiver A parses the header of the 1 GB file to be sent, obtaining the data length Ldata = 8 × 10⁻⁶. 9 Bits, line rate R = 10 Gbps = 1 × 10 10 With bps of bandwidth and additional overhead (preamble, inter-frame gap, FEC, etc.) of approximately 5%, the session duration is calculated as: Tsession = 8 × 10^6 bps. 9 ×10 10 ×1.05≈0.084 seconds=84 milliseconds. Optical transceiver A encrypts the session duration Tsession = 84 ms and sends it to optical transceiver B through the default encrypted channel. Both parties set their session timeout timers to 10 ms (with margin).

[0080] In step S4, optical transceiver A sends a handover preparation command on the default encrypted channel and specifies the handover time slot boundary as the next whole microsecond (i.e., t0 + (1μs - t0 mod 1μs), where t0 is the current time); after receiving the command, optical transceiver B replies with confirmation.

[0081] Upon reaching the agreed-upon switching time slot boundary, optical transceivers A and B simultaneously perform the following operations: disable the default channel fixation (release LP11 mode, 193.1032 THz frequency, and AES-128 engine); load the formal encryption parameters (mode switching sequence generator, chaotic state machines for the two modes, switching range of the tunable laser, etc.); and start the time slot counter t = 0, 1, 2, ... . This marks the beginning of the formal encrypted transmission phase.

[0082] In step S5, approximately 84 × 10^6 time slots will actually run continuously, with each time slot transmitting 100 bits. The table below illustrates the mode selection algorithm results (output of the pseudo-random number generator), the selected mode and its corresponding chaotic state, transmission frequency, and formula for the first four time slots (t=0: LP01, t=1: LP11, …):

[0083] In each time slot, the modulator of optical transceiver A at the transmitting end modulates 100 bits of data (FEC encoded) into PAM4 symbols, drives the tunable laser to emit light pulses of the corresponding frequency, and at the same time the mode converter converts it into the corresponding spatial mode, and the light pulses are coupled into the optical fiber for transmission.

[0084] In step S6, the optical transceiver B at the receiving end has the exact same seed, chaotic parameters, and synchronization clock (IEEE1588v2, guaranteeing a clock error of < 0.1 ns). Before the start of each time slot, optical transceiver B independently calculates the mode sequence and frequency; the mode sequence (t=0: LP01, t=1: LP11, …) and frequency (194.605 THz, 197.01 THz, …) calculated by optical transceiver B are exactly the same as the mode sequence and frequency used by optical transceiver A in that time slot.

[0085] Optical transceiver B configures the mode decomposer in real time (filtering out the optical signal of the current mode) and tunes the local oscillator laser to the corresponding frequency for coherent detection. The demodulated signal is then decoded by FEC to recover the original data. Due to chromatic dispersion, optical transceiver B performs phase and timing error estimation every 1000 time slots using pilot symbols (with known fixed bits) to ensure synchronization accuracy. The measured bit error rate is below 1e-12.

[0086] In step S7, after optical transceiver A transmits 1 GB of data (approximately 84 × 10^6 time slots), it sends a dedicated session end frame after the last time slot (t = 83,999,999), encrypting it with the official encryption parameters before sending. Upon receiving the session end frame, optical transceiver B clears its temporary state and performs a hardware reset: deleting the seed_mode, the official key seed_data, the two chaotic states, the default key Kdef, the ECDH private key, and all other keys and parameters. Optical transceivers A and B send hardware reset signals to their respective mode converters, tunable lasers, and tunable optical filters, restoring them to an open state (these hardware components are no longer locked to any mode or frequency and the default encryption engine is disabled). Both parties report their status: recording that the session was successful, data was transmitted completely, and the total time was 8.43 ms (including switching overhead), with no anomalies. Afterwards, optical transceivers A and B can immediately respond to new mode pairing requests and begin the next independent secure session.

[0087] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for encrypting data in a fiber optic channel, characterized in that, The method is applied between an optical transceiver at the transmitting end and an optical transceiver at the receiving end connected via an optical fiber channel. The optical transceiver at the transmitting end and the optical transceiver at the receiving end enter a pairing state, negotiate to generate a default encryption mode unique to this session, and solidify the default encryption mode at the physical layer, establishing a default encryption channel between the two optical transceivers; the default encryption mode includes a default transmission mode, a default transmission frequency, a default encryption algorithm, and a default key. The optical transceivers at both ends encrypt messages on the default encryption channel using the default encryption algorithm and the default key to negotiate and determine the formal encryption parameters; the formal encryption parameters include the frequency hopping algorithm and the method for generating the mode switching sequence; The optical transceivers at both ends switch to the formal encrypted transmission mode; in each time slot, the optical transceiver at the transmitting end determines the transmission mode of the current time slot according to the mode switching sequence, calculates the transmission frequency of the optical pulse in the current time slot according to the frequency hopping algorithm, and generates the corresponding optical pulse based on the transmission mode and transmission frequency determined in the current time slot and couples it into the optical fiber channel. In each time slot, the optical transceiver at the receiving end uses the negotiated formal encryption parameters and synchronization clock to independently calculate the combination of transmission mode and transmission frequency for the current time slot, synchronize and de-bounce the received optical pulses, and recover the original data.

2. The fiber optic channel data encryption method as described in claim 1, characterized in that, Before entering the mode pairing state, both the optical transceiver at the transmitting end and the optical transceiver at the receiving end are in an open state, and the mode converter, tunable laser and tunable optical filter inside each optical transceiver are not locked for any combination of transmission mode and transmission frequency. When the session ends or an anomaly occurs, the optical transceivers at both ends clear all keys and algorithm parameters of the session and trigger a hardware reset of the mode converter, tunable laser and tunable optical filter, so that the optical transceivers at both ends return to the open state.

3. The fiber optic channel data encryption method as described in claim 1, characterized in that, The optical transceiver at the transmitting end emits an optical signal at the physical layer as a mode matching request. After the optical transceiver at the receiving end detects the optical signal of the mode matching request, both parties synchronously enter the mode matching state. The optical signal used for mode matching request is a pulse sequence with a fixed wavelength and a fixed pattern.

4. The fiber optic channel data encryption method as described in claim 1, characterized in that, In the mode-matching state, the optical transceiver at the transmitting end and the optical transceiver at the receiving end each generate random parameters about the transmission mode, transmission frequency and key and interact with optical signals to negotiate and generate the default encryption mode. In this process, each of the two optical transceivers uses its internal pseudo-random number generator to generate a set of random parameters as candidate parameters for its own end. They then negotiate their candidate parameters by exchanging unencrypted optical signals to determine the default encryption mode.

5. The fiber optic channel data encryption method as described in claim 1 or 2, characterized in that, The optical transceiver at the transmitting end and the optical transceiver at the receiving end solidify the default encryption mode at the physical layer, including configuring their respective mode converters, tunable lasers and tunable optical filters, so that only optical signals corresponding to the combination of the default transmission mode and the default transmission frequency can pass through, and enabling encryption / decryption logic using the default encryption algorithm and the default key.

6. The fiber optic channel data encryption method as described in claim 2, characterized in that, The optical transceiver at the transmitting end and the optical transceiver at the receiving end exchange test frames encrypted with the default encryption algorithm through the default encryption channel for verification. Once the verification is successful, the optical transceivers at both ends continue negotiating the formal encryption parameters; If the verification fails and the preset limit for the number of retries has not been reached, the optical transceivers at both ends will renegotiate the default encryption mode. If the number of retries reaches the preset limit and the verification still fails, the optical transceivers at both ends will clear all keys and algorithm parameters for this session, triggering a hardware reset and restoring the system to an open state.

7. The fiber optic channel data encryption method as described in claim 2, characterized in that, After completing the data transmission of the preset length, the optical transceiver at the transmitting end sends a session end frame encrypted with the formal encryption parameters after the last time slot. According to the session end frame, the optical transceivers at both ends clear all keys and algorithm parameters of this session, triggering a hardware reset and restoring to the open state.

8. The fiber optic channel data encryption method as described in claim 2, characterized in that, The optical transceiver at the transmitting end parses the header of the data packet to be transmitted, extracts the data length information from it to estimate the duration of the current session, and encrypts the estimated duration using the default encryption algorithm before sending it to the optical transceiver at the receiving end via the default encryption channel. The optical transceivers at both ends each set a session timeout timer based on the estimated duration for timeout protection. If a session timeout occurs during the actual encrypted transmission, the optical transceivers at both ends clear all keys and algorithm parameters of this session, triggering a hardware reset and restoring the system to an open state.

9. The fiber optic channel data encryption method as described in claim 1 or 2, characterized in that, The optical transceiver at the transmitting end sends a switching preparation command encrypted with the default key on the default encryption channel, indicating that the negotiated formal encryption parameters will be enabled at the beginning of the next time slot boundary; after receiving the command, the optical transceiver at the receiving end replies with an acknowledgment message encrypted with the default key through the default encryption channel. The optical transceivers at both ends simultaneously perform the following operations at the agreed time slot boundaries: Hardware-based shutdown of the default encryption channel; The respective mode converters, tunable lasers, and tunable optical filters are reconfigured according to the formal encryption parameters negotiated. Initiate the formal "mode-frequency" joint switching logic so that the optical transceivers at both ends synchronously switch a combination of transmission mode and transmission frequency for data transmission and reception in each time slot during the formal encrypted transmission process.

10. The fiber optic channel data encryption method as described in claim 2, characterized in that, In the formal encryption parameters, the frequency jump algorithm includes a chaotic mapping type and initial chaotic parameters; the mode switching sequence generation method includes the type and initial state of the mode switching sequence generator. The formal encryption parameters also include an initial seed key, time slot width, frequency hopping range, center frequency, mode set, modulation format, and forward error correction coding; the mode set includes several supported transmission modes.

11. The fiber optic channel data encryption method as described in claim 10, characterized in that, During the formal encrypted transmission, the optical transceiver at the transmitting end performs the following operations in each time slot t, according to the formal encryption parameters agreed upon through negotiation: The mode number i(t) of the current time slot is calculated by the mode switching sequence generator, and the corresponding mode Mi(t) is obtained. Calculate the transmission frequency ν(t) of the optical pulse in the current time slot using the frequency hopping algorithm: ν(t) = ν0 + Δν·h(Mi(t), t, Seed) Where h is the chaotic mapping function with mode Mi(t) as independent variable, Seed is the initial seed key, Δν is the frequency jump range, ν0 is the center frequency, and t is the sequence number of the current time slot; The hardware parameters of the optical transceiver at the transmitting end are configured in real time, so that the modulator loads the current data bits for modulation, the tunable laser emits an optical pulse with a frequency of ν(t), which is converted to mode Mi(t) by the mode converter, and the optical pulse is coupled into the optical fiber channel for transmission.

12. The fiber optic channel data encryption method as described in claim 1 or 2, characterized in that, During each time slot of the formal encrypted transmission process, the optical transceiver at the receiving end calculates the combination of transmission mode and transmission frequency, and uses it to configure the local mode decomposer and tunable local oscillator in real time to perform coherent detection or direct detection. It also uses pilot signals to compensate for phase error and timing error in order to recover the original data.

13. A fiber optic channel data encryption system, applied to the fiber optic channel data encryption method according to any one of claims 1 to 12, characterized in that, The system includes an optical transceiver at the transmitting end and an optical transceiver at the receiving end connected via an optical fiber channel. The optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to: negotiate and generate a default encryption mode uniquely corresponding to this session in the mode-pairing state, and solidify the default encryption mode at the physical layer, and establish a default encryption channel between the optical transceivers at both ends; the default encryption mode includes a default transmission mode, a default transmission frequency, a default encryption algorithm and a default key. The optical transceiver at the transmitting end and the optical transceiver at the receiving end encrypt the message on the default encryption channel using the default encryption algorithm and the default key to negotiate and determine the formal encryption parameters; the formal encryption parameters include the frequency hopping algorithm and the method for generating the mode switching sequence; During each time slot of the formal encrypted transmission process, the optical transceiver at the transmitting end determines the transmission mode of the current time slot according to the mode switching sequence, calculates the transmission frequency of the optical pulse in the current time slot according to the frequency hopping algorithm, generates corresponding optical pulses for the original data to be transmitted in the current time slot according to the transmission mode and transmission frequency determined in the current time slot, and couples them into the optical fiber channel; the optical transceiver at the receiving end uses the formal encryption parameters and synchronization clock determined through negotiation to independently calculate the combination of transmission mode and transmission frequency in the current time slot, performs synchronous de-hopping on the received optical pulses, and recovers the original data.

14. The fiber optic channel data encryption system as described in claim 13, characterized in that, The optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to: in the mode-matching state, each generate random parameters about the transmission mode, transmission frequency and key and perform optical signal interaction to negotiate and generate the default encryption mode. Both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a pseudo-random number generator; the pseudo-random number generator is used to generate the random parameters.

15. The fiber optic channel data encryption system as described in claim 13, characterized in that, Both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a mode converter, a tunable laser, a tunable optical filter, and a hardware reset circuit. Before entering the mode pairing state, both the optical transceiver at the transmitting end and the optical transceiver at the receiving end are in an open state, and their respective mode converters, tunable lasers and tunable optical filters are not locked to any combination of transmission mode and transmission frequency. When the default encryption mode is fixed at the physical layer, the mode converter, tunable laser, and tunable optical filter are configured to allow only optical signals corresponding to the combination of the default transmission mode and the default transmission frequency to pass through; and the optical transceivers at both ends are configured to perform encryption / decryption logic using the default encryption algorithm and the default key.

16. The fiber optic channel data encryption system as described in claim 15, characterized in that, The optical transceiver at the transmitting end and the optical transceiver at the receiving end are configured to clear all keys and algorithm parameters of the current session when the session ends or an abnormality occurs. Both the optical transceiver at the transmitting end and the optical transceiver at the receiving end include a hardware reset circuit. The hardware reset circuit is used to send a reset signal to the local mode converter, tunable laser, and tunable optical filter when the session ends or an abnormality occurs, so that the optical transceiver is restored to the open state.

17. The fiber optic channel data encryption system as described in claim 15, characterized in that, At least the optical transceiver at the receiving end includes a mode resolver and a tunable local oscillator laser; When the optical transceiver at the receiving end calculates the combination of transmission mode and transmission frequency for the current time slot, the mode decomposer and the tunable local oscillator laser are configured in real time according to the transmission mode and transmission frequency in the combination, so as to synchronously debounce the received optical pulses to recover the original data.