WO2022116643A1 - 数据传输方法、通信装置及通信系统 - Google Patents
数据传输方法、通信装置及通信系统 Download PDFInfo
- Publication number
- WO2022116643A1 WO2022116643A1 PCT/CN2021/118784 CN2021118784W WO2022116643A1 WO 2022116643 A1 WO2022116643 A1 WO 2022116643A1 CN 2021118784 W CN2021118784 W CN 2021118784W WO 2022116643 A1 WO2022116643 A1 WO 2022116643A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ciphertext data
- data stream
- encryption parameter
- encryption
- ciphertext
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/12—Applying verification of the received information
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/16—Implementing security features at a particular protocol layer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/12—Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
- H04L9/16—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms the keys or algorithms being changed during operation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
- H04L9/3236—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
- H04L9/3242—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/16—Implementing security features at a particular protocol layer
- H04L63/162—Implementing security features at a particular protocol layer at the data link layer
Definitions
- the present application relates to the field of communication technologies, and in particular, to a data transmission method, a communication device, and a communication system.
- the encryption technology based on the medium access control security (MACSEC) protocol is a commonly used security encryption technology in the data network.
- the encryption technology is based on the open system interconnection reference model (open system interconnection reference model). , OSI) data link layer, is a standardized two-layer encryption technology.
- OSI open system interconnection reference model
- OSI data link layer
- this encryption technology is widely used in network equipment in government, military, financial and other occasions that require high data confidentiality.
- the encryption technology based on MACSEC protocol can be used Ensure the security of data in the intermediate transmission device.
- the implementation level of the encryption technology based on the MACSEC protocol is above the MAC layer, and the object of encryption and decryption is each user frame.
- the method of encrypting each user frame by using the encryption technology based on the MACSEC protocol at the MAC layer needs to carry encryption parameters in each user frame, resulting in less user data that can be sent in each user frame, occupying user service bandwidth, and the cost is relatively high. big.
- the encryption technology based on the MACSEC protocol does not encrypt the source MAC address and the destination MAC address, which has potential security risks.
- the present application provides a data transmission method, a communication device, and a communication system, which are used to improve user data transmission rate and improve security.
- an embodiment of the present application provides a data transmission method, including: generating N ciphertext data streams, where the first ciphertext data stream is any ciphertext data stream in the N ciphertext data streams, so
- the first ciphertext data stream includes at least two first alignment marks AM, at least two encryption parameter sets, and at least two ciphertext data segments; wherein, one ciphertext is included between every two of the first AMs A data segment and a set of the encryption parameters; the at least two first AMs are used for data alignment of the N channels of ciphertext data streams, where N is a positive integer; and the N channels of ciphertext data streams are sent.
- the encryption parameters and ciphertext data are sent through N data streams.
- the method can be applied to the physical layer of an optical module or a network device, so that the transmitted encryption parameters do not occupy the user service bandwidth, thereby increasing the data transmission volume and thus the data transmission rate.
- the scheme encrypts the bit stream of the physical layer, all bits (including source MAC address and destination MAC address) in a user frame will be encrypted, so that address information will not be exposed, which can improve security.
- the encryption parameter set includes one or more of the following:
- Encryption type the encryption type is used to identify whether to encrypt
- the key identifier indicates the encryption key used by the first ciphertext data segment
- An initialization vector identifier where the initialization vector identifier indicates an initialization vector used by the second ciphertext data segment.
- the two first AMs adjacent to the second ciphertext data segment and the two first AMs adjacent to the initialization vector identifier are respectively the same.
- the encryption parameter set further includes an integrity check value
- the integrity check value is used for encryption between the two first AMs before the integrity check value. Integrity check of the text data segment.
- the generating N paths of ciphertext data streams includes: acquiring N paths of plaintext data streams, the first plaintext data stream is any one of the N paths of plaintext data streams, and the The first plaintext data stream includes at least two second AMs and at least two plaintext data segments, and the at least two second AMs are used for data alignment of the N plaintext data streams; One of the plaintext data segments is included between the AMs, and one of the second AMs is included between every two of the plaintext data segments; according to the first plaintext data stream and the at least two encryption parameter sets, the The first ciphertext data stream.
- the first plaintext data segment is any one of the at least two plaintext data segments
- the third ciphertext data segment is the first plaintext data segment using the at least two encryption parameter sets a ciphertext data segment obtained by encrypting the first plaintext data segment with an encryption parameter set; generating the first ciphertext data stream according to the first plaintext data stream and the at least two encryption parameter sets, comprising: encrypting the first plaintext data segment according to the first encryption parameter set to obtain the third ciphertext data segment; and inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream.
- the inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream includes: inserting into the first plaintext data stream the first encryption parameter set to obtain a second ciphertext data stream; perform forward error correction coding on the second ciphertext data stream, or perform scrambling and forward error correction coding to obtain the first ciphertext data flow.
- the inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream includes: inserting N channels of the first plaintext data stream Insert the first encryption parameter set into N, respectively, to obtain N third ciphertext data streams; according to the set ratio, convert the N third ciphertext data streams into at least one serial ciphertext data stream;
- the at least one serial ciphertext data stream is subjected to forward error correction encoding, or scrambling and forward error correction encoding are performed to obtain at least one encoded serial ciphertext data stream;
- the line ciphertext data stream is converted into N channels of the first ciphertext data stream.
- the acquiring N channels of plaintext data streams includes: receiving M channels of physical channel signals; where M is a positive integer; and converting the M channels of physical channel signals into all physical channel signals according to a set ratio
- M is a positive integer
- the inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream includes: inserting into the first plaintext data stream The first encryption parameter set and padding information are used to obtain the first ciphertext data stream.
- the padding information is the padding information encrypted by the first encryption parameter set.
- an embodiment of the present application provides a data transmission method, including: acquiring N ciphertext data streams, where the first ciphertext data stream is any ciphertext data stream in the N ciphertext data streams, and the The first ciphertext data stream includes at least two first alignment marks AM, at least two encryption parameter sets, and at least two ciphertext data segments; wherein, one ciphertext is included between every two of the first AMs data segment and one of the encryption parameter sets; the at least two first AMs are used for data alignment of the N-channel ciphertext data streams, and N is a positive integer; according to the at least two encryption parameter sets A ciphertext data stream is decrypted to obtain a first plaintext data stream, where the first plaintext data stream is any one of the N plaintext data streams.
- the scheme encrypts the bit stream of the physical layer, all bits (including source MAC address and destination MAC address) in a user frame will be encrypted, so that address information will not be exposed, which
- the encryption parameters and ciphertext data are sent through N data streams.
- the method can be applied to the physical layer of an optical module or a network device, so that the transmitted encryption parameters do not occupy the user service bandwidth, thereby increasing the data transmission volume and thus the data transmission rate.
- the encryption parameter set includes one or more of the following:
- Encryption type the encryption type is used to identify whether to encrypt
- the key identifier indicates the encryption key used by the first ciphertext data segment
- An initialization vector identifier where the initialization vector identifier indicates an initialization vector used by the second ciphertext data segment.
- the two first AMs adjacent to the second ciphertext data segment and the two first AMs adjacent to the initialization vector identifier are respectively the same.
- the encryption parameter set further includes an integrity check value
- the integrity check value is used for encryption between the two first AMs before the integrity check value. Integrity check of the text data segment.
- the first plaintext data stream includes at least two second AMs and at least two plaintext data segments, and each two second AMs includes one plaintext data segment, and every two second AMs includes one plaintext data segment.
- One of the second AMs is included between the plaintext data segments, and the at least two second AMs are used for data alignment of the N plaintext data streams.
- the first plaintext data segment is any one of the at least two plaintext data segments
- the third ciphertext data segment is the first plaintext data segment using the at least two encryption parameter sets a ciphertext data segment after the encryption parameter set encrypts the first plaintext data segment
- the first ciphertext data stream is decrypted according to the at least two encryption parameter sets to obtain a first plaintext data stream, comprising: decrypting the third ciphertext data segment according to the first encryption parameter set to obtain the first plaintext data segment; and removing the first encryption parameter from the first plaintext data stream collection to obtain the first plaintext data stream.
- the decrypting the third ciphertext data segment according to the first encryption parameter set to obtain the first plaintext data segment includes: decrypting the first ciphertext data stream Perform forward error correction decoding, or perform descrambling and forward error correction decoding, to obtain a second ciphertext data stream; The data segment is decrypted to obtain the first plaintext data segment.
- the decrypting the third ciphertext data segment according to the first encryption parameter set to obtain the first plaintext data segment includes: according to a set ratio, converting N The first ciphertext data stream is converted into at least one serial ciphertext data stream; forward error correction decoding is performed on the at least one serial ciphertext data stream, or descrambling and forward error correction decoding are performed to obtain at least one serial ciphertext data stream.
- the third ciphertext data segment of the third ciphertext data stream is decrypted to obtain N first plaintext data segments.
- the removing the first encryption parameter set from the first plaintext data stream to obtain the first plaintext data stream includes: removing the first plaintext data stream in the first plaintext data stream The first plaintext data stream is obtained by dividing the first encryption parameter set and padding information.
- the padding information is the padding information encrypted by the first encryption parameter set.
- the number of bits of the padding information between the two adjacent first AMs is based on the number of bits spaced between two adjacent first AMs and the adjacent The number of bits of the encryption parameter set between the two first AMs is determined.
- (Y+a+P) mod Q 0, where Y is the number of bits separated by two adjacent first AMs, and a is the number of bits separated by the two adjacent first AMs.
- Y is the number of bits separated by two adjacent first AMs
- a is the number of bits separated by the two adjacent first AMs.
- P is the number of bits of the padding information between the two adjacent first AMs
- Q is the number of bits included in a forward error correction codeword
- mod mod is the modulo operation.
- P is the minimum value that satisfies the formula.
- any of the above methods is applied to the optical module.
- an embodiment of the present application provides a communication device, including a processor and a memory; the memory is used to store computer-executed instructions, and when the device is running, the processor executes the computer-executed instructions stored in the memory, so as to make The apparatus performs each implementation method of the first aspect or the second aspect above.
- an embodiment of the present application provides a communication apparatus, including units or means for performing each step of each implementation method of the first aspect or the second aspect.
- an embodiment of the present application provides a communication device, including a processor and an interface circuit, where the processor is configured to communicate with other devices through the interface circuit, and execute each implementation method of the first aspect or the second aspect.
- the number of the processors is one or more.
- an embodiment of the present application provides a communication device, including a processor, which is connected to a memory and used to call a program stored in the memory to execute each implementation method of the first aspect or the second aspect.
- the memory may be located within the device or external to the device.
- the number of the processors is one or more.
- embodiments of the present application further provide a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium runs on a computer, each of the above-mentioned first aspect or the second aspect is implemented method is executed.
- an embodiment of the present application further provides a computer program product, the computer product includes a computer program, and when the computer program runs, each implementation method of the first aspect or the second aspect is executed.
- an embodiment of the present application further provides a chip system, including: a processor configured to execute each implementation method of the first aspect or the second aspect.
- an embodiment of the present application further provides a communication system, including: a communication device for executing the implementation methods of the first aspect, and a communication device for executing the implementation methods of the second aspect.
- FIG. 1 is a schematic diagram of the Ethernet data link layer and physical layer architecture
- FIG. 2 is a schematic diagram of the working principle of BitMux
- Figure 3 is a schematic diagram of the relationship between logical channels, physical channels, AM distribution and BitMux;
- Figure 4 is a schematic diagram of the AM format of 200G/400G
- Figure 5 is a schematic diagram of the AM format of each logical channel of 400G;
- FIG. 6 is a schematic diagram of an encryption process at a sender
- Figure 7 is a schematic diagram of a physical chip externally supporting the MACSEC function on a single board
- FIG. 8 is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- Fig. 9 is a schematic diagram of N-way ciphertext data stream
- FIG. 11 is a schematic diagram of a deployment position when the solution according to the embodiment of the application is deployed on an optical module;
- FIG. 12 is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- FIG. 13A is a schematic structural diagram of an optical module implementing an encryption function
- 13B is another schematic structural diagram of the optical module implementing the encryption function
- 15 is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- FIG. 16 is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- 17A is a schematic structural diagram of an optical module implementing a decryption function
- 17B is another schematic structural diagram of the optical module implementing the decryption function
- FIG. 18 is a schematic diagram of a communication device according to an embodiment of the present application.
- FIG. 19 is a schematic diagram of a communication apparatus according to an embodiment of the present application.
- the data link layer includes a medium access control (MAC) layer, a MACSEC layer, a logic link control (logic link control, LLC) layer and other sublayers.
- the physical layer includes a physical coding sublayer (PCS), a physical medium attachment (PMA) sublayer, and a physical medium dependent (PMD) sublayer.
- the medium can be a cable, a pluggable optical module, or an optical fiber.
- the data link layer receives the message from the user side, framing through the MAC, completes the code block coding in the PCS, and distributes it to the multiple logical channels, and passes through the bit multiplexer or demultiplexer in the PMA sublayer. demuxplerxer, BitMux) conversion, distributed to multiple physical channels (related to the PMD sublayer).
- BitMux mainly completes the conversion of the signal flow of the input channel to the output channel in a bit interleaved manner.
- BitMux When BitMux is deployed at the physical layer, it is used to realize the conversion between N logical channels and M physical channels, for example, converting the signal flow of 16 logical channels to 8 physical channels.
- BitMux When BitMux is deployed in the optical module, it is used to realize the conversion between the signals of M physical channels and the digital signals of K channels, for example, the signal stream of 8 physical channels is converted into 2 channels of digital signals.
- a logic lane also called a virtual lane, refers to a PCS lane or a forward error correction (FEC) lane (FEC lane in the 100G standard and FEC lane in the 200G/400G standard) in the PCS channel).
- FEC forward error correction
- PCS distributes serial streams to multiple channels. These channels are generally distributed inside the implementation unit. In order to distinguish them from PAM channels, they are generally called logical channels or virtual channels. For example, in the Ethernet specification, the number of PCS channels corresponding to 200G is 8, the number of PCS channels corresponding to 400G is 16, and the number of FEC channels corresponding to 100G is 4.
- the physical lane may be a PMA lane.
- a physical channel can carry data from one or more logical channels. In 100G/200G/400G high-speed Ethernet, the number of physical channels varies depending on the implementation.
- FIG. 3 it is a schematic diagram of the relationship among the distribution of logical channels, physical channels, alignment markers (AM) and BitMux (built in PMA).
- An alignment mark also called an alignment block or an alignment unit, is, for example, 120 bits in length.
- AM an alignment mark
- the sending end sends a serial signal to multiple channels, it can periodically insert AM into each channel, and the receiving end implements locking according to the AM in each channel, so as to implement the data alignment of the multiple channels, so that the multiple channels can be aligned.
- the data is combined as one serial data.
- the encryption technology based on the MACSEC protocol is a commonly used security encryption technology in data networks.
- the encryption technology is based on the data link layer of OSI and is a standardized two-layer encryption technology. At present, this encryption technology is widely used in network equipment in government, military, financial and other occasions that require high data confidentiality. For example, when two routers are transmitted through optical transmission equipment, the encryption technology based on MACSEC protocol can be used Ensure the security of data in the intermediate transmission device.
- the implementation level of the encryption technology based on the MACSEC protocol is above the MAC layer, and the object of encryption and decryption is each user frame.
- FIG. 6 it is a schematic diagram of the encryption process at the sending end.
- the sender encrypts the plaintext data (that is, the data before encryption) according to the encryption algorithm, the key (Key) and the initialization vector (IV), and obtains the ciphertext data (ciphertext) (that is, the encrypted data). ).
- SecTAG When sending a message, the sender carries the ciphertext data, security tag (SecTAG) and integrity check value (ICV) generated during the encryption process in the message.
- SecTAG includes key identification (Key Identification), IV identification (IV Identification).
- Key Identification is used for the encryption key corresponding to the ciphertext data
- IV identifier is used to indicate the IV corresponding to the ciphertext data.
- the receiving end calculates the plaintext data and ICV according to the ciphertext data, key, IV and decryption algorithm, and only when the calculated ICV is consistent with the ICV carried in the message can it be considered correct. Otherwise decryption fails.
- the above-mentioned method for encrypting each user frame by using the encryption technology based on the MACSEC protocol at the MAC layer has the following problems:
- MACSEC encrypts each user frame or packet, and each frame or packet needs to carry 32 bytes.
- the industry mostly adopts a physical chip that supports the MACSEC function on the single board (refer to Figure 7), and also implements the MACSEC function based on a switch chip. Whether it is based on physical chips or based on switching chips, it is strongly related to the hardware of the single board, so it cannot meet the needs of customers to implement MACSEC encryption and decryption based on the existing traditional old single boards.
- the requirements for port encryption in customer field applications are often dynamic and difficult to predict. For example, when purchasing network equipment, only 8 fixed ports support the MACSEC function, which can basically meet the needs at that time.
- MACSEC ports are required for subsequent applications, only It can update the hardware solution and add investment; if the number of MACSEC ports purchased for network equipment is far more than the actual demand, it is easy to over-invest, so this solution cannot meet the customer's existing traditional hardware system or dynamic changes in the field.
- the embodiments of the present application design a lightweight encryption and decryption framework that supports general encryption or decryption algorithms.
- One way to do this is to move encryption and decryption functions down to flexible pluggable modules, such as optical modules or other modules.
- Another way to do this is to move the encryption and decryption functions down to the physical layer of the network device, so that when the encryption parameters are sent, they are sent through the physical layer.
- the encryption and decryption function in the physical chip can be removed, and then the decryption function can be newly added in the pluggable optical module.
- the solution has the following improvements:
- the encryption and decryption functions are deployed in the modules below the MAC, and the encryption and decryption framework is designed based on the Ethernet native AM, which supports integrity protection verification and does not occupy user service bandwidth.
- MACSEC encrypts each user frame or packet, and each frame or packet needs to carry 32 bytes.
- Bandwidth is expensive.
- each user frame does not need to carry the above 32 bytes, so these bytes can be used to carry data, so this scheme can achieve the same user service bandwidth.
- the encryption and decryption functions are moved down to the flexible pluggable optical module in the embodiment of the present application, the requirement for the capability of the single board is avoided, the power consumption of the single board is reduced, and the pluggable optical module can be flexibly selected based on the actual demand.
- the number of unplugged optical modules solves the problem that the number of MACSEC ports on a single board does not match the actual demand.
- the encryption and decryption function in the physical chip may be removed, and then the decryption function is newly added to the physical layer structure shown in FIG. 3 .
- the solution has the following improvements:
- the encryption and decryption functions are deployed in the modules below the MAC, and the encryption and decryption framework is designed based on the Ethernet native AM, which supports integrity protection verification and does not occupy user service bandwidth.
- MACSEC encrypts each user frame or packet, and each frame or packet needs to carry 32 bytes.
- Bandwidth is expensive.
- each user frame does not need to carry the above 32 bytes, so this part of the bytes can be used to carry user data, so this scheme can be implemented in the same user service.
- bandwidth increase the amount of data transmission, thereby increasing the data transmission rate.
- the data transmission method involves data encryption at the sending end and data decryption at the receiving end.
- the N plaintext data streams refer to unencrypted data streams transmitted through N logical channels. Any one of the N plaintext data streams is referred to as the first plaintext data stream.
- the first plaintext data stream includes at least two second AMs and at least two plaintext data segments, and the at least two second AMs are used for data alignment of N-way plaintext data streams; wherein, each two second AMs include one plaintext
- the data segment includes a second AM between every two plaintext data segments.
- the second AMs in one plaintext data stream are inserted periodically, and the second AMs in the same plaintext data stream are the same, and the second AMs in different plaintext data streams are different.
- the second AM and the plaintext data segment in each plaintext data stream appear periodically.
- FIG. 10 it is a schematic diagram of N channels of plaintext data streams. Each AM cycle contains a second AM and a plaintext data segment.
- the N ciphertext data streams refer to encrypted data streams transmitted through N logical channels. Any one of the N ciphertext data streams is referred to as the first ciphertext data stream.
- the first ciphertext data stream includes at least two first AMs, at least two encryption parameter sets, and at least two ciphertext data segments; wherein, each two first AMs include one ciphertext data segment and one encryption parameter set ; At least two first AMs are used for data alignment of N-way ciphertext data streams, and N is a positive integer.
- the first AM in one ciphertext data stream is inserted periodically, and the first AM in the same ciphertext data stream is the same, and the first AM in different ciphertext data streams is different .
- Each AM cycle includes a first AM, an encryption parameter set, and a ciphertext data segment.
- each AM cycle also carries one piece of padding information.
- the padding information may be padding information encrypted by using the encryption parameter set, or may be unencrypted padding information.
- each AM period carries the first AM, the encryption parameter set, the padding information (optional) and the ciphertext data segment in sequence.
- the information carried in different AM periods may appear in different orders, but may be circulated according to the granularity of multiple AM periods.
- the first AM cycle in two adjacent AM cycles carries the first AM, encryption parameter set, padding information (optional), and ciphertext data segment in turn
- the second AM cycle in two adjacent AM cycles Carry the first AM, encryption parameter set, ciphertext data segment and padding information (optional) in sequence.
- the following two AM cycles in every two adjacent AM cycles also carry the information to be sent in the same manner.
- the set of encryption parameters in each AM period may be continuous, that is, in the form of encryption parameter segments.
- the set of encryption parameters within each AM cycle is continuous.
- a first AM and an encryption parameter set are included between every two ciphertext data segments, and a first AM and a ciphertext data segment are included between every two encryption parameter sets.
- the set of encryption parameters in each AM cycle may also be discontinuous.
- the encryption parameter set in each AM period is divided into at least two encryption parameter subsets, and some or all of the encryption parameter subsets in the at least two encryption parameter subsets are discontinuous.
- the encryption parameter set in each AM period is divided into two encryption parameter subsets, and the two encryption parameter subsets are respectively located on both sides of the ciphertext data segment in the same AM period.
- N channels of plaintext data streams are encrypted to obtain N channels of ciphertext data streams.
- the N-channel ciphertext data streams shown in FIG. 9 may be generated according to the N-channel plaintext data streams shown in FIG. 10 .
- the second AM in the N channels of plaintext data streams corresponds to the same first AM in the N channels of ciphertext data streams.
- the second AM in the same plaintext data stream is the same, the second AM in different plaintext data streams is different, the first AM in the same ciphertext data stream is the same, and the ciphertext data in different paths are different.
- the first AMs in the streams are different, and the second AM in the Lth plaintext data stream is the same as the first AM in the Lth ciphertext data stream.
- AM in the first plaintext data stream and the first ciphertext data stream is AM1
- AM in the second plaintext data stream and the second ciphertext data stream is AM2 , and so on.
- the plaintext data segment (eg, the first plaintext data segment) in this embodiment of the present application includes unencrypted data (also referred to as data before encryption), and the ciphertext data segment (eg, the first ciphertext data segment, the second ciphertext data segment) segment, the third ciphertext data segment) refers to the data segment obtained after encrypting the plaintext data segment.
- the encryption parameter set refers to a set composed of one or more encryption parameters. This set of encryption parameters is a logical concept. An encryption parameter set is included between every two first AMs.
- the encryption parameter set includes multiple encryption parameters, the multiple encryption parameters may be continuous or discontinuous, that is, other information may be inserted between the multiple encryption parameters, such as inserting ciphertext data segments, Fill in information, etc.
- the encryption parameter set in each AM cycle includes one or more of the following 1) to 4):
- Encryption type the encryption type is used to identify whether to encrypt or not.
- the encryption type is used to identify whether the data segment in the AM cycle where the encryption type is located is encrypted.
- the encryption parameter set in the Xth AM cycle includes an encryption type, and the encryption type is used to identify that the data segment in the Xth AM cycle is an encrypted data segment.
- the encryption type is used to identify whether data segments in other periods other than the AM period in which the encryption type is located are encrypted.
- the encryption parameter set in the Xth AM cycle includes an encryption type, and the encryption type is used to identify that the data segment in the X+1th AM cycle is an encrypted data segment, and so on. 2) A key identifier, where the key identifier indicates the encryption key used by the first ciphertext data segment.
- the first ciphertext data segment here refers to ciphertext data encrypted by using the key indicated by the key identifier.
- the first ciphertext data segment and the key identifier are located in the same AM cycle. That is, the key indicated by the key identifier acts on the ciphertext data segment in the AM period where the key identifier is located.
- the encryption parameter set 1 in the Xth AM cycle includes a key identifier, and the key indicated by the key identifier is used for encrypting the ciphertext data segment 1 in the Xth AM cycle.
- the first ciphertext data segment and the key identifier are located in different AM periods. That is, the key indicated by the key identifier acts on the ciphertext data segment in other AM periods other than the AM period in which the key identifier is located.
- the encryption parameter set 1 in the Xth AM cycle includes a key identifier, and the key indicated by the key identifier is used for encrypting the ciphertext data segment 2 in the X+1th AM cycle.
- Initialization vector (IV) identification indicates the initialization vector used by the second ciphertext data segment.
- the second ciphertext data segment refers to ciphertext data encrypted by using the initialization vector indicated by the initialization vector identifier.
- the first ciphertext data corresponding to the key identifier in an encryption parameter set and the second ciphertext data corresponding to the initialization vector identifier in the encryption parameter set may be the same ciphertext data or different Encrypted data.
- the first ciphertext data segment and the initialization vector identifier are located in the same AM cycle, that is, the initialization vector indicated by the initialization vector identifier is the ciphertext data acting on the AM cycle where the initialization vector identifier is located. part. It can also be understood that the two first AMs adjacent to the second ciphertext data segment and the two first AMs adjacent to the initialization vector identifier are respectively the same.
- the encryption parameter set 1 in the Xth AM cycle includes an initialization vector identifier, and the initialization vector indicated by the initialization vector identifier is used for encryption of the ciphertext data segment 1 in the Xth AM cycle.
- the first ciphertext data segment and the initialization vector identifier are located in different AM periods. That is, the initialization vector indicated by the initialization vector identifier acts on the ciphertext data segment in other AM cycles other than the AM cycle where the initialization vector identifier is located.
- the encryption parameter set 1 in the Xth AM cycle includes an initialization vector identifier, and the initialization vector indicated by the initialization vector identifier is used for encryption of the ciphertext data segment 2 in the X+1th AM cycle.
- the encryption parameter set 1 in the Xth AM cycle contains an integrity check value
- the integrity check value is used for the integrity check of the ciphertext data segment 1 in the Xth AM cycle.
- the integrity check value is used for the integrity check of the ciphertext data segment between the two first AMs preceding the integrity check value.
- the encryption parameter set 2 in the X+1th AM cycle includes an integrity check value, and the integrity check value is used for the integrity check of the ciphertext data segment 1 in the Xth AM cycle .
- the encryption parameter set 2 in the X+1th AM cycle includes an integrity check value, and the integrity check value is used for the encryption in the X-1th AM cycle (not shown in the figure). Integrity check of ciphertext data segment.
- the encryption parameter set 2 in the X+1th AM cycle includes an integrity check value, and the integrity check value is used for the encryption in the X-2th AM cycle (not shown in the figure). Integrity check of ciphertext data segment, etc.
- Padding information refers to bit information composed of one or more bits.
- one piece of padding information or no padding information can be inserted between every two first AMs.
- the number of bits of the inserted padding information requires certain conditions. For example, after the padding information is inserted, it is ensured that AM is always at the beginning of an FEC codeword during FEC encoding, which is beneficial for the decryption side to identify AM and then perform FEC decoding.
- FIG. 8 it is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- the method may be performed by a flexible pluggable optical module on the sending side or by the physical layer of the network device on the sending side.
- the method involves the realization of the data encryption function.
- the method includes the following steps:
- Step 801 generating N-way ciphertext data streams.
- Step 802 Send N ciphertext data streams.
- the encryption parameters and ciphertext data are sent through N data streams.
- the method can be applied to the physical layer of an optical module or a network device, so that the transmitted encryption parameters do not occupy the user service bandwidth, thereby increasing the data transmission volume and thus the data transmission rate.
- the scheme encrypts the bit stream of the physical layer, all bits (including source MAC address and destination MAC address) in a user frame will be encrypted, so that address information will not be exposed, which can improve security.
- N ciphertext data streams may be generated according to the following methods: obtaining N plaintext data streams; generating a first ciphertext data stream according to the first plaintext data stream and at least two encryption parameter sets .
- the optical module when the data transmission method is applied to an optical module, the optical module can obtain N plaintext data streams by the following methods: receiving M physical channel signals; wherein M is a positive integer; according to a set ratio , which converts M channels of physical channel signals into N channels of plaintext data streams.
- a method for generating the first ciphertext data stream according to the first plaintext data stream and at least two sets of encryption parameters may be: encrypting the first plaintext data segment according to the first set of encryption parameters to obtain a third ciphertext data segment; and inserting a first encryption parameter set into the first plaintext data stream to obtain a first ciphertext data stream.
- the first plaintext data segment is any plaintext data segment in the first plaintext data stream
- the third ciphertext data segment is a ciphertext data segment obtained by encrypting the first plaintext data segment using the first encryption parameter set.
- the plaintext data segment 1 in the Xth AM cycle can be encrypted using the encryption parameter set 1 to obtain the ciphertext data segment 1, and then the encryption parameter set 1 is inserted in the Xth AM cycle,
- the first AM, the encryption parameter set 1 and the ciphertext data segment 1 in the Xth AM cycle are obtained, wherein the first AM is the same as the second AM.
- inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream may be: inserting the first encryption parameter set into the first plaintext data stream to obtain the second ciphertext data stream; perform forward error correction coding on the second ciphertext data stream, or perform scrambling and forward error correction coding to obtain the first ciphertext data stream. That is, after encrypting each channel of plaintext data stream to obtain the ciphertext data stream, further includes performing forward error correction encoding, or performing scrambling and forward error correction encoding on each channel of ciphertext data stream respectively.
- inserting the first encryption parameter set into the first plaintext data stream to obtain the first ciphertext data stream may be: inserting the first encryption parameter set into the N first plaintext data streams respectively, and obtaining N third ciphertext data streams; according to a set ratio, convert the N third ciphertext data streams into at least one serial ciphertext data stream; perform forward error correction coding on at least one serial ciphertext data stream , or perform scrambling and forward error correction encoding to obtain at least one encoded serial ciphertext data stream; convert at least one encoded serial ciphertext data stream into N first ciphertext data streams.
- the encrypted N ciphertext data streams are further converted into one or more serial ciphertext data streams, and then one or more The serial ciphertext data stream is subjected to forward error correction coding, or scrambling and forward error correction coding, and then converted into N-way ciphertext data streams.
- the embodiment of the present application may Padding information of corresponding bits (which may be encrypted padding information or unencrypted padding information) is inserted in the AM period. That is, the first ciphertext data stream in the N-channel ciphertext data stream further includes at least two pieces of padding information, and each AM period carries one piece of padding information.
- a piece of padding information is included between every two first AMs, a piece of padding information is also included between every two ciphertext data segments, and a first AM and a ciphertext data segment are included between every two pieces of padding information. and a set of encryption parameters. For example, referring to FIG. 9, a padding information is inserted between the ciphertext data segment and the encryption parameter set in each AM period.
- the encryption parameter set in the first ciphertext data stream is used to encrypt the ciphertext data segment in the first ciphertext data stream.
- the encryption parameter set in the first ciphertext data stream is used to encrypt the ciphertext data segment and padding information in the first ciphertext data stream.
- the plaintext data segment 1 and the padding information 1 can be encrypted using the encryption parameter set 1 to obtain the ciphertext data segment 1 and the encrypted padding information 1, and then the encryption is inserted in the Xth AM cycle. After the padding information 1 and encryption parameter set 1.
- the number of bits separated between two adjacent first AMs and the number of bits of an encryption parameter set between two adjacent first AMs can be used to determine the number of bits between two adjacent first AMs.
- the number of bits of padding information Exemplarily, the number of bits of padding information between two adjacent first AMs can be determined by the following formula:
- Y is the number of bits separated according to two adjacent first AMs
- a is the number of bits of the encryption parameter set between two adjacent first AMs
- P is the number of bits of padding information between two adjacent first AMs
- Q is the number of bits included in a forward error correction codeword
- mod is a modulo operation
- P is the minimum value that satisfies the formula.
- FIG. 11 it is a schematic diagram of a deployment position when the solution according to the embodiment of the present application is deployed on an optical module.
- the solutions of the embodiments of the present application can be implemented on optical modules that support Ethernet connections.
- the microcontroller unit (MCU) in the optical module is responsible for configuring the parameters of each functional module.
- the MCU can be used to configure the initialization parameters required for encryption and decryption, including starting or suspending the encryption and decryption function, and configuring the negotiated upper layer. key information such as keys.
- the device architecture of the embodiment of the present application can combine M physical channels (M is a positive integer) with K channels (K channels) in an optical digital signal processor (optical digital signal processor, oDSP).
- M physical channels
- K channels K channels
- oDSP optical digital signal processor
- the BitMUX between the two BitMUXs is divided into two parts, M:N and N:K, respectively, N is the number of logical channels, N is a positive integer, and then encryption and decryption and the corresponding functional module.
- FIG. 12 it is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- the method can be performed by a flexible pluggable optical module on the transmit side. This method is a specific example of the embodiment corresponding to FIG. 8 above.
- FIG. 13A and FIG. 13B it is a schematic structural diagram of an optical module implementing an encryption function.
- the method includes the following steps:
- Step 1201 Convert the received signals of M physical channels into signals of N logical channels.
- signals of M physical channels are converted into signals of N logical channels by BitMuX(A).
- the signal of each logical channel corresponds to a plaintext data stream.
- Step 1202 Search and lock the AM in each logical channel of the N logical channels.
- each logical channel searches for AM separately, and locks (Lock) within the specified interval (different rate Ethernet MAC/PHY, the interval of the alignment unit is different), and then eliminates the offset (Deskew).
- Fig. 5 is taken as an example for description.
- Search AM In the bit stream received by each channel (represented by the array X[0:]), take the 120-bit code block of X[0:119], and the CM0, CM1, CM2 defined in Figure 5, CM3, CM4, CM5 (6 bytes, 12 nibbles) are matched. When the number of unmatched nibble (nibble) is less than or equal to 3, the match is considered successful. If there is no match this time, take the 120-bit code block of X[1:120] for matching, and so on.
- Step 1203 insert encryption parameter set and padding information (Pad) after each AM.
- the inserted encryption parameter set includes one or more of the following: encryption type, key identifier, IV, and ICV.
- the encryption type is used to identify whether to encrypt or not
- the key identifier is used to indicate the used encryption key
- the IV is the encryption parameter used in the encryption process
- the ICV is used for the receiving end to perform integrity check on the encrypted data.
- the encryption parameter set in each AM cycle includes encryption type, key identifier, IV and ICV.
- the IV in an AM period acts on the ciphertext data segment and padding information in the AM period.
- the padding information here is encrypted padding information.
- the ICV in one AM period acts on the ciphertext data segment and padding information in the previous AM period of the AM period.
- the padding information here is encrypted padding information. That is, when decrypting, the receiving end uses the ICV in the X+1th AM cycle to perform integrity verification on the ciphertext data segment and the padding information in the Xth AM cycle.
- the number of bits separated by two AMs is Y
- the selected FEC is RS(n, k, m), where n is the number of symbols contained in an FEC codeword after encoding, and k is The number of data symbols contained in an FEC codeword, m is the number of bits contained in a symbol, k*m represents the number of bits contained in an FEC codeword, and mod is a modulo operation.
- the number of bits of the inserted Pad is P, and the number of bits of the encryption parameter set is a, then P can be the minimum value that satisfies the following conditions:
- MACSEC supports the integrity check function. In order to benchmark with MAC, this scheme implements encryption and decryption at the physical layer, and also needs to consider supporting the integrity check function. Since there are bit errors in the link, integrity protection is required. FEC can be used to correct the bit errors caused by the link, and then integrity check is performed.
- the algorithm adopts the commonly used Advanced Encryption Standard (AES) - Galois/Counter Mode (GCM).
- AES Advanced Encryption Standard
- GCM Galois/Counter Mode
- each logical channel independently performs locking AM, encryption and decryption, and insertion or extraction of encryption parameters, unrelated to each other.
- M 16 logical channels in total
- Select the Key Index field to be 8 bits.
- the change of the value means the switch from the key. For example, from "00000001" to "000000010", the decryption side needs to select a new Key for decryption.
- the IV length is selected to be 12 bytes (ie 96 bits), and the ICV length is 16 bytes (ie 128 bits).
- a P-bit Pad needs to be inserted.
- the selected FEC is RS (544, 514, 10)
- P can be the minimum value that satisfies the following conditions:
- MACSEC supports the integrity check function. In order to benchmark with MAC, this scheme implements encryption and decryption at the physical layer, and also needs to consider supporting the integrity check function. Since there are bit errors in the link, integrity protection is required. FEC can be used to correct the bit errors caused by the link, and then integrity check is performed.
- the algorithm adopts the commonly used AES-GCM.
- each logical channel independently performs locking AM, encryption and decryption, and insertion or extraction of encryption parameters, unrelated to each other.
- Select the Key Index field to be 8 bits.
- the change of the value means the switch from the key. For example, from "00000001" to "000000010", the decryption side needs to select a new Key for decryption.
- the IV length is selected to be 12 bytes (ie 96 bits), and the ICV length is 16 bytes (ie 128 bits).
- a P-bit Pad needs to be inserted.
- the selected FEC is RS (544, 514, 10)
- P can be the minimum value that satisfies the following conditions:
- the key identifier may be configured and modified by the MCU.
- the IV can be configured by the MCU, and then the IV can be automatically generated according to certain rules, such as automatically generated by the encryption module, inserted by the AM lock module, and the decryption module extracts the key identifier and IV.
- the ICV of the Xth AM cycle is stored in the ICV field field of the X+1th AM cycle.
- the decryption is completed, and the ICV is calculated and saved.
- the saved ICV is compared with the received ICV. If they are consistent, they are complete. If the integrity check is successful, if it is inconsistent, the integrity check fails and an alarm signal can be generated.
- Step 1204 Encrypt the plaintext data segment and padding information after AM according to the encryption parameter set to obtain N-channel encrypted signals.
- the method further includes: a signal (including information such as ciphertext data segment, encryption parameter set, etc.) for each logical channel is passed through After Mux is aggregated into a serial code block stream, Scrambler and FEC Encode are performed, and then N-channel encrypted signals are formed through De-Mux.
- a signal including information such as ciphertext data segment, encryption parameter set, etc.
- the method shown in FIG. 13A is to convert the encrypted signals of N logical channels into one or more serial encrypted signals through Mux, and then perform scramble and FEC encoding on the one or more serial encrypted signals, and then pass De-Mux converts one or more serial encrypted signals after scramble and FEC encoding into signals of N logical channels (that is, the signals after encryption, scramble and FEC encoding).
- the method shown in FIG. 13B is to perform scramble and FEC encoding on the encrypted signal of each logical channel (or the data stream of each logical channel) to obtain the signals of N logical channels (that is, after encryption, scramble and signal after FEC encoding).
- Step 1205 Convert the N channels of encrypted signals into K channels of digital signals.
- M channels of encrypted signals are converted into K channels of digital signals through BitMuX(B), and then sent to the oDSP.
- encryption is performed on the optical module, which does not occupy user service bandwidth, thus increasing the amount of data sent. Since the optical modules are flexible and pluggable, the corresponding number of optical modules can be configured according to the actual needs of customers, thus avoiding the increase of power consumption. Moreover, since the scheme encrypts the bit stream of the physical layer, all bits (including source MAC address and destination MAC address) in a user frame will be encrypted, so that address information will not be exposed, which can improve security.
- FIG. 15 a schematic flowchart of a data transmission method according to an embodiment of the present application is shown.
- the method may be performed by a flexible pluggable optical module on the receiving side or by the physical layer of the network device on the receiving side.
- the method involves the realization of the data decryption function.
- the method includes the following steps:
- Step 1501 Obtain N ciphertext data streams.
- the first ciphertext data stream is any one of the N ciphertext data streams, and the first ciphertext data stream includes at least two first alignment marks AM, at least two encryption parameter sets, and at least two ciphertexts Data segment; wherein, each two first AMs include a ciphertext data segment and an encryption parameter set; at least two first AMs are used for data alignment of N ciphertext data streams, and N is a positive integer.
- Step 1502 Decrypt the first ciphertext data stream according to the at least two encryption parameter sets to obtain a first plaintext data stream, where the first plaintext data stream is any one of the N plaintext data streams.
- the encryption parameters and ciphertext data are sent through N data streams.
- the method can be applied to the physical layer of an optical module or a network device, so that the transmitted encryption parameters do not occupy the user service bandwidth, thereby increasing the data transmission volume and thus the data transmission rate.
- the scheme encrypts the bit stream of the physical layer, all bits (including source MAC address and destination MAC address) in a user frame will be encrypted, so that address information will not be exposed, which can improve security.
- decrypting the first ciphertext data stream according to at least two sets of encryption parameters to obtain the first plaintext data stream may be: decrypting the third ciphertext data segment according to the first set of encryption parameters to obtain a first plaintext data segment; and removing the first encryption parameter set from the first plaintext data stream to obtain a first plaintext data stream.
- the first plaintext data segment is any plaintext data segment in the first plaintext data stream
- the third ciphertext data segment is a ciphertext data segment obtained by encrypting the first plaintext data segment using the first encryption parameter set.
- the decryption side when the encryption side encrypts the N channels of plaintext data streams, and also performs forward error correction coding or performs scrambling and forward error correction encoding, the decryption side encrypts the N channels of ciphertext data streams. Before decryption, it is also necessary to perform forward error correction decoding on the N-channel ciphertext data streams, or perform descrambling and forward error correction decoding.
- One method is: performing forward error correction decoding on the first ciphertext data stream, or performing descrambling and forward error correction decoding to obtain a second ciphertext data stream; The data segment is decrypted to obtain the first plaintext data segment.
- Another method is: converting the N first ciphertext data streams into at least one serial ciphertext data stream according to a set ratio; performing forward error correction decoding on at least one serial ciphertext data stream, or performing forward error correction decoding on at least one serial ciphertext data stream descrambling and forward error correction decoding to obtain at least one decoded serial ciphertext data stream; converting at least one decoded serial ciphertext data stream into N third ciphertext data streams; according to the first encryption parameter Set, respectively decrypt the third ciphertext data segments of the N third ciphertext data streams to obtain N first plaintext data segments.
- the sending side encrypts the plaintext data segment and the padding information
- the receiving side needs to decrypt the ciphertext data segment and the encrypted padding information. That is, if the padding information is encrypted, the padding information needs to be decrypted accordingly.
- FIG. 16 it is a schematic diagram of a data transmission method provided by an embodiment of the present application.
- the method can be performed by a flexible pluggable optical module on the receiving side.
- This method is a specific example of the above-mentioned embodiment corresponding to FIG. 15 .
- FIG. 17A and FIG. 17B it is a schematic structural diagram of an optical module implementing a decryption function.
- the structure shown in FIG. 17A or FIG. 17B can be used in conjunction with the structure shown in FIG. 13A or FIG. 13B to implement encryption and decryption functions respectively.
- the method includes the following steps:
- Step 1601 Convert the received digital signals of K channels into encrypted signals of N logical channels.
- K channels of digital signals are converted into encrypted signals of N logical channels through BitMuX(A).
- Step 1602 Search and lock the AM in each logical channel of the N logical channels.
- each logical channel searches for AM separately, and locks (Lock) within the specified interval (different rate Ethernet MAC/PHY, the interval of the alignment unit is different), and then eliminates the offset (Deskew).
- Step 1603 Decrypt the encrypted signals of the logical channel according to the set of encryption parameters after AM to obtain decrypted signals of N logical channels.
- the Type field in the encryption parameter is used to determine whether the data in the current AM cycle is encrypted. If it is encrypted, the encryption parameters are extracted for decryption, and the ICV is calculated for storage. When the ICV of the next AM cycle is received, the stored ICV is compared with the received ICV to determine whether they are consistent. If they are consistent, the integrity check succeeds; if they are inconsistent, the integrity check fails, and an alarm signal can be generated.
- the encryption parameter set after AM decrypt the encrypted signals of the logical channels to obtain the decrypted signals of N logical channels.
- One implementation method is: referring to FIG. 17A, the signals of the N logical channels are aggregated through Mux. After one or more serial signal streams, FEC decoding (FEC Decode), descrambling (De-Scrambler) are performed, and then through De-Mux, it is converted into an encrypted signal of N logical channels, and then the N logical channels are converted into encrypted signals. The encrypted signals are decrypted and padding removed respectively to obtain the decrypted signals of N logical channels.
- FEC Decode FEC Decode
- Descrambling Descrambling
- De-Mux de-Mux
- decrypt the encrypted signal of the logical channel to obtain the decrypted signals of N logical channels.
- Another implementation method is: referring to FIG. FEC decoding, descrambling, decryption, and padding removal to obtain signals of N logical channels.
- Step 1604 remove the encryption parameter set and padding information after AM.
- Step 1605 Convert the decrypted signals of N logical channels into signals of M physical channels.
- the signals of M logical channels are converted into signals of N physical channels through BitMuX(B).
- decryption is performed at the optical module, which does not occupy user service bandwidth, thus increasing the amount of data sent. Since the optical modules are flexible and pluggable, the corresponding number of optical modules can be configured according to the actual needs of customers, thus avoiding the increase of power consumption. Moreover, since the scheme encrypts the bit stream of the physical layer, all bits in a user frame (including the source MAC address and the destination MAC address) will be encrypted, so that the address information will not be exposed, which can improve the security.
- a framework for carrying encryption and decryption parameters is designed based on the AM of the virtual channel, and encryption and decryption functions are implemented in the module.
- the encryption side performs FEC encoding after encryption
- the decryption side performs decryption after FEC decoding. Since FEC has a certain error correction capability, it can avoid the impact of link errors on ICV, so it supports integrity protection ICV verification.
- the original BitMUX structure is divided into two parts, and the solution of the present invention is inserted without affecting other components in the module.
- Each virtual channel in the module implements encryption and decryption independently. By inserting a certain amount of padding information, it is ensured that after FEC encoding, the AM word is always located at the beginning of an FEC codeword.
- the present application may also apply the encryption scheme in the embodiment corresponding to FIG. 8 to the physical layer of the network device. The following description will be made with reference to FIG. 3 .
- one serial plaintext data stream is obtained, and then N serial plaintext data streams are generated according to one serial plaintext data stream, and the N serial plaintext data streams are encrypted respectively to obtain N serial plaintext data streams.
- the N ciphertext data streams are aggregated into one serial ciphertext data stream, and then one ciphertext data stream is converted into two serial ciphertext data streams by distributing 1.
- the ciphertext data stream is Reed-Solomon encoded, by distributing 2
- the encoded 2-channel serial ciphertext data stream is converted into 8-channel ciphertext data stream, and then the 8-channel ciphertext data stream is converted into M through PMA. signal of the physical channel.
- the present application may also apply the decryption scheme in the embodiment corresponding to FIG. 15 to the physical layer of the network device. The following description will be made with reference to FIG. 3 .
- FIG. 18 it is a schematic diagram of a communication apparatus according to an embodiment of the present application.
- the apparatus is used to implement each step performed by the corresponding communication apparatus in the foregoing embodiment.
- the apparatus 1800 includes a transceiver unit 1810 and a processing unit 1820 .
- the communication device is applied to an optical module or a network device, and is used to implement an encryption function, then:
- the processing unit 1820 is configured to generate N ciphertext data streams, the first ciphertext data stream is any ciphertext data stream in the N ciphertext data streams, and the first ciphertext data stream includes at least two ciphertext data streams a first alignment identifier AM, at least two encryption parameter sets, and at least two ciphertext data segments; wherein, one ciphertext data segment and one said encryption parameter set are included between every two said first AMs; all The at least two first AMs are used for data alignment of the N channels of ciphertext data streams, where N is a positive integer; the transceiver unit 1810 is configured to send the N channels of ciphertext data streams.
- the encryption parameter set includes one or more of the following:
- Encryption type the encryption type is used to identify whether to encrypt
- the key identifier indicates the encryption key used by the first ciphertext data segment
- An initialization vector identifier where the initialization vector identifier indicates an initialization vector used by the second ciphertext data segment.
- the two first AMs adjacent to the second ciphertext data segment and the two first AMs adjacent to the initialization vector identifier are respectively the same.
- the encryption parameter set further includes an integrity check value
- the integrity check value is used for encryption between the two first AMs before the integrity check value. Integrity check of the text data segment.
- the processing unit 1820 is specifically configured to acquire N plaintext data streams, the first plaintext data stream is any plaintext data stream in the N plaintext data streams, and the first plaintext data stream At least two second AMs and at least two plaintext data segments are included, and the at least two second AMs are used for data alignment of the N-way plaintext data streams; wherein, between each two of the second AMs, one The plaintext data segment includes a second AM between every two plaintext data segments; the first ciphertext data is generated according to the first plaintext data stream and the at least two encryption parameter sets flow.
- the first plaintext data segment is any one of the at least two plaintext data segments
- the third ciphertext data segment is the first plaintext data segment using the at least two encryption parameter sets
- the ciphertext data segment after the encryption parameter set encrypts the first plaintext data segment
- the processing unit 1820 is specifically configured to encrypt the first plaintext data segment according to the first encryption parameter set to obtain the first plaintext data segment.
- the processing unit 1820 is specifically configured to insert the first encryption parameter set into the first plaintext data stream to obtain a second ciphertext data stream; Perform forward error correction coding, or perform scrambling and forward error correction coding to obtain the first ciphertext data stream.
- the processing unit 1820 is specifically configured to insert the first encryption parameter set into the N channels of the first plaintext data streams, respectively, to obtain N channels of third ciphertext data streams; ratio, converting the N third ciphertext data streams into at least one serial ciphertext data stream; performing forward error correction coding on the at least one serial ciphertext data stream, or performing scrambling and forward correction Error coding is performed to obtain at least one encoded serial ciphertext data stream; and the at least one encoded serial ciphertext data stream is converted into N channels of the first ciphertext data stream.
- the processing unit 1820 is specifically configured to receive M channels of physical channel signals through the transceiver unit 1810; wherein, M is a positive integer; according to a set ratio, the M channels of physical channel signals are converted into all physical channel signals.
- M is a positive integer
- the M channels of physical channel signals are converted into all physical channel signals.
- the N plaintext data streams are described above.
- the first AM and the encryption parameter set are included between every two ciphertext data segments, and the first AM is included between every two encryption parameter sets.
- AM and one said ciphertext data segment; or, one said encryption parameter set between every two said first AMs is divided into at least two encryption parameter subsets, part of said at least two encryption parameter subsets The encrypted subset or all subsets are not contiguous.
- the processing unit 1820 is specifically configured to insert the first encryption parameter set and padding information into the first plaintext data stream to obtain the first ciphertext data stream.
- the padding information is the padding information encrypted by the first encryption parameter set.
- (Y+a+P) mod Q 0, where Y is the number of bits separated by two adjacent first AMs, and a is the number of bits separated by the two adjacent first AMs.
- Y is the number of bits separated by two adjacent first AMs
- a is the number of bits separated by the two adjacent first AMs.
- P is the number of bits of the padding information between the two adjacent first AMs
- Q is the number of bits included in a forward error correction codeword
- mod mod is the modulo operation.
- P is the minimum value that satisfies the formula.
- the communication device is applied to an optical module or a network device, and is used to implement a decryption function, then:
- the transceiver unit 1810 is configured to obtain N ciphertext data streams, the first ciphertext data stream is any ciphertext data stream in the N ciphertext data streams, and the first ciphertext data stream includes at least two ciphertext data streams a first alignment identifier AM, at least two encryption parameter sets, and at least two ciphertext data segments; wherein, one ciphertext data segment and one said encryption parameter set are included between every two said first AMs; all The at least two first AMs are used for data alignment of the N ciphertext data streams, and N is a positive integer; the processing unit 1820 is configured to align the first ciphertext data streams according to the at least two encryption parameter sets Decryption is performed to obtain a first plaintext data stream, where the first plaintext data stream is any one of the N plaintext data streams.
- the encryption parameter set includes one or more of the following:
- Encryption type the encryption type is used to identify whether to encrypt
- the key identifier indicates the encryption key used by the first ciphertext data segment
- An initialization vector identifier where the initialization vector identifier indicates an initialization vector used by the second ciphertext data segment.
- the two first AMs adjacent to the second ciphertext data segment and the two first AMs adjacent to the initialization vector identifier are respectively the same.
- the encryption parameter set further includes an integrity check value
- the integrity check value is used for encryption between the two first AMs before the integrity check value. Integrity check of the text data segment.
- the first plaintext data stream includes at least two second AMs and at least two plaintext data segments, and each two second AMs includes one plaintext data segment, and every two second AMs includes one plaintext data segment.
- One of the second AMs is included between the plaintext data segments, and the at least two second AMs are used for data alignment of the N plaintext data streams.
- the first plaintext data segment is any one of the at least two plaintext data segments
- the third ciphertext data segment is the first plaintext data segment using the at least two encryption parameter sets
- the ciphertext data segment after the encryption parameter set encrypts the first plaintext data segment
- the processing unit 1820 is configured to decrypt the third ciphertext data segment according to the first encryption parameter set to obtain the first plaintext data segment.
- the processing unit 1820 is configured to perform forward error correction decoding on the first ciphertext data stream, or perform descrambling and forward error correction decoding to obtain a second ciphertext data stream; according to The first encryption parameter set decrypts the third ciphertext data segment of the second ciphertext data stream to obtain the first plaintext data segment.
- the processing unit 1820 is configured to convert the N channels of the first ciphertext data stream into at least one serial ciphertext data stream according to a set ratio; Perform forward error correction decoding on the text data stream, or perform descrambling and forward error correction decoding to obtain at least one decoded serial ciphertext data stream; convert the at least one decoded serial ciphertext data stream into N third ciphertext data streams; according to the first encryption parameter set, respectively decrypt the third ciphertext data segments of the N third ciphertext data streams to obtain N first plaintexts data segment.
- the first AM and the encryption parameter set are included between every two ciphertext data segments, and the first AM is included between every two encryption parameter sets.
- AM and one said ciphertext data segment; or, one said encryption parameter set between every two said first AMs is divided into at least two encryption parameter subsets, part of said at least two encryption parameter subsets The encrypted subset or all subsets are not contiguous.
- the processing unit 1820 is specifically configured to remove the first encryption parameter set and padding information from the first plaintext data stream to obtain the first plaintext data stream.
- the padding information is the padding information encrypted by the first encryption parameter set.
- the number of bits of the padding information between the two adjacent first AMs is based on the number of bits spaced between two adjacent first AMs and the adjacent The number of bits of the encryption parameter set between the two first AMs is determined.
- (Y+a+P) mod Q 0, where Y is the number of bits separated by two adjacent first AMs, and a is the number of bits separated by the two adjacent first AMs.
- Y is the number of bits separated by two adjacent first AMs
- a is the number of bits separated by the two adjacent first AMs.
- P is the number of bits of the padding information between the two adjacent first AMs
- Q is the number of bits included in a forward error correction codeword
- mod mod is the modulo operation.
- P is the minimum value that satisfies the formula.
- the above-mentioned communication device 1800 may further include a storage unit, which is used to store data or instructions (also referred to as codes or programs), and each of the above-mentioned units may interact or be coupled with the storage unit to implement corresponding methods or Function.
- a storage unit which is used to store data or instructions (also referred to as codes or programs), and each of the above-mentioned units may interact or be coupled with the storage unit to implement corresponding methods or Function.
- each unit in the above apparatus can be realized in the form of software calling through the processing element; also can all be realized in the form of hardware; some units can also be realized in the form of software calling through the processing element, and some units can be realized in the form of hardware.
- each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function.
- each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
- a unit in any of the above apparatuses may be one or more integrated circuits configured to implement the above method, such as: one or more Application Specific Integrated Circuits (ASICs), or, one or more Multiple microprocessors (digital singnal processors, DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), or a combination of at least two of these integrated circuit forms.
- ASICs Application Specific Integrated Circuits
- DSP digital singnal processors
- FPGA Field Programmable Gate Array
- FPGA Field Programmable Gate Array
- a unit in the apparatus can be implemented in the form of a processing element scheduler
- the processing element can be a general-purpose processor, such as a central processing unit (Central Processing Unit, CPU) or other processors that can invoke programs.
- CPU central processing unit
- these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
- SOC system-on-a-chip
- the above transceiver unit 1810 is an interface circuit of the device, and is used to receive signals from or send signals to other devices.
- the transceiver unit 1810 is an interface circuit used by the chip to receive signals from and/or send signals to other chips or devices.
- the communication apparatus includes: a processor 1910 and an interface 1930 , and optionally, the communication apparatus further includes a memory 1920 .
- the interface 1930 is used to enable communication with other devices.
- the method performed by the communication apparatus in the above embodiments may be implemented by the processor 1910 calling a program stored in a memory (which may be the memory 1920 in the communication apparatus or an external memory). That is, the communication apparatus may include a processor 1910, and the processor 1910 executes the method performed by the communication apparatus in the above method embodiments by invoking the program in the memory.
- the processor here may be an integrated circuit with signal processing capability, such as a CPU.
- the communication apparatus may be implemented by one or more integrated circuits configured to implement the above methods. For example: one or more ASICs, or, one or more microprocessor DSPs, or, one or more FPGAs, etc., or a combination of at least two of these integrated circuit forms. Alternatively, the above implementations may be combined.
- the functions/implementation process of the transceiver unit 1810 and the processing unit 1820 in FIG. 18 can be implemented by the processor 1910 in the communication apparatus 1900 shown in FIG. 19 calling computer executable instructions stored in the memory 1920 .
- the function/implementation process of the processing unit 1820 in FIG. 18 may be implemented by the processor 1910 in the communication device 1900 shown in FIG. 19 calling the computer-executed instructions stored in the memory 1920, and the function of the transceiver unit 1810 in FIG. 18
- the implementation process can be implemented through the interface 1930 in the communication device 1900 shown in FIG. 19 .
- the present application also provides a computer-readable medium on which a computer program is stored, and when the computer program is executed by a computer, implements the functions of any of the foregoing method embodiments.
- the present application also provides a computer program product, which implements the functions of any of the above method embodiments when the computer program product is executed by a computer.
- the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
- software it can be implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
- the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
- the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
- the computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
- the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
- a general-purpose processor may be a microprocessor, or alternatively, the general-purpose processor may be any conventional processor, controller, microcontroller, or state machine.
- a processor may also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors in combination with a digital signal processor core, or any other similar configuration. accomplish.
- the steps of the method or algorithm described in the embodiments of this application may be directly embedded in hardware, a software unit executed by a processor, or a combination of the two.
- Software units can be stored in random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read-Only Memory, ROM), EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM or this.
- RAM Random Access Memory
- ROM read-only memory
- EPROM memory read-only memory
- EEPROM memory electrically erasable programmable read-only memory
- registers hard disk, removable disk, CD-ROM or this.
- a storage medium can be coupled to the processor such that the processor can read information from, and write information to, the storage medium.
- the storage medium can also be integrated into the processor.
- the processor and storage medium may be provided in the ASIC.
- the above-described functions described herein may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on, or transmitted over, a computer-readable medium in the form of one or more instructions or code.
- Computer-readable media includes computer storage media and communication media that facilitate the transfer of a computer program from one place to another. Storage media can be any available media that a general-purpose or special-purpose computer can access.
- Such computer-readable media may include, but are not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other device that can be used to carry or store instructions or data structures and Other media in the form of program code that can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor.
- any connection is properly defined as a computer-readable medium, for example, if software is transmitted from a website site, server or other remote source over a coaxial cable, fiber optic computer, twisted pair, digital subscriber line (DSL) Or transmitted by wireless means such as infrared, wireless, and microwave are also included in the definition of computer-readable media.
- DSL digital subscriber line
- the discs and magnetic discs include compact discs, laser discs, optical discs, digital versatile discs (English: Digital Versatile Disc, DVD for short), floppy discs and Blu-ray discs. Disks usually reproduce data magnetically, while Discs usually use lasers to optically reproduce data. Combinations of the above can also be included in computer readable media.
- the functions described in this application may be implemented in hardware, software, firmware, or any combination thereof.
- the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请提供数据传输方法、通信装置及通信系统。该方法包括:生成N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;每两个第一AM之间包括一个密文数据段和一个加密参数集合;至少两个第一AM用于N路密文数据流的数据对齐;发送N路密文数据流。该方案可应用于光模块或网络设备的物理层,由于发送的加密参数不占用用户业务带宽,从而提升数据发送量,进而提升数据发送速率。该方案是对物理层的比特流进行加密,用户帧中所有的比特(包括源MAC地址、目的MAC地址)都被加密,因而不会暴露地址信息,可提升安全性。
Description
相关申请的交叉引用
本申请要求在2020年12月02日提交中国专利局、申请号为202011410721.1、申请名称为“数据传输方法、通信装置及通信系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,尤其涉及数据传输方法、通信装置及通信系统。
目前,随着移动智能终端、个人电脑的普及,互联网络已成为人们工作、生活的一部分。而一般情况下,大部分数据在局域网络中都是以明文形式传输的,这样就会存在许多安全隐患,比如:银行帐户的信息被窃取、篡改,遭受恶意网络攻击等,因此保证网络数据传输的安全性已日益成为企业和个人客户的基本要求。而在目前广泛使用的网络安全技术中,数据加密技术是一种保障网络安全的重要手段。
基于媒体访问控制安全协议(medium access control security,MACSEC)协议的加密技术,是目前数据网络中较常用的一种安全加密技术,该加密技术基于开放式系统互联通信参考模型(open system interconnection reference model,OSI)的数据链路层,是一种已标准化的二层加密技术。目前在政府、军队、金融等对数据机密性要求较高场合的网络设备上较多采用该加密技术,如两台路由器设备之间经过光传输设备传输时,可通过基于MACSEC协议的加密技术来保证数据在中间传输设备的安全。
基于MACSEC协议的加密技术的实现层次是在MAC层之上,加密和解密的对象是每一个用户帧。
在MAC层使用基于MACSEC协议的加密技术对每一用户帧进行加密的方法,需要在每一用户帧内携带加密参数,导致每一用户帧可发送的用户数据减少,占用用户业务带宽,代价较大。此外,基于MACSEC协议的加密技术不对源MAC地址和目的MAC地址进行加密,存在安全隐患。
发明内容
本申请提供数据传输方法、通信装置及通信系统,用以提升用户数据发送速率和提升安全性。
第一方面,本申请实施例提供一种数据传输方法,包括:生成N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;发送所述N路密文数据流。
基于该方案,将加密参数以及密文数据通过N路数据流中进行发送。该方法可以应用于光模块或网络设备的物理层,因而发送的加密参数不占用用户业务带宽,从而提升数据发送量,进而提升数据发送速率。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
作为一种可能的实现方法,所述加密参数集合包括以下一项或多项:
加密类型,所述加密类型用于标识是否加密;
密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;
初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
作为一种可能的实现方法,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
作为一种可能的实现方法,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
作为一种可能的实现方法,所述生成N路密文数据流,包括:获取N路明文数据流,第一明文数据流是所述N路明文数据流中的任一路明文数据流,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,所述至少两个第二AM用于所述N路明文数据流的数据对齐;其中,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM;根据所述第一明文数据流和所述至少两个加密参数集合,生成所述第一密文数据流。
作为一种可能的实现方法,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;所述根据所述第一明文数据流和所述至少两个加密参数集合,生成所述第一密文数据流,包括:根据所述第一加密参数集合对所述第一明文数据段进行加密,得到所述第三密文数据段;以及,在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流。
作为一种可能的实现方法,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在所述第一明文数据流中插入所述第一加密参数集合,得到第二密文数据流;对所述第二密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到所述第一密文数据流。
作为一种可能的实现方法,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在N路所述第一明文数据流中分别插入所述第一加密参数集合,得到N路第三密文数据流;按照设定的比例,将所述N路第三密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到至少一路编码后的串行密文数据流;将所述至少一路编码后的串行密文数据流转化为N路所述第一密文数据流。
作为一种可能的实现方法,所述获取N路明文数据流,包括:接收M路物理通道信号;其中,M为正整数;按照设定的比例,将所述M路物理通道信号转化为所述N路明文数据流。
作为一种可能的实现方法,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在所述第一明文数据流中插入所述第一加密参数集合和 填充信息,得到所述第一密文数据流。
作为一种可能的实现方法,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
第二方面,本申请实施例提供一种数据传输方法,包括:获取N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;根据所述至少两个加密参数集合对所述第一密文数据流进行解密,得到第一明文数据流,所述第一明文数据流是N路明文数据流中的任一路明文数据流。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
基于该方案,将加密参数以及密文数据通过N路数据流中进行发送。该方法可以应用于光模块或网络设备的物理层,因而发送的加密参数不占用用户业务带宽,从而提升数据发送量,进而提升数据发送速率。
作为一种可能的实现方法,所述加密参数集合包括以下一项或多项:
加密类型,所述加密类型用于标识是否加密;
密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;
初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
作为一种可能的实现方法,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
作为一种可能的实现方法,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
作为一种可能的实现方法,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM,所述至少两个第二AM用于所述N路明文数据流的数据对齐。
作为一种可能的实现方法,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;所述根据所述至少两个加密参数集合对所述第一密文数据流进行解密,得到第一明文数据流,包括:根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段;以及,在所述第一明文数据流中移除所述第一加密参数集合,得到所述第一明文数据流。
作为一种可能的实现方法,所述根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段,包括:对所述第一密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到第二密文数据流;根据所述第一加密参数集合对所述第二密文数据流的所述第三密文数据段进行解密,得到所述第一明文数据段。
作为一种可能的实现方法,所述根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段,包括:按照设定的比例,将N路所述第一密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到至少一路解码后的串行密文数据流;将所述至少一路解码 后的串行密文数据流转化为N路第三密文数据流;根据所述第一加密参数集合,分别对所述N路第三密文数据流的所述第三密文数据段进行解密,得到N个所述第一明文数据段。
作为一种可能的实现方法,所述在所述第一明文数据流中移除所述第一加密参数集合,得到所述第一明文数据流,包括:在所述第一明文数据流中移除所述第一加密参数集合和填充信息,得到所述第一明文数据流。
作为一种可能的实现方法,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
基于上述第一方面或第二方面的任意实现方法:
作为一种可能的实现方法,所述相邻两个所述第一AM之间的填充信息的比特数,是根据相邻两个所述第一AM之间相隔的比特数以及所述相邻两个所述第一AM之间的加密参数集合的比特数确定的。
基于该方案,可以保证进行前向纠错编码时AM是始终位于一个前向纠错码字的开端,从而有利于解密侧识别AM后进行前向纠错解码。
作为一种可能的实现方法,(Y+a+P)mod Q=0,其中,Y为根据相邻两个所述第一AM之间相隔的比特数,a为所述相邻两个所述第一AM之间的加密参数集合的比特数,P为所述相邻两个所述第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
作为一种可能的实现方法,P为满足公式的最小值。
作为一种可能的实现方法,上述任意方法应用于光模块。
第三方面,本申请实施例提供一种通信装置,包括处理器和存储器;该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述第一方面或第二方面的各实现方法。
第四方面,本申请实施例提供一种通信装置,包括用于执行上述第一方面或第二方面的各实现方法的各个步骤的单元或手段(means)。
第五方面,本申请实施例提供一种通信装置,包括处理器和接口电路,所述处理器用于通过接口电路与其它装置通信,并执行上述第一方面或第二方面的各实现方法。该处理器的数量为一个或多个。
第六方面,本申请实施例提供一种通信装置,包括处理器,用于与存储器相连,用于调用所述存储器中存储的程序,以执行上述第一方面或第二方面的各实现方法。该存储器可以位于该装置之内,也可以位于该装置之外。该处理器的数量为一个或多个。
第七方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得上述第一方面或第二方面的各实现方法被执行。
第八方面,本申请实施例还提供一种计算机程序产品,该计算机产品包括计算机程序,当计算机程序运行时,使得上述第一方面或第二方面的各实现方法被执行。
第九方面,本申请实施例还提供一种芯片系统,包括:处理器,用于执行上述第一方面或第二方面的各实现方法。
第十方面,本申请实施例还提供一种通信系统,包括:用于执行上述第一方面各实现方法的通信装置,和用于执行上述第二方面各实现方法的通信装置。
图1为以太数据链路层和物理层架构示意图;
图2为BitMux工作原理示意图;
图3为逻辑通道、物理通道、AM的分布以及BitMux之间的关系示意图;
图4为200G/400G的AM格式示意图;
图5为400G每个逻辑通道的AM格式示意图;
图6为发送端加密过程示意图;
图7为单板外置支持MACSEC功能的物理芯片示意图;
图8为本申请实施例提供的数据传输方法示意图;
图9为N路密文数据流的一个示意图;
图10为N路明文数据流的一个示意图;
图11为本申请实施例方案部署在光模块时的部署位置示意图;
图12为本申请实施例提供的数据传输方法示意图;
图13A为光模块实现加密功能的一个结构示意图;
图13B为光模块实现加密功能的另一个结构示意图;
图14为插入的加密参数集合和填充信息示意图;
图15为本申请实施例提供的数据传输方法示意图;
图16为本申请实施例提供的数据传输方法示意图;
图17A为光模块实现解密功能的一个结构示意图;
图17B为光模块实现解密功能的另一个结构示意图;
图18为本申请实施例提供的一种通信装置的示意图;
图19为本申请实施例提供的一种通信装置的示意图。
参考图1,为以太数据链路层和物理层架构示意图。数据链路层包括媒体访问控制(medium access control,MAC)层、MACSEC层、逻辑链路控制(logic link control,LLC)层及其它子层。物理层包括物理编码子层(physical coding sublayer,PCS)、物理媒介连接(physical medium attachment,PMA)子层和物理媒介相关(physical medium dependent,PMD)子层。介质(medium)可以是电缆、可插拔光模块或光纤等。
数据链路层从用户侧接收报文,经由MAC组帧,在PCS内完成码块编码,并分发到多路逻辑通道,在PMA子层内经过比特复用或解复用器(bit muxplexer or demuxplerxer,BitMux)转换,分发到多路物理通道(与PMD子层相关)。
参考图2,为BitMux工作原理示意图。BitMux主要完成以比特交织方式将输入通道的信号流转换到输出通道。当BitMux部署于物理层,则用于实现N个逻辑通道与M个物理通道之间的转换,例如将16个逻辑通道的信号流转换到8个物理通道。当BitMux部署于光模块,则用于实现M个物理通道的信号与K路数字信号之间的转换,例如将8个物理通道的信号流转换为2路数字信号。
本申请实施例中,逻辑通道(logic lane),也称为虚拟通道,指的是PCS通道或前向 纠错码(forward error correction,FEC)通道(100G标准中为FEC通道,200G/400G标准中为PCS通道)。PCS会把串行的流分发到多个通道上,这些通道一般分布在实现单元内部,为了和PAM通道区分,一般称呼为逻辑通道或虚拟通道。比如在以太网规范中,200G对应的PCS通道个数为8,400G对应的PCS通道个数为16,100G对应的FEC通道个数为4。
本申请实施例中,物理通道(physical lane)可以是PMA通道。一个物理通道可以承载一个或多个逻辑通道的数据。在100G/200G/400G高速以太网中,根据实现的不同,物理通道数也会不同。
参考图3,为逻辑通道、物理通道、对齐标识(alignment marker,AM)的分布以及BitMux(内置于PMA)之间的关系示意图。
对齐标识(AM),也称为对齐码块或对齐单元,例如长度为120比特。发送端发送一条串行信号到多路通道时,可以周期性往每个通道插入AM,接收端根据各通道中的AM实施锁定,以便实施多路通道的数据对齐,从而可以实现将多路通道的数据并为一路串行数据。
IEEE 802.3规范的40G/50G/100G/200G/400G多通道(PCS,FEC或PMA)架构中,当数据在不同的逻辑通道与物理通道上传输时,为了保证接收端可以对多条逻辑通道进行数据对齐,IEEE 802.3规范设计了对齐码块。参考图4,为200G/400G的AM格式。其中,CM0,CM1,CM2,CM3,CM4,CM5是所有逻辑通道的共同标识,而UM0,UM1,UM2,UM3,UM4,UM5则唯一标识一个逻辑通道。参考图5,为400G每个逻辑通道的AM格式。接收端只有接收到除UP0-UP2字段(用户可编辑)之外的其他字段均与图5中匹配的AM时,才能对一个逻辑通道进行锁定,从而正确识别出这个逻辑通道的编号。
目前,随着移动智能终端、个人电脑的普及,互联网络已成为人们工作、生活的一部分。而一般情况下,大部分数据在局域网络中都是以明文形式传输的,这样就会存在许多安全隐患,比如:银行帐户的信息被窃取、篡改,遭受恶意网络攻击等,因此保证网络数据传输的安全性已日益成为企业和个人客户的基本要求。而在目前广泛使用的网络安全技术中,数据加密技术是一种保障网络安全的重要手段。
基于MACSEC协议的加密技术,是目前数据网络中较常用的一种安全加密技术,参考图1,该加密技术基于OSI的数据链路层,是一种已标准化的二层加密技术。目前在政府、军队、金融等对数据机密性要求较高场合的网络设备上较多采用该加密技术,如两台路由器设备之间经过光传输设备传输时,可通过基于MACSEC协议的加密技术来保证数据在中间传输设备的安全。
基于MACSEC协议的加密技术的实现层次是在MAC层之上,加密和解密的对象是每一个用户帧。
参考图6,为发送端加密过程示意图。发送端根据加密算法、密钥(Key)和初始化向量(initialization vector,IV),对明文数据(plaintext)(即加密前的数据)进行加密,得到密文数据(ciphertext)(即加密后的数据)。
发送端在发送报文时,在报文中携带密文数据、安全标签(security tag,SecTAG)和加密过程中生成的完整性校验值(integrity check value,ICV)。其中,SecTAG包含密钥标识(Key Identification)、IV标识(IV Identification)。密钥标识用于密文数据对应的加密密钥,IV标识用于指示密文数据对应的IV。
接收端在收到报文后,根据密文数据、密钥、IV和解密算法计算得到明文数据和ICV,并且只有计算出来的ICV与报文中携带的ICV一致时,才认为是正确的,否则解密失败。
上述在MAC层使用基于MACSEC协议的加密技术对每一用户帧进行加密的方法,存在以下问题:
问题1,MACSEC针对每一用户帧或包加密,需要每一帧或包都携带32字节,当平均帧长64字节时,占用32/64=50%用户带宽,代价较大。
问题2,近年来随着网络设备容量的翻倍增长,功耗带来的散热、供电等工程挑战越来越大,客户对降功耗诉求越来越强烈,而随着高性能计算、人工智能等加速推广,对网络时延的关注度也越来越高。尽管基于MACSEC协议的加解密技术是基于以太网数据链路层(二层)实现数据加解密,但随着系统容量提升、端口带宽增长,基于高速率大容量芯片实现MACSEC功能所需功耗代价越来越大,而新业务下时延带来的影响也越来越明显。从实现方式上看,业界多采用在单板外置支持MACSEC功能的物理芯片(参考图7),另外也有基于交换芯片上实现MACSEC功能。不论是基于物理芯片还是基于交换芯片的方式,都与单板硬件强相关,因此对于客户基于已有传统老单板实现MACSEC加解密的需求却无法满足。另外,客户现场应用中对端口加密的需求往往动态变化且难以预测,譬如:在购买网络设备时仅有8个固定端口支持MACSEC功能基本可满足当时需求,若后续应用需要更多MACSEC端口则只能更新硬件方案、追加投资;若购买网络设备的MACSEC端口数远远多于实际需求,又容易过度投资,因此该方案无法满足客户已有传统硬件系统或现场动态变化需求。
问题3,基于MACSEC协议的加密技术不对源MAC地址和目的MAC地址进行加密,存在安全隐患。
为解决上述问题,本申请实施例设计一种轻量级的加密和解密框架,支持通用加密或解密算法。一种实现方法是,将加密和解密功能下移至灵活可插拔模块,例如光模块或其它模块。另一种实现方法是,将加密和解密功能下移至网络设备的物理层,从而在发送加密参数时,通过物理层发送。
比如,参考图7,可以将物理芯片中的去除加解密功能,然后在可插拔光模块内新增加解密功能。与现有技术相比,该方案具有如下改进:
第一,将加解密功能部署于MAC以下的模块中,基于以太网原生AM设计加密解密框架,支持完整性保护校验,且不占用用户业务带宽。
针对上述问题1,在现有技术中,MACSEC针对每一用户帧或包加密,需要每一帧或包都携带32字节,当平均帧长64字节时,占用32/64=50%用户带宽,代价较大。而基于该方案,在MAC层,由于移除了加解密功能,因此每一用户帧不需要携带上述32字节,因此这部分字节可用于携带数据,从而该方案可实现在相同用户业务带宽的前提下,提升 数据发送量,进而提升数据发送速率。
第二,由于本申请实施例将加解密功能下移至灵活可插拔光模块,因此避免了对单板能力的要求,降低了单板的功耗,并且可以基于实际需求,灵活选择可插拔光模块的数量,因而解决了单板上的MACSEC端口数与实际需求不匹配的问题。
第三,由于本申请实施例是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,不会暴露地址信息,因而安全性更高。
再比如,参考图7,可以将物理芯片中的去除加解密功能,然后图3所示的物理层结构中新增加解密功能。与现有技术相比,该方案具有如下改进:
第一,将加解密功能部署于MAC以下的模块中,基于以太网原生AM设计加密解密框架,支持完整性保护校验,且不占用用户业务带宽。
针对上述问题1,在现有技术中,MACSEC针对每一用户帧或包加密,需要每一帧或包都携带32字节,当平均帧长64字节时,占用32/64=50%用户带宽,代价较大。而基于该方案,在MAC层,由于移除了加解密功能,因此每一用户帧不需要携带上述32字节,因此这部分字节可用于携带用户数据,从而该方案可实现在相同用户业务带宽的前提下,提升数据发送量,进而提升数据发送速率。
第二,由于本申请实施例是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,不会暴露地址信息,因而安全性更高。
为解决上述问题,下面结合附图,对本申请实施例提供的数据传输方法进行说明。该数据传输方法在发送端涉及数据加密,在接收端涉及数据解密。
下面先对本申请实施例中出现的一些概念或概念之间的关系进行解释说明。
一、明文数据流
本申请实施例中,N路明文数据流指的是通过N个逻辑通道传输的未经加密的数据流。将N路明文数据流中的任一路明文数据流称为第一明文数据流。第一明文数据流包括至少两个第二AM以及至少两个明文数据段,至少两个第二AM用于N路明文数据流的数据对齐;其中,每两个第二AM之间包括一个明文数据段,每两个明文数据段之间包括一个第二AM。
作为一种实现方法,一路明文数据流内的第二AM是周期性插入的,且同一路明文数据流内的第二AM是相同的,不同路明文数据流内的第二AM不同。其中,每一路明文数据流内的第二AM和明文数据段是周期性出现的。参考图10,为N路明文数据流的一个示意图。每个AM周期内包含一个第二AM和一个明文数据段。
二、密文数据流
本申请实施例中,N路密文数据流指的是通过N个逻辑通道传输的加密的数据流。将N路密文数据流中的任一路密文数据流称为第一密文数据流。第一密文数据流包括至少两个第一AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个第一AM之间包括一个密文数据段和一个加密参数集合;至少两个第一AM用于N路密文数据流的数据对齐,N为正整数。
作为一种实现方法,一路密文数据流内的第一AM是周期性插入的,且同一路密文数据流内的第一AM是相同的,不同路密文数据流内的第一AM不同。
其中,每一路密文数据流内的第一AM、加密参数集合和密文数据段是周期性出现的。参考图9,为N路密文数据流的一个示意图。每个AM周期内包含一个第一AM、一个加密参数集合、一个密文数据段。可选的,每个AM周期还携带一个填充信息。该填充信息可以是使用加密参数集合加密后的填充信息,也可以是未经加密的填充信息。
作为一种实现方法,不同AM周期内携带的信息出现的顺序是相同。例如,参考图9,每个AM周期内均是依次携带第一AM、加密参数集合、填充信息(可选)和密文数据段。
作为另一种实现方法,不同AM周期内携带的信息出现的顺序也可以不同,但可以按照多个AM周期的粒度进行循环。例如,相邻两个AM周期内的第一个AM周期依次携带第一AM、加密参数集合、填充信息(可选)和密文数据段,相邻两个AM周期内的第二个AM周期依次携带第一AM、加密参数集合、密文数据段和填充信息(可选)。后续每相邻两个AM周期内的两个AM周期也是按照同样的方式携带需要发送的信息。
作为一种实现方法,每个AM周期内的加密参数集合可以是连续的,也即是以加密参数段的形式出现。例如参考图9,每个AM周期内的加密参数集合是连续的。每两个密文数据段之间包括一个第一AM和一个加密参数集合,每两个加密参数集合之间包括一个第一AM和一个密文数据段。
作为另一种实现方法,每个AM周期内的加密参数集合也可以不连续。比如,将每个AM周期内的加密参数集合划分为至少两个加密参数子集,该至少两个加密参数子集中的部分加密子集或全部子集不连续。示例性地,每个AM周期内的加密参数集合划分为两个加密参数子集,该两个加密参数子集分别位于同一AM周期内的密文数据段的两侧。
三、明文数据流与密文数据流的关系
本申请实施例中,对N路明文数据流加密,得到N路密文数据流。例如,图9所示的N路密文数据流可以是根据图10所示的N路明文数据流生成的。
作为一种实现方法,N路明文数据流内的第二AM与N路密文数据流内的第一AM对应相同。示例性地,同一路明文数据流内的第二AM是相同的,不同路明文数据流内的第二AM不同,同一路密文数据流内的第一AM是相同的,不同路密文数据流内的第一AM不同,并且,第L路明文数据流内的第二AM与第L路密文数据流内的第一AM相同。例如,参考图9和图10,第一路明文数据流和第一路密文数据流内的AM均是AM1,第二路明文数据流和第二路密文数据流内的AM均是AM2,以此类推。
四、明文数据段、密文数据段
本申请实施例中的明文数据段(如第一明文数据段)包含未加密的数据(也称为加密前的数据),密文数据段(如第一密文数据段、第二密文数据段、第三密文数据段)指的是对明文数据段进行加密后得到的数据段。
五、加密参数集合
本申请实施例中,加密参数集合指的是由一个或多个加密参数构成的集合。该加密参数集合是逻辑上的概念。每两个第一AM之间包含一个加密参数集合。当该加密参数集合 包括多个加密参数时,该多个加密参数可以是连续的,也可以是不连续的,也即可以在多个加密参数之间插入其它信息,如插入密文数据段、填充信息等。
作为一种实现方法,每个AM周期内的加密参数集合包括以下1)至4)中的一项或多项:
1)加密类型,加密类型用于标识是否加密。
作为一种实现方法,该加密类型用于标识该加密类型所在的AM周期内的数据段是否加密。例如参考图9,作为一个具体示例,第X个AM周期内的加密参数集合包含加密类型,该加密类型用于标识第X个AM周期内的数据段是加密数据段。
作为另一种实现方法,该加密类型用于标识该加密类型所在的AM周期之外的其它周期内的数据段是否加密。例如参考图9,作为一个具体示例,第X个AM周期内的加密参数集合包含加密类型,该加密类型用于标识第X+1个AM周期内的数据段是加密数据段,等等。2)密钥标识,密钥标识指示第一密文数据段使用的加密密钥。
这里的第一密文数据段指的是使用该密钥标识指示的密钥加密后的密文数据。
作为一种实现方法,该第一密文数据段与该密钥标识位于同一个AM周期内。也即密钥标识指示的密钥是作用于该密钥标识所在的AM周期内的密文数据段。例如参考图9,第X个AM周期内的加密参数集合1包含密钥标识,该密钥标识指示的密钥用于第X个AM周期内的密文数据段1的加密。
作为另一种实现方法,该第一密文数据段与该密钥标识位于不同的AM周期内。也即密钥标识指示的密钥是作用于该密钥标识所在的AM周期之外的其它AM周期内的密文数据段。例如参考图9,第X个AM周期内的加密参数集合1包含密钥标识,该密钥标识指示的密钥用于第X+1个AM周期内的密文数据段2的加密。
3)初始化向量(IV)标识,初始化向量标识指示第二密文数据段使用的初始化向量。
该第二密文数据段指的是使用该初始化向量标识指示的初始化向量进行加密后的密文数据。
一个加密参数集合内的密钥标识所对应的第一密文数据,与该加密参数集合内的初始化向量标识所对应的第二密文数据,可以是同一个密文数据,也可以是不同的密文数据。
作为一种实现方法,该第一密文数据段与该初始化向量标识位于同一个AM周期内,也即初始化向量标识指示的初始化向量是作用于该初始化向量标识所在的AM周期内的密文数据段。也可以理解为,与第二密文数据段相邻的两个第一AM,和与初始化向量标识相邻的两个第一AM分别相同。例如参考图9,第X个AM周期内的加密参数集合1包含初始化向量标识,该初始化向量标识指示的初始化向量用于第X个AM周期内的密文数据段1的加密。
作为另一种实现方法,该第一密文数据段与该初始化向量标识位于不同的AM周期内。也即初始化向量标识指示的初始化向量是作用于该初始化向量标识所在的AM周期之外的其它AM周期内的密文数据段。例如参考图9,第X个AM周期内的加密参数集合1包含初始化向量标识,该初始化向量标识指示的初始化向量用于第X+1个AM周期内的密文数据段2的加密。
4)完整性校验值。
作为一种实现方法,用于与完整性校验值相邻的两个第一AM之间的密文数据段的完整性校验。例如参考图9,第X个AM周期内的加密参数集合1包含完整性校验值,该完 整性校验值用于第X个AM周期内的密文数据段1的完整性校验。
作为另一种实现方法,完整性校验值用于完整性校验值之前的两个第一AM之间的密文数据段的完整性校验。例如参考图9,第X+1个AM周期内的加密参数集合2包含完整性校验值,该完整性校验值用于第X个AM周期内的密文数据段1的完整性校验。再例如参考图9,第X+1个AM周期内的加密参数集合2包含完整性校验值,该完整性校验值用于第X-1个AM周期(图中未示出)内的密文数据段的完整性校验。再例如参考图9,第X+1个AM周期内的加密参数集合2包含完整性校验值,该完整性校验值用于第X-2个AM周期(图中未示出)内的密文数据段的完整性校验,等等。
六、填充信息
填充信息指的是由一个或多个比特构成的比特信息。在一路密文数据流中,每两个第一AM之间可以插入一个填充信息或者是不插入填充信息。当需要插入填充信息,该插入的填充信息的比特数需要一定条件,比如在插入填充信息后,保证进行FEC编码时AM是始终位于一个FEC码字的开端,从而有利于解密侧识别AM后进行FEC解码。
对于填充信息的比特数的具体计算方式,可以参考下文描述。
参考图8,为本申请实施例提供的数据传输方法示意图。该方法可以由发送侧的灵活可插拔光模块执行或由发送侧的网络设备的物理层执行。该方法涉及数据加密功能的实现。
该方法包括以下步骤:
步骤801,生成N路密文数据流。
步骤802,发送N路密文数据流。
基于该方案,将加密参数以及密文数据通过N路数据流中进行发送。该方法可以应用于光模块或网络设备的物理层,因而发送的加密参数不占用用户业务带宽,从而提升数据发送量,进而提升数据发送速率。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
作为一种实现方法,上述步骤801中可以根据以下方法生成N路密文数据流:获取N路明文数据流;根据第一明文数据流和至少两个加密参数集合,生成第一密文数据流。
作为一种实现方法,当该数据传输方法应用于光模块时,则光模块可以通过以下方法获取N路明文数据流:接收M路物理通道信号;其中,M为正整数;按照设定的比例,将M路物理通道信号转化为N路明文数据流。
作为一种实现方法,根据第一明文数据流和至少两个加密参数集合,生成第一密文数据流的方法,比如可以是:根据第一加密参数集合对第一明文数据段进行加密,得到第三密文数据段;以及,在第一明文数据流中插入第一加密参数集合,得到第一密文数据流。其中,第一明文数据段是第一明文数据流中的任一个明文数据段,第三密文数据段是使用第一加密参数集合对第一明文数据段进行加密后的密文数据段。比如,参考图9和图10,可以使用加密参数集合1对第X个AM周期内的明文数据段1加密,得到密文数据段1,然后在第X个AM周期内插入加密参数集合1,从而得到第X个AM周期内的第一AM、加密参数集合1和密文数据段1,其中,第一AM与第二AM相同。
作为一种实现方法,在第一明文数据流中插入第一加密参数集合,得到第一密文数据流,可以是:在第一明文数据流中插入第一加密参数集合,得到第二密文数据流;对第二密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到第一密文数据流。也即,在对每一路明文数据流进行加密得到密文数据流之后,还包括对每一路密文数据流分别进行前向纠错编码,或进行加扰和前向纠错编码的操作。
作为另一种实现方法,在第一明文数据流中插入第一加密参数集合,得到第一密文数据流,可以是:在N路第一明文数据流中分别插入第一加密参数集合,得到N路第三密文数据流;按照设定的比例,将N路第三密文数据流转化为至少一路串行密文数据流;对至少一路串行密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到至少一路编码后的串行密文数据流;将至少一路编码后的串行密文数据流转化为N路第一密文数据流。也即,在对每一路明文数据流进行加密得到密文数据流之后,进一步还将加密后的N路密文数据流转化为一路或多路串行密文数据流,然后对一路或多路串行密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,之后再转化为N路密文数据流。
上面介绍了对明文数据流进行加密得到密文数据流的各种不同实现方式。结合上述方案,为了保证进行FEC编码时AM是始终位于一个FEC码字的开端,从而有利于解密侧识别AM后进行FEC解码,本申请实施例可以在加密后的各路密文数据流的各个AM周期内插入相应比特的填充信息(可以是加密的填充信息或未经加密的填充信息)。也即,N路密文数据流中的第一密文数据流还包括至少两个填充信息,每个AM周期内携带一个填充信息。可选的,每两个第一AM之间包括一个填充信息,每两个密文数据段之间还包括一个填充信息,每两个填充信息之间包括一个第一AM、一个密文数据段和一个加密参数集合。例如,参考图9,每个AM周期内的密文数据段与加密参数集合之间插入一个填充信息。
作为一种实现方法,第一密文数据流内的加密参数集合用于对第一密文数据流内的密文数据段进行加密。
作为另一种实现方法,第一密文数据流内的加密参数集合用于对第一密文数据流内的密文数据段和填充信息进行加密。例如,参考图9和图10,可以使用加密参数集合1对明文数据段1和填充信息1加密,得到密文数据段1和加密后的填充信息1,然后在第X个AM周期内插入加密后的填充信息1和加密参数集合1。
作为一种实现方法,可以根据相邻两个第一AM之间相隔的比特数以及相邻两个第一AM之间的加密参数集合的比特数,确定相邻两个第一AM之间的填充信息的比特数。示例性地,可以通过以下公式确定相邻两个第一AM之间的填充信息的比特数:
(Y+a+P)mod Q=0,其中,Y为根据相邻两个第一AM之间相隔的比特数,a为相邻两个第一AM之间的加密参数集合的比特数,P为相邻两个第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
可选的,P为满足公式的最小值。
示例性,当上述发送侧的基于加密的数据传输方法应用光模块时,参考图11,为本申请实施例方案部署在光模块时的部署位置示意图。本申请实施例方案可以在支持以太网连 接的光模块落地。光模块内微控制器单元(micro controller unit,MCU)负责配置各个功能模块的参数,比如,MCU可用于配置加密和解密所需的初始化参数,包括启动或暂停加密解密功能、配置上层协商好的密钥等关键信息。结合图11所示的光模块架构,本申请实施例的装置架构可以将M条物理通道(M为正整数)与光数字信号处理芯片(optical digital signal processor,oDSP)内的K条通道(K为正整数)之间的BitMUX一分为二,分别为M:N和N:K两个bitMUX,N为逻辑通道数量,N为正整数,然后在两个BitMUX之间引入加密解密以及相应的功能模块。
参考图12,为本申请实施例提供的数据传输方法示意图。该方法可以由发送侧的灵活可插拔光模块执行。该方法是上述图8对应的实施例的一个具体示例。参考图13A和图13B,为光模块实现加密功能的结构示意图。
参考图12,该方法包括以下步骤:
步骤1201,将接收的M个物理通道的信号转换为N个逻辑通道的信号。
参考图13A或图13B,通过BitMuX(A)将M个物理通道的信号转换为N个逻辑通道的信号。
其中,每个逻辑通道的信号对应一路明文数据流。
步骤1202,搜索并锁定N个逻辑通道中各个逻辑通道内的AM。
比如,每一个逻辑通道分别搜索AM,并在指定间隔(不同速率以太网MAC/PHY,对齐单元的间隔不同)内锁定(Lock),然后消除偏移(Deskew)。
以图5为例进行说明。
搜索AM:在每个通道接收的比特流中(用数组X[0:]表示),取X[0:119]的120-bit的码块,与图5中定义的CM0,CM1,CM2,CM3,CM4,CM5(6个字节,12个半字节)进行匹配。当不匹配的nibble(半字节)个数小于等于3时,认为此次匹配成功。如果此次不匹配,则取X[1:120]的120-bit的码块进行匹配,依次类推。
锁定AM:若某次AM匹配后,从当前位置后第2785280开始的120-bit进行匹配,若同样匹配,则表示AM锁定。
通道Deskew:当16个通道的AM均锁定后,对16个通道进行Deskew,消除不同通道之间的偏差,实现通道之间的对齐。
步骤1203,在各个AM之后插入加密参数集合和填充信息(Pad)。
比如,插入的加密参数集合包括以下一个或多个:加密类型、密钥标识、IV、ICV。其中,加密类型用于标识是否加密,密钥标识用于指示使用的加密密钥,IV为加密过程中使用的加密参数,ICV用于接收端对加密数据做完整性校验。
参考图14,为插入的加密参数集合和填充信息示意图。其中,每个AM周期内的加密参数集合包括加密类型、密钥标识、IV和ICV。
可选的,一个AM周期内的IV作用于该AM周期内的密文数据段和填充信息。这里的填充信息是经过加密的填充信息。
可选的,一个AM周期内的ICV作用于该AM周期的上一个AM周期内的密文数据段和填充信息。这里的填充信息是经过加密的填充信息。也即,接收端在解密时,使用第X+1个AM周期内的ICV对第X个AM周期内的密文数据段和填充信息做完整性校验。
需要说明的是,为保证AM始终位于一个FEC码字的开端,每个AM周期内插入的 填充信息的大小需要满足一定条件。
假设未实施加密前,2个AM之间相隔的比特数为Y,选择的FEC为RS(n,k,m),其中n为编码后一个FEC码字所包含的符号的个数,k为一个FEC码字所包含的数据符号个数,m为一个符号所包含的比特数,k*m表示一个FEC码字包含的比特数,mod为取模运算。插入的Pad的比特数为P,加密参数集合的比特数为a,则P可以是满足以下条件的最小值:
(Y+a+P)mod(k*m)=0
下面结合具体示例进行说明。
示例一
MACSEC支持完整性校验功能。为了和MAC对标,本方案在物理层实施加解密,同样需要考虑支持完整性校验功能。由于链路存在误码,要做完整性保护,可以使用FEC纠正由于链路产生的误码,然后再做完整性校验。
以400G以太网MAC/PHY/光模块为例,在光模块内的电层实现本发明所述技术方案,物理通道为8路50Gbps(N=8),光模块内电层与oDSP相关补充功能相关的通道为2路(K=2)。
算法采用常用的高级加密标准(Advanced Encryption Standard,AES)-伽罗瓦/计数器模式(Galois/Counter Mode,GCM)。
在该示例中,每个逻辑通道独立完成锁定AM,加密和解密,以及插入或提取加密参数,彼此无关联。对于400Gbps速率,共16个逻辑通道(即M=16)。
选择Type域为32比特,用于区分普通非加密AM(Type=00H)与加密AM(Type=01H)。选择Key Index域为8比特,值的变化意味从密钥的切换,比如从”00000001”变化为”000000010”,则解密侧需要选择新的Key进行解密。选择IV长度为12字节(即96比特),ICV长度为16字节(即128比特)。
为了保证AM始终位于FEC码字的开端,需要插入P比特的Pad。对于400G,2个AM组之间相隔的比特数Y=278528*10,选择的FEC为RS(544,514,10),一个FEC码字所包含的数据符号个数为k=514,一个符号所包含的比特个数m=10,则P可以是满足以下条件的最小值:
(278528*10+32+8+128+96+P)mod(514*10)=0
计算得到P=336比特。
示例二
MACSEC支持完整性校验功能。为了和MAC对标,本方案在物理层实施加解密,同样需要考虑支持完整性校验功能。由于链路存在误码,要做完整性保护,可以使用FEC纠正由于链路产生的误码,然后再做完整性校验。
以100G以太网MAC/PHY/光模块为例,在光模块内的电层实现本发明所述技术方案,物理通道为4路50Gbps(N=4),光模块内电层与oDSP相关补充功能相关的通道为2路(K=2)。
算法采用常用的AES-GCM。
在该示例中,每个逻辑通道独立完成锁定AM,加密和解密,以及插入或提取加密参数,彼此无关联。对于100Gbps速率,共4个逻辑通道(即M=4)。
选择Type域为32比特,用于区分普通非加密AM码块(Type=00H)与加密AM码块(Type=01H)。选择Key Index域为8比特,值的变化意味从密钥的切换,比如从”00000001”变化为”000000010”,则解密侧需要选择新的Key进行解密。选择IV长度为12字节(即96比特),ICV长度为16字节(即128比特)。
为了保证AM字始终位于FEC码字的开端,需要插入P比特的Pad。对于100G,2个AM组之间相隔的比特数Y=557056*10,选择的FEC为RS(544,514,10),一个FEC码字所包含的数据符号个数为k=514,一个符号所包含的比特个数m=10,则P可以是满足以下条件的最小值:
(557056*10+32+8+128+96+P)mod(514*10)=0
计算得到P=936比特。
作为一种实现方法,本申请实施例中,密钥标识可以由MCU配置并修改。第一次启动时,IV可由MCU配置,之后IV可以按照一定规则自动生成,比如由加密模块自动生成,由AM锁定模块插入,解密模块提取密钥标识、IV。
作为一种实现方法,本申请实施例中,为了保证解密速度,第X个AM周期的ICV,存储在第X+1个AM周期的ICV字段域。当接收到第X个AM周期的信号完成解密,计算ICV后保存下来,当接收到第X+1个AM周期的ICV后,将保存的ICV与该接收到的ICV进行对比,若一致则完整性校验成功,若不一致,则完整性校验失败,可以产生一个告警信号。
步骤1204,根据加密参数集合,对AM之后的明文数据段和填充信息进行加密,得到N路加密信号。
作为一种实现方法,参考图13A或图13B,在对AM之后的数据和填充信息进行加密之后,还包括:针对每个逻辑通道的信号(包含密文数据段、加密参数集合等信息)通过Mux聚合为串行码块流后,进行扰码(Scrambler)、FEC编码(FEC Encode),再通过De-Mux,形成N路加密信号。
其中,图13A所示的方法是通过Mux将N个逻辑通道的加密信号转化为一路或多路串行加密信号,然后对该一路或多路串行加密信号进行加扰和FEC编码,然后通过De-Mux将加扰和FEC编码后的一路或多路串行加密信号转化为N个逻辑通道的信号(即经过了加密、加扰和FEC编码之后的信号)。
图13B所示的方法是将分别对每个逻辑通道的加密信号(或每个逻辑通道的数据流)进行加扰和FEC编码,得到N个逻辑通道的信号(即经过了加密、加扰和FEC编码之后的信号)。
步骤1205,将N路加密信号转换为K路数字信号。
参考图13A或图13B,通过BitMuX(B)将M路加密信号转换为K路数字信号,然后发送至oDSP。
基于上述方案,在光模块进行加密,不占用用户业务带宽,因而可以提升数据发送量。由于光模块灵活可插拔,因而可以根据客户实际需求配置相应数量的光模块,从而避免了功耗增加。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
参考图15,为本申请实施例提供的数据传输方法示意图流程示意图。该方法可以由接收侧的灵活可插拔光模块执行或由接收侧的网络设备的物理层执行。该方法涉及数据解密功能的实现。
该方法包括以下步骤:
步骤1501,获取N路密文数据流。
第一密文数据流是N路密文数据流中的任一路密文数据流,第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个第一AM之间包括一个密文数据段和一个加密参数集合;至少两个第一AM用于N路密文数据流的数据对齐,N为正整数。
步骤1502,根据至少两个加密参数集合对第一密文数据流进行解密,得到第一明文数据流,第一明文数据流是N路明文数据流中的任一路明文数据流。
基于该方案,将加密参数以及密文数据通过N路数据流中进行发送。该方法可以应用于光模块或网络设备的物理层,因而发送的加密参数不占用用户业务带宽,从而提升数据发送量,进而提升数据发送速率。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
其中,关于N路明文数据流以及N路密文数据流的结构的各种不同实现方法,可以参考前述加密侧方案的相关描述,这里不再赘述。
作为一种实现方法,根据至少两个加密参数集合对第一密文数据流进行解密,得到第一明文数据流,可以是:根据第一加密参数集合对第三密文数据段进行解密,得到第一明文数据段;以及,在第一明文数据流中移除第一加密参数集合,得到第一明文数据流。其中,第一明文数据段是第一明文数据流中的任一个明文数据段,第三密文数据段是使用第一加密参数集合对第一明文数据段进行加密后的密文数据段。
作为一种实现方法,当加密侧对N路明文数据流加密的同时,还进行了前向纠错编码或进行了加扰和前向纠错编码,则解密侧在对N路密文数据流解密之前,还需要对N路密文数据流进行前向纠错解码,或进行解扰和前向纠错解码。一种方法是:对第一密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到第二密文数据流;然后根据第一加密参数集合对第三密文数据段进行解密,得到第一明文数据段。另一种方法是:按照设定的比例,将N路第一密文数据流转化为至少一路串行密文数据流;对至少一路串行密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到至少一路解码后的串行密文数据流;将至少一路解码后的串行密文数据流转化为N路第三密文数据流;根据第一加密参数集合,分别对N路第三密文数据流的第三密文数据段进行解密,得到N个第一明文数据段。
需要说明的是,当发送侧是对明文数据段和填充信息进行加密,则接收侧需要对密文数据段和加密后的填充信息进行解密。也即,如果填充信息被加密了,则相应的需要对填充信息进行解密。
参考图16,为本申请实施例提供的数据传输方法示意图。该方法可以由接收侧的灵活可插拔光模块执行。该方法是上述图15对应的实施例的一个具体示例。参考图17A和图17B,为光模块实现解密功能的结构示意图。该图17A或图17B所示的结构,与图13A或图13B所示的结构可以配合使用,分别实现加密和解密功能。
参考图16,该方法包括以下步骤:
步骤1601,将接收的K路数字信号转换为N个逻辑通道的加密信号。
参考图17A或图17B,通过BitMuX(A)将K路数字信号转换为N个逻辑通道的加密信号。
步骤1602,搜索并锁定N个逻辑通道中各个逻辑通道内的AM。
比如,每一个逻辑通道分别搜索AM,并在指定间隔(不同速率以太网MAC/PHY,对齐单元的间隔不同)内锁定(Lock),然后消除偏移(Deskew)。
步骤1603,根据AM后的加密参数集合,对逻辑通道的加密信号进行解密,得到N个逻辑通道的解密信号。
比如,针对每个逻辑通道的信号,通过加密参数中的Type域,判断当前AM周期的数据是否加密,若是加密的,则提取加密参数进行解密,并计算ICV进行保存。当接收到下一个AM周期的ICV时,将保存的ICV与该接收到的ICV进行对比,判断是否一致。若一致则完整性校验成功,若不一致,则完整性校验失败,可以产生一个告警信号。
可选的,根据AM后的加密参数集合,对逻辑通道的加密信号进行解密,得到N个逻辑通道的解密信号,一种实现方法是:参考图17A,将N个逻辑通道的信号通过Mux聚合为一路或多路串行信号流后,进行FEC解码(FEC Decode)、解扰(De-Scrambler),再通过De-Mux,转化为N个逻辑通道的加密信号,然后对该N个逻辑通道的加密信号分别进行解密和填充移除,得到N个逻辑通道的解密信号。
可选的,根据AM后的加密参数集合,对逻辑通道的加密信号进行解密,得到N个逻辑通道的解密信号,另一种实现方法是:参考图17B,分别对每个逻辑通道的信号进行FEC解码、解扰、解密和填充移除,得到N个逻辑通道的信号。
步骤1604,移除AM之后的加密参数集合和填充信息。
步骤1605,将N个逻辑通道的解密信号,转换为M个物理通道的信号。
参考图17A或图17B,通过BitMuX(B)将M个逻辑通道的信号,转换为N物理通道的信号。
基于上述方案,在光模块进行解密,不占用用户业务带宽,因而可以提升数据发送量。由于光模块灵活可插拔,因而可以根据客户实际需求配置相应数量的光模块,从而避免了功耗增加。并且,由于该方案是对物理层的比特流进行加密,一个用户帧中所有的比特(包括源MAC地址、目的MAC地址)都会被加密,因而不会暴露地址信息,可以提升安全性。
本申请实施例应用于光模块时,基于虚拟通道的AM,设计承载加密解密参数的框架,在模块内实现加密和解密功能。加密侧在加密后进行FEC编码,解密侧在FEC解码后再进行解密,由于FEC具有一定纠错能力,可避免链路误码对ICV的影响,因此支持完整性保护ICV校验。原BitMUX结构一分为二,插入本发明方案,不影响模块内其他组件。模块内各路虚拟通道独立实施加密和解密。通过插入一定数目的填充信息,保证经过FEC 编码后,AM字始终位于一个FEC码字的开端。
以上结合图11至图14,描述了将图8对应的实施例中的加密方案应用于光模块的具体实现过程。作为另一种实现方法,本申请还可以将图8对应的实施例中的加密方案应用于网络设备的物理层。下面结合图3进行描述。
参考图3,通过AM组插入之后,得到一路串行明文数据流,然后根据一路串行明文数据流生成N路串行明文数据流,对N路串行明文数据流分别进行加密得到N路密文数据流,再将N路密文数据流聚合为一路串行密文数据流,接着通过分发1,将一路密文数据流转化为2路串行密文数据流,分别对2路串行密文数据流进行里德-所罗门编码后,通过分发2,将编码后的2路串行密文数据流转化为8路密文数据流,然后通过PMA将8路密文数据流转化为M路物理通道的信号。
以上结合图11、图16及图17A(或图17B),描述了将图15对应的实施例中的解密方案应用于光模块的具体实现过程。作为另一种实现方法,本申请还可以将图15对应的实施例中的解密方案应用于网络设备的物理层。下面结合图3进行描述。
参考图3,接收到M路物理通道的加密信号后,通过PMA转化为8路密文数据流,然后实施AM锁定、去抖(即消除偏移)、通道重排序和解交织操作后得到两路串行密文数据流,然后对两路串行密文数据流进行里德-所罗门解码后进行交织,得到一路串行密文数据流,然后将一路串行密文数据流转化为N路密文数据流,然后分别对N路密文数据流进行解密得到N路明文数据流,然后将N路明文数据流转化为一路串行明文数据流,并通过AM组移出。
参考图18,为本申请实施例提供的一种通信装置的示意图。该装置用于实现上述实施例中对应通信装置所执行的各个步骤,如图18所示,该装置1800包括收发单元1810和处理单元1820。
在第一个实施例中,该通信装置应用于光模块或网络设备,且用于实现加密功能,则:
处理单元1820,用于生成N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;收发单元1810,用于发送所述N路密文数据流。
作为一种可能的实现方法,所述加密参数集合包括以下一项或多项:
加密类型,所述加密类型用于标识是否加密;
密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;
初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
作为一种可能的实现方法,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
作为一种可能的实现方法,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
作为一种可能的实现方法,处理单元1820,具体用于获取N路明文数据流,第一明文 数据流是所述N路明文数据流中的任一路明文数据流,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,所述至少两个第二AM用于所述N路明文数据流的数据对齐;其中,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM;根据所述第一明文数据流和所述至少两个加密参数集合,生成所述第一密文数据流。
作为一种可能的实现方法,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;处理单元1820,具体用于根据所述第一加密参数集合对所述第一明文数据段进行加密,得到所述第三密文数据段;以及,在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流。
作为一种可能的实现方法,处理单元1820,具体用于在所述第一明文数据流中插入所述第一加密参数集合,得到第二密文数据流;对所述第二密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到所述第一密文数据流。
作为一种可能的实现方法,处理单元1820,具体用于在N路所述第一明文数据流中分别插入所述第一加密参数集合,得到N路第三密文数据流;按照设定的比例,将所述N路第三密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到至少一路编码后的串行密文数据流;将所述至少一路编码后的串行密文数据流转化为N路所述第一密文数据流。
作为一种可能的实现方法,处理单元1820,具体用于通过收发单元1810接收M路物理通道信号;其中,M为正整数;按照设定的比例,将所述M路物理通道信号转化为所述N路明文数据流。
作为一种可能的实现方法,每两个所述密文数据段之间包括一个所述第一AM和一个所述加密参数集合,每两个所述加密参数集合之间包括一个所述第一AM和一个所述密文数据段;或者,每两个所述第一AM之间的一个所述加密参数集合划分为至少两个加密参数子集,所述至少两个加密参数子集中的部分加密子集或全部子集不连续。
作为一种可能的实现方法,处理单元1820,具体用于在所述第一明文数据流中插入所述第一加密参数集合和填充信息,得到所述第一密文数据流。
作为一种可能的实现方法,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
作为一种可能的实现方法,根据相邻两个所述第一AM之间相隔的比特数以及所述相邻两个所述第一AM之间的加密参数集合的比特数,确定所述相邻两个所述第一AM之间的填充信息的比特数。
作为一种可能的实现方法,(Y+a+P)mod Q=0,其中,Y为根据相邻两个所述第一AM之间相隔的比特数,a为所述相邻两个所述第一AM之间的加密参数集合的比特数,P为所述相邻两个所述第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
作为一种可能的实现方法,P为满足公式的最小值。
在第二个实施例中,该通信装置应用于光模块或网络设备,且用于实现解密功能,则:
收发单元1810,用于获取N路密文数据流,第一密文数据流是所述N路密文数据流 中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;处理单元1820,用于根据所述至少两个加密参数集合对所述第一密文数据流进行解密,得到第一明文数据流,所述第一明文数据流是N路明文数据流中的任一路明文数据流。
作为一种可能的实现方法,所述加密参数集合包括以下一项或多项:
加密类型,所述加密类型用于标识是否加密;
密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;
初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
作为一种可能的实现方法,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
作为一种可能的实现方法,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
作为一种可能的实现方法,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM,所述至少两个第二AM用于所述N路明文数据流的数据对齐。
作为一种可能的实现方法,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;处理单元1820,用于根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段;以及,在所述第一明文数据流中移除所述第一加密参数集合,得到所述第一明文数据流。
作为一种可能的实现方法,处理单元1820,用于对所述第一密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到第二密文数据流;根据所述第一加密参数集合对所述第二密文数据流的所述第三密文数据段进行解密,得到所述第一明文数据段。
作为一种可能的实现方法,处理单元1820,用于按照设定的比例,将N路所述第一密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到至少一路解码后的串行密文数据流;将所述至少一路解码后的串行密文数据流转化为N路第三密文数据流;根据所述第一加密参数集合,分别对所述N路第三密文数据流的所述第三密文数据段进行解密,得到N个所述第一明文数据段。
作为一种可能的实现方法,每两个所述密文数据段之间包括一个所述第一AM和一个所述加密参数集合,每两个所述加密参数集合之间包括一个所述第一AM和一个所述密文数据段;或者,每两个所述第一AM之间的一个所述加密参数集合划分为至少两个加密参数子集,所述至少两个加密参数子集中的部分加密子集或全部子集不连续。
作为一种可能的实现方法,处理单元1820,具体用于在所述第一明文数据流中移除所述第一加密参数集合和填充信息,得到所述第一明文数据流。
作为一种可能的实现方法,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
作为一种可能的实现方法,所述相邻两个所述第一AM之间的填充信息的比特数,是 根据相邻两个所述第一AM之间相隔的比特数以及所述相邻两个所述第一AM之间的加密参数集合的比特数确定的。
作为一种可能的实现方法,(Y+a+P)mod Q=0,其中,Y为根据相邻两个所述第一AM之间相隔的比特数,a为所述相邻两个所述第一AM之间的加密参数集合的比特数,P为所述相邻两个所述第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
作为一种可能的实现方法,P为满足公式的最小值。
可选的,上述通信装置1800还可以包括存储单元,该存储单元用于存储数据或者指令(也可以称为代码或者程序),上述各个单元可以和存储单元交互或者耦合,以实现对应的方法或者功能。
应理解以上装置中单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以成为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。
在一个例子中,以上任一装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA),或这些集成电路形式中至少两种的组合。再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如中央处理器(Central Processing Unit,CPU)或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
以上收发单元1810是一种该装置的接口电路,用于从其它装置接收信号或向其它装置发送信号。例如,当该装置以芯片的方式实现时,该收发单元1810是该芯片用于从其它芯片或装置接收信号,和/或向其它芯片或装置发送信号的接口电路。
参考图19,为本申请实施例提供的一种通信装置示意图,用于实现以上实施例中通信装置(如光模块内的通信装置或网络设备内的通信装置)的操作。如图19所示,该通信装置包括:处理器1910和接口1930,可选的,该通信装置还包括存储器1920。接口1930用于实现与其他设备进行通信。
以上实施例中通信装置执行的方法可以通过处理器1910调用存储器(可以是通信装置中的存储器1920,也可以是外部存储器)中存储的程序来实现。即,通信装置可以包括处理器1910,该处理器1910通过调用存储器中的程序,以执行以上方法实施例中通信装置执行的方法。这里的处理器可以是一种具有信号的处理能力的集成电路,例如CPU。通信装置可以通过配置成实施以上方法的一个或多个集成电路来实现。例如:一个或多个ASIC,或,一个或多个微处理器DSP,或,一个或者多个FPGA等,或这些集成电路形式 中至少两种的组合。或者,可以结合以上实现方式。
具体的,图18中的收发单元1810和处理单元1820的功能/实现过程可以通过图19所示的通信装置1900中的处理器1910调用存储器1920中存储的计算机可执行指令来实现。或者,图18中的处理单元1820的功能/实现过程可以通过图19所示的通信装置1900中的处理器1910调用存储器1920中存储的计算机执行指令来实现,图18中的收发单元1810的功能/实现过程可以通过图19中所示的通信装置1900中的接口1930来实现。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
本申请还提供了一种计算机可读介质,其上存储有计算机程序,该计算机程序被计算机执行时实现上述任意方法实施例的功能。
本申请还提供了一种计算机程序产品,该计算机程序产品被计算机执行时实现上述任意方法实施例的功能。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。
本申请实施例中所描述的各种说明性的逻辑单元和电路可以通过通用处理器,数字信号处理器,专用集成电路(ASIC),现场可编程门阵列(FPGA)或其它可编程逻辑装置,离散门或晶体管逻辑,离散硬件部件,或上述任何组合的设计来实现或操作所描述的功能。通用处理器可以为微处理器,可选地,该通用处理器也可以为任何传统的处理器、控制器、微控制器或状态机。处理器也可以通过计算装置的组合来实现,例如数字信号处理器和微处理器,多个微处理器,一个或多个微处理器联合一个数字信号处理器核,或任何其它类似的配置来实现。
本申请实施例中所描述的方法或算法的步骤可以直接嵌入硬件、处理器执行的软件单元、或者这两者的结合。软件单元可以存储于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read-Only Memory,ROM)、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动磁盘、CD-ROM或本领域中其它任意形式的存储媒介中。示例性地,存储媒介可以与处理器连接,以使得处理器可以从存储媒介中读取信息,并可以 向存储媒介存写信息。可选地,存储媒介还可以集成到处理器中。处理器和存储媒介可以设置于ASIC中。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个或多个示例性的设计中,本申请所描述的上述功能可以在硬件、软件、固件或这三者的任意组合来实现。如果在软件中实现,这些功能可以存储与电脑可读的媒介上,或以一个或多个指令或代码形式传输于电脑可读的媒介上。电脑可读媒介包括电脑存储媒介和便于使得让电脑程序从一个地方转移到其它地方的通信媒介。存储媒介可以是任何通用或特殊电脑可以接入访问的可用媒体。例如,这样的电脑可读媒体可以包括但不限于RAM、ROM、EEPROM、CD-ROM或其它光盘存储、磁盘存储或其它磁性存储装置,或其它任何可以用于承载或存储以指令或数据结构和其它可被通用或特殊电脑、或通用或特殊处理器读取形式的程序代码的媒介。此外,任何连接都可以被适当地定义为电脑可读媒介,例如,如果软件是从一个网站站点、服务器或其它远程资源通过一个同轴电缆、光纤电脑、双绞线、数字用户线(DSL)或以例如红外、无线和微波等无线方式传输的也被包含在所定义的电脑可读媒介中。所述的碟片(disk)和磁盘(disc)包括压缩磁盘、镭射盘、光盘、数字通用光盘(英文:Digital Versatile Disc,简称:DVD)、软盘和蓝光光盘,磁盘通常以磁性复制数据,而碟片通常以激光进行光学复制数据。上述的组合也可以包含在电脑可读媒介中。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。本申请说明书的上述描述可以使得本领域技术任何可以利用或实现本申请的内容,任何基于所公开内容的修改都应该被认为是本领域显而易见的,本申请所描述的基本原则可以应用到其它变形中而不偏离本申请的发明本质和范围。因此,本申请所公开的内容不仅仅局限于所描述的实施例和设计,还可以扩展到与本申请原则和所公开的新特征一致的最大范围。
尽管结合具体特征及其实施例对本申请进行了描述,显而易见的,在不脱离本申请的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本申请的示例性说明,且视为已覆盖本申请范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包括这些改动和变型在内。
Claims (35)
- 一种数据传输方法,其特征在于,包括:生成N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;发送所述N路密文数据流。
- 如权利要求1所述的方法,其特征在于,所述加密参数集合包括以下一项或多项:加密类型,所述加密类型用于标识是否加密;密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
- 如权利要求2所述的方法,其特征在于,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
- 如权利要求2或3所述的方法,其特征在于,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
- 如权利要求1-4任一所述的方法,其特征在于,所述生成N路密文数据流,包括:获取N路明文数据流,第一明文数据流是所述N路明文数据流中的任一路明文数据流,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,所述至少两个第二AM用于所述N路明文数据流的数据对齐;其中,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM;根据所述第一明文数据流和所述至少两个加密参数集合,生成所述第一密文数据流。
- 如权利要求5所述的方法,其特征在于,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;所述根据所述第一明文数据流和所述至少两个加密参数集合,生成所述第一密文数据流,包括:根据所述第一加密参数集合对所述第一明文数据段进行加密,得到所述第三密文数据段;以及,在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流。
- 如权利要求6所述的方法,其特征在于,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在所述第一明文数据流中插入所述第一加密参数集合,得到第二密文数据流;对所述第二密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到所述第一密文数据流。
- 如权利要求6所述的方法,其特征在于,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在N路所述第一明文数据流中分别插入所述第一加密参数集合,得到N路第三密文数据流;按照设定的比例,将所述N路第三密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错编码,或进行加扰和前向纠错编码,得到至少一路编码后的串行密文数据流;将所述至少一路编码后的串行密文数据流转化为N路所述第一密文数据流。
- 如权利要求5-8任一所述的方法,其特征在于,所述获取N路明文数据流,包括:接收M路物理通道信号;其中,M为正整数;按照设定的比例,将所述M路物理通道信号转化为所述N路明文数据流。
- 如权利要求1-9任一所述的方法,其特征在于,每两个所述密文数据段之间包括一个所述第一AM和一个所述加密参数集合,每两个所述加密参数集合之间包括一个所述第一AM和一个所述密文数据段;或者,每两个所述第一AM之间的一个所述加密参数集合划分为至少两个加密参数子集,所述至少两个加密参数子集中的部分加密子集或全部子集不连续。
- 如权利要求6所述的方法,其特征在于,所述在所述第一明文数据流中插入所述第一加密参数集合,得到所述第一密文数据流,包括:在所述第一明文数据流中插入所述第一加密参数集合和填充信息,得到所述第一密文数据流。
- 如权利要求11所述的方法,其特征在于,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
- 如权利要求11或12所述的方法,其特征在于,还包括:根据相邻两个所述第一AM之间相隔的比特数以及所述相邻两个所述第一AM之间的加密参数集合的比特数,确定所述相邻两个所述第一AM之间的填充信息的比特数。
- 如权利要求13所述的方法,其特征在于,(Y+a+P)mod Q=0,其中,Y为根据相邻两个所述第一AM之间相隔的比特数,a为所述相邻两个所述第一AM之间的加密参数集合的比特数,P为所述相邻两个所述第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
- 如权利要求14所述的方法,其特征在于,P为满足公式的最小值。
- 如权利要求1-15任一所述的方法,其特征在于,所述方法应用于光模块。
- 一种数据传输方法,其特征在于,包括:获取N路密文数据流,第一密文数据流是所述N路密文数据流中的任一路密文数据流,所述第一密文数据流包括至少两个第一对齐标识AM、至少两个加密参数集合以及至少两个密文数据段;其中,每两个所述第一AM之间包括一个所述密文数据段和一个所述加密参数集合;所述至少两个第一AM用于所述N路密文数据流的数据对齐,N为正整数;根据所述至少两个加密参数集合对所述第一密文数据流进行解密,得到第一明文数据流,所述第一明文数据流是N路明文数据流中的任一路明文数据流。
- 如权利要求17所述的方法,其特征在于,所述加密参数集合包括以下一项或多项:加密类型,所述加密类型用于标识是否加密;密钥标识,所述密钥标识指示第一密文数据段使用的加密密钥;初始化向量标识,所述初始化向量标识指示第二密文数据段使用的初始化向量。
- 如权利要求18所述的方法,其特征在于,与所述第二密文数据段相邻的两个第一AM,和与所述初始化向量标识相邻的两个第一AM分别相同。
- 如权利要求18或19所述的方法,其特征在于,所述加密参数集合还包括完整性校验值,所述完整性校验值用于所述完整性校验值之前的两个所述第一AM之间的密文数据段的完整性校验。
- 如权利要求17-20任一所述的方法,其特征在于,所述第一明文数据流包括至少两个第二AM以及至少两个明文数据段,每两个所述第二AM之间包括一个所述明文数据段,每两个所述明文数据段之间包括一个所述第二AM,所述至少两个第二AM用于所述N路明文数据流的数据对齐。
- 如权利要求21所述的方法,其特征在于,第一明文数据段是所述至少两个明文数据段中的任一个明文数据段,第三密文数据段是使用所述至少两个加密参数集合中的第一加密参数集合对所述第一明文数据段进行加密后的密文数据段;所述根据所述至少两个加密参数集合对所述第一密文数据流进行解密,得到第一明文数据流,包括:根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段;以及,在所述第一明文数据流中移除所述第一加密参数集合,得到所述第一明文数据流。
- 如权利要求22所述的方法,其特征在于,所述根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段,包括:对所述第一密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到第二密文数据流;根据所述第一加密参数集合对所述第二密文数据流的所述第三密文数据段进行解密,得到所述第一明文数据段。
- 如权利要求22所述的方法,其特征在于,所述根据所述第一加密参数集合对所述第三密文数据段进行解密,得到所述第一明文数据段,包括:按照设定的比例,将N路所述第一密文数据流转化为至少一路串行密文数据流;对所述至少一路串行密文数据流进行前向纠错解码,或进行解扰和前向纠错解码,得到至少一路解码后的串行密文数据流;将所述至少一路解码后的串行密文数据流转化为N路第三密文数据流;根据所述第一加密参数集合,分别对所述N路第三密文数据流的所述第三密文数据段进行解密,得到N个所述第一明文数据段。
- 如权利要求17-24任一所述的方法,其特征在于,每两个所述密文数据段之间包括一个所述第一AM和一个所述加密参数集合,每两个所述加密参数集合之间包括一个所述第一AM和一个所述密文数据段;或者,每两个所述第一AM之间的一个所述加密参数集合划分为至少两个加密参数子集,所述至少两个加密参数子集中的部分加密子集或全部子集不连续。
- 如权利要求22所述的方法,其特征在于,所述在所述第一明文数据流中移除所述第一加密参数集合,得到所述第一明文数据流,包括:在所述第一明文数据流中移除所述第一加密参数集合和填充信息,得到所述第一明文数据流。
- 如权利要求26所述的方法,其特征在于,所述填充信息是经过所述第一加密参数集合加密后的填充信息。
- 如权利要求26或27所述的方法,其特征在于,所述相邻两个所述第一AM之间的填充信息的比特数,是根据相邻两个所述第一AM之间相隔的比特数以及所述相邻两个所述第一AM之间的加密参数集合的比特数确定的。
- 如权利要求28所述的方法,其特征在于,(Y+a+P)mod Q=0,其中,Y为根据相邻两个所述第一AM之间相隔的比特数,a为所述相邻两个所述第一AM之间的加密参数集合的比特数,P为所述相邻两个所述第一AM之间的填充信息的比特数,Q为一个前向纠错码字包含的比特数,mod为取模运算。
- 如权利要求29所述的方法,其特征在于,P为满足公式的最小值。
- 如权利要求17-30任一所述的方法,其特征在于,所述方法应用于光模块。
- 一种通信装置,其特征在于,包括:处理器,所述存储器和处理器耦合,所述存储器用于存储程序指令,所述处理器用于执行所述程序指令,以实现权利要求1-16任一所述的方法。
- 一种通信装置,其特征在于,包括:处理器,所述存储器和处理器耦合,所述存储器用于存储程序指令,所述处理器用于执行所述程序指令,以实现权利要求17-31任一所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,当所述指令在计算机上运行时,实现如权利要求1-31任一所述的方法。
- 一种通信系统,其特征在于,包括用于执行如权利要求1-16任一所述方法的通信装置,和用于执行如权利要求17-31任一所述方法的通信装置。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP21899678.3A EP4250638A4 (en) | 2020-12-02 | 2021-09-16 | DATA TRANSMISSION METHOD, COMMUNICATION DEVICE AND COMMUNICATION SYSTEM |
| US18/326,283 US12470363B2 (en) | 2020-12-02 | 2023-05-31 | Data transmission method, communication apparatus, and communication system |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011410721.1 | 2020-12-02 | ||
| CN202011410721.1A CN114598488A (zh) | 2020-12-02 | 2020-12-02 | 数据传输方法、通信装置及通信系统 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/326,283 Continuation US12470363B2 (en) | 2020-12-02 | 2023-05-31 | Data transmission method, communication apparatus, and communication system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022116643A1 true WO2022116643A1 (zh) | 2022-06-09 |
Family
ID=81802870
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/118784 Ceased WO2022116643A1 (zh) | 2020-12-02 | 2021-09-16 | 数据传输方法、通信装置及通信系统 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12470363B2 (zh) |
| EP (1) | EP4250638A4 (zh) |
| CN (1) | CN114598488A (zh) |
| WO (1) | WO2022116643A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115242538A (zh) * | 2022-07-28 | 2022-10-25 | 天翼云科技有限公司 | 一种数据传输方法及装置 |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115766046B (zh) * | 2021-09-03 | 2025-09-09 | 华为技术有限公司 | 一种数据传输方法、设备、可读存储介质和芯片系统 |
| CN118337352B (zh) * | 2023-01-10 | 2024-11-22 | 华为技术有限公司 | 对齐标志的搜索方法、装置、系统及计算机可读存储介质 |
| CN118487714B (zh) * | 2023-02-14 | 2025-04-22 | 华为技术有限公司 | 一种以太网中发送数据的方法、设备和系统 |
| CN120881424A (zh) * | 2024-04-30 | 2025-10-31 | 中兴通讯股份有限公司 | 光传送网信号处理方法、存储介质及电子装置 |
| CN121603230A (zh) * | 2024-08-21 | 2026-03-03 | 华为技术有限公司 | 数据传输方法、装置、设备及存储介质 |
| DE102024209604A1 (de) | 2024-10-01 | 2026-04-02 | Robert Bosch Gesellschaft mit beschränkter Haftung | Vorrichtungen, insbesondere Empfänger oder Sender, und Verfahren, insbesondere im Empfänger oder im Sender, zur mit einem Sitzungsschlüssel verschlüsselten Kommunikation |
| CN120151068B (zh) * | 2025-04-01 | 2026-01-06 | 中科驭数(北京)科技有限公司 | 基于dpu网卡的数据处理方法、系统、电子设备及存储介质 |
| CN120896753A (zh) * | 2025-08-07 | 2025-11-04 | 安徽明世电子有限公司 | 汽车信息安全用通讯数据加密方法 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014043363A1 (en) * | 2012-09-14 | 2014-03-20 | Qualcomm Incorporated | Streaming alignment of key stream to unaligned data stream |
| CN105306161A (zh) * | 2015-09-29 | 2016-02-03 | 中国科学院半导体研究所 | 一种基于多通道信号碎片化传输的信息保密方法及装置 |
| US20190097748A1 (en) * | 2017-09-22 | 2019-03-28 | Cisco Technology, Inc. | Security protection of terabit ethernet pcs layer using alignment markers |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9083516B2 (en) * | 2013-06-05 | 2015-07-14 | Cisco Technology, Inc. | Securing virtual lane physical layers |
| US10193688B2 (en) * | 2015-12-11 | 2019-01-29 | Ciena Corporation | Flexible Ethernet encryption systems and methods |
| US10182039B2 (en) * | 2016-02-04 | 2019-01-15 | Cisco Technology, Inc. | Encrypted and authenticated data frame |
-
2020
- 2020-12-02 CN CN202011410721.1A patent/CN114598488A/zh active Pending
-
2021
- 2021-09-16 EP EP21899678.3A patent/EP4250638A4/en active Pending
- 2021-09-16 WO PCT/CN2021/118784 patent/WO2022116643A1/zh not_active Ceased
-
2023
- 2023-05-31 US US18/326,283 patent/US12470363B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014043363A1 (en) * | 2012-09-14 | 2014-03-20 | Qualcomm Incorporated | Streaming alignment of key stream to unaligned data stream |
| CN105306161A (zh) * | 2015-09-29 | 2016-02-03 | 中国科学院半导体研究所 | 一种基于多通道信号碎片化传输的信息保密方法及装置 |
| US20190097748A1 (en) * | 2017-09-22 | 2019-03-28 | Cisco Technology, Inc. | Security protection of terabit ethernet pcs layer using alignment markers |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4250638A4 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115242538A (zh) * | 2022-07-28 | 2022-10-25 | 天翼云科技有限公司 | 一种数据传输方法及装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4250638A4 (en) | 2024-05-01 |
| US20230308259A1 (en) | 2023-09-28 |
| EP4250638A1 (en) | 2023-09-27 |
| US12470363B2 (en) | 2025-11-11 |
| CN114598488A (zh) | 2022-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12470363B2 (en) | Data transmission method, communication apparatus, and communication system | |
| US20250007691A1 (en) | Data Transmission Method, Device, Readable Storage Medium, and Chip System | |
| CN101969376A (zh) | 一种具有语义安全的自适应加密系统及方法 | |
| CN104735471B (zh) | 用于数字内容保护方案的安全预设的技术 | |
| US12537607B2 (en) | Status notification method, optical module, network device, and network system | |
| US12261949B2 (en) | Network coding-based post-quantum cryptography | |
| CN101827107A (zh) | 一种基于ieee802.1ae协议的gcm高速加解密器 | |
| CN110535634A (zh) | 基于量子加密的音视频传输系统 | |
| CN103346878B (zh) | 一种基于fpga高速串行io的保密通信方法 | |
| CN201051744Y (zh) | 一种安全的加密网卡装置 | |
| CN104486756B (zh) | 一种密笺短信的加解密方法及系统 | |
| CN118337369A (zh) | 一种融合后量子密码的加密方法和装置、解密方法和装置 | |
| CN103338447B (zh) | 一种应用于短距离传输的自存取加解密电路 | |
| CN107040921B (zh) | 一种基于点对点的短信加密系统 | |
| CN112699393B (zh) | 一种并行总线数据传输方法和装置 | |
| WO2022116711A1 (zh) | 一种数据传输方法、通信装置及通信系统 | |
| CN110086633B (zh) | 一种区块链技术中密文防篡改方法 | |
| CN101902664A (zh) | 一种提高无源光网络加解密速度的方法和系统 | |
| CN115766046B (zh) | 一种数据传输方法、设备、可读存储介质和芯片系统 | |
| CN103888937A (zh) | 一种适用于无线传感器网络aes加密的低开销快速轮加密装置及方法 | |
| CN107483183A (zh) | 一种高效率密钥流的并行输出电路 | |
| CN102448059A (zh) | 应用于ZigBee协议的加解密电路结构及其控制方法 | |
| CN102665202B (zh) | 应用于ZigBee协议的安全协处理器电路结构及其控制方法 | |
| Muzaffar et al. | Secure ECS Communication | |
| CN101894087A (zh) | 具有usb接口的移动可信计算模块 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2021899678 Country of ref document: EP Effective date: 20230620 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |