Method for implementing PCIE optical fiber communication adapter card and optical fiber communication adapter card
The PCIE optical fiber communication adapter card is implemented in the optical fiber communication card through the FPGA chip, which solves the problem of insufficient security and flexibility of the existing optical fiber communication card. It improves the communication speed and security through encryption and programmable logic, and is suitable for data security. Sensitive industry.
Patent Information
- Application Number
- CN202010258653.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-03
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-04-03
AI Technical Summary
The underlying protocols of existing optical fiber communication cards cannot be adjusted and have low security, which increases the risk of information theft. The communication speed and flexibility are insufficient, making it difficult to adapt to the needs of different application scenarios.
The FPGA chip is used to implement the PCIE optical fiber communication adapter card, which is connected to the computer system through PCIE Improved security.
It improves the security and flexibility of optical fiber communication cards and can adapt to different application scenarios, especially in industries that are sensitive to data security, providing higher communication security and flexibility.
Smart Images

Figure CN111475444B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for implementing a PCIE optical fiber communication adapter card and a PCIE optical fiber communication adapter card. Background Art
[0002] Optical fiber communication is widely used in power communication, optoelectronic media, intelligent transportation, industrial automation, national defense information construction and other fields, and has become a key technology that affects everyone's life. In the power system, optical fiber is laid along with high-voltage lines to achieve high-speed information transmission and provide us with an intelligent power supply network. The optoelectronic media industry mainly outputs sound and images. In order to ensure the quality of sound and images, the stability and bandwidth of transmission are particularly important. Some media units have built complete equipment based on optical fiber communication technology; in the military field, optical fiber communication can not only transmit a large amount of information, but also has strong anti-interference, and occupies an irreplaceable position in ground communication, air communication, strategic communication and other aspects. The optical fiber card is the basic component of optical fiber communication.
[0003] Existing fiber optic communication cards are basically supplied by international giants such as INTELBRODCOM, Cisco, and Huawei. Domestic suppliers also basically use these chips for OEM. The interfaces and protocols tend to be standardized, with poor controllability, and it is basically impossible to adjust the underlying protocols. The security is low. Standardization brings the benefits of compatibility, but it also gives criminals the opportunity to steal information. Summary of the invention
[0004] In view of the defects in the prior art, the present invention provides a method for implementing a PCIE optical fiber communication adapter card and a PCIE optical fiber communication adapter card.
[0005] In a first aspect, the present invention provides a method for implementing a PCIE optical fiber communication adapter card, which is applied to an FPGA chip, wherein the FPGA chip is connected to a computer system via a PCIE X8, comprising:
[0006] Obtaining a PCIE data stream sent by the computer system;
[0007] Perform PCIE protocol analysis on the PCIE data stream to determine the data to be processed, and determine the forwarding light port of each of the data to be processed through routing judgment;
[0008] encrypting the data to be processed;
[0009] According to the optical port protocol, the encrypted data to be processed is converted into optical port data, and the optical port data is forwarded to the corresponding forwarding optical port.
[0010] As in the above method, optionally, after obtaining the PCIE data stream sent by the computer system, the method further includes:
[0011] Sending the PCIE data stream to a downlink buffer queue;
[0012] Accordingly, performing PCIE protocol parsing on the PCIE data stream to determine the data to be processed includes:
[0013] According to a preset cycle, PCIE data is taken out from the downlink buffer queue, optical port protocol conversion is performed on the PCIE data, and data to be processed is determined.
[0014] As the above method, optionally, it also includes:
[0015] The optical port data sent from each receiving optical port is sent to an uplink buffer data queue. When the uplink buffer data queue is not empty, an interrupt signal is sent to the computer system to notify the computer system that there is received data to be processed.
[0016] As in the above method, optionally, when the uplink buffer data queue is not empty, sending an interrupt signal to the computer system includes:
[0017] The uplink buffer data queue is set to FIFO mode, and when the optical port data in the uplink buffer data queue meets a preset condition, an interrupt signal is sent to the computer system.
[0018] As the above method, optionally, it also includes:
[0019] According to the data characteristics of each receiving optical port, the FIFO size and the corresponding preset condition corresponding to each receiving optical port are determined.
[0020] As in the above method, optionally, encrypting the data to be processed includes:
[0021] A set of random codes is selected to perform an XOR operation on the data to be processed, and a CRC is generated.
[0022] As in the above method, optionally, encrypting the data to be processed includes:
[0023] The data to be processed is encrypted using the DES encryption method.
[0024] As in the above method, optionally, the encrypting the data to be processed by using the DES encryption method includes:
[0025] For the data to be processed m, all bits in m are rearranged by a fixed initial permutation IP to construct a 64-bit bit string m0;
[0026] Split the 64-bit bit string m0 into the form m0=IP(m0)=L0R0, where L0 consists of the last 32 bits of m0;
[0027] Calculate 16 iterative transformations, where the i-th iterative operation uses the result of the i-1-th iteration and the subkey Ki as input. Each iterative operation only transforms the right half of the data Ri-1, and obtains LiRi as the input of the next iteration according to the round function f;
[0028] The subkey Ki of each round of operation is obtained by dividing the 56-bit user key into two parts, each of which is shifted according to the cyclic shift number table and permuted according to the permutation selection table;
[0029] The processing of the round function f includes: first performing E substitution on Ri-1, then performing XOR with the subkey Ki of this round, and finally performing S box substitution and P substitution;
[0030] The results of the 16 iterative transformations are processed using the inverse permutation IP-1 of the IP permutation, and the final output is used as the encrypted data to be processed.
[0031] As in the above method, optionally, sending the optical port data sent by each receiving optical port to the uplink buffer data queue includes:
[0032] The optical port data sent from each receiving optical port is decrypted according to a preset decryption method and then sent to the uplink buffer data queue.
[0033] In a second aspect, the present invention provides a PCIE optical fiber communication adapter card, comprising:
[0034] Connectors, DCDC power supplies, FPGA modules and at least one QSFP interface cage;
[0035] The connector is used to obtain power and connect the FPGA module to the computer system via PCIE X8;
[0036] The FPGA module includes an FPGA chip and firmware, the FPGA chip is connected to the at least one QSFP interface cage and the firmware, the firmware stores an FPGA program, and when the FPGA program is burned into the FPGA chip, the FPGA chip executes any of the above methods;
[0037] The DC-DC power supply is connected to the connector and the FPGA module for power supply.
[0038] The method for realizing a PCIE optical fiber communication adapter card and the PCIE optical fiber communication adapter card provided by the present invention realize the adapter card from PCIE to optical fiber communication based on an FPGA field programmable logic gate array, and encrypts through field programmable logic, so that it has both the characteristics of hard encryption and the characteristics of easy upgrade of soft encryption, and the communication rate is controllable, and the underlying protocol is controllable and encryptable, thereby improving the security and flexibility of the PCIE adapter card, adapting to different application scenarios, and being particularly suitable for industries sensitive to data security. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 A schematic diagram of the structure of a PCIE optical fiber communication adapter card provided in an embodiment of the present invention;
[0041] Figure 2 A schematic diagram of an FPGA module in a PCIE optical fiber communication adapter card provided in an embodiment of the present invention;
[0042] Figure 3 A schematic flow chart of a method for implementing a PCIE optical fiber communication adapter card provided by an embodiment of the present invention;
[0043] Figure 4 A schematic diagram of the DES encryption process provided by an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of one iteration in the DES encryption process provided by an embodiment of the present invention
[0045] Figure 6 A schematic diagram of the DES encryption process in an FPGA module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Figure 1A schematic diagram of the structure of a PCIE optical fiber communication adapter card provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the PCIE optical fiber communication adapter card includes: a connector, a DCDC power supply, an FPGA module and at least one QSFP interface cage;
[0048] The connector is used to take power and connect the FPGA module to the computer system through PCIE X83.0; the connector is responsible for taking power,
[0049] The FPGA module includes an FPGA chip and firmware. The FPGA chip is connected to at least one QSFP interface cage and firmware. The firmware stores the FPGA program. After power-on, the FPGA automatically loads the program to complete the PCIE interface and protocol control, as well as the optical port interface and protocol control. The data sent by the computer system to the corresponding optical port through PCIE is routed and then converted to the protocol, and then forwarded to the corresponding optical port. The DC-DC power supply is connected to the connector and the FPGA module for power supply. Among them, the FPGA chip model can be V7XC690T.
[0050] Figure 2 A schematic diagram of an FPGA module in a PCIE optical fiber communication adapter card provided in an embodiment of the present invention is shown in FIG. Figure 2 As shown, the FPAG module includes: a PCIE interface control submodule, a FIFO status monitoring management submodule, an uplink buffer queue, a downlink buffer queue, an encryption submodule, a decryption submodule and a GTH interface serial-to-parallel conversion submodule (GTHsedes).
[0051] The PCIE interface control submodule is connected to the connector, completes the communication control between the PCIE interface and the computer system, implements the PCIE protocol, parses the received data and sends it to the uplink buffer queue. The uplink buffer queue can be configured in FIFO mode. When sending data, the data stream is sent to the downlink buffer queue. The downlink buffer queue can also be configured in FIFO mode. The sending module then takes the data out of the queue and processes it before sending it to each optical port. When receiving data, the data coming in from the optical port enters the uplink buffer queue after a series of processing. When the queue is not empty, the PCIE interface control submodule will send an interrupt signal to the computer through the PCIE interface to notify the computer that there is received data to be processed.
[0052] The frequent interruption problem needs to be optimized for large amounts of data. When the data packets on the optical port are small and frequent, the system will generate many interruptions. The system will spend too much time to handle the interruptions, and the processing efficiency is low. Therefore, the interruption can be made configurable. It can be configured to generate an interrupt when the FIFO is almost full. Under normal circumstances, the system will query to see if there is data to be read. This greatly improves the CPU utilization. The CPU does not need to constantly handle interrupts, but checks at intervals whether the fiber card has received data to be processed. If there is, DMA to the memory for post-processing. If not, exit directly. The FIFO status monitoring management submodule configures and detects the FIFO. The interruption can be configured to 10 levels for different application scenarios. For example, some optical ports may apply some relatively small data volumes and have certain requirements for real-time scenarios, while other optical ports require large data volumes, but have relatively less strict requirements for delay. At this time, a reasonable processing level can be achieved by configuring different interrupt levels. On the other hand, the FIFO size can also be configured, and it can be adjusted according to the actual scenario when applied, which greatly increases the flexibility and adaptability to different scenarios. For data encryption, there are independent encryption submodules and decryption submodules in the FPGA module to encrypt and decrypt data. They are customizable and replaceable, and have the flexibility and security of programmable logic. In addition, the GTH interface serial-to-parallel conversion submodule converts parallel data into serial data when sending data, and converts serial data into parallel data when receiving data, thereby speeding up processing efficiency.
[0053] The following is a detailed description of the processing process of the FPGA module. Figure 3 A schematic diagram of a method for implementing a PCIE optical fiber communication adapter card according to an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method includes:
[0054] Step S31, obtaining the PCIE data stream sent by the computer system;
[0055] Specifically, the PCIE data stream sent by the computer system is obtained through the connector and the PCIE interface control submodule. After obtaining the PCIE data stream sent by the computer system, the PCIE data stream is sent to the downlink buffer queue. The downlink buffer queue can be set to FIFO mode. The specific FIFO size and the trigger condition for retrieving data are determined according to the data characteristics of each optical port.
[0056] Step S32, performing PCIE protocol analysis on the PCIE data stream to determine the data to be processed, and determining the forwarding light port of each of the data to be processed through routing judgment;
[0057] Specifically, according to a preset cycle, for example, processing once at a certain interval, PCIE data is taken out from the downlink buffer queue, optical port protocol conversion is performed on the PCIE data, and data to be processed is determined.
[0058] Step S33, encrypting the data to be processed;
[0059] Specifically, a simple encryption algorithm may be used, for example, a set of random codes may be selected to perform an XOR operation on the data to be processed, and a CRC may be generated. The data to be processed may also be encrypted using the DES encryption method. The DES encryption algorithm converts a 64-bit plaintext input block into a 64-bit ciphertext output block, and its key is 64 bits, of which 8 bits are parity bits.
[0060] Figure 4 A schematic diagram of the DES encryption process provided by an embodiment of the present invention; Figure 5 A schematic diagram of one iteration in the DES encryption process provided by an embodiment of the present invention is shown in FIG. Figure 4-Figure 5 As shown, the DES encryption process includes:
[0061] For the data to be processed m, all bits in m are rearranged by a fixed initial permutation IP to construct a 64-bit bit string m0;
[0062] Split the 64-bit bit string m0 into the form m0=IP(m0)=L0R0, where L0 consists of the last 32 bits of m0;
[0063] Calculate 16 iterations of transformations, each with the same structure, where the i-th iteration is based on the result of the i-1 iteration and the subkey Ki as input, and each iteration transforms only the right half of the data Ri-1, and obtains LiRi as the input of the next iteration according to the round function f, representing the XOR of the two bit strings (bitwise modulo 2 addition);
[0064] The subkey Ki of each round of operation is obtained by dividing the 56-bit user key into two parts, each of which is shifted according to the cyclic shift number table and permuted according to the permutation selection table;
[0065] The processing of the round function f includes: first performing E substitution on Ri-1, then performing XOR with the subkey Ki of this round, and finally performing S box substitution and P substitution;
[0066] The results of the 16 iterative transformations are processed using the inverse permutation IP-1 of the IP permutation, and the final output is used as the encrypted data to be processed.
[0067] Figure 6 A schematic diagram of the DES encryption process in an FPGA module provided by an embodiment of the present invention is shown in FIG. Figure 6As shown in the figure, the DES encryption algorithm generates secret messages based on multiple rounds of key transformation round functions and key plus data calculation round functions, that is, through 16 hardware copies of the round function, deep and detailed pipeline processing can be achieved to achieve performance optimization. The iterative characteristics of the DES algorithm make it suitable for pipeline structure design, which can realize the encryption of 16 data blocks at the same time, thereby improving encryption efficiency.
[0068] Step S34: according to the optical port protocol, convert the encrypted data to be processed into optical port data, and forward the optical port data to the corresponding forwarding optical port.
[0069] Furthermore, the method also includes: sending the optical port data sent by each receiving optical port to an uplink buffer data queue, and when the uplink buffer data queue is not empty, sending an interrupt signal to the computer system to notify the computer system that there is received data to be processed.
[0070] Specifically, the uplink buffer data queue is set to FIFO mode, and when the optical port data in the uplink buffer data queue meets the preset condition, an interrupt signal is sent to the computer system. The FIFO size and the corresponding preset condition corresponding to each receiving optical port are determined according to the data characteristics of each receiving optical port.
[0071] Furthermore, sending the optical port data sent from each receiving optical port to the uplink buffer data queue includes: decrypting the optical port data sent from each receiving optical port according to a preset decryption method and sending the decrypted data to the uplink buffer data queue.
[0072] The method for realizing a PCIE optical fiber communication adapter card and the PCIE optical fiber communication adapter card provided in the embodiments of the present invention realize the adapter card from PCIE to optical fiber communication based on an FPGA field programmable logic gate array, and encrypts through field programmable logic. It has the characteristics of hard encryption and easy upgrade of soft encryption. The communication rate is controllable, and the underlying protocol is controllable and encryptable, which improves the security and flexibility of the PCIE adapter card, can adapt to different application scenarios, and is particularly suitable for industries sensitive to data security.
[0073] The above-described embodiments of the apparatus and the like are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for implementing a PCIE optical fiber communication adapter card, applied to an FPGA chip, wherein the FPGA chip is connected to a computer system via PCIE X8, characterized in that: include: Obtaining a PCIE data stream sent by the computer system; Perform PCIE protocol analysis on the PCIE data stream to determine the data to be processed, and determine the forwarding light port of each of the data to be processed through routing judgment; encrypting the data to be processed; According to the optical port protocol, the encrypted data to be processed is converted into optical port data, and the optical port data is forwarded to the corresponding forwarding optical port; Sending the optical port data sent by each receiving optical port to an uplink buffer data queue, and when the uplink buffer data queue is not empty, sending an interrupt signal to the computer system to notify the computer system that there is received data to be processed; Wherein, when the uplink buffer data queue is not empty, sending an interrupt signal to the computer system comprises: setting the uplink buffer data queue to FIFO mode, and sending an interrupt signal to the computer system when the optical port data in the uplink buffer data queue meets a preset condition; The encrypting of the data to be processed includes: selecting a group of random codes to perform an XOR operation on the data to be processed to generate a CRC.
2. The method according to claim 1, characterized in that After obtaining the PCIE data stream sent by the computer system, the method further includes: Sending the PCIE data stream to a downlink buffer queue; Accordingly, performing PCIE protocol parsing on the PCIE data stream to determine the data to be processed includes: According to a preset cycle, PCIE data is taken out from the downlink buffer queue, optical port protocol conversion is performed on the PCIE data, and data to be processed is determined.
3. The method according to any one of claims 1-2, characterized in that: The encrypting the data to be processed includes: A set of random codes is selected to perform an XOR operation on the data to be processed to generate a CRC.
4. The method according to any one of claims 1-2, characterized in that: The encrypting the data to be processed includes: The data to be processed is encrypted using the DES encryption method.
5. The method according to claim 4, characterized in that The method of encrypting the data to be processed by using the DES encryption method includes: For the data to be processed m, all bits in m are rearranged by a fixed initial permutation IP to construct a 64-bit bit string m0; Split the 64-bit bit string m0 into the form m0=IP(m0)=L0R0, where L0 consists of the last 32 bits of m0; Calculate 16 iterative transformations, where the i-th iterative operation uses the result of the i-1-th iteration and the subkey Ki as input. Each iterative operation only transforms the right half of the data Ri-1, and obtains LiRi as the input of the next iteration according to the round function f; The subkey Ki of each round of operation is obtained by dividing the 56-bit user key into two parts, each of which is shifted according to the cyclic shift number table and permuted according to the permutation selection table; The processing of the round function f includes: first performing E substitution on Ri-1, then performing XOR with the subkey Ki of this round, and finally performing S box substitution and P substitution; The results of the 16 iterative transformations are processed using the inverse permutation IP-1 of the IP permutation, and the final output is used as the encrypted data to be processed.
6. The method according to claim 1, characterized in that The step of sending the optical port data sent from each receiving optical port to the uplink buffer data queue includes: The optical port data sent from each receiving optical port is decrypted according to a preset decryption method and then sent to the uplink buffer data queue.
7. A PCIE optical fiber communication adapter card, characterized in that: include: Connectors, DCDC power supplies, FPGA modules and at least one QSFP interface cage; The connector is used to obtain power and connect the FPGA module to the computer system via PCIE X8; The FPGA module includes an FPGA chip and firmware, the FPGA chip is connected to the at least one QSFP interface cage and the firmware, an FPGA program is stored in the firmware, and when the FPGA program is burned into the FPGA chip, the FPGA chip executes the method according to any one of claims 1 to 6; The DCDC power supply is connected to the connector and the FPGA module for power supply.
Citation Information
Patent Citations
Fiber switching protection system suitable for fiber switching protection device
CN105591688A
Optical fiber channel protocol general simulation testing card and data interaction method thereof
CN106612141A
Digital information safety processing system
CN201733394U
PCIE optical fiber communication riser card
CN211479114U
Method and apparatus for maintaining data integrity for block-encryption algorithms
US20100067687A1
