WO2023273712A1 - Encryption transmission method and device - Google Patents
Encryption transmission method and device Download PDFInfo
- Publication number
- WO2023273712A1 WO2023273712A1 PCT/CN2022/094986 CN2022094986W WO2023273712A1 WO 2023273712 A1 WO2023273712 A1 WO 2023273712A1 CN 2022094986 W CN2022094986 W CN 2022094986W WO 2023273712 A1 WO2023273712 A1 WO 2023273712A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- key
- encryption
- information
- osu
- switching
- Prior art date
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 147
- 238000000034 method Methods 0.000 title claims abstract description 136
- 230000003287 optical effect Effects 0.000 claims abstract description 33
- 238000012545 processing Methods 0.000 claims description 90
- 238000012790 confirmation Methods 0.000 claims description 63
- 230000015654 memory Effects 0.000 claims description 34
- 238000004590 computer program Methods 0.000 claims description 21
- 238000007726 management method Methods 0.000 description 64
- 230000006870 function Effects 0.000 description 53
- 239000013598 vector Substances 0.000 description 53
- 238000004422 calculation algorithm Methods 0.000 description 51
- 238000012544 monitoring process Methods 0.000 description 47
- 230000008569 process Effects 0.000 description 37
- 238000010586 diagram Methods 0.000 description 36
- 230000001360 synchronised effect Effects 0.000 description 36
- 238000013461 design Methods 0.000 description 23
- 102100032282 26S proteasome non-ATPase regulatory subunit 14 Human genes 0.000 description 18
- 101000590281 Homo sapiens 26S proteasome non-ATPase regulatory subunit 14 Proteins 0.000 description 18
- 238000004891 communication Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 13
- 238000013507 mapping Methods 0.000 description 8
- 238000013478 data encryption standard Methods 0.000 description 4
- 230000010365 information processing Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013496 data integrity verification Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 238000012795 verification Methods 0.000 description 3
- OTZZZISTDGMMMX-UHFFFAOYSA-N 2-(3,5-dimethylpyrazol-1-yl)-n,n-bis[2-(3,5-dimethylpyrazol-1-yl)ethyl]ethanamine Chemical compound N1=C(C)C=C(C)N1CCN(CCN1C(=CC(C)=N1)C)CCN1C(C)=CC(C)=N1 OTZZZISTDGMMMX-UHFFFAOYSA-N 0.000 description 2
- 230000033228 biological regulation Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 125000004122 cyclic group Chemical group 0.000 description 2
- 230000010354 integration Effects 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 101100406674 Arabidopsis thaliana OTU4 gene Proteins 0.000 description 1
- 101100462419 Homo sapiens OTUB2 gene Proteins 0.000 description 1
- 101150046103 OTU2 gene Proteins 0.000 description 1
- 102100025914 Ubiquitin thioesterase OTUB2 Human genes 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 238000002715 modification method Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000005693 optoelectronics Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- 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/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/27—Arrangements for networking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/16—Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
-
- 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
Definitions
- the present application relates to the communication field, in particular to an encrypted transmission method and device.
- an optical data unit k (optical data unit-k, ODUk) frame is used to carry service data of multiple different users.
- the sender can encrypt ODUk frames to improve data security.
- the sender when encrypting an ODUk frame, the sender can encrypt all service data carried by the ODUk frame, but cannot separately encrypt some service data carried by the ODUk frame, and the data security is still poor.
- the embodiments of the present application provide an encrypted transmission method and device, which can solve the problem that part of service data carried in an ODUk frame cannot be individually encrypted in an OTN.
- an encrypted transmission method includes: encrypting a plurality of data in one encryption cycle one by one according to the encryption and decryption control information.
- the encrypted transmission method described in the first aspect can be executed by the sending end, which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be
- the sending end which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be
- the apparatus including the OTN equipment is not limited in this application.
- the sending end can encrypt multiple OSU frames within one encryption period and send multiple OSU frames.
- the sending end may map the multiple encrypted OSU frames into the ODUk frame, so as to use the ODUk frame to carry the multiple encrypted OSU frames.
- the sender can separately encrypt part of the service data carried in the ODUk frame to improve data security.
- the above-mentioned encrypting multiple data in one encryption cycle one by one according to the encryption and decryption control information may include: generating multiple encryption blocks according to the encryption and decryption control information.
- the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers.
- a plurality of data is bit-wise encrypted using N bits in a plurality of cipher blocks.
- the sender can also generate as few cipher blocks as possible under the premise of ensuring that the total number of bits M of the generated cipher block is greater than or equal to the total number of bits N of multiple data, so as to improve encryption efficiency.
- the sender can use a cipher block with the same length as the multiple data to encrypt multiple data, thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, reducing processing time, and further improving encryption efficiency.
- the above-mentioned bit-wise encryption of multiple data using N bits in multiple cipher blocks may include: using i-th bit in the N bits to encrypt i-th bit in the multiple data.
- i can be a positive integer, i ⁇ N.
- the encryption transmission method described in the first aspect may further include: sending switching instruction information to the receiving end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the key can be switched synchronously between the sending end and the receiving end through the switching indication information. In this way, after a period of time, such as one or more encryption cycles, the key can be switched synchronously between the sending end and the receiving end to prevent the same plaintext block from being always encrypted into the same ciphertext block, thereby improving data security .
- the encrypted transmission method may further include: sending key switching request information to the receiving end.
- the key switching request information is used to instruct the receiving end to feed back key switching confirmation information.
- Receive key switching confirmation information from the receiving end.
- the key switching confirmation information is used to instruct the sender to send switching instruction information.
- the sending end and the receiving end can also use the key switching request information and the key switching confirmation information to confirm whether the communication between the two parties is normal, so as to prevent the sending end from communicating with the receiving end.
- the key is not switched synchronously, so as to ensure that the key can be switched synchronously between the sender and the receiver to further improve data security.
- the encrypted transmission method may further include: receiving key switching completion information from the receiving end.
- the key switching completion information is used to instruct the receiving end to complete the key switching.
- the sending end can judge whether the receiving end has completed key synchronous switching according to the key switching completion information, thereby ensuring that the key can be switched synchronously between the sending end and the receiving end, and improving data security.
- multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
- the receiving end can judge whether the encrypted data has been tampered with during transmission according to the authentication information, so as to realize data integrity verification and further improve data security.
- an encrypted transmission method includes: receiving multiple OSU frames within one encryption period. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information. According to the encryption and decryption control information, multiple encrypted data are decrypted one by one.
- the encrypted transmission method described in the second aspect can be executed by the receiving end, which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be
- the receiving end which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be
- the apparatus including the OTN equipment is not limited in this application.
- the above-mentioned decryption of multiple encrypted data one by one according to the encryption and decryption control information may include: generating multiple encryption blocks according to the encryption and decryption control information.
- the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers.
- the N bits in the multiple cipher blocks the multiple encrypted data are decrypted bit by bit.
- using the N bits in the plurality of cipher blocks to decrypt the encrypted data bit by bit may include: using the i-th bit in the N bits to decrypt the encrypted data in the i bit decryption.
- i can be a positive integer, i ⁇ N.
- the encrypted transmission method described in the second aspect may further include: receiving switching instruction information from the sending end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the encrypted transmission method may further include: receiving key switch request information from the sender, and sending key switch confirmation information to the sender.
- the key switching request information is used to instruct the receiving end to feed back key switching confirmation information
- the key switching confirmation information is used to instruct the sending end to send switching instruction information.
- the encrypted transmission method according to the second aspect may further include: sending key switch completion information to the sender.
- the key switching completion information is used to instruct the receiving end to complete the key switching.
- multiple OSU frames carry authentication information.
- the authentication information is determined by the encryption and decryption control information and a plurality of encrypted data.
- an encrypted transmission device in a third aspect, includes: a processing module and a transceiver module.
- the processing module is used to encrypt multiple data in one encryption cycle one by one according to the encryption and decryption control information.
- the transceiver module is used to send multiple OSU frames. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information of encryption and decryption control information.
- the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information.
- the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers.
- the processing module is further configured to use the N bits in the multiple cipher blocks to encrypt multiple pieces of data bitwise.
- the processing module is further configured to use the i-th bit in the N bits to encrypt the i-th bit in the plurality of data.
- i can be a positive integer, i ⁇ N.
- the transceiver module is also configured to send switching indication information to the receiving end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the transceiver module is further configured to send key switching request information to the receiving end.
- the key switching request information is used to instruct the receiving end to feed back key switching confirmation information.
- the transceiver module is also used to receive the key switching confirmation information from the receiving end.
- the key switching confirmation information is used to instruct the encryption transmission device described in the third aspect to send switching instruction information.
- the transceiver module is further configured to receive key switching completion information from the receiving end.
- the key switching completion information is used to instruct the receiving end to complete the key switching.
- the above multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
- the transceiver module may include a receiving module and a sending module.
- the sending module is used to realize the sending function of the encrypted transmission device
- the receiving module is used to realize the receiving function of the encrypted transmission device.
- the encrypted transmission device described in the third aspect may further include a storage module, where programs or instructions are stored in the storage module.
- the processing module executes the program or the instruction
- the encrypted transmission device can execute the encrypted transmission method described in the first aspect.
- the encrypted transmission device described in the third aspect can be OTN equipment, or a chip (system) or other components or components that can be installed in OTN equipment, or a device that includes OTN equipment. This is not limited.
- an encrypted transmission device in a fourth aspect, includes: a processing module and a transceiver module.
- the transceiver module is used to receive multiple OSU frames in one encryption period.
- each OSU frame carries an encrypted data
- multiple OSU frames carry indication information
- the indication information is used to indicate encryption and decryption control information.
- the processing module is used to decrypt multiple encrypted data one by one according to the encryption and decryption control information.
- the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information.
- the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers.
- the processing module is further configured to use the N bits in the multiple cipher blocks to decrypt multiple encrypted data bit by bit.
- the processing module is further configured to use the i-th bit in the N bits to decrypt the i-th bit in the plurality of encrypted data.
- i can be a positive integer, i ⁇ N.
- the transceiver module is also configured to receive handover instruction information from the sending end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the transceiver module is also configured to receive key switching request information from the sender.
- the key switching request information is used to instruct the encryption transmission device described in the fourth aspect to feed back key switching confirmation information.
- the transceiver module is also used to send key switching confirmation information to the sender.
- the key switching confirmation information is used to instruct the sender to send switching instruction information.
- the transceiver module is further configured to send key switching completion information to the sender.
- the key switching completion information is used to instruct the encryption transmission device described in the fourth aspect to complete the key switching.
- multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
- the transceiver module may include a receiving module and a sending module.
- the sending module is used to realize the sending function of the encrypted transmission device
- the receiving module is used to realize the receiving function of the encrypted transmission device.
- the encrypted transmission device described in the fourth aspect may further include a storage module, where programs or instructions are stored in the storage module.
- the processing module executes the program or the instruction
- the encrypted transmission device can execute the encrypted transmission method described in the second aspect.
- the encrypted transmission device described in the fourth aspect can be OTN equipment, or a chip (system) or other components or components that can be installed in OTN equipment, or a device that includes OTN equipment. This is not limited.
- an encrypted transmission device in a fifth aspect, includes: a processor, the processor is coupled with a memory, and the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the encrypted transmission device performs any one of the first aspect and the second aspect.
- the encrypted transmission device described in the fifth aspect may further include a transceiver.
- the transceiver can be a transceiver circuit or an input/output interface.
- the transceiver can be used for the encrypted transmission device to communicate with other encrypted transmission devices.
- the encrypted transmission device described in the fifth aspect may be an OTN device, or a chip or a chip system disposed inside the OTN device.
- a processor is provided. Wherein, the processor is configured to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
- an encrypted transmission system in a seventh aspect, includes a sending end and a receiving end.
- the sending end is configured to execute the encrypted transmission method described in any possible implementation manner in the first aspect
- the receiving end is configured to execute the encrypted transmission method described in any possible implementation manner in the second aspect.
- a computer-readable storage medium includes computer programs or instructions.
- the computer program or instruction is run on the computer, the computer is made to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
- a computer program product is provided, where the computer program product includes computer programs or instructions.
- the computer program or instruction is run on the computer, the computer is made to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
- FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of a hardware structure of an OTN device provided in an embodiment of the present application
- FIG. 4 is a schematic structural diagram of an OSU frame provided by an embodiment of the present application.
- FIG. 5 is a schematic diagram of encrypting data in CTR mode using AES provided by the embodiment of the present application.
- FIG. 6 is a schematic diagram of decrypting data using the CTR mode of AES provided by the embodiment of the present application.
- FIG. 7 is a schematic diagram of key extension and round key provided by the embodiment of the present application.
- Fig. 8 is a schematic diagram of encrypting data in GCM mode using AES provided by the embodiment of the present application.
- FIG. 9 is a schematic flow diagram of a sending end performing ciphertext authentication in a GCM mode provided by an embodiment of the present application.
- FIG. 10 is a schematic flowchart of an encrypted transmission method provided in an embodiment of the present application.
- Fig. 11 is a schematic diagram of the payload of 256 consecutive OSU frames encrypted by using multiple cipher blocks provided by the embodiment of the present application;
- FIG. 12 is a schematic diagram 1 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application;
- FIG. 13 is a schematic diagram of a state machine for synchronously switching keys between the sending end and the receiving end provided in the embodiment of the present application;
- FIG. 14 is a second schematic diagram of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application.
- FIG. 15 is a schematic diagram 3 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application.
- FIG. 16 is a schematic diagram of interaction between a sending end and a receiving end provided by an embodiment of the present application.
- FIG. 17 is a schematic flow diagram of a sending end encrypting data provided by an embodiment of the present application.
- FIG. 18 is a first structural schematic diagram of an encrypted transmission device provided by an embodiment of the present application.
- FIG. 19 is a second structural schematic diagram of an encrypted transmission device provided by an embodiment of the present application.
- the network architecture and service scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
- An OTN is usually formed by connecting multiple OTN devices through optical fibers, and can be composed of different topology types such as line, ring, and mesh according to specific needs.
- Fig. 1 shows a schematic diagram of a network architecture applicable to the embodiment of the present application.
- the OTN shown in Fig. 1 includes two OTN networks (respectively OTN network 1 and OTN network 2).
- Each OTN network includes a certain number of OTN devices (indicated by Nx in Figure 1, x is a positive integer), the link between the devices in the OTN network is an intra-domain link, and the link between the devices in the OTN network is Interdomain links.
- an OTN device may have one or more functions.
- OTN equipment is divided into optical layer equipment, electrical layer equipment, and optoelectronic hybrid equipment.
- An optical layer device refers to a device capable of processing optical layer signals, such as an optical amplifier (optical amplifier, OA).
- Electrical-layer devices refer to devices that can process electrical-layer signals, for example, devices that can process ODU signals.
- Optical hybrid equipment refers to equipment capable of processing optical layer signals and electrical layer signals. It should be noted that, according to specific integration requirements, one OTN device can integrate various functions. The technical solution provided by this application is applicable to OTN equipment of different forms and integration levels.
- the sending end refers to a device that sends service data
- the receiving end refers to a device that receives service data from the sending end.
- Both the sending end and the receiving end may be the OTN equipment described above. For example, assuming that N1 in FIG. 1 sends service data to N3, N1 is the sending end, and N3 is the receiving end.
- the sending end may also be called a source end, and the receiving end may also be called a sink end, which is not limited in this embodiment of the present application.
- FIG. 2 shows a schematic diagram of a hardware structure of an OTN device applicable to the embodiment of the present application.
- an OTN device includes a power supply, a fan, auxiliary boards, and may also include tributary boards, line boards, cross-connect boards, and system control and communication boards, where the circuit boards may also include optical layer processing boards .
- the types and quantities of boards contained in each device may be different.
- a network device serving as a core node may not have a tributary board.
- a network device serving as an edge node may have multiple tributary boards.
- the power supply is used to supply power to the OTN equipment, and may include main and backup power supplies. Fans are used to cool the device.
- Auxiliary boards are used to provide auxiliary functions such as external alarms or access to external clocks.
- Tributary boards, cross-connect boards, and line boards are mainly used to process electrical layer signals of the OTN (subsequently referred to as OTN frames).
- the tributary board is used to realize the receiving and sending of various service data, such as synchronous digital hierarchy (synchronous digital hierarchy, SDH) service, packet service, Ethernet service and fronthaul service, etc.
- the tributary board can be divided into user-side optical modules and signal processors.
- the user-side optical module may be an optical transceiver for receiving and/or sending user signals.
- the signal processor is used to implement mapping and demapping of user signals to OTN frames.
- the cross-connect board is used to implement the exchange of OTN frames and complete the exchange of one or more types of OTN frames.
- the line board mainly realizes the processing of the OTN frame on the line side.
- the circuit board can be divided into a line-side optical module and a signal processor.
- the line-side optical module may be a line-side optical transceiver for receiving and/or sending OTN frames.
- the signal processor is used to implement multiplexing and demultiplexing, or mapping and demapping processing of the OTN frames on the line side.
- System control and communication boards are used to implement system control and communication. Specifically, information may be collected from different single boards through the backplane, or control instructions may be sent to corresponding single boards.
- branch boards there may be one or more specific components (such as branch boards), which are not limited in this application. It should be noted that the embodiment of the present application does not limit the types of boards included in the device, and the specific functional design and quantity of the boards.
- Service data refers to services that can be carried by the OTN, for example, Ethernet services, packet services, wireless backhaul services, and so on.
- the sender can map the user’s service data to the payload of the optical service unit (OSU) frame, and then add the OSU overhead (overhead, OH) to the payload of the OSU frame to obtain OSU frame. Then, the OSU frame is mapped into the payload of the optical payload unit k (OPUk) frame, and then OPUk overhead and optical data unit k (optical data unit-k, ODUk) overhead are added to the payload of the OPUk frame to obtain the ODUk frame. Next, add optical transport unit k (optical transport unit-k, OTUk) overhead etc. to the ODUk frame to obtain the OTUk frame. Finally, the sending end sends the OTUk frame to the receiving end.
- the foregoing payload may also be called a payload area
- the overhead may also be called an overhead area.
- K can be 0, 1, 2, 3, 4, Cn and flex.
- the bit rate (that is, the transmission rate) of the OTUk frame is different.
- k 0, 1, 2, 3, 4, Cn, and flex, respectively representing the bit rates of 1.25 gigabit (Gbit)/second (s), 2.5Gbit/s, 10Gbit/s, 40Gbit/s, and 100Gbit /s, n*100Gbit/s and n*1.25Gbit/s (n ⁇ 2).
- Gbit gigabit
- the bit rate of the OTU2 frame is 10Gbit/s
- the bit rate of the OTU4 frame is 100Gbit/s.
- the bit rates mentioned above are approximate values.
- a more accurate bit rate for OPU4 frames is 104.35597533Gbit/s. Other examples are not listed one by one.
- FIG. 3 shows a schematic diagram of a frame structure of an OTUk frame when k ⁇ Cn.
- an OTUk frame has 4 rows*4080 columns.
- the OSU frame payload and OSU overhead (ie, OSU OH) constitute an OSU frame, and the OSU frame is mapped into the OPUk frame payload.
- OPUk payload and OPUk overhead (ie OPUk OH) constitute the OPUk frame
- OPUk frame and ODUk overhead ie ODUk OH
- ODUk frame OTUk overhead
- OTUk overhead ie OTUk OH
- frame alignment signal frame alignment signal, FAS
- forward error correction forward error correction, FEC
- columns 1 to 7 of the first row in the OTUk frame are FAS and a multiframe alignment signal (multiframe alignment signal, MFAS), columns 8 to 14 of the first row are OTUk OH, and columns 1 to 4 of the second to fourth rows are OTUk OH.
- Column 14 is ODUk OH, columns 15 to 16 of lines 1 to 4 are OPUk OH, columns 17 to 3824 of lines 1 to 4 are OPUk payloads, columns 3825 to 4080 of lines 1 to 4 are FEC check areas .
- FIG. 4 shows a schematic structural diagram of an OSU frame applicable to this embodiment of the present application.
- the OSU frame includes an overhead and a payload
- the overhead includes a general overhead, a mapping overhead, and a cyclic redundancy check code (cyclic redundancy check, CRC).
- CRC cyclic redundancy check code
- the general overhead can be used to monitor and manage the service data
- the mapping overhead can represent the mapping rule adopted when the service data is mapped to the payload of the OSU frame.
- N consecutive OSU frames are called an encryption period, and n is a positive integer.
- n is a positive integer.
- the structure of the OSU frame in the embodiment of this application is not limited to that shown in Figure 4.
- the structure of the OSU frame can be adjusted according to actual needs, and this application does not limit it.
- the OSU frame can also be called an optical service unit frame.
- OSU frame applicable to the embodiment of the application is also given in the embodiment of the application.
- another OSU frame provided in this embodiment is applicable to the embodiment of the application
- An OSU frame may be called an OSUv frame.
- the OSUv frame will be described below in conjunction with Table 1-Table 3.
- the OSUv frames can carry constant bit rate (constant bit rate, CBR) services and variable bit rate services (variable bit rate, VBR) services.
- the types of the OSUv frame are different.
- the OSUv frame may include: an OSUv frame carrying a CBR service (referred to as a CBR_OSUv frame for short), and an OSUv frame carrying a VBR service (referred to as a VBR_OSUv frame for short).
- the CBR_OSUv frame includes: a CBR frame and a CBR extension (extension) frame, and the CBR extension frame may be referred to as a CBR_EXT frame for short.
- the VBR_OSUv frame includes: a VBR frame and a VBR extended frame, and the VBR extended frame may be referred to as a VBR_EXT frame for short.
- One encryption cycle usually includes 1024 OSUv frames. According to the different services carried by the OSUv frame, the types of the OSUv frame in one encryption cycle are different.
- an encryption period when carrying a CBR service, includes a CBR frame and a CBR_EXT frame, and the CBR frame and the CBR_EXT frame are generated at a ratio of 1:3.
- the 4 consecutive OSUv frames sent from the sender to the receiver include 1 CBR frame and 3 CBR_EXT frames in sequence. Therefore, if an encryption period includes 1024 OSUv frames, then the encryption period includes 256 CBR frames and 768 CBR_EXT frames.
- the overhead of one CBR frame includes: channel overhead and multiframe header.
- the channel overhead of the CBR frame includes: POH1 and POH2.
- the multiframe header of one CBR frame includes: 32 multiframe headers (abbreviated as M32_P1) and 256 multiframe headers (abbreviated as M256_P1).
- the continuous 32 CBR frames may be called a 32CBR multiframe, and the continuous 256 CBR frames may be called a 256CBR multiframe.
- the POH1 of the 32CBR multiframe can form a POH1 overhead of a 32CBR multiframe
- the POH2 of a 256CBR multiframe can form a POH2 overhead of a 256CBR multiframe.
- the M32_P1 of the 32CBR multiframe can form a multiframe header overhead of a 32CBR multiframe
- the multiframe header overhead of the 32CBR multiframe can be used to indicate the 32CBR multiframe.
- the M256_P1 of the 256CBR multiframe can form a multiframe header overhead of a 256CBR multiframe, and the multiframe header overhead of the 256CBR multiframe can be used to indicate the 256CBR multiframe.
- the POH1 overhead of the 32CBR multiframe is synchronized with the multiframe header overhead of the 32CBR multiframe
- the POH2 overhead of the 256CBR multiframe is synchronized with the multiframe header overhead of the 256CBR multiframe.
- one 32CBR multiframe Including: one 32CBR multiframe POH1 overhead and one 32CBR multiframe header overhead
- one 256CBR multiframe overhead includes: one 256CBR multiframe POH2 overhead and one 256CBR multiframe multiframe header overhead.
- the 32CBR multiframe is synchronized with the 256CBR multiframe. For example, if an encryption period includes 1024 OSUv frames, then the first to eighth 32CBR multiframes in the encryption period can form the first 256CBR of the encryption period. multiframe.
- Table 1 is an overhead table of a CBR frame.
- the sizes of POH1 and POH2 are 2 bits and 1 bit respectively, and the sizes of M32_P1 and M256_P1 are both 1 bit.
- the POH1 overhead of the 32CBR multiframe may be referred to as the CBR_POH1 overhead
- the POH2 overhead of the 256CBR multiframe may be referred to as the CBR_POH2 overhead.
- an encryption period includes 1024 OSUv frames
- the encryption period includes 8 M32_P1 and 1 M256_P1, that is to say, the encryption period includes 8 CBR_POH1 overheads and 1 CBR_POH2 overhead.
- an encryption cycle When carrying VBR services, an encryption cycle includes VBR frames and VBR_EXT frames, and VBR frames and VBR_EXT frames are generated at a ratio of 1:1.
- the 4 consecutive OSUv frames sent from the sender to the receiver include 1 VBR frame and 1 VBR_EXT frame in sequence. Therefore, if an encryption period includes 1024 OSUv frames, then the encryption period includes 512 VBR frames and 512 VBR_EXT frames.
- the overhead of the VBR frame and the VBR_EXT frame both include: channel overhead and a multiframe header.
- the channel overhead of the VBR frame includes: POH1 and POH2.
- the multiframe header of the VBR frame includes: a 64-multiframe header (abbreviated as M64_P2) and a 256-multiframe header (abbreviated as M256_P2).
- the channel overhead of the VBR_EXT frame includes POH1
- the multiframe header of the VBR_EXT frame includes: 64 multiframe headers.
- the 64 consecutive OSUv frames include 32 VBR frames and 32 VBR_EXT frames, that is to say, the 64 consecutive OSUv frames include POH1 including 32 VBR frames and POH1 including 32 VBR_EXT frames, a total of 64 POH1 .
- the 64 POH1s in the 64 consecutive OSUv frames may be referred to as one VBR_POH1 overhead.
- the 64 consecutive VBR frames may be called a 64VBR multiframe, and the consecutive 256 VBR frames may be called a 256VBR multiframe.
- the POH2 of a 256VBR multiframe can form a POH2 overhead of a 256VBR multiframe.
- the M64_P2 of the 64VBR multiframe can form a multiframe header overhead of a 64VBR multiframe, and the multiframe header overhead of the 64VBR multiframe can be used to indicate the 64VBR multiframe.
- the M256_P2 of the 256VBR multiframe can form a multiframe header overhead of a 256VBR multiframe, and the multiframe header overhead of the 256VBR multiframe can be used to indicate the 256VBR multiframe.
- the POH2 overhead of the 256VBR multiframe is synchronized with the header overhead of the multiframe of the 256VBR multiframe. That is to say, the overhead of one 256VBR multiframe includes: one POH2 overhead of one 256VBR multiframe and one Frame header overhead.
- the 64VBR multiframe is not synchronized with the 256VBR multiframe. Specifically, if one encryption period includes 1024 OSUv frames (that is, one encryption period includes 16 64VBR multiframes), then since the 64VBR multiframe is not synchronized with the 256VBR multiframe Synchronously, 256VBR multiframe corresponds to 512 consecutive OSUv frames, therefore, there is at least one complete M256_P2 in this encryption cycle.
- Table 2 is an overhead table of a VBR frame.
- the sizes of POH1, POH2, M64_P2, and M256_P2 are all 1 bit.
- Consecutive 64 VBR_EXT frames may be referred to as 64VBR_EXT multiframes.
- the M64_P2 of the 64VBR_EXT multiframe can form a multiframe header overhead of a 64VBR_EXT multiframe, and the multiframe header overhead of the 64VBR_EXT multiframe can be used to indicate the 64VBR_EXT multiframe.
- Table 3 is the overhead table of the VBR_EXT frame.
- the sizes of POH1 and M64_P2 are both 1 bit.
- VBR_POH2 overhead the above POH2 overhead of the 256VBR multiframe may be referred to as VBR_POH2 overhead for short. If an encryption period includes 1024 OSUv frames, then the encryption period includes 16 M64_P2 and at least 1 M256_P2, that is to say, the encryption period includes: 16 VBR_POH1 overheads, at least 1 complete VBR_POH2 overhead (with POH2 of 512 VBR frames, there is at least 1 VBR_POH2).
- the length of the OSUv frame is 192 bytes, which is the same as the length of the above-mentioned OSU frame.
- the OSUv frame also includes a payload.
- the difference between the OSUv frame payload and the aforementioned OSU frame payload is that the length of the OSUv frame payload may not be fixed at 185 bytes.
- the OSU frame is generally the OSU frame shown in FIG. 4
- the OSUv frame is generally another OSU frame provided by the foregoing embodiment and applicable to the embodiment of the present application.
- OSU frames can carry user service data, such as E1 services.
- the E1 service refers to the dedicated line service with a rate of 2.048Mb/s, which is a general term for various services using the G.703 interface, such as voice, data, and image services.
- the payload of an OSU frame may be the smallest unit (also called the smallest tributary unit) for carrying user service data.
- the rate of an OSU frame can be a variable rate or a fixed rate.
- OSU frames can be combined to carry user service data of a corresponding rate. Different service data are mapped to corresponding OSU frames according to their respective rates, and labels are added to the overhead of OSU frames to realize end-to-end operation administration and maintenance (OAM) functions. Wherein, multiple OSU frames carrying the same service data may be continuous or discontinuous.
- An ODUk frame can carry multiple OSU frames, so that it can carry service data of multiple users.
- the sender encrypts the ODUk frame, it actually encrypts the ODUk frame payload as a whole, and does not distinguish which of the service data carried in the ODUk frame payload needs to be encrypted and which does not need to be encrypted. Therefore, the sender cannot encrypt the ODUk frame payload.
- Part of the business data in all the business data carried by the frame is encrypted separately.
- Encryption algorithms can be divided into three categories: symmetric encryption algorithms, asymmetric encryption algorithms and hash (hash) encryption algorithms.
- Symmetric encryption algorithm refers to the use of the same key for encryption and decryption.
- Asymmetric encryption refers to encryption and decryption using different keys.
- the symmetric encryption algorithm includes: data encryption standard (data encryption standard, DES), triple data encryption algorithm (triple data encryption algorithm, TDEA) and advanced encryption standard (advanced encryption standard, AES), etc.
- Asymmetric encryption algorithms include: elliptic curve cryptography (ECC) encryption algorithm, Diffie-Hellman (DH) encryption algorithm, digital signature algorithm (digital signature algorithm, DSA), etc.
- AES Advanced Encryption Standard
- the sender can encrypt the plaintext according to the key and initialization vector (initialization vector, IV), obtain the ciphertext, and send the ciphertext to the receiver; the receiver can decrypt the received ciphertext according to the same key and initialization vector The ciphertext is obtained to obtain the corresponding plaintext, so as to realize the encrypted transmission of data.
- initialization vector initialization vector
- the AES algorithm can be divided into AES-128, AES-192 and AES-256.
- the length of the key used by AES-128 is 128 bits (bit)
- the length of the key used by AES-192 is 192 bits
- the length of the key used by AES-256 is 256 bits.
- AES includes a variety of encryption modes, such as calculator (counter, CTR) mode, Galois/counter mode (galois/counter mode, GCM), electronic codebook (electronic codebook book, ECB) mode, cipher block chaining (cipher block chaining) , CBC) mode.
- calculator counter, CTR
- Galois/counter mode Galois/counter mode
- GCM Galois/counter mode
- ECB electronic codebook
- cipher block chaining cipher block chaining
- CBC cipher block chaining
- the following takes the CTR mode of AES-256 as an example to illustrate the process of encrypting data and decrypting data.
- FIG. 5 is a schematic diagram of encrypting data using the CTR mode of AES-256.
- a 256-bit key (key), a 128-bit initial vector and an AES encryption function can be used to generate a 128-bit cipher block (cipher).
- an XOR operation can be performed on the 128-bit cipher block and the 128-bit plaintext (plaintext) to obtain the corresponding 128-bit ciphertext (ciphertext).
- FIG. 6 is a schematic diagram of decrypting data using the CTR mode of AES.
- a 256-bit key, a 128-bit initialization vector and an AES encryption function can be used to generate a 128-bit cipher block (cipher).
- the XOR operation can be performed on the 128-bit cipher block and the 128-bit ciphertext to obtain the corresponding 128-bit plaintext.
- FIG. 7 is a schematic diagram of key extension and round key addition provided by the embodiment of the present application. Please refer to FIG. 7 , when performing key expansion, the 256-bit key can be expanded into multiple round keys by using the 256-bit key and the key expansion function. When adding round keys, a 128-bit cipher block can be generated by using a 128-bit initial vector, multiple round keys and round key functions.
- the initial vector in the CTR mode, can be generated by a counter, and every time a cipher block is generated, the initial vector is updated once, for example, the value of the initial vector increases by 1.
- the key expansion function and the round key function reference may be made to the relevant regulations in the CTR mode, which will not be repeated here.
- the difference between the GCM mode of AES and the CTR mode is that the GCM mode can not only use the CTR mode to encrypt plaintext or decrypt ciphertext, but also perform ciphertext authentication.
- the sender can not only encrypt the plaintext by using the CTR mode to obtain the ciphertext, but also can use the key, the initial vector, the ciphertext and the authentication identifier generation function to generate the first authentication identifier. Then, the sending end sends the ciphertext and the first authentication identifier to the receiving end.
- the receiving end may use the CTR mode to decrypt the received ciphertext into plaintext, and may use the key, the initial vector, the received ciphertext and the authentication identifier generation function to generate a second authentication identifier. Finally, the receiving end can compare whether the first authentication identifier is consistent with the second authentication identifier. If not, it indicates that the ciphertext may have been tampered with during transmission.
- the GCM mode can implement data encryption and data integrity verification to improve data security.
- FIG. 8 is a schematic diagram of encrypting data in GCM mode using AES provided by an embodiment of the present application.
- the sending end can perform the authentication process of encrypting plaintext and ciphertext
- the receiving end can perform the process of decrypting ciphertext and ciphertext authentication.
- the process of encrypting plaintext and decrypting ciphertext reference may be made to the process of encrypting and decrypting data in the above CTR mode, which will not be repeated here.
- the following describes the ciphertext authentication process performed by the sender and the receiver.
- the sender can use additional authenticated data (additional authenticated data, AAD), key, ciphertext, and GHASH function to generate the first hash value; then, use the key, initial The vector and the GCTR function encrypt the first hash value to obtain the first authentication identifier; finally, the overhead of the OSU frame is used to carry the first authentication identifier, and the OSU frame carrying the first authentication identifier is sent to the receiving end.
- the GHASH function is a hash function
- the GCTR function is an encryption function.
- the specific implementation manners of the GHASH function and the GCTR function can refer to relevant regulations in the GCM mode, and will not be repeated here.
- FIG. 9 is a schematic flow diagram of a sending end performing ciphertext authentication in the GCM mode provided by the embodiment of the present application.
- A is predefined data, and the length of A is usually 128 bits.
- C is ciphertext, and the length of C can be an integer multiple of 128 bits.
- Len(A) is the length of A, and Len(C) is the length of C.
- the value of H can be determined by the key, and the value of J can be determined by the initial vector and the key.
- the sender performs the ciphertext authentication process
- the data composed of A, C, Len(A), Len(C) and H can be input into the GHASH function to obtain the first hash value; then, the first hash value, J Input the GCTR function for encryption to obtain an identity verification label; finally, use the identity verification label and the MSB function to generate the first authentication mark.
- the receiving end can use the AAD, key, received ciphertext, and GHASH function to generate a second hash value; then, use the key, initial vector, and The GCTR function encrypts the second hash value to obtain the second authentication ID; finally, compare whether the first authentication ID is consistent with the second authentication ID, if not, it means that the ciphertext received by the receiving end may be tampered with during transmission.
- the specific implementation manner of performing the ciphertext authentication process by the receiving end may refer to the flow of ciphertext authentication performed by the sending end shown in FIG. 9 , which will not be repeated here.
- the encryption algorithm used in the encrypted transmission methods shown in FIGS. 10-17 uses the AES encryption algorithm as an example. It should be noted that the encryption algorithm used in the encrypted transmission method provided in the embodiment of the present application is not limited to the AES encryption algorithm, and the encryption algorithm that can also be used includes: DES encryption algorithm, TDEA encryption algorithm, AES encryption algorithm, ECC encryption algorithm, The DH encryption algorithm, the DSA encryption algorithm, and the hybrid encryption algorithm are not limited in this application.
- FIG. 10 is a schematic flowchart of an encrypted transmission method provided by an embodiment of the present application. This encrypted transmission method can be applied to the communication between any two OTN devices shown in FIG. 1 .
- the encrypted transmission method includes the following steps:
- the sending end encrypts a plurality of data in one encryption period one by one according to the encryption and decryption control information.
- the encryption and decryption control information may be determined by the encryption algorithm used by the sender.
- the encryption and decryption control information may include an initialization vector and a key.
- the initial vector and the key please refer to the relevant description of "AES Advanced Encryption Standard" in the introduction of the above technical terms, and will not repeat them here.
- the encryption and decryption control information in this embodiment of the application includes an initialization vector and a key.
- N consecutive OSU frames are called an encryption period, and n is a positive integer.
- the last OSU frame included in one encryption period and the first OSU frame included in the next encryption period of the encryption period are two adjacent OSU frames in the payload of the OPU frame. That is to say, multiple consecutive encryption periods occupy multiple consecutive bytes (or bits) in the payload of one or more OPU frames.
- the plurality of data in one encryption cycle may be user service data, or the payload of an OSU frame carrying service data, which is not limited in this application.
- the sender can map multiple data to the payloads of multiple OSU frames in one encryption period, and encrypt the payloads of multiple OSU frames one by one according to the encryption and decryption control information; Encrypt and decrypt control information, encrypt multiple data in one encryption cycle one by one, and map the encrypted multiple data to the payload of multiple OSU frames. It can be understood that each OSU frame carries one piece of encrypted data.
- an encryption cycle includes 256 consecutive OSU frames
- the sender can map the user's service data into the payload of 256 consecutive OSU frames, and then or, the sending end can divide the user's business data into 256 parts, and the size of each business data is the same as the size of the payload (185 bytes) of an OSU frame, and then, these 256 business data
- the data is encrypted one by one, and the encrypted service data is mapped to the payload of 256 consecutive OSU frames.
- the data in one encryption period may be an OSU frame (including payload and overhead) carrying service data.
- OSU frame including payload and overhead
- the overhead of the OSU frame can be encrypted, so as to further improve the security of data transmission.
- the above S1001 encrypts a plurality of data in one encryption cycle one by one, which may include the following steps 1 and 2:
- Step 1 Generate multiple cipher blocks according to the encryption and decryption control information.
- the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N are positive integers.
- 0 ⁇ M-N ⁇ k2 where k2 is the length of a cipher block.
- the difference between the total number M of bits of multiple cipher blocks and the total number N of bits of multiple data is smaller than the length of one cipher block and greater than or equal to zero.
- the number of multiple cipher blocks is k1
- the length of each cipher block is k2
- the number of multiple data is k3
- the length of each data is k4
- the multiple cipher blocks generated by the sending end according to the encryption and decryption control information satisfy the following condition: 0 ⁇ k1*k2 ⁇ k3*k4 ⁇ k2.
- the sending end can generate as few cipher blocks as possible under the premise of ensuring that the total number M of bits of the generated cipher block is greater than or equal to the total number N of bits of multiple data, so as to further improve the encryption efficiency.
- Step 2 using N bits in the multiple cipher blocks to encrypt multiple data bit by bit.
- the calculation method of bit-wise encryption may be determined by the encryption algorithm used by the sending end. For example, when the sending end uses the AES encryption algorithm to encrypt data, the calculation method of bitwise encryption is XOR operation, and the operation symbol of XOR operation is
- the sending end can obtain N bits used for encrypting data from M bits of multiple cipher blocks according to the first encryption rule, and use the N bits according to the second encryption rule to bitwise encryption.
- the first encryption rule may be understood as a rule for obtaining N bits from M bits of multiple cipher blocks, for example, the first encryption rule may be a generation sequence of cipher blocks. Specifically, obtaining N bits used for encrypting data from M bits of multiple cipher blocks according to the first encryption rule may include the following implementation manners:
- the first N bits among the M bits of the multiple cipher blocks are determined as the N bits used for the encrypted data. For example, assuming that the M bits of a plurality of cipher blocks include c 1 , c 2 , .
- the last N bits among the M bits of the multiple cipher blocks are determined as the N bits used for the encrypted data.
- the M bits of a plurality of cipher blocks include c 1 , c 2 , ..., c M in the order of generation of the cipher blocks
- the second encryption rule may be understood as a rule for bitwise encrypting a plurality of data using N bits, for example, the second encryption rule may be a generation sequence of cipher blocks.
- bitwise encryption of multiple data may include the following implementation manners:
- Mode 3 using the i-th bit among the N bits to encrypt the i-th bit among the plurality of data, where i is a positive integer, and i ⁇ N.
- the N bits in multiple cipher blocks include c 1 , c 2 , ..., c N
- the multiple data include the following N bits p 1 , p 2 , ..., p N
- the encrypted data includes the following N bits
- Mode 4 using the Ni-th bit among the N bits to encrypt the i-th bit among the plurality of data, where i is a positive integer, and i ⁇ N.
- the N bits in multiple cipher blocks include c 1 , c 2 , ..., c N
- the multiple data include the following N bits p 1 , p 2 , ..., p N
- the encrypted data includes the following N bits
- first encryption rule and the second encryption rule can be configured by the user or determined through negotiation between the sending end and the receiving end, and this application does not limit the specific implementation of the first encryption rule and the second encryption rule.
- the sending end and the receiving end need to use the same first encryption rule and second encryption rule.
- modes 1 to 4 can provide a variety of ways to encrypt multiple data using N bits in multiple cipher blocks, so as to realize separate encryption of multiple OSU frames carried by ODUk frames and improve data security. .
- the sending end may use the i-th bit of the multiple cipher blocks in the generation order of the multiple cipher blocks to encrypt the i-th bit in the multiple data, where i is a positive integer and i ⁇ N.
- multiple cipher blocks include the following M bits c 1 , c 2 , ..., c M in order of generation
- multiple data include the following N bits p 1 , p 2 , ..., p N , where M ⁇ N
- the encrypted data includes the following N bits
- the sending end can encrypt one OSU frame each time.
- the payload (185 bytes) of the OSU frame needs to be encrypted, and the overhead (7 bytes) of the OSU frame may not be encrypted.
- the length of one encrypted block is 16 bytes, 11.5625 encrypted blocks are required to encrypt the payload of one OSU frame.
- 12 encryption blocks need to be generated.
- the bytes in the 12 cipher blocks that are not used to encrypt the payload of the first OSU frame can be used to encrypt the payload of the next OSU frame, that is, the second OSU frame.
- the cipher blocks used to encrypt the payload of the kth OSU frame include: the unused cipher blocks among the multiple cipher blocks used to encrypt the payload of the k-1th OSU frame, and the sending end An unused cipher block among multiple cipher blocks generated.
- k is a positive integer, and k is less than or equal to the number of multiple OSU frames.
- the The unused bits in the unused cipher block encrypt the payload of the kth OSU frame. In this way, it is possible to avoid wasting cipher blocks and reduce the number of generated cipher blocks, thereby reducing processing time and improving encryption efficiency.
- Fig. 11 is a schematic diagram of encrypting the payload of 256 consecutive OSU frames by using multiple cipher blocks according to the embodiment of the present application.
- the payloads of 256 consecutive OSU frames have been mapped to user service data.
- the sender can generate 2960 cipher blocks, and these 2960 cipher blocks include CB1, CB2, ... in the order of generation , CB2960.
- the sender can use the generated cipher block to encrypt the payloads of the 256 consecutive OSU frames.
- the sending end may determine a frame-crossing cipher block, where the frame-crossing cipher block is an incompletely used cipher block among the multiple cipher blocks used to encrypt the k-1th OSU frame. Then, the sending end may encrypt the payload of the k-th OSU frame by using the cross-frame cipher block and unused cipher blocks among the generated multiple cipher blocks.
- the sender can use 12 cipher blocks (including CB1 to CB12) to encrypt the payload of the first OSU frame, wherein all bits of CB1-CB11 are used To encrypt the payload of the first OSU frame, 9 bytes of CB12 are used to encrypt the payload of the first OSU frame, and the remaining 7 bytes of CB12 are not used to encrypt the payload of the first OSU frame.
- the cross-frame cipher block is CB12, so that the sender can use the 7 bytes of CB12 that are not used to encrypt the payload of the first OSU frame and CB13 to CB24 to encrypt the net of the second OSU frame charge.
- the specific description of the payload encryption of the k-th OSU frame will not be repeated here.
- the i-th bit of the multiple encrypted blocks is used above, and the i-th bit in the multiple data
- the implementation of bit encryption can realize that the incompletely used cipher blocks among the multiple cipher blocks used to encrypt the payload of an OSU frame can encrypt the payload of the next OSU frame, so that one cipher block can encrypt data across frames , thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, thereby reducing processing time, and further improving encryption efficiency.
- step 1 and step 2 can be executed in parallel, so as to improve encryption efficiency.
- the sender can use the cipher block to encrypt the unencrypted 16 bytes in the multiple data every time a cipher block is produced. bit encryption.
- the above step 1 may also be performed prior to step 2, which is not limited in this application.
- the sending end can also generate as few cipher blocks as possible under the premise of ensuring that the total number of bits M of the generated cipher block is greater than or equal to the total number of bits N of multiple data, so as to improve the encryption efficiency .
- the sender can use a cipher block with the same length as the multiple data to encrypt multiple data, thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, reducing processing time, and further improving encryption efficiency.
- the sending end can also encrypt multiple OSUv frames in one encryption cycle one by one according to the encryption and decryption control information.
- the frame is enough, so I won’t repeat it here.
- the encryption and decryption control information used by the sending end and the receiving end need to be consistent, so that the receiving end can correctly decrypt the ciphertext and obtain the plaintext corresponding to the ciphertext.
- the encryption and decryption control information needs to be updated every time the plaintext is encrypted, so as to ensure that the encryption and decryption control information used for each encryption of the plaintext is not repeated.
- the AES encryption algorithm is used for encryption and decryption.
- the encryption and decryption control information includes the initial vector and the key. For example, each time a cipher block is used to encrypt the plaintext, the initial vector needs to be updated, and every time after a period of time, the initial vector needs to be updated. Update the key once.
- the initial vector can be generated by a counter. Since the number generated by the counter has an upper limit, the key needs to be updated before the number generated by the counter reaches the upper limit, so as to ensure that the key and initial vector used for each encryption of plaintext are not repeated. In this way, the same plaintext block can be prevented from being encrypted into the same ciphertext block all the time, thereby improving data security.
- the sending end needs to send indication information of the updated encryption and decryption control information to the receiving end.
- the indication information of the encryption and decryption control information may be determined by the encryption algorithm used by the sender.
- the indication information of the encryption and decryption control information is used to indicate the initial vector and the key.
- the indication information of the encryption and decryption control information may include the indication information of the key and the indication information of the initial vector
- the indication information of the key may include the handover indication information and the key data stream
- the handover indication information is used to indicate the The switching position (that is, the time point of the next key period)
- the key data flow at the sending end can be determined by the key (or called key value) and a certain security algorithm, and the security algorithm here is not limited.
- the receiving end can obtain the key value according to the key data flow, and use the key value as the key used in the next key cycle.
- the relevant description of the handover indication information reference may be made to the description in step 3.
- the sending end may use multiple OSU frames within one encryption cycle to send indication information of the updated encryption and decryption control information to the receiving end.
- the receiving end may determine the updated encryption and decryption control information according to the indication information.
- multiple OSU frames within one encryption period may carry indication information of encryption and decryption control information.
- the above-mentioned key data flow can be restored to a key through a corresponding security algorithm at the receiving end, which can prevent the key from being transmitted in the network in plain text and improve data security.
- the indication information of the encryption and decryption control information may include: some data of the initial vector (such as the inter-frame counter), the key data stream determined according to the key and a certain security algorithm, and the switching instruction information.
- the above-mentioned key data flow, partial data of the initial vector, and switching instruction information can all be transmitted through the overhead of multiple OSU frames in one encryption cycle, where the overhead of multiple OSU frames in one encryption cycle can be called monitoring A management overhead domain
- the monitoring management overhead domain may include a key security management channel (key exchange communication channel, KCC).
- KCC key exchange communication channel
- the above-mentioned key data flow may be transmitted through the key security management channel
- the above-mentioned partial data of the initial vector and handover instruction information may be transmitted through part of the overhead in the monitoring and management overhead domain.
- the key security management channel may also be called a key exchange communication channel.
- Table 4 shows the structure of an initial vector provided by the embodiment of this application.
- the initial vector includes 128 bits, from the most significant bit (most significant bit, MSB) to the least significant bit (least significant bit, LSB) including: 32-bit configuration value (cfg_iv_fix), 32-bit inter-frame counter ( intra_mf_cnt), 32-bit inter-frame counter, 17 0-bits, and 15-bit intra-frame counter (inter_mf_cnt).
- the configuration value may be a fixed value and may be configured by a user.
- the inter-frame counter can be generated by the sending end, and the value of the inter-frame counter increases by 1 every time an encryption period passes.
- the intra-frame counter starts counting from 1 in each encryption cycle, and the value of the intra-frame counter increases by 1 every time an encrypted block is generated.
- the initial vector in Table 4 includes 2 identical inter-frame counters.
- Table 5 shows the structure of another initial vector provided by the embodiment of this application.
- the initial vector includes 128 bits, including: 32-bit configuration value, 32 0-bits, 32-bit inter-frame counter, 17 0-bits and 15-bit intra-frame counter from the most significant bit to the least significant bit.
- configuration values inter-frame counters, and intra-frame counters
- the difference between the initial vectors shown in Table 5 and the initial vectors shown in Table 4 is that the inter-frame counters do not repeat. It can be understood that Table 4 and Table 5 provide two structural examples of initial vectors, and this application does not limit the specific structure of initial vectors.
- the sending end and the receiving end can be configured with the same configuration value, and the intra-frame counter starts counting from 1 within an encryption period, so that the sending end can only send the inter-frame counter to the receiving end, and the receiving end can determine according to the inter-frame counter Generate an initial vector within an encryption cycle.
- the indication information of the encryption and decryption control information may include: the 32-bit inter-frame counter of the initial vector shown in Table 4 or Table 5 above, the key data stream determined according to the key and a certain security algorithm (for example, using RSA encryption algorithm encrypted key), and switching instruction information.
- the indication information of the encryption and decryption control information may be carried in the overhead of multiple OSU frames in one encryption cycle.
- multiple OSU frames may carry authentication information.
- the authentication information may be determined by encryption and decryption control information and multiple encrypted data (ie, ciphertext).
- the sender uses the AES encryption algorithm to encrypt data
- the sender can use the key, initial vector, ciphertext, and authentication identifier generation function to generate an authentication identifier and use the authentication identifier as authentication information.
- GCM mode of AES the relevant description of "GCM mode of AES” in the introduction of the above technical terms, and details are not repeated here.
- the above authentication information may be carried in the overhead of multiple OSU frames within one encryption period. In this way, the receiving end can judge whether the encrypted data has been tampered with in the transmission process according to the authentication information, so as to realize the integrity verification of the data and improve the data security.
- the sending end sends multiple OSU frames within one encryption cycle to the receiving end.
- the receiving end receives multiple OSU frames within one encryption period from the sending end.
- the process of sending OSU frames at the sending end and receiving OSU at the receiving end can refer to the relevant description about the OTN device sending and receiving data in FIG. 2 above, and will not be repeated here.
- the receiving end decrypts the multiple encrypted data one by one according to the encryption and decryption control information.
- the algorithm used by the receiving end to decrypt the multiple encrypted data one by one is consistent with the algorithm used by the sending end.
- the sending end uses the AES encryption algorithm to encrypt data
- the receiving end uses the same AES encryption algorithm to decrypt the encrypted data.
- S1003 reference may be made to relevant descriptions in S1001 above, and details are not repeated here.
- the sending end not only sends the indication information of the encryption and decryption control information to the receiving end, but also needs to switch keys synchronously between the sending end and the receiving end.
- the encrypted transmission method provided in the embodiment of the present application may also include the following steps:
- Step 3 the sending end sends handover indication information to the receiving end.
- the receiving end receives the handover indication information sent from the sending end.
- the switching indication information is used to indicate the key of the next key period.
- a key period includes multiple encryption periods, and the multiple encryption periods use the same key.
- the length of the above-mentioned key period is less than the length of one cycle count of the inter-frame counter. For example, assuming that the inter-frame counter starts counting from 0, its counting upper limit is 65535, that is, the number of bits of the inter-frame counter is 16 bits. Then, the length of the key period is less than 65535 encryption periods.
- the switching instruction information may indicate the next key period.
- FIG. 12 is a schematic diagram 1 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application. Referring to Figure 12, the process of synchronously switching keys between the sending end and the receiving end may include:
- the sending end may first generate a key for the next key period, and determine a key data stream of the key according to the key. Then, the sending end can send the key data stream to the receiving end through the key security management channel. After receiving the key data stream from the sender, the receiver can restore the key according to the key data stream. And, the receiving end writes the restored key into the backup key area, and waits for the key switching instruction.
- the receiving end may send key switching information to the sending end through the key security management channel.
- the sending end can judge whether the receiving end has completed the restoration of the key according to the information about the ready to switch key, so as to ensure that the sending end sends switching instruction information after the receiving end restores the key, and ensures that both parties can switch the key synchronously.
- the sending end sends switching instruction information to the receiving end, and the receiving end receives the switching instruction information from the sending end.
- the sending end can send switching instruction information to the receiving end, and the switching instruction information is used to indicate that the key of the next key cycle is the key 1. And, the sender uses key 1 to encrypt the data in the next key cycle. After receiving the switching instruction information from the sending end, the receiving end uses key 1 to decrypt the data in the next key cycle.
- the receiving end and the sending end can also clear the inter-frame counter to enter the encryption and decryption of the next key period.
- the handover instruction information may be carried in other part of the overhead except the key security management channel in the monitoring and management overhead field.
- two keys can be maintained between the sending end and the receiving end, namely the primary key and the backup key.
- the primary key is the key currently used, and the backup key is used for the next key period. key.
- key 1 is the backup key, in the first key cycle, both the sending end and the receiving end use key 0 for encryption and decryption.
- key 1 is the backup key, and the sending end updates key 1 and sends key 1 to the receiving end through KCC, and both the sending end and the receiving end update key 1 to the backup key area.
- the sending end and the receiving end use the key 1 in the backup key area synchronously, that is to say, switch the used key from key 0 to key 1.
- key 0 is the backup key
- the sender updates key 0 and sends key 0 to the receiver through KCC, and both the sender and receiver update key 0 to the backup key area.
- the sending end and the receiving end use the key 0 in the standby key area synchronously, that is to say, switch the used key from key 1 to Key 0, and so on. In this way, the timing and synchronous update of the key can be realized. It can be seen from the above process that the backup key can be updated before the key switching is started, so as to ensure data security.
- the key can be switched synchronously between the sending end and the receiving end through the switching indication information.
- the key can be switched synchronously between the sending end and the receiving end to prevent the same plaintext block from always being encrypted into the same ciphertext block, thereby improving data security .
- the encryption transmission method provided in the embodiment of the present application may further include: the sending end sends key switching request information to the receiving end, and the receiving end receives the key switching request information from the sending end. end key switching request information.
- the key switching request information is used to instruct the receiving end to feed back key switching confirmation information.
- the receiving end sends key switching confirmation information to the sending end, and the sending end receives the key switching confirmation information from the receiving end.
- the key switching confirmation information is used to instruct the sending end to send switching indication information, indicating that the backup key of the receiving end has been updated.
- the above-mentioned process of synchronously switching the key between the sending end and the receiving end may also include:
- the sending end sends key switching request information to the receiving end, and the receiving end receives the key switching request information from the sending end.
- the receiving end sends key switching confirmation information to the sending end, and the sending end receives the key switching confirmation information from the receiving end.
- the sending end may send key switching request information to the receiving end.
- the receiving end may send key switching confirmation information to the sending end to notify the sending end that keys can be switched synchronously.
- the sending end and the receiving end can also use the key switching request information and the key switching confirmation information to confirm whether the communication between the two parties is normal, so as to prevent the sending end from communicating with the receiving end.
- the key is not switched synchronously, so as to ensure that the key can be switched synchronously between the sender and the receiver to further improve data security.
- the above-mentioned key switching completion information, key switching request information, and key switching confirmation information can be carried in the key security management channel, or in other part of the overhead in the monitoring and management overhead field except the key security management channel , which is not limited in this application.
- the encrypted transmission method provided in the embodiment of the present application may further include: the receiving end sends key switching completion information to the sending end.
- the sending end receives the key switching completion information from the receiving end.
- the key switching completion information is used to instruct the receiving end to complete the key switching.
- the sending end sends switching instruction information to the receiving end, and after the receiving end receives the switching instruction information from the sending end, the above-mentioned process of synchronously switching keys between the sending end and the receiving end can also be include:
- the receiving end sends key switching completion information to the sending end, and the sending end receives the key switching completion information from the receiving end.
- the sending end and the receiving end not only switch the key used from key 1 to key 2 synchronously, but the receiving end can also send key switching completion information to the sending end.
- the sending end can judge whether the receiving end has completed the synchronous key switching according to the key switching completion information, so as to ensure that the key can be switched synchronously between the sending end and the receiving end, so as to further improve data security.
- the sending end when the sending end sends the switching instruction information to the receiving end, it may send the switching instruction information in multiple consecutive encryption periods.
- the sending end stops sending switching instruction information. In this way, even if the first handover indication information is not correctly received by the receiving end due to accidental packet loss, the receiving end can still receive handover indication information after the first handover indication information, so as to ensure the reliability of the synchronous handover key.
- the key switching request information key switching confirmation information, switching instruction information, and key switching completion information between the sender and the receiving end
- key switching request information key switching confirmation information
- key switching completion information key switching completion information It can be realized through the KCC or the overhead other than the KCC in the monitoring and management overhead domain, which is not limited in this application.
- the transmission between the sender and the receiver is a two-way service. Therefore, the receiver can also send information to the sender through overhead.
- the information here can include the above-mentioned key switching completion information and key switching confirmation information.
- the above-mentioned KCC channel is also bidirectional, therefore, the KCC channel can also return some information for confirmation, such as the information about preparing to switch the key in the above-mentioned S1201.
- the overhead of multiple OSU frames in one encryption period can be used to carry one or more of the following information: indication information of encryption and decryption control information, authentication information, key switching completion information, key switching Request information and key switching confirmation information.
- the indication information of the encryption and decryption control information may include the indication information of the initial vector and the indication information of the key, and the indication information of the key may include: switching indication information and a key data flow.
- the switching indication information, key switching completion information, key switching request information, and key switching confirmation information may be collectively referred to as key synchronization information.
- the instruction information, authentication information, key switching completion information, key switching request information, and key switching confirmation information of the encryption and decryption control information may be collectively referred to as monitoring and management information.
- the sender can write one or more pieces of information into the monitoring and management overhead field: indication information of encryption and decryption control information, authentication information, key switching completion information, key switching request information, and key switching confirmation information.
- the monitoring management overhead field may include a partial overhead of each OSU frame in a plurality of OSU frames within one encryption period.
- the monitoring and management overhead field may include part of the overhead of each OSU frame in the 256 OSU frames in an encryption period, for example, the reserved value in the overhead field of each OSU frame 1 bit in (reserve, RES) overhead.
- RES reserved value in the overhead field of each OSU frame 1 bit in (reserve, RES) overhead.
- the monitoring and management overhead field includes frame alignment signal (frame alignment signal, FAS), inter-frame counter (that is, the indication information of the initial vector), switching indication information (key_sw), key switching request information (key_sw_req), encryption Key switching confirmation information (key_sw_ack), key switching completion information (key_sw_ok), authentication information, key indication information and reserved overhead.
- frame alignment signal frame alignment signal, FAS
- inter-frame counter that is, the indication information of the initial vector
- switching indication information key_sw
- key switching request information key_sw_req
- encryption Key switching confirmation information key_sw_ack
- key switching completion information key_sw_ok
- the frame alignment signal is used to determine the starting position of the monitoring and management overhead field within an encryption period, and the reserved overhead is used to carry information corresponding to the newly added management and maintenance function.
- the switching indication information is used to indicate the key to be used in the next key cycle, for example, the switching indication information changes from "0000 (hexadecimal number)" to "FFFF (hexadecimal number)", indicating the key to be used to switch.
- the current master key is key 0
- the backup key is key 1
- the switching indication information in the nth encryption cycle is "0000 (hexadecimal number)" if the n+1th In the first encryption cycle, the switching indication information changes from "0000 (hexadecimal number)" to "FFFF (hexadecimal number)", then the sending end and the receiving end can be at the frame header of the n+2th encryption cycle Switch the key used from key 0 to key 1.
- the n+2th encryption cycle is the first encryption cycle of the next key cycle.
- Monitor Administrative Overhead Domains carry information Bit 224 - Bit 255 frame alignment signal Bit 192 - Bit 223 inter frame counter Bit 176 - Bit 191 switch instructions Bit 168 - Bit 175 Key switching request information Bit 160 - Bit 167 Key switching confirmation message Bit 152 - Bit 159 key switching completion message Bit 24 - Bit 151 Certification Information 8th bit - 23rd bit Key Security Management Channel (KCC) Bit 0-bit 7 retention overhead
- the length and format of the handover indication information in Table 6 above may be modified.
- the length of the handover indication information in Table 6 is 16 bits.
- the length of the handover indication information may be less than 16 bits, such as 14 bits, 10 bits, etc., which is not limited in this application.
- the length and format of other information in Table 6 can be modified like the above switching instruction information.
- key switching request information key switching confirmation information
- key switching completion information key switching completion information
- the value of the key synchronization information may be determined in a majority decision manner.
- the handover instruction information as an example, assuming that the length of the handover instruction information is 16 bits, when the sending end sends the handover instruction information with the value "FFFF (hexadecimal number)" to the receiving end, if the channel quality suddenly deteriorates, the receiving end
- the handover indication information received by the end is "FFF0 (hexadecimal number)", which is equivalent to the jump of some bits in the handover indication information.
- the receiving end can still determine that the switching indication information is actually "FFFF (hexadecimal number)", and perform synchronization key switching according to the switching indication information. In this way, the reliability of information transmission can be ensured.
- Table 7 is another information table carried in the monitoring management overhead field provided by the embodiment of the present application.
- the monitoring management overhead field includes frame alignment signal, authentication information, key indication information, switching indication information, encryption type indication information, inter-frame counter and reserved overhead.
- the indication information of the key includes 16 bits, the upper 8 bits of the indication information of the key are located in the 95th to the 88th bits of the monitoring and management overhead domain, and the lower 8 bits of the indication information of the key are located in the 8th bit of the monitoring and management overhead domain. 87th bit - the 80th bit.
- the encryption type indication information is used to indicate the encryption algorithm used, for example, when the sending end uses the AES encryption algorithm, the encryption type indication information may be "000001".
- the handover instruction information in Table 7 may also be called a key number (key index, KI).
- the key number includes 2 bits, for example, when the key number is "00", it indicates that the next encryption period (or multiframe period) uses the first key (key 0), when the key number is "01” , indicating that the next encryption period (or multiframe period) uses the second key (key 1).
- key index KI
- the key number includes 2 bits, for example, when the key number is "00", it indicates that the next encryption period (or multiframe period) uses the first key (key 0), when the key number is "01” , indicating that the next encryption period (or multiframe period) uses the second key (key 1).
- Monitor Administrative Overhead Domains carry information Bit 224 - Bit 255 frame alignment signal Bit 96 - Bit 223 Certification Information 80th bit - 95th bit Key Security Management Channel (KCC) Bit 78-Bit 79 switch instructions Bit 72-Bit 77 Encryption type indication Bit 40 - Bit 71 inter frame counter Bit 0-bit 39 retention overhead
- the monitoring and management overhead field is equivalent to a transmission channel for transmitting monitoring and management information, and the sending end and the receiving end can use this transmission channel to realize the interaction of monitoring and management information
- the transmission of the indication information of the encryption and decryption control information and the key synchronization information in the above method embodiment is realized.
- Table 6 by monitoring the switching instruction information, key switching request information, key switching confirmation information, key switching completion information, etc. in the management overhead field, the sending end and the receiving end can realize the transmission of key switching related information synchronously,
- This transmission method can be called a hardware handshake.
- key switching request information, key switching confirmation information, and key switching completion information can be transmitted through the KCC channel and implemented by software control. This transmission method can be called a software handshake.
- Table 7 The difference between Table 7 and Table 6 is that there is no key switching request information, key switching confirmation information, and key switching completion information in Table 7, which can save the hardware handshake process.
- the receiver when using Table 7 to switch keys synchronously, the receiver only needs to restore the key, and feed back a confirmation message to the sender through the KCC to inform the sender that the key can be switched synchronously. That is, the key can be switched synchronously, so that the handshake process can be simplified compared with the way of switching the key synchronously shown in Table 6.
- FIG. 13 is a schematic diagram of a state machine for synchronously switching keys between the sending end and the receiving end provided by the embodiment of the present application.
- both the sending end and the receiving end enter the initial state by default, and then the configuration starts, and each enters the next state.
- the sending end enters the sending request state, and the receiving end enters the waiting request state.
- the sending end is in the sending request state, and can send key switching request information to the receiving end.
- the receiving end is in the waiting request state, and if it receives the key switch request information from the sending end, it will enter the sending confirmation state.
- the receiving end can send key switching confirmation information to the sending end in the sending confirmation state.
- the sending end is in the sending request state, and if it receives the key switching confirmation information from the receiving end, it will enter the sending switching instruction state.
- the sending end can send switching instruction information to the receiving end in the state of sending the switching instruction, and switch the currently used key to the key indicated by the switching instruction information in the next key period, for example, assuming that the sending end and the receiving end are currently using
- the key is the first key, and the second key needs to be used in the next key cycle, then the sending end sends the second key switching instruction information to the receiving end, and the sending end will switch the key used in the next key cycle as the second key.
- the receiving end is in the state of sending confirmation, and if it receives switching instruction information from the sending end, it can enter the state of completing key switching.
- the receiving end can send key switching completion information to the sending end when the key switching is completed, and switch the currently used key to the key indicated by the switching instruction information in the next key period, and return to the initial state.
- the sending end is in the state of sending the switching instruction, and if it receives the key switching completion information from the receiving end, it will enter the initial state.
- FIG. 14 is a second schematic diagram of synchronous key switching between the sending end and the receiving end provided in the embodiment of the present application. Please refer to FIG. 14 , assuming that the key currently used by the sender and the receiver is key 0, the next key period starts from the nth encryption period, and the key to be used in the next key period is key 1.
- the sending end may send key 1 switching instruction information to the receiving end in the (n+1) encryption cycle, and the sending end switches the key used to key 1 in the (n+2) encryption cycle.
- the receiving end When the receiving end receives the switching instruction information of key 1 from the sending end in the n+1 encryption period, it can switch the used key to key 1 in the n+2 encryption cycle, and send the encryption key to the sending end key switching completion information, thereby completing the synchronous key switching between the sender and the receiver.
- the switch instruction information may indicate to switch the currently used key to the indicated key in the next encryption cycle.
- the judgment method for the receiving end to receive the switching indication information may be: the switching indication information in the nth encryption cycle "0000 (hexadecimal number)", the switching indication information in the n+1th encryption cycle from " 0000 (hexadecimal number)” is changed to "FFFF (hexadecimal number)", then the receiving end determines that the switching instruction information is received, and switches the key at the frame header of the n+2th encryption cycle.
- both the sending end and the receiving end will perform a state jump, jumping from the current state to the initial state. If the configuration is enabled, the sender will jump from the current state to the sending request state, and the receiving end will jump from the current state to the waiting request state.
- the above configuration startup can be understood as starting the synchronous key switching.
- the switching instruction information may be sent in multiple consecutive encryption cycles. And, when receiving the key switching completion information from the receiving end, the sending end stops sending the switching instruction information.
- FIG. 15 is a third schematic diagram of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application.
- the multiframe period includes 4 encryption periods, that is to say, in one multiframe period, the sender can send OSU frames of 4 encryption periods to the receiver.
- Send KI 01 to the receiving end in the n+1 multiframe period, indicating that the key used in the n+2 multiframe period is key 1, and the key to be used in the n+2 multiframe period
- the key is switched to key 1.
- the receiving end switches keys synchronously according to the value of KI, where the key used in the nth multiframe period and the n+1th multiframe period is key 0, and the key used in the n+2th multiframe period Switch the used key to key 1.
- the values of multiple KIs in one multiframe period are the same, and the receiving end may determine the values of multiple KIs in one multiframe period by means of majority decision.
- the four KIs sent by the sender to the receiver are "01”, “01”, “01”, and "01” respectively. If the channel quality suddenly deteriorates, the receiver at the nth The four KIs received in a multiframe period are "01”, “01”, “01”, and "00", which is equivalent to a jump in some KIs in a multiframe period.
- Table 7 uses the handover indication information to implement synchronous handover keys, and the handover indication information in Table 7 only occupies a 2-bit monitoring and management overhead field.
- Table 6 the reliability of the synchronous switching key can be ensured through the state machine shown in FIG. 13 .
- the sending end can send the same switching instruction information to the receiving end in multiple encryption cycles to ensure that the receiving end correctly receives the switching instruction information and ensure the reliability of the synchronous switching key.
- the receiving end can feed back the key switching information through the KCC channel to inform the sending end that the key can be switched synchronously.
- the way of switching keys synchronously shown in Table 6 can simplify the handshake process.
- the above monitoring and management information may be transmitted through the overhead of multiple OSUv frames within one encryption period.
- Table 8 is an information table of OSUv frame overhead carrying monitoring management information provided by the embodiment of the present application, and it is assumed that one encryption cycle includes 1024 OSUv frames.
- VBR_POH1 and VBR_POH2 in VBR_OSUv frames can respectively carry one or more of the following monitoring and management information: inter-frame counters, key synchronization information, counters for 64VBR multiframes, key security Management channel, authentication information.
- CBR_POH1 and CBR_POH2 in a CBR_OSUv frame can respectively carry one or more of the following monitoring and management information: inter-frame counter, key synchronization information, key security management channel, and authentication information.
- #X (X is an integer, and 0 ⁇ X ⁇ 15)" in Table 8 indicates the Xth frame in an encryption period, for example, VBR_POH1#0 indicates the 0th VBR_POH1 in an encryption period.
- VBR_POH1#0-#15[39:8] indicates that the 0th VBR_POH1 to the 15th VBR_POH1 in one encryption cycle all carry an inter-frame counter, and the 8th-39th bits of each VBR_POH1 are used for Carries the interframe counter.
- CBR_POH1#0-#7[19:4][1:0] indicates that the POH1 overhead size of the CBR frame is 2 bits, specifically, "CBR_POH1#0-#7[19:4 ][1:0]” can indicate that the 0th CBR_POH1 to the 7th CBR_POH1 in one encryption cycle all carry the inter-frame counter, and the 8th-38th bits of each CBR_POH1 are used to carry the inter-frame counter.
- the meanings of other items in Table 8 will not be repeated here.
- Table 9 is an information table of another OSUv frame overhead carrying monitoring and management information provided by the embodiment of the present application, and it is assumed that one encryption period includes 1024 OSUv frames.
- VBR_POH1 and VBR_POH2 in the VBR_OSUv frame can respectively carry one or more of the following monitoring and management information: inter-frame counter, switching instruction information, counter of 64VBR multiframe, key security management Channel, authentication information.
- CBR_POH1 and CBR_POH2 in the CBR_OSUv frame (the OSUv frame carrying the CBR service) can respectively carry one or more monitoring and management information as follows: inter-frame counter, handover instruction information, key security management channel, and authentication information.
- VBR_POH1#0 indicates the 0th VBR_POH1 in an encryption period. Therefore, VBR_POH1#0-#15[7:6] indicates that the 0th VBR_POH1 to the 15th VBR_POH1 in one encryption cycle all carry switching instruction information, and the 6th-7th bits of each VBR_POH1 are used for Bearer handover indication information.
- the meanings of other items in the table will not be repeated here.
- the 64VBR multiframe in VBR_POH1 is The frame counter is used to identify 64VBR multiframes in one encryption cycle. In other words, the above-mentioned 64VBR multiframe counter indicates which 64VBR multiframe is the current 64VBR multiframe in one encryption cycle.
- the CBR_OSUv frame in one encryption period uses the header overhead of the first 256CBR multiframe as the frame header to identify the encryption period, and one encryption period includes one 256CBR multiframe, therefore, the CBR_OSUv frame There is no counter for CBR multiframes.
- the inter-frame counters key synchronization information, handover instruction information, key security management channels, and authentication information in the above-mentioned Tables 8 and 9, reference may be made to the relevant descriptions in Tables 6 and 7 in the above-mentioned embodiments, and will not be repeated here. repeat.
- the VBR_OSUv frame transmits the inter-frame counter 16 times in one encryption period
- the CBR_OSUv frame transmits the inter-frame counter 8 times in one encryption period.
- the OSU frames shown in Table 6 and Table 7 above only transmit the inter-frame counter once in one encryption cycle. Therefore, the OSUv frame overhead shown in Table 8 and Table 9 above carries monitoring and management information. Even if the first inter-frame counter is not received correctly by the receiving end due to accidental packet loss, the receiving end can still receive the first The inter-frame counter after the inter-frame counter ensures the reliability of encryption and decryption.
- the VBR_OSUv frame passed the inter-frame counter 16 times in one encryption period, and the values of the 16 inter-frame counters were the same;
- the CBR_OSUv frame passed the inter-frame counter 8 times in one encryption period, and the values of the 8 inter-frame counters same.
- the receiving end can still receive the inter-frame counters after the first inter-frame counter, which improves the reliability of encryption and decryption.
- the switching indication information may be called a key indication (key index, KI), and KI may include 2 bits, for example, when KI is "00" When KI is "01", it indicates that the next key cycle uses the first key, and when KI is "01", it indicates that the next key cycle uses the second key.
- KI is transmitted 16 times in VBR_OSUv frame in one encryption period, and the values of these 16 KIs are the same; in CBR_OSUv frame in one encryption period, KI is transmitted 8 times, and the values of these 8 KIs are the same.
- the receiving end can determine the values of multiple KIs in this one encryption cycle by means of majority judgment. Determining multiple KI values in one multiframe period" related descriptions will not be repeated here.
- the receiving end may only need to feed back the key switching information through the KCC channel to inform the sending end that the key can be switched synchronously.
- the handshake process can be simplified.
- the above monitoring and management information may be carried in an operation administration and maintenance (OAM) information element.
- OAM operation administration and maintenance
- the sending end can use the OAM information element to send monitoring and management information to the receiving end.
- the sending time and cycle of OAM cells can be adjusted according to actual needs, that is to say, the sending end can adjust the sending cycle of OAM to change the length of the encryption cycle of service data, which can improve the transmission speed of small-bandwidth services, and adjust The cycle of switching keys synchronously between the sending end and the receiving end makes the encryption of business data more flexible.
- this application provides an example of implementing the above encrypted transmission method, specifically as follows:
- FIG. 16 is a schematic diagram of an interaction between a sending end and a receiving end provided by an embodiment of the present application. Please refer to Figure 16.
- the sender sends an OSU frame to the receiver.
- the sender can perform the following three steps: business data processing, encryption, and overhead processing.
- the receiver can perform the following three steps: steps: overhead processing, decryption, and business data processing.
- the business data processing step can be to map the business data to the payload of multiple OSU frames in one encryption cycle, so as to use the OSU frame to carry the business data; payload encryption; the overhead processing step may be writing monitoring and management information in the overhead of the OSU frame carrying service data.
- the overhead processing step can be to read the monitoring and management information from the overhead of the OSU frame carrying service data; the decryption step can be to decrypt the payload of the OSU frame carrying service data; the service data processing step can be The decrypted service data is obtained from the payload of the decrypted OSU frame.
- the monitoring management information may include: the indication information of the above-mentioned encryption and decryption control information, authentication information, key switching completion information, key switching request information, and key switching confirmation information.
- the switching indication information, key switching completion information, key switching request information, and key switching confirmation information may be collectively referred to as key synchronization information.
- the above encryption step may be performed before or after the overhead processing step, which is not limited in this application.
- the above decryption step may be performed before the overhead processing step or after the overhead processing step, which is not limited in this application.
- FIG. 17 is a schematic flow diagram of a sending end encrypting data provided by an embodiment of the present application.
- the OTN device can be a sending end or a receiving end.
- the process of the sending end performing service data processing, encryption, and overhead processing steps may include the following implementation methods:
- the sending end maps service data to the payloads of multiple OSU frames in one encryption cycle, and maps the multiple OSU frames to processing channels through cell bus (also called OSU bus) and channel mapping. Then, the sending end performs an information processing step, and the information processing step may include: the sending end obtains the key and the initial vector used in the current encryption cycle. In addition, the sending end performs an overhead processing step, which may include: the sending end determines the key used in the current encryption cycle, the indication information of the initial vector, the key synchronization information, etc., and converts the encryption and decryption control information indication information and Key synchronization information and the like are written into the overhead of multiple OSU frames in the above processing channel.
- the sending end encrypts the payloads of the multiple OSU frames, and the sending end can encrypt the payloads of the multiple OSU frames by using a key, an initialization vector, and an AES encryption function to obtain multiple encrypted OSU frames.
- the sending end further executes an authentication identification processing step, and the authentication identification processing step may include: the sending end determines the first authentication identification by using the encrypted payloads of multiple OSU frames.
- the sending end also performs the step of writing the authentication identifier, and writes the first authentication identifier into the overhead of multiple OSU frames.
- the sending end sends the multiple OSU frames to the receiving end through the cell bus and the transceiver module.
- the process of the receiving end performing overhead processing, decryption and service data processing may include the following implementation methods:
- the receiving end uses the transceiver module to receive multiple OSU frames from the transmitting end, and maps the multiple OSU frames to the processing channel through the cell bus and channel mapping. Then, the receiving end performs an overhead processing step, which may include: the receiving end reads key indication information, initial vector indication information, and key synchronization information from the overhead of multiple OSU frames in the processing channel. In addition, the receiving end also performs an information processing step, and the information processing step may include: the receiving end determines the key and the initial vector used in the current encryption cycle according to the indication information of the key and the indication information of the initial vector.
- the receiving end executes the authentication identification processing step, and the authentication identification processing step may include: the receiving end determines the second authentication identification by using the payload of the undecrypted OSU frame.
- the receiving end decrypts the payloads of the multiple OSU frames, that is, uses the key, the initial vector, and the AES encryption function to decrypt the payloads of the multiple OSU frames, and obtains multiple decrypted OSU frames, and then obtains the decrypted business data.
- the receiving end executes the authentication identification reading step, reads the first authentication identification from the overhead of multiple OSU frames, and compares whether the first authentication identification and the second authentication identification are consistent, if they are not consistent, it means that the ciphertext is being transmitted may be tampered with.
- the cell bus may be N ⁇ 128 (N is a positive integer, and N ⁇ 12, for example, N may be 1, 2, 3, 4, 6, 12, etc.).
- N 12
- the OTN device can process one OSU frame at a time; when N ⁇ 12, one OSU frame will be divided into multiple OSU subframes, and at this time, the overhead of the OSU frame is located in multiple OSU subframes of the first OSU subframe.
- the processing procedure of the OTN device for these multiple OSU subframes may be: perform an overhead processing step on the overhead in the first OSU subframe, perform an encryption or decryption step on the payload in the first OSU subframe, and perform an encryption or decryption step on the payload in the second OSU subframe.
- the first and second subsequent OSU subframes perform encryption or decryption steps.
- the sending end can encrypt multiple OSU frames within one encryption cycle and send multiple OSU frames.
- the sending end may map the multiple encrypted OSU frames into the ODUk frame, so as to use the ODUk frame to carry the multiple encrypted OSU frames.
- the sender can separately encrypt part of the service data carried in the ODUk frame to improve data security.
- encrypting the OSU frame is equivalent to encrypting the small-grain services, thereby providing data encryption services for users of the small-grain services.
- the encrypted OSU frame can be transparently transmitted in the OTN network without affecting the monitoring and management of the OTN network.
- the encrypted transmission method provided by the embodiment of the present application has been described in detail above with reference to FIGS. 10-17 .
- the encrypted transmission device for implementing the encrypted transmission method provided by the embodiment of the present application will be described in detail below with reference to FIGS. 10-17 .
- FIG. 18 is a first schematic structural diagram of an encryption transmission device provided by an embodiment of the present application.
- an encrypted transmission device 1800 includes: a processing module 1801 and a transceiver module 1802 .
- FIG. 18 only shows the main components of the encrypted transmission device.
- the encrypted transmission device 1800 is applicable to the network architecture described in FIG. 1 above, and performs the function of an OTN device (that is, a sender) that sends service data in the network architecture. For example, assuming that N1 sends service data to N3 in the network architecture shown in FIG. 1 , that is, N1 is the sending end and N3 is the receiving end, then the encrypted transmission device 1800 can perform the function of N1 in the network architecture.
- OTN device that is, a sender
- the processing module 1801 is configured to encrypt multiple data in one encryption cycle one by one according to the encryption and decryption control information.
- the transceiver module 1802 is configured to send multiple OSU frames. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information of encryption and decryption control information.
- the processing module 1801 is further configured to generate multiple cipher blocks according to the encryption and decryption control information.
- the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers.
- the processing module 1801 is further configured to use the N bits in the multiple cipher blocks to encrypt multiple pieces of data bitwise.
- the processing module 1801 is further configured to use the i-th bit in the N bits to encrypt the i-th bit in the plurality of data.
- i can be a positive integer, i ⁇ N.
- the transceiver module 1802 is also configured to send switching indication information to the receiving end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the transceiver module 1802 is also configured to send key switching request information to the receiving end.
- the key switching request information is used to instruct the receiving end to feed back key switching confirmation information.
- the transceiver module 1802 is also configured to receive key switching confirmation information from the receiving end.
- the key switching confirmation information is used to instruct the encryption transmission device described in the third aspect to send switching instruction information.
- the transceiver module 1802 is also configured to receive key switching completion information from the receiving end.
- the key switching completion information is used to instruct the receiving end to complete the key switching.
- the above multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
- the encrypted transmission device 1800 may be applicable to the network architecture described in FIG. 1 above, and perform the function of an OTN device (that is, a receiving end) receiving service data in the network architecture. For example, assuming that N1 sends service data to N3 in the network architecture shown in FIG. 1 , that is, N1 is the sending end and N3 is the receiving end, then the encrypted transmission device 1800 can perform the function of N3 in the network architecture.
- the transceiver module 1802 is configured to receive multiple OSU frames within one encryption cycle. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information.
- the processing module 1801 is configured to decrypt multiple encrypted data one by one according to the encryption and decryption control information.
- the processing module 1801 is further configured to generate multiple cipher blocks according to the encryption and decryption control information.
- the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers.
- the processing module 1801 is further configured to use the N bits in the multiple cipher blocks to decrypt multiple encrypted data bit by bit.
- the processing module 1801 is further configured to use the i-th bit in the N bits to decrypt the i-th bit in the plurality of encrypted data.
- i can be a positive integer, i ⁇ N.
- the transceiver module 1802 is also configured to receive switching instruction information from the sending end.
- the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
- the transceiver module 1802 is also configured to receive key switching request information from the sender. Wherein, the key switching request information is used to instruct the encryption transmission device described in the fourth aspect to feed back key switching confirmation information.
- the transceiver module 1802 is further configured to send key switching confirmation information to the sending end. Wherein, the key switching confirmation information is used to instruct the sender to send switching instruction information.
- the transceiver module 1802 is also configured to send key switching completion information to the sender.
- the key switching completion information is used to instruct the encryption transmission device described in the fourth aspect to complete the key switching.
- multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
- the transceiver module 1802 may include a receiving module and a sending module (not shown in FIG. 18 ).
- the sending module is used to implement the sending function of the encrypted transmission device 1800
- the receiving module is used to realize the receiving function of the encrypted transmission device 1800 .
- the encrypted transmission device 1800 may further include a storage module (not shown in FIG. 18 ), where programs or instructions are stored in the storage module.
- the processing module 1801 executes the program or instruction, the encrypted transmission device 1800 can perform the function of the receiving end.
- the encrypted transmission device 1800 may further include a storage module (not shown in FIG. 18 ), where programs or instructions are stored in the storage module.
- the processing module 1801 executes the program or instruction, the encrypted transmission device 1800 can perform the function of the sending end.
- the processing module 1801 involved in the encrypted transmission device 1800 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the transceiver module 1802 may be implemented by a transceiver or a transceiver-related circuit component, and may be transceiver or transceiver unit.
- the above-mentioned processing module 1801 may also be called a processing unit, and the transceiver module 1802 may also be called a transceiver unit.
- the encrypted transmission device 1800 may be an OTN device in the OTN, or a chip (system) or other components or components installed in the above-mentioned OTN device, or a device including the OTN device, which is not covered by this application. limited.
- FIG. 19 is a second structural schematic diagram of an encryption transmission device provided in an embodiment of the present application.
- the encrypted transmission device may be the above-mentioned sending end or receiving end, or may be a chip (system) or other components or components arranged at the sending end or receiving end.
- an encrypted transmission device 1900 may include a processor 1901 .
- the encrypted transmission device 1900 may further include a memory 1902 and/or a transceiver 1903 .
- the processor 1901 is coupled with the memory 1902 and the transceiver 1903, such as may be connected through a communication bus.
- the components of the encrypted transmission device 1900 will be specifically introduced below in conjunction with FIG. 19 :
- the processor 1901 is the control center of the encrypted transmission device 1900, and may be one processor, or a general term for multiple processing elements.
- the processor 1901 is one or more central processing units (central processing unit, CPU), may also be a specific integrated circuit (application specific integrated circuit, ASIC), or is configured to implement one or more An integrated circuit, for example: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA).
- CPU central processing unit
- ASIC application specific integrated circuit
- An integrated circuit for example: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA).
- the processor 1901 may execute various functions of the encrypted transmission device 1900 by running or executing software programs stored in the memory 1902 and calling data stored in the memory 1902 .
- the processor 1901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 19 .
- the encrypted transmission apparatus 1900 may also include multiple processors, for example, the processor 1901 and the processor 1904 shown in FIG. 19 .
- processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
- a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
- the memory 1902 is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor 1901 .
- the specific implementation may refer to the above-mentioned method embodiment, which will not be repeated here.
- the memory 1902 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) that can store information and
- ROM read-only memory
- RAM random access memory
- Other types of dynamic storage devices for instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical discs storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited to.
- the memory 1902 can be integrated with the processor 1901 or exist independently, and is coupled with the processor 1901 through an interface circuit (not shown in FIG. 19 ) of the encrypted transmission device 1900 , which is not specifically limited in this embodiment of the present application
- the transceiver 1903 is used for communication with other encrypted transmission devices.
- the encrypted transmission device 1900 is a client, and the transceiver 1903 can be used to communicate with the server.
- the transceiver 1903 may include a receiver and a transmitter (not separately shown in FIG. 19 ). Wherein, the receiver is used to realize the receiving function, and the transmitter is used to realize the sending function.
- the transceiver 1903 may be integrated with the processor 1901, or may exist independently, and be coupled with the processor 1901 through an interface circuit (not shown in FIG. 19 ) of the encryption transmission device 1900.
- an interface circuit not shown in FIG. 19
- This embodiment of the present application Not specifically limited.
- This embodiment also provides an encrypted transmission system.
- the encrypted transmission system includes a sending end and a receiving end.
- the sending end may be used to execute S1001 and S1002 in the above encrypted transmission method embodiment
- the receiving end may be used to execute S1002 and S1003 in the above encrypted transmission method embodiment.
- a subscript such as W 1 may be a clerical error into a non-subscript form such as W1.
- the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processor, DSP), dedicated integrated Circuit (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
- the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
- the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
- Volatile memory can be random access memory (RAM), which acts as external cache memory.
- RAM random access memory
- static random access memory static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory Access memory
- SDRAM synchronous dynamic random access memory
- double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
- enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
- serial link DRAM SLDRAM
- direct memory bus random access memory direct rambus RAM, DR RAM
- the above-mentioned embodiments may be implemented in whole or in part by software, hardware (such as circuits), firmware, or other arbitrary combinations.
- the above-described embodiments may be implemented in whole or in part in the form of computer program products.
- the computer program product comprises one or more computer instructions or computer programs. When the computer instruction or computer program is loaded or executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part.
- the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
- 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 transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as infrared, wireless, microwave, etc.).
- the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more sets of available media.
- the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media.
- the semiconductor medium may be a solid state drive.
- At least one means one or more, and “multiple” means two or more.
- At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.
- at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
- sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application.
- the implementation process constitutes any limitation.
- the disclosed systems, devices and methods may be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Communication Control (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present application provides an encryption transmission method and device, which can solve the problem that in an OTN, part of service data carried in an ODUk frame cannot be individually encrypted. The method comprises: encrypting one by one multiple pieces of data in one encryption period according to encryption and decryption control information; and sending multiple optical service unit (OSU) frames, each OSU frame carrying one piece of encrypted data, and the multiple OSU frames carrying indication information of the encryption and decryption control information. Said encryption transmission method can be executed by a transmitting end. On the basis of the described method, it may be known that a transmitting end can encrypt multiple OSU frames in one encryption period and send the multiple OSU frames. When encrypting multiple OSU frames, the transmitting end can map the encrypted multiple OSU frames into an ODUk frame, so as to use the ODUk frame to carry the multiple encrypted OSU frames. In other words, the transmitting end can individually encrypt part of service data carried in the ODUk frame so as to improve data security.
Description
本申请要求于2021年06月29日提交国家知识产权局、申请号为202110732933.X、申请名称为“加密传输方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office on June 29, 2021, with application number 202110732933.X and application name "encrypted transmission method and device", the entire contents of which are incorporated by reference in this application middle.
本申请涉及通信领域,尤其涉及一种加密传输方法及装置。The present application relates to the communication field, in particular to an encrypted transmission method and device.
在光传送网(optical transport network,OTN)中,光数据单元k(optical data unit-k,ODUk)帧用于携带多个不同用户的业务数据。发送端可以对ODUk帧加密,从而提升数据安全性。In an optical transport network (OTN), an optical data unit k (optical data unit-k, ODUk) frame is used to carry service data of multiple different users. The sender can encrypt ODUk frames to improve data security.
目前,在对ODUk帧加密时,发送端能够对ODUk帧携带的全部业务数据加密,但不能对ODUk帧携带的部分业务数据进行单独加密,数据安全性仍然较差。At present, when encrypting an ODUk frame, the sender can encrypt all service data carried by the ODUk frame, but cannot separately encrypt some service data carried by the ODUk frame, and the data security is still poor.
发明内容Contents of the invention
本申请实施例提供一种加密传输方法及装置,能够解决OTN中不能对ODUk帧携带的部分业务数据进行单独加密的问题。The embodiments of the present application provide an encrypted transmission method and device, which can solve the problem that part of service data carried in an ODUk frame cannot be individually encrypted in an OTN.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above object, the application adopts the following technical solutions:
第一方面,提供一种加密传输方法。该加密传输方法包括:根据加解密控制信息,对一个加密周期内的多个数据逐一加密。发送多个光业务单元OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带加解密控制信息的指示信息。In a first aspect, an encrypted transmission method is provided. The encrypted transmission method includes: encrypting a plurality of data in one encryption cycle one by one according to the encryption and decryption control information. Send multiple optical service unit OSU frames. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information of encryption and decryption control information.
需要说明的是,第一方面所述的加密传输方法可以由发送端执行,该发送端可以是OTN设备,也可以是可设置于OTN设备的芯片(系统)或其他部件或组件,还可以是包含OTN设备的装置,本申请对此不做限定。It should be noted that the encrypted transmission method described in the first aspect can be executed by the sending end, which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be The apparatus including the OTN equipment is not limited in this application.
基于第一方面所述的加密传输方法,发送端能够对一个加密周期内的多个OSU帧加密,并发送多个OSU帧。其中,在对多个OSU帧加密时,发送端可以将加密后的多个OSU帧映射到ODUk帧中,以利用ODUk帧携带多个加密后的OSU帧。换句话说,发送端能够对ODUk帧携带的部分业务数据进行单独加密,以提升数据安全性。Based on the encrypted transmission method described in the first aspect, the sending end can encrypt multiple OSU frames within one encryption period and send multiple OSU frames. Wherein, when encrypting multiple OSU frames, the sending end may map the multiple encrypted OSU frames into the ODUk frame, so as to use the ODUk frame to carry the multiple encrypted OSU frames. In other words, the sender can separately encrypt part of the service data carried in the ODUk frame to improve data security.
一种可能的设计方案中,上述根据加解密控制信息,对一个加密周期内的多个数据逐一加密,可以包括:根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个数据的比特总数N,M、N均可以为正整数。使用多个密码块中的N个比特,对多个数据按位加密。换句话说,发送端还可以在确保生成的密码块比特总数M大于或等于多个数据的比特总数N的前提下,生成尽可能少的密码块,以提升加密效率。并且,发送端可以使用与多个数据长度相同的密码块对多个数据加密,从而避免浪费密码块,减少生成的密码块的数量,进而减少处理时间,进一步提升加密效率。In a possible design solution, the above-mentioned encrypting multiple data in one encryption cycle one by one according to the encryption and decryption control information may include: generating multiple encryption blocks according to the encryption and decryption control information. Wherein, the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers. A plurality of data is bit-wise encrypted using N bits in a plurality of cipher blocks. In other words, the sender can also generate as few cipher blocks as possible under the premise of ensuring that the total number of bits M of the generated cipher block is greater than or equal to the total number of bits N of multiple data, so as to improve encryption efficiency. In addition, the sender can use a cipher block with the same length as the multiple data to encrypt multiple data, thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, reducing processing time, and further improving encryption efficiency.
可选地,上述使用多个密码块中的N个比特,对多个数据按位加密,可以包括:使用N个比特中的第i比特,对多个数据中的第i比特加密。其中,i可以为正整数,i≤N。这样, 能够提供一种利用多个密码块中的N个比特对多个数据加密的方式,以实现对ODUk帧携带的多个OSU帧进行单独加密,以进一步提升数据安全性。Optionally, the above-mentioned bit-wise encryption of multiple data using N bits in multiple cipher blocks may include: using i-th bit in the N bits to encrypt i-th bit in the multiple data. Wherein, i can be a positive integer, i≤N. In this way, a manner of encrypting multiple data by using N bits in multiple cipher blocks can be provided, so as to realize separate encryption of multiple OSU frames carried by the ODUk frame, so as to further improve data security.
一种可能的设计方案中,第一方面所述的加密传输方法还可以包括:向接收端发送切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。换句话说,可以通过切换指示信息实现发送端与接收端之间同步切换密钥。这样,每经过一段时间,如一个或多个加密周期,发送端和接收端之间可以同步切换一次密钥,以防止同样的明文块始终被加密成同样的密文块,从而提高数据安全性。In a possible design solution, the encryption transmission method described in the first aspect may further include: sending switching instruction information to the receiving end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods. In other words, the key can be switched synchronously between the sending end and the receiving end through the switching indication information. In this way, after a period of time, such as one or more encryption cycles, the key can be switched synchronously between the sending end and the receiving end to prevent the same plaintext block from being always encrypted into the same ciphertext block, thereby improving data security .
可选地,在向接收端发送切换指示信息之前,第一方面所述的加密传输方法还可以包括:向接收端发送密钥切换请求信息。其中,密钥切换请求信息用于指示接收端反馈密钥切换确认信息。接收来自接收端的密钥切换确认信息。其中,密钥切换确认信息用于指示发送端发送切换指示信息。这样,在发送端向接收端发送切换指示信息前,发送端与接收端之间还可以利用密钥切换请求信息、密钥切换确认信息确认双方之间的通信是否正常,避免发送端与接收端未同步切换密钥的情况,从而确保发送端与接收端之间能够同步切换密钥,以进一步提高数据安全性。Optionally, before sending the switching indication information to the receiving end, the encrypted transmission method according to the first aspect may further include: sending key switching request information to the receiving end. Wherein, the key switching request information is used to instruct the receiving end to feed back key switching confirmation information. Receive key switching confirmation information from the receiving end. Wherein, the key switching confirmation information is used to instruct the sender to send switching instruction information. In this way, before the sending end sends the switching indication information to the receiving end, the sending end and the receiving end can also use the key switching request information and the key switching confirmation information to confirm whether the communication between the two parties is normal, so as to prevent the sending end from communicating with the receiving end. The key is not switched synchronously, so as to ensure that the key can be switched synchronously between the sender and the receiver to further improve data security.
可选地,在向接收端发送切换指示信息之后,第一方面所述的加密传输方法还可以包括:接收来自接收端的密钥切换完成信息。其中,密钥切换完成信息用于指示接收端完成密钥切换。这样,发送端可以根据密钥切换完成信息判断接收端是否完成密钥同步切换,从而确保发送端与接收端之间能够同步切换密钥,提高数据安全性。Optionally, after sending the switching indication information to the receiving end, the encrypted transmission method according to the first aspect may further include: receiving key switching completion information from the receiving end. Wherein, the key switching completion information is used to instruct the receiving end to complete the key switching. In this way, the sending end can judge whether the receiving end has completed key synchronous switching according to the key switching completion information, thereby ensuring that the key can be switched synchronously between the sending end and the receiving end, and improving data security.
一种可能的设计方案中,多个OSU帧携带认证信息,认证信息由加解密控制信息和多个加密后的数据确定。这样,接收端可以根据认证信息判断加密后的数据是否在传输过程中被篡改,以实现数据完整性校验,以进一步提高数据安全性。In a possible design solution, multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data. In this way, the receiving end can judge whether the encrypted data has been tampered with during transmission according to the authentication information, so as to realize data integrity verification and further improve data security.
第二方面,提供一种加密传输方法。该加密传输方法包括:接收一个加密周期内的多个OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带指示信息,指示信息用于指示加解密控制信息。根据加解密控制信息,对多个加密后的数据逐一解密。In a second aspect, an encrypted transmission method is provided. The encryption transmission method includes: receiving multiple OSU frames within one encryption period. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information. According to the encryption and decryption control information, multiple encrypted data are decrypted one by one.
需要说明的是,第二方面所述的加密传输方法可以由接收端执行,该接收端可以是OTN设备,也可以是可设置于OTN设备的芯片(系统)或其他部件或组件,还可以是包含OTN设备的装置,本申请对此不做限定。It should be noted that the encrypted transmission method described in the second aspect can be executed by the receiving end, which can be an OTN device, or a chip (system) or other components or components that can be set on the OTN device, or can be The apparatus including the OTN equipment is not limited in this application.
一种可能的设计方案中,上述根据加解密控制信息,对多个加密后的数据逐一解密,可以包括:根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个加密后的数据的比特总数N,M、N均可以为正整数。使用多个密码块中的N个比特,对多个加密后的数据按位解密。In a possible design solution, the above-mentioned decryption of multiple encrypted data one by one according to the encryption and decryption control information may include: generating multiple encryption blocks according to the encryption and decryption control information. Wherein, the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers. Using the N bits in the multiple cipher blocks, the multiple encrypted data are decrypted bit by bit.
可选地,上述使用多个密码块中的N个比特,对多个加密后的数据按位解密,可以包括:使用N个比特中的第i比特,对多个加密后的数据中的第i比特解密。其中,i可以为正整数,i≤N。Optionally, using the N bits in the plurality of cipher blocks to decrypt the encrypted data bit by bit may include: using the i-th bit in the N bits to decrypt the encrypted data in the i bit decryption. Wherein, i can be a positive integer, i≤N.
一种可能的设计方案中,第二方面所述的加密传输方法还可以包括:接收来自发送端的切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。In a possible design solution, the encrypted transmission method described in the second aspect may further include: receiving switching instruction information from the sending end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
可选地,在接收来自发送端的切换指示信息之前,第二方面所述的加密传输方法还可以包括:接收来自发送端的密钥切换请求信息,并向发送端发送密钥切换确认信息。其中, 密钥切换请求信息用于指示接收端反馈密钥切换确认信息,密钥切换确认信息用于指示发送端发送切换指示信息。Optionally, before receiving the switch indication information from the sender, the encrypted transmission method according to the second aspect may further include: receiving key switch request information from the sender, and sending key switch confirmation information to the sender. Wherein, the key switching request information is used to instruct the receiving end to feed back key switching confirmation information, and the key switching confirmation information is used to instruct the sending end to send switching instruction information.
可选地,在接收来自发送端的切换指示信息之后,第二方面所述的加密传输方法还可以包括:向发送端发送密钥切换完成信息。其中,密钥切换完成信息用于指示接收端完成密钥切换。Optionally, after receiving the switch indication information from the sender, the encrypted transmission method according to the second aspect may further include: sending key switch completion information to the sender. Wherein, the key switching completion information is used to instruct the receiving end to complete the key switching.
一种可能的设计方案中,多个OSU帧携带认证信息。其中,认证信息由加解密控制信息和多个加密后的数据确定。In a possible design solution, multiple OSU frames carry authentication information. Wherein, the authentication information is determined by the encryption and decryption control information and a plurality of encrypted data.
此外,第二方面所述的加密传输方法的技术效果可以参考第一方面所述的加密传输方法的技术效果,此处不再赘述。In addition, for the technical effects of the encrypted transmission method described in the second aspect, reference may be made to the technical effects of the encrypted transmission method described in the first aspect, which will not be repeated here.
第三方面,提供一种加密传输装置。该加密传输装置包括:处理模块和收发模块。其中,处理模块,用于根据加解密控制信息,对一个加密周期内的多个数据逐一加密。收发模块,用于发送多个OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带加解密控制信息的指示信息。In a third aspect, an encrypted transmission device is provided. The encryption transmission device includes: a processing module and a transceiver module. Wherein, the processing module is used to encrypt multiple data in one encryption cycle one by one according to the encryption and decryption control information. The transceiver module is used to send multiple OSU frames. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information of encryption and decryption control information.
一种可能的设计方案中,处理模块,还用于根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个数据的比特总数N,M、N均可以为正整数。处理模块,还用于使用多个密码块中的N个比特,对多个数据按位加密。In a possible design solution, the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information. Wherein, the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers. The processing module is further configured to use the N bits in the multiple cipher blocks to encrypt multiple pieces of data bitwise.
可选地,处理模块,还用于使用N个比特中的第i比特,对多个数据中的第i比特加密。其中,i可以为正整数,i≤N。Optionally, the processing module is further configured to use the i-th bit in the N bits to encrypt the i-th bit in the plurality of data. Wherein, i can be a positive integer, i≤N.
一种可能的设计方案中,收发模块,还用于向接收端发送切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。In a possible design solution, the transceiver module is also configured to send switching indication information to the receiving end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
可选地,收发模块,还用于向接收端发送密钥切换请求信息。其中,密钥切换请求信息用于指示接收端反馈密钥切换确认信息。收发模块,还用于接收来自接收端的密钥切换确认信息。其中,密钥切换确认信息用于指示第三方面所述的加密传输装置发送切换指示信息。Optionally, the transceiver module is further configured to send key switching request information to the receiving end. Wherein, the key switching request information is used to instruct the receiving end to feed back key switching confirmation information. The transceiver module is also used to receive the key switching confirmation information from the receiving end. Wherein, the key switching confirmation information is used to instruct the encryption transmission device described in the third aspect to send switching instruction information.
可选地,收发模块,还用于接收来自接收端的密钥切换完成信息。其中,密钥切换完成信息用于指示接收端完成密钥切换。Optionally, the transceiver module is further configured to receive key switching completion information from the receiving end. Wherein, the key switching completion information is used to instruct the receiving end to complete the key switching.
一种可能的设计方案中,上述多个OSU帧携带认证信息,该认证信息由加解密控制信息和多个加密后的数据确定。In a possible design solution, the above multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
可选地,收发模块可以包括接收模块和发送模块。其中,发送模块用于实现加密传输装置的发送功能,接收模块用于实现加密传输装置的接收功能。Optionally, the transceiver module may include a receiving module and a sending module. Wherein, the sending module is used to realize the sending function of the encrypted transmission device, and the receiving module is used to realize the receiving function of the encrypted transmission device.
可选地,第三方面所述的加密传输装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该加密传输装置可以执行第一方面所述的加密传输方法。Optionally, the encrypted transmission device described in the third aspect may further include a storage module, where programs or instructions are stored in the storage module. When the processing module executes the program or the instruction, the encrypted transmission device can execute the encrypted transmission method described in the first aspect.
需要说明的是,第三方面所述的加密传输装置可以是OTN设备,也可以是可设置于OTN设备的芯片(系统)或其他部件或组件,还可以是包含OTN设备的装置,本申请对此不做限定。It should be noted that the encrypted transmission device described in the third aspect can be OTN equipment, or a chip (system) or other components or components that can be installed in OTN equipment, or a device that includes OTN equipment. This is not limited.
此外,第三方面所述的加密传输装置的技术效果可以参考第一方面所述的加密传输方法的技术效果,此处不再赘述。In addition, for the technical effect of the encrypted transmission device described in the third aspect, reference may be made to the technical effect of the encrypted transmission method described in the first aspect, which will not be repeated here.
第四方面,提供一种加密传输装置。该加密传输装置包括:处理模块和收发模块。其 中,收发模块,用于接收一个加密周期内的多个OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带指示信息,指示信息用于指示加解密控制信息。处理模块,用于根据加解密控制信息,对多个加密后的数据逐一解密。In a fourth aspect, an encrypted transmission device is provided. The encryption transmission device includes: a processing module and a transceiver module. Wherein, the transceiver module is used to receive multiple OSU frames in one encryption period. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information. The processing module is used to decrypt multiple encrypted data one by one according to the encryption and decryption control information.
一种可能的设计方案中,处理模块,还用于根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个加密后的数据的比特总数N,M、N均可以为正整数。处理模块,还用于使用多个密码块中的N个比特,对多个加密后的数据按位解密。In a possible design solution, the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information. Wherein, the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers. The processing module is further configured to use the N bits in the multiple cipher blocks to decrypt multiple encrypted data bit by bit.
可选地,处理模块,还用于使用N个比特中的第i比特,对多个加密后的数据中的第i比特解密。其中,i可以为正整数,i≤N。Optionally, the processing module is further configured to use the i-th bit in the N bits to decrypt the i-th bit in the plurality of encrypted data. Wherein, i can be a positive integer, i≤N.
一种可能的设计方案中,收发模块,还用于接收来自发送端的切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。In a possible design solution, the transceiver module is also configured to receive handover instruction information from the sending end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
可选地,收发模块,还用于接收来自发送端的密钥切换请求信息。其中,密钥切换请求信息用于指示第四方面所述的加密传输装置反馈密钥切换确认信息。收发模块,还用于向发送端发送密钥切换确认信息。其中,密钥切换确认信息用于指示发送端发送切换指示信息。Optionally, the transceiver module is also configured to receive key switching request information from the sender. Wherein, the key switching request information is used to instruct the encryption transmission device described in the fourth aspect to feed back key switching confirmation information. The transceiver module is also used to send key switching confirmation information to the sender. Wherein, the key switching confirmation information is used to instruct the sender to send switching instruction information.
可选地,收发模块,还用于向发送端发送密钥切换完成信息。其中,密钥切换完成信息用于指示第四方面所述的加密传输装置完成密钥切换。Optionally, the transceiver module is further configured to send key switching completion information to the sender. Wherein, the key switching completion information is used to instruct the encryption transmission device described in the fourth aspect to complete the key switching.
一种可能的设计方案中,多个OSU帧携带认证信息,认证信息由加解密控制信息和多个加密后的数据确定。In a possible design solution, multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
可选地,收发模块可以包括接收模块和发送模块。其中,发送模块用于实现加密传输装置的发送功能,接收模块用于实现加密传输装置的接收功能。Optionally, the transceiver module may include a receiving module and a sending module. Wherein, the sending module is used to realize the sending function of the encrypted transmission device, and the receiving module is used to realize the receiving function of the encrypted transmission device.
可选地,第四方面所述的加密传输装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该加密传输装置可以执行第二方面所述的加密传输方法。Optionally, the encrypted transmission device described in the fourth aspect may further include a storage module, where programs or instructions are stored in the storage module. When the processing module executes the program or the instruction, the encrypted transmission device can execute the encrypted transmission method described in the second aspect.
需要说明的是,第四方面所述的加密传输装置可以是OTN设备,也可以是可设置于OTN设备的芯片(系统)或其他部件或组件,还可以是包含OTN设备的装置,本申请对此不做限定。It should be noted that the encrypted transmission device described in the fourth aspect can be OTN equipment, or a chip (system) or other components or components that can be installed in OTN equipment, or a device that includes OTN equipment. This is not limited.
此外,第四方面所述的加密传输装置的技术效果可以参考第二方面所述的加密传输方法的技术效果,此处不再赘述。In addition, for the technical effect of the encrypted transmission device described in the fourth aspect, reference may be made to the technical effect of the encrypted transmission method described in the second aspect, which will not be repeated here.
第五方面,提供一种加密传输装置。该加密传输装置包括:处理器,该处理器与存储器耦合,存储器用于存储计算机程序;处理器用于执行存储器中存储的计算机程序,以使得该加密传输装置执行第一方面、第二方面中任一种可能的实现方式所述的加密传输方法。In a fifth aspect, an encrypted transmission device is provided. The encrypted transmission device includes: a processor, the processor is coupled with a memory, and the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, so that the encrypted transmission device performs any one of the first aspect and the second aspect. An encrypted transmission method described in a possible implementation manner.
在一种可能的设计中,第五方面所述的加密传输装置还可以包括收发器。该收发器可以为收发电路或输入/输出接口。所述收发器可以用于该加密传输装置与其他加密传输装置通信。In a possible design, the encrypted transmission device described in the fifth aspect may further include a transceiver. The transceiver can be a transceiver circuit or an input/output interface. The transceiver can be used for the encrypted transmission device to communicate with other encrypted transmission devices.
在本申请中,第五方面所述的加密传输装置可以为OTN设备,或者设置于OTN设备内部的芯片或芯片系统。In the present application, the encrypted transmission device described in the fifth aspect may be an OTN device, or a chip or a chip system disposed inside the OTN device.
第五方面所述的加密传输装置的技术效果可以参考第一方面或第二方面中任一种可能的实现方式所述的加密传输方法的技术效果,此处不再赘述。For the technical effect of the encrypted transmission device described in the fifth aspect, reference may be made to the technical effect of the encrypted transmission method described in any possible implementation manner in the first aspect or the second aspect, which will not be repeated here.
第六方面,提供一种处理器。其中,处理器用于执行第一方面或第二方面中任一种可 能的实现方式所述的加密传输方法。In a sixth aspect, a processor is provided. Wherein, the processor is configured to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
第七方面,提供一种加密传输系统。该加密传输系统包括发送端和接收端。其中,发送端用于执行第一方面中任一种可能的实现方式所述的加密传输方法,接收端用于执行第二方面中任一种可能的实现方式所述的加密传输方法。In a seventh aspect, an encrypted transmission system is provided. The encrypted transmission system includes a sending end and a receiving end. Wherein, the sending end is configured to execute the encrypted transmission method described in any possible implementation manner in the first aspect, and the receiving end is configured to execute the encrypted transmission method described in any possible implementation manner in the second aspect.
第八方面,提供一种计算机可读存储介质。该计算机可读存储介质包括计算机程序或指令。当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面或第二方面中任一种可能的实现方式所述的加密传输方法。In an eighth aspect, a computer-readable storage medium is provided. The computer readable storage medium includes computer programs or instructions. When the computer program or instruction is run on the computer, the computer is made to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
第九方面,提供一种计算机程序产品,该计算机程序产品包括计算机程序或指令。当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面或第二方面中任一种可能的实现方式所述的加密传输方法。In a ninth aspect, a computer program product is provided, where the computer program product includes computer programs or instructions. When the computer program or instruction is run on the computer, the computer is made to execute the encrypted transmission method described in any possible implementation manner of the first aspect or the second aspect.
图1为本申请实施例提供的一种网络架构的示意图;FIG. 1 is a schematic diagram of a network architecture provided by an embodiment of the present application;
图2为本申请实施例提供的一种OTN设备的硬件结构示意图;FIG. 2 is a schematic diagram of a hardware structure of an OTN device provided in an embodiment of the present application;
图3为本申请实施例提供的k≠Cn时,OTUk帧的帧结构示意图;When Fig. 3 is that k≠Cn that the embodiment of the present application provides, the frame structure diagram of OTUk frame;
图4为本申请实施例提供的OSU帧的结构示意图;FIG. 4 is a schematic structural diagram of an OSU frame provided by an embodiment of the present application;
图5为本申请实施例提供的使用AES的CTR模式加密数据的示意图;FIG. 5 is a schematic diagram of encrypting data in CTR mode using AES provided by the embodiment of the present application;
图6为本申请实施例提供的使用AES的CTR模式解密数据的示意图;6 is a schematic diagram of decrypting data using the CTR mode of AES provided by the embodiment of the present application;
图7为本申请实施例提供的密钥扩展和加轮密钥的示意图;FIG. 7 is a schematic diagram of key extension and round key provided by the embodiment of the present application;
图8为本申请实施例提供的一种使用AES的GCM模式加密数据的示意图;Fig. 8 is a schematic diagram of encrypting data in GCM mode using AES provided by the embodiment of the present application;
图9为本申请实施例提供的一种GCM模式中发送端进行密文认证的流程示意图;FIG. 9 is a schematic flow diagram of a sending end performing ciphertext authentication in a GCM mode provided by an embodiment of the present application;
图10为本申请实施例提供的加密传输方法的流程示意图;FIG. 10 is a schematic flowchart of an encrypted transmission method provided in an embodiment of the present application;
图11为本申请实施例提供的一种利用多个密码块加密256个连续OSU帧的净荷的示意图;Fig. 11 is a schematic diagram of the payload of 256 consecutive OSU frames encrypted by using multiple cipher blocks provided by the embodiment of the present application;
图12为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图一;FIG. 12 is a schematic diagram 1 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application;
图13为本申请实施例提供的发送端与接收端之间同步切换密钥的状态机示意图;FIG. 13 is a schematic diagram of a state machine for synchronously switching keys between the sending end and the receiving end provided in the embodiment of the present application;
图14为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图二;FIG. 14 is a second schematic diagram of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application;
图15为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图三;FIG. 15 is a schematic diagram 3 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application;
图16为本申请实施例提供的一种发送端与接收端之间交互的示意图;FIG. 16 is a schematic diagram of interaction between a sending end and a receiving end provided by an embodiment of the present application;
图17为本申请实施例提供的一种发送端加密数据的流程示意图;FIG. 17 is a schematic flow diagram of a sending end encrypting data provided by an embodiment of the present application;
图18为本申请实施例提供的加密传输装置的结构示意图一;FIG. 18 is a first structural schematic diagram of an encrypted transmission device provided by an embodiment of the present application;
图19为本申请实施例提供的加密传输装置的结构示意图二。FIG. 19 is a second structural schematic diagram of an encrypted transmission device provided by an embodiment of the present application.
本申请实施例描述的网络架构和业务场景是为了更清楚地说明本申请实施例的技术方案,并不构成对本申请实施例提供的技术方案的限制。本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似技术问题同样适用。The network architecture and service scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided by the embodiments of the present application. Those skilled in the art know that with the evolution of the network architecture and the emergence of new service scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请实施例提供的技术方案可适用于光网络,例如:OTN。一个OTN通常由多个OTN设备通过光纤连接而成,可以根据具体需要组成如线形、环形和网状等不同的拓扑类型。The technical solutions provided by the embodiments of the present application are applicable to optical networks, such as OTN. An OTN is usually formed by connecting multiple OTN devices through optical fibers, and can be composed of different topology types such as line, ring, and mesh according to specific needs.
图1给出了可适用于本申请实施例的一种网络架构的示意图。如图1所示的OTN包括两 个OTN网络(分别为OTN网络1和OTN网络2)。每一个OTN网络包括一定数量的OTN设备(图1中用Nx表示,x为正整数),OTN网络内的设备之间的链路为域内链路,OTN网络间的设备之间的链路为域间链路。根据实际需要,一个OTN设备可能具备一种或多种功能。一般来说,OTN设备分为光层设备、电层设备以及光电混合设备。光层设备指的是能够处理光层信号的设备,例如:光放大器(optical amplifier,OA)。电层设备指的是能够处理电层信号的设备,例如:能够处理ODU信号的设备。光电混合设备指的是具备处理光层信号和电层信号能力的设备。需要说明的是,根据具体的集成需要,一台OTN设备可以集合多种不同的功能。本申请提供的技术方案适用于不同形态和集成度的OTN设备。Fig. 1 shows a schematic diagram of a network architecture applicable to the embodiment of the present application. The OTN shown in Fig. 1 includes two OTN networks (respectively OTN network 1 and OTN network 2). Each OTN network includes a certain number of OTN devices (indicated by Nx in Figure 1, x is a positive integer), the link between the devices in the OTN network is an intra-domain link, and the link between the devices in the OTN network is Interdomain links. According to actual needs, an OTN device may have one or more functions. Generally speaking, OTN equipment is divided into optical layer equipment, electrical layer equipment, and optoelectronic hybrid equipment. An optical layer device refers to a device capable of processing optical layer signals, such as an optical amplifier (optical amplifier, OA). Electrical-layer devices refer to devices that can process electrical-layer signals, for example, devices that can process ODU signals. Optical hybrid equipment refers to equipment capable of processing optical layer signals and electrical layer signals. It should be noted that, according to specific integration requirements, one OTN device can integrate various functions. The technical solution provided by this application is applicable to OTN equipment of different forms and integration levels.
本申请实施例中,发送端是指发送业务数据的设备,接收端是指接收来自发送端的业务数据的设备。该发送端和接收端均可以是上文中描述的OTN设备。例如,假设图1中的N1向N3发送业务数据,则N1为发送端,N3为接收端。需要注意,发送端也可以被称为源端,接收端也可以被称为宿端,本申请实施例对此不作限定。In this embodiment of the present application, the sending end refers to a device that sends service data, and the receiving end refers to a device that receives service data from the sending end. Both the sending end and the receiving end may be the OTN equipment described above. For example, assuming that N1 in FIG. 1 sends service data to N3, N1 is the sending end, and N3 is the receiving end. It should be noted that the sending end may also be called a source end, and the receiving end may also be called a sink end, which is not limited in this embodiment of the present application.
图2给出了可适用于本申请实施例的一种OTN设备的硬件结构示意图。具体地,一个OTN设备包括电源、风扇、辅助类单板,还可能包括支路板、线路板、交叉板,以及系统控制和通信类单板,其中,线路板也可包括光层处理单板。需要说明的是,根据具体的需要,每个设备具体包含的单板类型和数量可能不相同。例如,作为核心节点的网络设备可能没有支路板。作为边缘节点的网络设备可能有多个支路板。其中,电源用于为OTN设备供电,可能包括主用和备用电源。风扇用于为设备散热。辅助类单板用于提供外部告警或者接入外部时钟等辅助功能。支路板、交叉板和线路板主要是用于处理OTN的电层信号(后续称为OTN帧)。其中,支路板用于实现各种业务数据的接收和发送,例如同步数字体系(synchronous digital hierarchy,SDH)业务、分组业务、以太网业务和前传业务等。FIG. 2 shows a schematic diagram of a hardware structure of an OTN device applicable to the embodiment of the present application. Specifically, an OTN device includes a power supply, a fan, auxiliary boards, and may also include tributary boards, line boards, cross-connect boards, and system control and communication boards, where the circuit boards may also include optical layer processing boards . It should be noted that, according to specific requirements, the types and quantities of boards contained in each device may be different. For example, a network device serving as a core node may not have a tributary board. A network device serving as an edge node may have multiple tributary boards. Among them, the power supply is used to supply power to the OTN equipment, and may include main and backup power supplies. Fans are used to cool the device. Auxiliary boards are used to provide auxiliary functions such as external alarms or access to external clocks. Tributary boards, cross-connect boards, and line boards are mainly used to process electrical layer signals of the OTN (subsequently referred to as OTN frames). Among them, the tributary board is used to realize the receiving and sending of various service data, such as synchronous digital hierarchy (synchronous digital hierarchy, SDH) service, packet service, Ethernet service and fronthaul service, etc.
更进一步地,支路板可以划分为用户侧光模块和信号处理器。其中,用户侧光模块可以为光收发器,用于接收和/或发送用户信号。信号处理器用于实现对用户信号到OTN帧的映射和解映射处理。交叉板用于实现OTN帧的交换,完成一种或多种类型的OTN帧的交换。线路板主要实现线路侧OTN帧的处理。具体地,线路板可以划分为线路侧光模块和信号处理器。其中,线路侧光模块可以为线路侧光收发器,用于接收和/或发送OTN帧。信号处理器用于实现对线路侧的OTN帧的复用和解复用,或者映射和解映射处理。系统控制和通信类单板用于实现系统控制和通信。具体地,可以通过背板从不同的单板收集信息,或者将控制指令发送到对应的单板。Furthermore, the tributary board can be divided into user-side optical modules and signal processors. Wherein, the user-side optical module may be an optical transceiver for receiving and/or sending user signals. The signal processor is used to implement mapping and demapping of user signals to OTN frames. The cross-connect board is used to implement the exchange of OTN frames and complete the exchange of one or more types of OTN frames. The line board mainly realizes the processing of the OTN frame on the line side. Specifically, the circuit board can be divided into a line-side optical module and a signal processor. Wherein, the line-side optical module may be a line-side optical transceiver for receiving and/or sending OTN frames. The signal processor is used to implement multiplexing and demultiplexing, or mapping and demapping processing of the OTN frames on the line side. System control and communication boards are used to implement system control and communication. Specifically, information may be collected from different single boards through the backplane, or control instructions may be sent to corresponding single boards.
除非特殊说明,具体的组件(例如支路板)可以是一个或多个,本申请不做任何限制。需要说明的是,本申请实施例对设备包含的单板类型,以及单板具体的功能设计和数量不作限制。Unless otherwise specified, there may be one or more specific components (such as branch boards), which are not limited in this application. It should be noted that the embodiment of the present application does not limit the types of boards included in the device, and the specific functional design and quantity of the boards.
为了更加清楚的理解本申请,以下对本申请实施例中使用的部分术语和技术作简单介绍。In order to understand the present application more clearly, some terms and technologies used in the embodiments of the present application are briefly introduced below.
1、业务数据1. Business data
业务数据指的是OTN可以承载的业务,例如,可以是以太网业务、分组业务、无线回传业务等。Service data refers to services that can be carried by the OTN, for example, Ethernet services, packet services, wireless backhaul services, and so on.
2、OTN2. OTN
在OTN中,发送端可以将用户的业务数据映射到光业务单元(optical service unit,OSU) 帧的净荷(payload)中,再为OSU帧的净荷添加OSU开销(overhead,OH),得到OSU帧。然后,将OSU帧映射到光净荷单元k(OPUk)帧的净荷中,再为OPUk帧的净荷添加OPUk开销和光数据单元k(optical data unit-k,ODUk)开销,得到ODUk帧。接着,为ODUk帧添加光传输单元k(optical transport unit-k,OTUk)开销等,得到OTUk帧。最后,发送端向接收端发送该OTUk帧。上述净荷也可以被称为净荷区,开销也可以被称为开销区。In OTN, the sender can map the user’s service data to the payload of the optical service unit (OSU) frame, and then add the OSU overhead (overhead, OH) to the payload of the OSU frame to obtain OSU frame. Then, the OSU frame is mapped into the payload of the optical payload unit k (OPUk) frame, and then OPUk overhead and optical data unit k (optical data unit-k, ODUk) overhead are added to the payload of the OPUk frame to obtain the ODUk frame. Next, add optical transport unit k (optical transport unit-k, OTUk) overhead etc. to the ODUk frame to obtain the OTUk frame. Finally, the sending end sends the OTUk frame to the receiving end. The foregoing payload may also be called a payload area, and the overhead may also be called an overhead area.
其中,K可以为0、1、2、3、4、Cn和flex。k取不同值时,OTUk帧的比特速率(即传输速率)不同。具体地,k=0、1、2、3、4、Cn和flex,分别表示比特速率为1.25吉比特(Gbit)/秒(s)、2.5Gbit/s、10Gbit/s、40Gbit/s、100Gbit/s、n*100Gbit/s和n*1.25Gbit/s(n≥2)。如OTU2帧的比特速率是10Gbit/s,OTU4帧的比特速率是100Gbit/s。需要说明的是,上述提及的比特速率均为近似值。例如,OPU4帧更准确的比特速率为104.35597533Gbit/s。其他示例不再一一列举。Wherein, K can be 0, 1, 2, 3, 4, Cn and flex. When k takes different values, the bit rate (that is, the transmission rate) of the OTUk frame is different. Specifically, k=0, 1, 2, 3, 4, Cn, and flex, respectively representing the bit rates of 1.25 gigabit (Gbit)/second (s), 2.5Gbit/s, 10Gbit/s, 40Gbit/s, and 100Gbit /s, n*100Gbit/s and n*1.25Gbit/s (n≥2). For example, the bit rate of the OTU2 frame is 10Gbit/s, and the bit rate of the OTU4 frame is 100Gbit/s. It should be noted that the bit rates mentioned above are approximate values. For example, a more accurate bit rate for OPU4 frames is 104.35597533Gbit/s. Other examples are not listed one by one.
示例性地,图3示出了k≠Cn时,OTUk帧的帧结构示意图。请参照图3,一个OTUk帧有4行*4080列。OSU帧净荷和OSU开销(即OSU OH)构成了OSU帧,OSU帧被映射于OPUk帧净荷中。OPUk净荷和OPUk开销(即OPUk OH)构成了OPUk帧,OPUk帧和ODUk开销(即ODUk OH)构成了ODUk帧,ODUk帧、OTUk开销(即OTUk OH)、帧对齐信号(frame alignment signal,FAS)和前向错误纠正(forward error correction,FEC)校验区构成了OTUk帧。具体地,OTUk帧中的第1行的1~7列为FAS和复帧对齐信号(multiframe alignment signal,MFAS),第1行的8~14列为OTUk OH,第2~4行的1~14列为ODUk OH,第1~4行的15~16列为OPUk OH,第1~4行的17~3824列为OPUk净荷,第1~4行的3825~4080列为FEC校验区。Exemplarily, FIG. 3 shows a schematic diagram of a frame structure of an OTUk frame when k≠Cn. Please refer to Figure 3, an OTUk frame has 4 rows*4080 columns. The OSU frame payload and OSU overhead (ie, OSU OH) constitute an OSU frame, and the OSU frame is mapped into the OPUk frame payload. OPUk payload and OPUk overhead (ie OPUk OH) constitute the OPUk frame, OPUk frame and ODUk overhead (ie ODUk OH) constitute the ODUk frame, ODUk frame, OTUk overhead (ie OTUk OH), frame alignment signal (frame alignment signal, FAS) and forward error correction (forward error correction, FEC) check area constitute the OTUk frame. Specifically, columns 1 to 7 of the first row in the OTUk frame are FAS and a multiframe alignment signal (multiframe alignment signal, MFAS), columns 8 to 14 of the first row are OTUk OH, and columns 1 to 4 of the second to fourth rows are OTUk OH. Column 14 is ODUk OH, columns 15 to 16 of lines 1 to 4 are OPUk OH, columns 17 to 3824 of lines 1 to 4 are OPUk payloads, columns 3825 to 4080 of lines 1 to 4 are FEC check areas .
进一步地,图4给出了一种可适用于本申请实施例的OSU帧的结构示意图。请参照图4,OSU帧包括开销和净荷,开销包括通用开销、映射开销和循环冗余校验码(cyclic redundancy check,CRC)。OSU帧开销的长度为7字节,OSU帧净荷的长度为185字节。Further, FIG. 4 shows a schematic structural diagram of an OSU frame applicable to this embodiment of the present application. Referring to FIG. 4, the OSU frame includes an overhead and a payload, and the overhead includes a general overhead, a mapping overhead, and a cyclic redundancy check code (cyclic redundancy check, CRC). The length of the OSU frame overhead is 7 bytes, and the length of the OSU frame payload is 185 bytes.
其中,通用开销可以用于对业务数据进行监控管理,映射开销可以表征将业务数据映射到OSU帧净荷时所采用的映射规则。Among them, the general overhead can be used to monitor and manage the service data, and the mapping overhead can represent the mapping rule adopted when the service data is mapped to the payload of the OSU frame.
n个连续的OSU帧被称为一个加密周期,n为正整数。其中,本申请实施例对n的取值不作限定,例如,n=128、256、512或1024等。在实际应用时,n通常为256。N consecutive OSU frames are called an encryption period, and n is a positive integer. Wherein, the embodiment of the present application does not limit the value of n, for example, n=128, 256, 512 or 1024 and so on. In practical applications, n is usually 256.
需要注意,本申请实施例中的OSU帧的结构并不仅限于图4所示,OSU帧的结构可以根据实际需求调整,本申请对此不作限定,另外,OSU帧也可以被称为光业务单元帧。It should be noted that the structure of the OSU frame in the embodiment of this application is not limited to that shown in Figure 4. The structure of the OSU frame can be adjusted according to actual needs, and this application does not limit it. In addition, the OSU frame can also be called an optical service unit frame.
本申请实施例中还给出了另一种可适用于本申请实施例的OSU帧,为了与图4所示的OSU帧进行区分,本实施例提供的另一种可适用于本申请实施例的OSU帧可以被称为OSUv帧。下面结合表1-表3对该OSUv帧进行说明。Another OSU frame applicable to the embodiment of the application is also given in the embodiment of the application. In order to distinguish it from the OSU frame shown in Figure 4, another OSU frame provided in this embodiment is applicable to the embodiment of the application An OSU frame may be called an OSUv frame. The OSUv frame will be described below in conjunction with Table 1-Table 3.
OSUv帧可以承载恒定比特率(constant bit rate,CBR)业务和可变比特率业务(variable bit rate,VBR)业务。根据OSUv帧承载的业务不同,OSUv帧的类型不同。具体地,OSUv帧可以包括:承载CBR业务的OSUv帧(简称为CBR_OSUv帧),承载VBR业务的OSUv帧(简称为VBR_OSUv帧)。其中,CBR_OSUv帧包括:CBR帧和CBR扩展(extension)帧,CBR扩展帧可以简称为CBR_EXT帧。VBR_OSUv帧包括:VBR帧和VBR扩展帧,VBR扩展帧可以简称为VBR_EXT帧。OSUv frames can carry constant bit rate (constant bit rate, CBR) services and variable bit rate services (variable bit rate, VBR) services. According to the different services carried by the OSUv frame, the types of the OSUv frame are different. Specifically, the OSUv frame may include: an OSUv frame carrying a CBR service (referred to as a CBR_OSUv frame for short), and an OSUv frame carrying a VBR service (referred to as a VBR_OSUv frame for short). Wherein, the CBR_OSUv frame includes: a CBR frame and a CBR extension (extension) frame, and the CBR extension frame may be referred to as a CBR_EXT frame for short. The VBR_OSUv frame includes: a VBR frame and a VBR extended frame, and the VBR extended frame may be referred to as a VBR_EXT frame for short.
一个加密周期通常包括1024个OSUv帧。根据OSUv帧承载的业务不同,一个加密周期 中OSUv帧的类型不同。One encryption cycle usually includes 1024 OSUv frames. According to the different services carried by the OSUv frame, the types of the OSUv frame in one encryption cycle are different.
具体地,承载CBR业务时,一个加密周期中包括CBR帧和CBR_EXT帧,CBR帧和CBR_EXT帧按1:3的比例产生。换句话说,发送端向接收端发送的连续的4个OSUv帧中,依次包括1个CBR帧和3个CBR_EXT帧。因此,如果一个加密周期包括1024个OSUv帧,那么该加密周期中包括256个CBR帧和768个CBR_EXT帧。Specifically, when carrying a CBR service, an encryption period includes a CBR frame and a CBR_EXT frame, and the CBR frame and the CBR_EXT frame are generated at a ratio of 1:3. In other words, the 4 consecutive OSUv frames sent from the sender to the receiver include 1 CBR frame and 3 CBR_EXT frames in sequence. Therefore, if an encryption period includes 1024 OSUv frames, then the encryption period includes 256 CBR frames and 768 CBR_EXT frames.
其中,CBR_EXT帧的开销中不存在通道开销(path overhead,POH)。1个CBR帧的开销包括:通道开销和复帧帧头。CBR帧的通道开销包括:POH1和POH2。1个CBR帧的复帧帧头包括:32复帧帧头(简称为M32_P1)和256复帧帧头(简称为M256_P1)。Wherein, there is no channel overhead (path overhead, POH) in the overhead of the CBR_EXT frame. The overhead of one CBR frame includes: channel overhead and multiframe header. The channel overhead of the CBR frame includes: POH1 and POH2. The multiframe header of one CBR frame includes: 32 multiframe headers (abbreviated as M32_P1) and 256 multiframe headers (abbreviated as M256_P1).
连续的32个CBR帧可以被称为32CBR复帧,连续的256个CBR帧可以被称为256CBR复帧。32CBR复帧的POH1可以组成1个32CBR复帧的POH1开销,256CBR复帧的POH2可以组成1个256CBR复帧的POH2开销。32CBR复帧的M32_P1可以组成1个32CBR复帧的复帧帧头开销,该32CBR复帧的复帧帧头开销可以用于指示该32CBR复帧。256CBR复帧的M256_P1可以组成1个256CBR复帧的复帧帧头开销,该256CBR复帧的复帧帧头开销可以用于指示该256CBR复帧。并且,32CBR复帧的POH1开销与32CBR复帧的复帧帧头开销同步,256CBR复帧的POH2开销与256CBR复帧的复帧帧头开销同步,也即是说,1个32CBR复帧的开销包括:1个32CBR复帧的POH1开销和1个32CBR复帧的复帧帧头开销,1个256CBR复帧的开销包括:1个256CBR复帧的POH2开销和1个256CBR复帧的复帧帧头开销。另外,32CBR复帧与256CBR复帧同步,比如,如果一个加密周期包括1024个OSUv帧,那么该加密周期中的第1个至第8个32CBR复帧,可以组成该加密周期的第1个256CBR复帧。The continuous 32 CBR frames may be called a 32CBR multiframe, and the continuous 256 CBR frames may be called a 256CBR multiframe. The POH1 of the 32CBR multiframe can form a POH1 overhead of a 32CBR multiframe, and the POH2 of a 256CBR multiframe can form a POH2 overhead of a 256CBR multiframe. The M32_P1 of the 32CBR multiframe can form a multiframe header overhead of a 32CBR multiframe, and the multiframe header overhead of the 32CBR multiframe can be used to indicate the 32CBR multiframe. The M256_P1 of the 256CBR multiframe can form a multiframe header overhead of a 256CBR multiframe, and the multiframe header overhead of the 256CBR multiframe can be used to indicate the 256CBR multiframe. In addition, the POH1 overhead of the 32CBR multiframe is synchronized with the multiframe header overhead of the 32CBR multiframe, and the POH2 overhead of the 256CBR multiframe is synchronized with the multiframe header overhead of the 256CBR multiframe. That is to say, the overhead of one 32CBR multiframe Including: one 32CBR multiframe POH1 overhead and one 32CBR multiframe header overhead, one 256CBR multiframe overhead includes: one 256CBR multiframe POH2 overhead and one 256CBR multiframe multiframe header overhead. In addition, the 32CBR multiframe is synchronized with the 256CBR multiframe. For example, if an encryption period includes 1024 OSUv frames, then the first to eighth 32CBR multiframes in the encryption period can form the first 256CBR of the encryption period. multiframe.
示例性地,表1为CBR帧的开销表,参照表1,CBR帧的开销中,POH1、POH2的大小分别为2比特、1比特,M32_P1、M256_P1的大小均为1比特。32CBR复帧的POH1开销的大小为2*32=64比特,32CBR复帧的复帧帧头开销的大小为1*32=32比特。256CBR复帧的POH2开销的大小为1*256=256比特,256CBR复帧的复帧帧头开销的大小为1*256=256比特。Exemplarily, Table 1 is an overhead table of a CBR frame. Referring to Table 1, in the overhead of a CBR frame, the sizes of POH1 and POH2 are 2 bits and 1 bit respectively, and the sizes of M32_P1 and M256_P1 are both 1 bit. The size of the POH1 overhead of the 32CBR multiframe is 2*32=64 bits, and the size of the header overhead of the multiframe of the 32CBR multiframe is 1*32=32 bits. The size of the POH2 overhead of the 256CBR multiframe is 1*256=256 bits, and the size of the header overhead of the 256CBR multiframe is 1*256=256 bits.
为了便于理解,本文中,32CBR复帧的POH1开销可以简称为CBR_POH1开销,256CBR复帧的POH2开销可以简称为CBR_POH2开销。如果一个加密周期包括1024个OSUv帧,那么该加密周期中包括8个M32_P1和1个M256_P1,也即是说,该加密周期中包括8个CBR_POH1开销、1个CBR_POH2开销。For ease of understanding, in this document, the POH1 overhead of the 32CBR multiframe may be referred to as the CBR_POH1 overhead, and the POH2 overhead of the 256CBR multiframe may be referred to as the CBR_POH2 overhead. If an encryption period includes 1024 OSUv frames, then the encryption period includes 8 M32_P1 and 1 M256_P1, that is to say, the encryption period includes 8 CBR_POH1 overheads and 1 CBR_POH2 overhead.
表1Table 1
承载VBR业务时,一个加密周期中包括VBR帧和VBR_EXT帧,VBR帧和VBR_EXT帧按1:1的比例产生。换句话说,发送端向接收端发送的连续的4个OSUv帧中,依次包括1个VBR帧和1个VBR_EXT帧。因此,如果一个加密周期包括1024个OSUv帧,那么该加密周期中包括512个VBR帧和512个VBR_EXT帧。When carrying VBR services, an encryption cycle includes VBR frames and VBR_EXT frames, and VBR frames and VBR_EXT frames are generated at a ratio of 1:1. In other words, the 4 consecutive OSUv frames sent from the sender to the receiver include 1 VBR frame and 1 VBR_EXT frame in sequence. Therefore, if an encryption period includes 1024 OSUv frames, then the encryption period includes 512 VBR frames and 512 VBR_EXT frames.
其中,VBR帧和VBR_EXT帧的开销均包括:通道开销和复帧帧头。VBR帧的通道开销包括:POH1和POH2。VBR帧的复帧帧头包括:64复帧帧头(简称为M64_P2)和256复帧 帧头(简称为M256_P2)。VBR_EXT帧的通道开销包括POH1,VBR_EXT帧的复帧帧头包括:64复帧帧头。Wherein, the overhead of the VBR frame and the VBR_EXT frame both include: channel overhead and a multiframe header. The channel overhead of the VBR frame includes: POH1 and POH2. The multiframe header of the VBR frame includes: a 64-multiframe header (abbreviated as M64_P2) and a 256-multiframe header (abbreviated as M256_P2). The channel overhead of the VBR_EXT frame includes POH1, and the multiframe header of the VBR_EXT frame includes: 64 multiframe headers.
连续的64个OSUv帧中包括32个VBR帧和32个VBR_EXT帧,也即是说,连续的64个OSUv帧中包括包括32个VBR帧的POH1和32个VBR_EXT帧的POH1,共64个POH1。这连续的64个OSUv帧中的64个POH1可以被称为1个VBR_POH1开销。The 64 consecutive OSUv frames include 32 VBR frames and 32 VBR_EXT frames, that is to say, the 64 consecutive OSUv frames include POH1 including 32 VBR frames and POH1 including 32 VBR_EXT frames, a total of 64 POH1 . The 64 POH1s in the 64 consecutive OSUv frames may be referred to as one VBR_POH1 overhead.
连续的64个VBR帧可以被称为64VBR复帧,连续的256个VBR帧可以被称为256VBR复帧。256VBR复帧的POH2可以组成1个256VBR复帧的POH2开销。64VBR复帧的M64_P2可以组成1个64VBR复帧的复帧帧头开销,该64VBR复帧的复帧帧头开销可以用于指示该64VBR复帧。256VBR复帧的M256_P2可以组成1个256VBR复帧的复帧帧头开销,该256VBR复帧的复帧帧头开销可以用于指示该256VBR复帧。并且,256VBR复帧的POH2开销与256VBR复帧的复帧帧头开销同步,也即是说,1个256VBR复帧的开销包括:1个256VBR复帧的POH2开销和1个256VBR复帧的复帧帧头开销。其中,64VBR复帧与256VBR复帧不同步,具体地,如果1个加密周期包括1024个OSUv帧(即1个加密周期中包括16个64VBR复帧),那么由于64VBR复帧与256VBR复帧不同步,256VBR复帧对应512个连续的OSUv帧,因此,该加密周期中存在至少1个完整的M256_P2。The 64 consecutive VBR frames may be called a 64VBR multiframe, and the consecutive 256 VBR frames may be called a 256VBR multiframe. The POH2 of a 256VBR multiframe can form a POH2 overhead of a 256VBR multiframe. The M64_P2 of the 64VBR multiframe can form a multiframe header overhead of a 64VBR multiframe, and the multiframe header overhead of the 64VBR multiframe can be used to indicate the 64VBR multiframe. The M256_P2 of the 256VBR multiframe can form a multiframe header overhead of a 256VBR multiframe, and the multiframe header overhead of the 256VBR multiframe can be used to indicate the 256VBR multiframe. Moreover, the POH2 overhead of the 256VBR multiframe is synchronized with the header overhead of the multiframe of the 256VBR multiframe. That is to say, the overhead of one 256VBR multiframe includes: one POH2 overhead of one 256VBR multiframe and one Frame header overhead. Among them, the 64VBR multiframe is not synchronized with the 256VBR multiframe. Specifically, if one encryption period includes 1024 OSUv frames (that is, one encryption period includes 16 64VBR multiframes), then since the 64VBR multiframe is not synchronized with the 256VBR multiframe Synchronously, 256VBR multiframe corresponds to 512 consecutive OSUv frames, therefore, there is at least one complete M256_P2 in this encryption cycle.
示例性地,表2为VBR帧的开销表,参照表2,VBR帧的开销中,POH1、POH2、M64_P2、M256_P2的大小均为1比特。64VBR复帧的POH1开销的大小为1*64=64比特,64VBR复帧的复帧帧头开销的大小为1*64=64比特。256VBR复帧的POH2开销的大小为1*256=256比特,256VBR复帧的复帧帧头开销的大小为1*256=256比特。Exemplarily, Table 2 is an overhead table of a VBR frame. Referring to Table 2, in the overhead of a VBR frame, the sizes of POH1, POH2, M64_P2, and M256_P2 are all 1 bit. The size of the POH1 overhead of the 64VBR multiframe is 1*64=64 bits, and the size of the header overhead of the multiframe of the 64VBR multiframe is 1*64=64 bits. The size of the POH2 overhead of the 256VBR multiframe is 1*256=256 bits, and the size of the header overhead of the multiframe of the 256VBR multiframe is 1*256=256 bits.
表2Table 2
连续的64个VBR_EXT帧可以被称为64VBR_EXT复帧。64VBR_EXT复帧的M64_P2可以组成1个64VBR_EXT复帧的复帧帧头开销,该64VBR_EXT复帧的复帧帧头开销可以用于指示该64VBR_EXT复帧。Consecutive 64 VBR_EXT frames may be referred to as 64VBR_EXT multiframes. The M64_P2 of the 64VBR_EXT multiframe can form a multiframe header overhead of a 64VBR_EXT multiframe, and the multiframe header overhead of the 64VBR_EXT multiframe can be used to indicate the 64VBR_EXT multiframe.
示例性地,表3为VBR_EXT帧的开销表,参照表3,VBR_EXT帧的开销中,POH1、M64_P2的大小均为1比特。64VBR_EXT复帧的POH1开销的大小为1*64=64比特,64VBR_EXT复帧的复帧帧头开销的大小为1*64=64比特。Exemplarily, Table 3 is the overhead table of the VBR_EXT frame. Referring to Table 3, in the overhead of the VBR_EXT frame, the sizes of POH1 and M64_P2 are both 1 bit. The size of the POH1 overhead of the 64VBR_EXT multiframe is 1*64=64 bits, and the size of the header overhead of the multiframe of the 64VBR_EXT multiframe is 1*64=64 bits.
为了便于理解,本文中,上述256VBR复帧的POH2开销可以简称为VBR_POH2开销。如果一个加密周期包括1024个OSUv帧,那么该加密周期中包括16个M64_P2和至少1个M256_P2,也即是说,该加密周期中包括:16个VBR_POH1开销、至少1个完整的VBR_POH2开销(有512个VBR帧的POH2,则至少有1个VBR_POH2)。For ease of understanding, herein, the above POH2 overhead of the 256VBR multiframe may be referred to as VBR_POH2 overhead for short. If an encryption period includes 1024 OSUv frames, then the encryption period includes 16 M64_P2 and at least 1 M256_P2, that is to say, the encryption period includes: 16 VBR_POH1 overheads, at least 1 complete VBR_POH2 overhead (with POH2 of 512 VBR frames, there is at least 1 VBR_POH2).
表3table 3
OSUv帧的长度为192字节,与上述OSU帧的长度相同。OSUv帧还包括净荷。OSUv帧净荷与上述OSU帧净荷的区别在于,OSUv帧净荷的长度可以不固定为185字节。The length of the OSUv frame is 192 bytes, which is the same as the length of the above-mentioned OSU frame. The OSUv frame also includes a payload. The difference between the OSUv frame payload and the aforementioned OSU frame payload is that the length of the OSUv frame payload may not be fixed at 185 bytes.
如无特别说明,在本文中:OSU帧通常为图4所示的OSU帧,OSUv帧通常为上述实施例提供的另一种可适用于本申请实施例的OSU帧。OSU帧能够承载用户的业务数据,比如E1业务。其中,E1业务是指标称速率为2.048Mb/s专线业务,是采用G.703接口的各种业务的总称,比如话音、数据、图像等业务。具体实现时,一个OSU帧的净荷可以是承载用户的业务数据的最小单元(亦可以称为最小支路单元)。一个OSU帧的速率可以是可变速率,也可以是固定速率。多个OSU帧可以组合在一起,用于承载对应速率的用户的业务数据。不同的业务数据依据各自速率映射到对应的OSU帧中,并在OSU帧的开销中添加标签实现端到端的操作管理和维护(operation administration and maintenance,OAM)功能。其中,承载同一项业务数据的多个OSU帧可以连续,也可以不连续。Unless otherwise specified, in this document: the OSU frame is generally the OSU frame shown in FIG. 4 , and the OSUv frame is generally another OSU frame provided by the foregoing embodiment and applicable to the embodiment of the present application. OSU frames can carry user service data, such as E1 services. Among them, the E1 service refers to the dedicated line service with a rate of 2.048Mb/s, which is a general term for various services using the G.703 interface, such as voice, data, and image services. During specific implementation, the payload of an OSU frame may be the smallest unit (also called the smallest tributary unit) for carrying user service data. The rate of an OSU frame can be a variable rate or a fixed rate. Multiple OSU frames can be combined to carry user service data of a corresponding rate. Different service data are mapped to corresponding OSU frames according to their respective rates, and labels are added to the overhead of OSU frames to realize end-to-end operation administration and maintenance (OAM) functions. Wherein, multiple OSU frames carrying the same service data may be continuous or discontinuous.
一个ODUk帧可以携带多个OSU帧,从而可以承载多个用户的业务数据。发送端在对ODUk帧加密时,实际是将ODUk帧净荷作为一个整体进行加密,不会区分ODUk帧净荷携带的业务数据中哪些需要加密,哪些不需要加密,因此,发送端不能对ODUk帧承载的全部业务数据中的部分业务数据进行单独加密。An ODUk frame can carry multiple OSU frames, so that it can carry service data of multiple users. When the sender encrypts the ODUk frame, it actually encrypts the ODUk frame payload as a whole, and does not distinguish which of the service data carried in the ODUk frame payload needs to be encrypted and which does not need to be encrypted. Therefore, the sender cannot encrypt the ODUk frame payload. Part of the business data in all the business data carried by the frame is encrypted separately.
3、加密算法3. Encryption algorithm
加密算法可以被分为三类:对称加密算法,非对称加密算法和哈希(hash)加密算法。对称加密算法指的是加密解密均使用同一密钥。非对称加密指的是加密、解密使用不同密钥。其中,对称加密算法包括:数据加密标准(data encryption standard,DES)、三重数据加密算法(triple data encryption algorithm,TDEA)和高级加密标准(advanced encryption standard,AES)等。非对称加密算法包括:椭圆曲线密码编码学(elliptic curves cryptography,ECC)加密算法、迪菲-赫尔曼(diffie-hellman,DH)加密算法、数字签名算法(digital signature algorithm,DSA)等。Encryption algorithms can be divided into three categories: symmetric encryption algorithms, asymmetric encryption algorithms and hash (hash) encryption algorithms. Symmetric encryption algorithm refers to the use of the same key for encryption and decryption. Asymmetric encryption refers to encryption and decryption using different keys. Among them, the symmetric encryption algorithm includes: data encryption standard (data encryption standard, DES), triple data encryption algorithm (triple data encryption algorithm, TDEA) and advanced encryption standard (advanced encryption standard, AES), etc. Asymmetric encryption algorithms include: elliptic curve cryptography (ECC) encryption algorithm, Diffie-Hellman (DH) encryption algorithm, digital signature algorithm (digital signature algorithm, DSA), etc.
4、AES高级加密标准(advanced encryption standard,AES)4. AES Advanced Encryption Standard (AES)
在AES中,发送端可以根据密钥和初始向量(initialization vector,IV)加密明文,得到密文,并向接收端发送该密文;接收端可以根据同样的密钥和初始向量解密接收到的密文,得到对应的明文,从而实现数据的加密传输。In AES, the sender can encrypt the plaintext according to the key and initialization vector (initialization vector, IV), obtain the ciphertext, and send the ciphertext to the receiver; the receiver can decrypt the received ciphertext according to the same key and initialization vector The ciphertext is obtained to obtain the corresponding plaintext, so as to realize the encrypted transmission of data.
根据密钥的长度不同,AES算法可以被分为AES-128、AES-192和AES-256。其中,AES-128使用的密钥的长度为128比特(bit),AES-192使用的密钥的长度为192比特,AES-256使用的密钥的长度为256比特。According to the length of the key, the AES algorithm can be divided into AES-128, AES-192 and AES-256. Wherein, the length of the key used by AES-128 is 128 bits (bit), the length of the key used by AES-192 is 192 bits, and the length of the key used by AES-256 is 256 bits.
AES包括多种加密模式,比如计算器(counter,CTR)模式、伽罗瓦/计数器模式(galois/counter mode,GCM)、电码本(electronic codebook book,ECB)模式、密码分组链接(cipher block chaining,CBC)模式。AES includes a variety of encryption modes, such as calculator (counter, CTR) mode, Galois/counter mode (galois/counter mode, GCM), electronic codebook (electronic codebook book, ECB) mode, cipher block chaining (cipher block chaining) , CBC) mode.
下面以AES-256的CTR模式为例,说明加密数据和解密数据的过程。The following takes the CTR mode of AES-256 as an example to illustrate the process of encrypting data and decrypting data.
图5为使用AES-256的CTR模式加密数据的示意图。请参照图5,首先可以利用256比特的密钥(key)、128比特的初始向量和AES加密函数,生成128比特的密码块(cipher)。然后可以将128比特的密码块和128比特的明文(plaintext)进行异或运算,得到对应的128比特的密文(ciphertext)。FIG. 5 is a schematic diagram of encrypting data using the CTR mode of AES-256. Referring to FIG. 5 , first, a 256-bit key (key), a 128-bit initial vector and an AES encryption function can be used to generate a 128-bit cipher block (cipher). Then, an XOR operation can be performed on the 128-bit cipher block and the 128-bit plaintext (plaintext) to obtain the corresponding 128-bit ciphertext (ciphertext).
图6为使用AES的CTR模式解密数据的示意图。请参照图6,首先可以利用256比特的密 钥、128比特的初始向量和AES加密函数,生成128比特的密码块(cipher)。然后可以将128比特的密码块和128比特的密文进行异或运算,得到对应的128比特的明文。FIG. 6 is a schematic diagram of decrypting data using the CTR mode of AES. Referring to Fig. 6, firstly, a 256-bit key, a 128-bit initialization vector and an AES encryption function can be used to generate a 128-bit cipher block (cipher). Then the XOR operation can be performed on the 128-bit cipher block and the 128-bit ciphertext to obtain the corresponding 128-bit plaintext.
具体地,上述图5和图6中,利用256比特的密钥、128比特的初始向量和AES加密函数生成128比特的密码块的过程,包括密钥扩展(key expansion)和加轮密钥(add round key)两个步骤。图7为本申请实施例提供的密钥扩展和加轮密钥的示意图。请参照图7,进行密钥扩展时,可以利用256比特的密钥和密钥扩展函数,将256比特的密钥扩展为多个轮密钥(round key)。进行加轮密钥时,可以利用128比特的初始向量、多个轮密钥和加轮密钥函数,生成128比特的密码块。其中,CTR模式中,初始向量可以由计数器产生,并且每生成一个密码块,初始向量更新1次,例如初始向量的值增加1。密钥扩展函数和加轮密钥函数的具体实现方式可以参照CTR模式中的相关规定,在此不再赘述。Specifically, in the above-mentioned Figures 5 and 6, the process of generating a 128-bit cipher block using a 256-bit key, a 128-bit initial vector, and an AES encryption function includes key expansion (key expansion) and round key ( add round key) two steps. FIG. 7 is a schematic diagram of key extension and round key addition provided by the embodiment of the present application. Please refer to FIG. 7 , when performing key expansion, the 256-bit key can be expanded into multiple round keys by using the 256-bit key and the key expansion function. When adding round keys, a 128-bit cipher block can be generated by using a 128-bit initial vector, multiple round keys and round key functions. Wherein, in the CTR mode, the initial vector can be generated by a counter, and every time a cipher block is generated, the initial vector is updated once, for example, the value of the initial vector increases by 1. For the specific implementation of the key expansion function and the round key function, reference may be made to the relevant regulations in the CTR mode, which will not be repeated here.
AES的GCM模式与CTR模式的区别在于,GCM模式不仅可以利用CTR模式加密明文或解密密文,还可以进行密文认证。具体地,发送端不仅可以利用CTR模式加密明文,得到密文,还可以利用密钥、初始向量、密文和认证标识生成函数生成第一认证标识。然后,发送端向接收端发送该密文和第一认证标识。接收端可以利用CTR模式将接收的密文解密为明文,以及可以利用密钥、初始向量、接收的密文和认证标识生成函数生成第二认证标识。最后,接收端可以比较第一认证标识与第二认证标识是否一致,若不一致,则说明密文在传输过程中可能被篡改。换句话说,GCM模式可以实现对数据的加密和对数据进行完整性校验,提高数据安全性。The difference between the GCM mode of AES and the CTR mode is that the GCM mode can not only use the CTR mode to encrypt plaintext or decrypt ciphertext, but also perform ciphertext authentication. Specifically, the sender can not only encrypt the plaintext by using the CTR mode to obtain the ciphertext, but also can use the key, the initial vector, the ciphertext and the authentication identifier generation function to generate the first authentication identifier. Then, the sending end sends the ciphertext and the first authentication identifier to the receiving end. The receiving end may use the CTR mode to decrypt the received ciphertext into plaintext, and may use the key, the initial vector, the received ciphertext and the authentication identifier generation function to generate a second authentication identifier. Finally, the receiving end can compare whether the first authentication identifier is consistent with the second authentication identifier. If not, it indicates that the ciphertext may have been tampered with during transmission. In other words, the GCM mode can implement data encryption and data integrity verification to improve data security.
图8为本申请实施例提供的一种使用AES的GCM模式加密数据的示意图。请参照图8,发送端可以执行加密明文和密文认证过程,接收端可以执行解密密文和密文认证过程。其中,加密明文过程和解密密文过程可以参考上述CTR模式中对数据的加密和解密过程,在此不再赘述。下面对发送端和接收端执行密文认证过程进行说明。FIG. 8 is a schematic diagram of encrypting data in GCM mode using AES provided by an embodiment of the present application. Referring to FIG. 8 , the sending end can perform the authentication process of encrypting plaintext and ciphertext, and the receiving end can perform the process of decrypting ciphertext and ciphertext authentication. For the process of encrypting plaintext and decrypting ciphertext, reference may be made to the process of encrypting and decrypting data in the above CTR mode, which will not be repeated here. The following describes the ciphertext authentication process performed by the sender and the receiver.
请参照图8,发送端进行密文认证过程中,可以利用附加身份验证数据(additional authenticated data,AAD)、密钥、密文和GHASH函数生成第一哈希值;然后,利用密钥、初始向量和GCTR函数对第一哈希值加密,得到第一认证标识;最后,利用OSU帧的开销携带该第一认证标识,并向接收端发送携带该第一认证标识的OSU帧。其中,GHASH函数为一种哈希函数,GCTR函数为一种加密函数,GHASH函数和GCTR函数的具体实现方式可以参照GCM模式中的相关规定,在此不再赘述。Please refer to Figure 8. During the ciphertext authentication process, the sender can use additional authenticated data (additional authenticated data, AAD), key, ciphertext, and GHASH function to generate the first hash value; then, use the key, initial The vector and the GCTR function encrypt the first hash value to obtain the first authentication identifier; finally, the overhead of the OSU frame is used to carry the first authentication identifier, and the OSU frame carrying the first authentication identifier is sent to the receiving end. Wherein, the GHASH function is a hash function, and the GCTR function is an encryption function. The specific implementation manners of the GHASH function and the GCTR function can refer to relevant regulations in the GCM mode, and will not be repeated here.
具体地,图9为本申请实施例提供的一种GCM模式中发送端进行密文认证的流程示意图。请参照图9,A为预定义的数据,A的长度通常为128比特。C为密文,C的长度可以是128比特的整数倍。Len(A)为A的长度,Len(C)为C的长度。H的值可以由密钥确定,J的值由初始向量和密钥确定。最高有效位函数的形式可以为:MSB
t(T),MSB
t(T)可以用于保留T中的最高t位,比如,假设t=3,T=01100,则MSB
t(011100)=011。其中,t可以为128,从而可以产生128比特的认证T。发送端执行密文认证过程时,可以将A、C、Len(A)、Len(C)组成的数据以及H输入GHASH函数,得到第一哈希值;然后,将第一哈希值、J输入GCTR函数进行加密,得到身份验证标签;最后,利用身份验证标签和MSB函数生成第一认证标识。
Specifically, FIG. 9 is a schematic flow diagram of a sending end performing ciphertext authentication in the GCM mode provided by the embodiment of the present application. Please refer to FIG. 9 , A is predefined data, and the length of A is usually 128 bits. C is ciphertext, and the length of C can be an integer multiple of 128 bits. Len(A) is the length of A, and Len(C) is the length of C. The value of H can be determined by the key, and the value of J can be determined by the initial vector and the key. The form of the most significant bit function can be: MSB t (T), MSB t (T) can be used to reserve the highest t bit in T, for example, suppose t=3, T=01100, then MSB t (011100)=011 . Wherein, t may be 128, so that a 128-bit authentication T may be generated. When the sender performs the ciphertext authentication process, the data composed of A, C, Len(A), Len(C) and H can be input into the GHASH function to obtain the first hash value; then, the first hash value, J Input the GCTR function for encryption to obtain an identity verification label; finally, use the identity verification label and the MSB function to generate the first authentication mark.
相应地,请再参照图8,接收端执行密文认证过程中,接收端可以利用AAD、密钥、接收的密文和GHASH函数生成第二哈希值;然后,利用密钥、初始向量和GCTR函数对第二 哈希值加密,得到第二认证标识;最后,比较第一认证标识与第二认证标识是否一致,若不一致,则说明接收端接收的密文在传输过程中可能被篡改。其中,接收端执行密文认证过程的具体实施方式可以参照图9所示的发送端进行密文认证的流程,在此不再赘述。Correspondingly, please refer to FIG. 8 again. During the process of ciphertext authentication at the receiving end, the receiving end can use the AAD, key, received ciphertext, and GHASH function to generate a second hash value; then, use the key, initial vector, and The GCTR function encrypts the second hash value to obtain the second authentication ID; finally, compare whether the first authentication ID is consistent with the second authentication ID, if not, it means that the ciphertext received by the receiving end may be tampered with during transmission. Wherein, the specific implementation manner of performing the ciphertext authentication process by the receiving end may refer to the flow of ciphertext authentication performed by the sending end shown in FIG. 9 , which will not be repeated here.
需要说明的是,上述对AES的CTR模式、GCM模式的相关说明均是示例,其不构成对本实施例中描述的AES的CTR模式、GCM模式的限定。It should be noted that the foregoing descriptions about the CTR mode and the GCM mode of the AES are examples, and do not constitute limitations on the CTR mode and the GCM mode of the AES described in this embodiment.
下面将结合图10-图17对本申请实施例提供的加密传输方法进行具体阐述。The encrypted transmission method provided by the embodiment of the present application will be described in detail below with reference to FIGS. 10-17 .
为了便于理解,图10-图17所示的加密传输方法所使用的加密算法以AES加密算法作为示例。需要说明的是,本申请实施例提供的加密传输方法所使用的加密算法并不仅限于AES加密算法,还可使用的加密算法包括:DES加密算法、TDEA加密算法、AES加密算法、ECC加密算法、DH加密算法、DSA加密算法以及混合加密算法等,本申请对此不作限定。For ease of understanding, the encryption algorithm used in the encrypted transmission methods shown in FIGS. 10-17 uses the AES encryption algorithm as an example. It should be noted that the encryption algorithm used in the encrypted transmission method provided in the embodiment of the present application is not limited to the AES encryption algorithm, and the encryption algorithm that can also be used includes: DES encryption algorithm, TDEA encryption algorithm, AES encryption algorithm, ECC encryption algorithm, The DH encryption algorithm, the DSA encryption algorithm, and the hybrid encryption algorithm are not limited in this application.
示例性地,图10为本申请实施例提供的加密传输方法的流程示意图。该加密传输方法可以适用于图1所示的任意两个OTN设备之间的通信。Exemplarily, FIG. 10 is a schematic flowchart of an encrypted transmission method provided by an embodiment of the present application. This encrypted transmission method can be applied to the communication between any two OTN devices shown in FIG. 1 .
如图10所示,该加密传输方法包括如下步骤:As shown in Figure 10, the encrypted transmission method includes the following steps:
S1001,发送端根据加解密控制信息,对一个加密周期内的多个数据逐一加密。S1001. The sending end encrypts a plurality of data in one encryption period one by one according to the encryption and decryption control information.
其中,加解密控制信息可以由发送端使用的加密算法确定。比如,当发送端使用AES加密算法对数据进行加密时,加解密控制信息可以包括初始向量和密钥。初始向量和密钥的说明可以参照上述技术术语介绍中“AES高级加密标准”的相关说明,在此不再赘述。Wherein, the encryption and decryption control information may be determined by the encryption algorithm used by the sender. For example, when the sending end uses the AES encryption algorithm to encrypt data, the encryption and decryption control information may include an initialization vector and a key. For the description of the initial vector and the key, please refer to the relevant description of "AES Advanced Encryption Standard" in the introduction of the above technical terms, and will not repeat them here.
需要注意,由于本实施例提供的加密传输方法所使用的加密算法以AES加密算法作为示例,因此,如无特别说明,本申请实施例中的加解密控制信息包括初始向量和密钥。It should be noted that since the encryption algorithm used in the encrypted transmission method provided in this embodiment uses the AES encryption algorithm as an example, unless otherwise specified, the encryption and decryption control information in this embodiment of the application includes an initialization vector and a key.
n个连续的OSU帧被称为一个加密周期,n为正整数。可选地,每个加密周期所包括的OSU帧的数量相同,其中,本申请实施例对n的取值不作限定,例如,n=128、256、512或1024等。N consecutive OSU frames are called an encryption period, and n is a positive integer. Optionally, the number of OSU frames included in each encryption period is the same, and the value of n is not limited in this embodiment of the present application, for example, n=128, 256, 512, or 1024.
可选地,一个加密周期所包括的最后一个OSU帧与该加密周期的下一个加密周期所包括的第一个OSU帧之间,是OPU帧的净荷中相邻的两个OSU帧。也就是说,连续的多个加密周期占用一个或多个OPU帧的净荷中连续的多个字节(或比特)。Optionally, between the last OSU frame included in one encryption period and the first OSU frame included in the next encryption period of the encryption period are two adjacent OSU frames in the payload of the OPU frame. That is to say, multiple consecutive encryption periods occupy multiple consecutive bytes (or bits) in the payload of one or more OPU frames.
可选地,上述一个加密周期内的多个数据可以是用户的业务数据,或者是携带业务数据的OSU帧的净荷,本申请对此不作限定。换句话说,发送端可以将多个数据映射到一个加密周期内的多个OSU帧的净荷,并根据加解密控制信息,对多个OSU帧的净荷逐一加密;或者,发送端可以根据加解密控制信息,对一个加密周期内的多个数据逐一加密,并将加密后的多个数据映射到多个OSU帧的净荷。可以理解,每个OSU帧携带一个加密后的数据。Optionally, the plurality of data in one encryption cycle may be user service data, or the payload of an OSU frame carrying service data, which is not limited in this application. In other words, the sender can map multiple data to the payloads of multiple OSU frames in one encryption period, and encrypt the payloads of multiple OSU frames one by one according to the encryption and decryption control information; Encrypt and decrypt control information, encrypt multiple data in one encryption cycle one by one, and map the encrypted multiple data to the payload of multiple OSU frames. It can be understood that each OSU frame carries one piece of encrypted data.
示例性地,假设一个加密周期包括256个连续的OSU帧,在一个加密周期中,发送端可以将用户的业务数据映射到256个连续的OSU帧的净荷中,然后对这256个OSU帧的净荷逐一加密;或者,发送端可以将用户的业务数据分为256份,每份业务数据的大小与一个OSU帧的净荷的大小(185字节)相同,然后,对这256份业务数据逐一加密,并将加密后的业务数据映射到256个连续的OSU帧的净荷中。For example, assuming that an encryption cycle includes 256 consecutive OSU frames, in one encryption cycle, the sender can map the user's service data into the payload of 256 consecutive OSU frames, and then or, the sending end can divide the user's business data into 256 parts, and the size of each business data is the same as the size of the payload (185 bytes) of an OSU frame, and then, these 256 business data The data is encrypted one by one, and the encrypted service data is mapped to the payload of 256 consecutive OSU frames.
可选地,为了对OSU帧的开销进行加密,上述一个加密周期内的多个数据可以是携带业务数据的OSU帧(包括净荷和开销)。这样,不仅可以对OSU帧的净荷加密,还可以对OSU帧的开销加密,以进一步提升数据传输的安全性。Optionally, in order to encrypt the overhead of the OSU frame, the data in one encryption period may be an OSU frame (including payload and overhead) carrying service data. In this way, not only the payload of the OSU frame can be encrypted, but also the overhead of the OSU frame can be encrypted, so as to further improve the security of data transmission.
一些可能的实施例中,上述的S1001,根据加解密控制信息,对一个加密周期内的多个 数据逐一加密,可以包括如下步骤1和步骤2:In some possible embodiments, the above S1001, according to the encryption and decryption control information, encrypts a plurality of data in one encryption cycle one by one, which may include the following steps 1 and 2:
步骤1,根据加解密控制信息生成多个密码块。Step 1: Generate multiple cipher blocks according to the encryption and decryption control information.
其中,多个密码块的比特总数M大于或等于多个数据的比特总数N,M、N均为正整数。Wherein, the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N are positive integers.
以发送端将用户的业务数据映射到256个连续的OSU帧的净荷中,然后对这256个OSU帧的净荷逐一加密为例,由于256个OSU帧的净荷的长度为185*256字节,1个密码块的长度为128比特(16字节),因此,发送端可以根据初始向量和密钥生成至少生成185*256/16=2960个密码块。需要注意,发送端根据初始向量和密钥生成密码块的具体过程,可以参照上述技术术语介绍中“AES高级加密标准”的相关说明,在此不再赘述。Take the sending end mapping the user's service data into the payload of 256 consecutive OSU frames, and then encrypting the payloads of these 256 OSU frames one by one as an example, because the length of the payload of 256 OSU frames is 185*256 bytes, the length of one cipher block is 128 bits (16 bytes), therefore, the sender can generate at least 185*256/16=2960 cipher blocks according to the initial vector and key generation. It should be noted that the specific process of generating a cipher block based on the initial vector and the key at the sending end can refer to the relevant description of "AES Advanced Encryption Standard" in the introduction of the above technical terms, and will not be repeated here.
可选地,0≤M-N<k2,k2为一个密码块的长度。换句话说,多个密码块的比特总数M与多个数据的比特总数N的差值小于一个密码块的长度,且大于或等于0。例如,如果多个密码块的数量为k1,每个密码块的长度为k2,多个数据的数量为k3,每个数据的长度为k4,则多个密码块的比特总数为M=k1*k2,多个数据的比特总数为N=k3*k4。从而,发送端根据加解密控制信息生成的多个密码块满足如下条件:0≤k1*k2-k3*k4<k2。这样,发送端可以在确保生成的密码块比特总数M大于或等于多个数据的比特总数N的前提下,生成尽可能少的密码块,以进一步提升加密效率。Optionally, 0≤M-N<k2, where k2 is the length of a cipher block. In other words, the difference between the total number M of bits of multiple cipher blocks and the total number N of bits of multiple data is smaller than the length of one cipher block and greater than or equal to zero. For example, if the number of multiple cipher blocks is k1, the length of each cipher block is k2, the number of multiple data is k3, and the length of each data is k4, then the total number of bits of multiple cipher blocks is M=k1* k2, the total number of bits of multiple data is N=k3*k4. Therefore, the multiple cipher blocks generated by the sending end according to the encryption and decryption control information satisfy the following condition: 0≦k1*k2−k3*k4<k2. In this way, the sending end can generate as few cipher blocks as possible under the premise of ensuring that the total number M of bits of the generated cipher block is greater than or equal to the total number N of bits of multiple data, so as to further improve the encryption efficiency.
可以理解,当多个密码块的比特总数M等于多个数据的比特总数N时,发送端生成的密码块的数量最少,从而能够进一步减少处理时间,提升加密效率。It can be understood that when the total number M of bits of multiple cipher blocks is equal to the total number N of bits of multiple data, the number of cipher blocks generated by the sender is the least, thereby further reducing processing time and improving encryption efficiency.
步骤2,使用多个密码块中的N个比特,对多个数据按位加密。 Step 2, using N bits in the multiple cipher blocks to encrypt multiple data bit by bit.
其中,按位加密的计算方式可以由发送端使用的加密算法确定。比如,当发送端使用AES加密算法对数据进行加密时,按位加密的计算方式为异或运算,异或运算的运算符号为
Wherein, the calculation method of bit-wise encryption may be determined by the encryption algorithm used by the sending end. For example, when the sending end uses the AES encryption algorithm to encrypt data, the calculation method of bitwise encryption is XOR operation, and the operation symbol of XOR operation is
具体地,发送端可以按照第一加密规则从多个密码块的M个比特中获取用于加密数据的N个比特,以及根据第二加密规则并利用该N个比特,对多个数据按位加密。Specifically, the sending end can obtain N bits used for encrypting data from M bits of multiple cipher blocks according to the first encryption rule, and use the N bits according to the second encryption rule to bitwise encryption.
第一加密规则可以理解为从多个密码块的M个比特中获取N个比特的规则,比如,第一加密规则可以为密码块的生成顺序。具体地,按照第一加密规则从多个密码块的M个比特中获取用于加密数据的N个比特,可以包括如下实施方式:The first encryption rule may be understood as a rule for obtaining N bits from M bits of multiple cipher blocks, for example, the first encryption rule may be a generation sequence of cipher blocks. Specifically, obtaining N bits used for encrypting data from M bits of multiple cipher blocks according to the first encryption rule may include the following implementation manners:
方式1,按密码块的生成顺序,将多个密码块的M个比特中前N个比特确定为用于加密数据的N个比特。例如,假设多个密码块的M个比特按密码块的生成顺序包括c
1、c
2、…、c
M,则可以将c
1至c
N确定为用于加密数据的N个比特。
Mode 1, according to the generation sequence of the cipher blocks, the first N bits among the M bits of the multiple cipher blocks are determined as the N bits used for the encrypted data. For example, assuming that the M bits of a plurality of cipher blocks include c 1 , c 2 , .
方式2,按密码块的生成顺序,将多个密码块的M个比特中后N个比特确定为用于加密数据的N个比特。例如,假设多个密码块的M个比特按密码块的生成顺序包括c
1、c
2、…、c
M,则可以将c
T至c
M确定为用于加密数据的N个比特,M-T+1=N。
Mode 2, according to the generation sequence of the cipher blocks, the last N bits among the M bits of the multiple cipher blocks are determined as the N bits used for the encrypted data. For example, assuming that the M bits of a plurality of cipher blocks include c 1 , c 2 , ..., c M in the order of generation of the cipher blocks, c T to c M can be determined as the N bits used for encrypting data, M- T+ 1=N.
第二加密规则可以理解为利用N个比特对多个数据按位加密的规则,比如,第二加密规则可以为密码块的生成顺序。具体地,根据第二加密规则并利用该N个比特,对多个数据按位加密,可以包括如下实施方式:The second encryption rule may be understood as a rule for bitwise encrypting a plurality of data using N bits, for example, the second encryption rule may be a generation sequence of cipher blocks. Specifically, according to the second encryption rule and using the N bits, bitwise encryption of multiple data may include the following implementation manners:
方式3,使用N个比特中的第i比特,对多个数据中的第i比特加密,i为正整数,i≤N。例如,假设多个密码块中的N个比特包括c
1、c
2、…、c
N,多个数据包括如下N个比特p
1、p
2、…、p
N,则加密后的数据包括如下N个比特
Mode 3, using the i-th bit among the N bits to encrypt the i-th bit among the plurality of data, where i is a positive integer, and i≤N. For example, assuming that the N bits in multiple cipher blocks include c 1 , c 2 , ..., c N , and the multiple data include the following N bits p 1 , p 2 , ..., p N , then the encrypted data includes the following N bits
方式4,使用N个比特中的第N-i比特,对多个数据中的第i比特加密,i为正整数,i≤N。 例如,假设多个密码块中的N个比特包括c
1、c
2、…、c
N,多个数据包括如下N个比特p
1、p
2、…、p
N,则加密后的数据包括如下N个比特
Mode 4, using the Ni-th bit among the N bits to encrypt the i-th bit among the plurality of data, where i is a positive integer, and i≤N. For example, assuming that the N bits in multiple cipher blocks include c 1 , c 2 , ..., c N , and the multiple data include the following N bits p 1 , p 2 , ..., p N , then the encrypted data includes the following N bits
需要注意,第一加密规则和第二加密规则可以由用户配置或者由发送端和接收端协商确定,本申请对第一加密规则和第二加密规则的具体实施方式不作限定。当然,为了使得接收端能够正确地对多个数据解密,发送端与接收端需要使用相同的第一加密规则和第二加密规则。It should be noted that the first encryption rule and the second encryption rule can be configured by the user or determined through negotiation between the sending end and the receiving end, and this application does not limit the specific implementation of the first encryption rule and the second encryption rule. Of course, in order for the receiving end to correctly decrypt multiple data, the sending end and the receiving end need to use the same first encryption rule and second encryption rule.
可以理解,上述方式1-方式4能够提供多种利用多个密码块中的N个比特对多个数据加密的方式,以实现对ODUk帧携带的多个OSU帧进行单独加密,提升数据安全性。It can be understood that the above modes 1 to 4 can provide a variety of ways to encrypt multiple data using N bits in multiple cipher blocks, so as to realize separate encryption of multiple OSU frames carried by ODUk frames and improve data security. .
一些可能的实施例中,发送端可以按多个密码块的生成顺序使用多个密码块的第i比特,对多个数据中的第i比特加密,i为正整数,i≤N。例如,假设多个密码块按生成顺序包括如下M个比特c
1、c
2、…、c
M,多个数据包括如下N个比特p
1、p
2、…、p
N,其中,M≥N,那么加密后的数据包括如下N个比特
In some possible embodiments, the sending end may use the i-th bit of the multiple cipher blocks in the generation order of the multiple cipher blocks to encrypt the i-th bit in the multiple data, where i is a positive integer and i≤N. For example, assume that multiple cipher blocks include the following M bits c 1 , c 2 , ..., c M in order of generation, and multiple data include the following N bits p 1 , p 2 , ..., p N , where M≥N , then the encrypted data includes the following N bits
以一个加密周期包括256个连续的OSU帧,OSU总线为12*128比特(192字节)举例,发送端每次可以对1个OSU帧加密。1个OSU帧中,OSU帧的净荷(185字节)需要被加密,OSU帧的开销(7字节)可以不被加密。当仅加密OSU帧的净荷时,由于1个加密块的长度为16字节,因此,加密1个OSU帧的净荷需要11.5625个加密块。比如,对第1个OSU帧的净荷加密,需要生成12个加密块,这12个加密块加密第1个OSU帧的净荷后,还剩余7个字节未用于加密第1个OSU帧的净荷。为了提高密码块的利用率,这12个加密块中的未用于加密第1个OSU帧的净荷的字节可以用于加密下一个OSU帧的净荷,即第2个OSU帧。以此类推,对第k个OSU帧的净荷加密所使用的密码块包括:用于加密第k-1个OSU帧的净荷的多个密码块中未用完的密码块,以及发送端生成的多个密码块中未使用的密码块。其中,k为正整数,且k小于或等于多个OSU帧的数量。换句话说,对第k-1个OSU帧的净荷加密时,若用于加密第k-1个OSU帧的净荷的多个密码块中存在未用完的密码块,则可以利用该未用完的密码块中未使用的比特加密第k个OSU帧的净荷。这样,可以避免浪费密码块,减少生成密码块的数量,从而减少处理时间,提升加密效率。Taking an encryption period including 256 consecutive OSU frames as an example, and the OSU bus is 12*128 bits (192 bytes) as an example, the sending end can encrypt one OSU frame each time. In one OSU frame, the payload (185 bytes) of the OSU frame needs to be encrypted, and the overhead (7 bytes) of the OSU frame may not be encrypted. When only the payload of the OSU frame is encrypted, since the length of one encrypted block is 16 bytes, 11.5625 encrypted blocks are required to encrypt the payload of one OSU frame. For example, to encrypt the payload of the first OSU frame, 12 encryption blocks need to be generated. After these 12 encryption blocks encrypt the payload of the first OSU frame, there are still 7 bytes that are not used to encrypt the first OSU The payload of the frame. In order to improve the utilization rate of the cipher block, the bytes in the 12 cipher blocks that are not used to encrypt the payload of the first OSU frame can be used to encrypt the payload of the next OSU frame, that is, the second OSU frame. By analogy, the cipher blocks used to encrypt the payload of the kth OSU frame include: the unused cipher blocks among the multiple cipher blocks used to encrypt the payload of the k-1th OSU frame, and the sending end An unused cipher block among multiple cipher blocks generated. Wherein, k is a positive integer, and k is less than or equal to the number of multiple OSU frames. In other words, when encrypting the payload of the k-1th OSU frame, if there are unused cipher blocks among the multiple cipher blocks used to encrypt the payload of the k-1th OSU frame, the The unused bits in the unused cipher block encrypt the payload of the kth OSU frame. In this way, it is possible to avoid wasting cipher blocks and reduce the number of generated cipher blocks, thereby reducing processing time and improving encryption efficiency.
下面结合附图详细说明上述发送端按多个密码块的生成顺序使用多个密码块的第i比特,对多个数据中的第i比特加密的实施方式。The implementation manner in which the sending end encrypts the i-th bit of the plurality of data by using the i-th bit of the plurality of cipher blocks according to the generation sequence of the plurality of cipher blocks will be described in detail below in conjunction with the accompanying drawings.
图11为本申请实施例提供的一种利用多个密码块加密256个连续OSU帧的净荷的示意图。请参照图11,256个连续的OSU帧的净荷已被映射用户的业务数据。假设每个OSU帧的净荷的长度为185字节,1个密码块的长度为16字节,那么发送端可以生成2960个密码块,这2960个密码块按照生成顺序包括CB1、CB2、…、CB2960。并且,发送端可以利用生成的密码块对这256个连续的OSU帧的净荷加密。具体地,以对256个连续OSU帧中第k个OSU帧的净荷加密为例,k为正整数,且k≤256。发送端可以确定跨帧密码块,该跨帧密码块为用于加密第k-1个OSU帧的多个密码块中未完全使用的密码块。然后,发送端可以利用跨帧密码块以及生成的多个密码块中未使用的密码块加密该第k个OSU帧的净荷。比如,当k=1时,跨帧密码块不存在,从而发送端可以利用12个密码块(包括CB1至CB12)加密第1个OSU帧的净荷,其中,CB1-CB11的所有比特均用于加密第1个OSU帧的净荷,CB12的9个字节用于加密第1个OSU帧的净荷,CB12中剩余7个字节未用于加密第1个OSU帧的净荷。当k=2时,跨帧密码块为CB12,从而发送端可以利用CB12中未用于加密第1个OSU帧的净 荷的7个字节以及CB13至CB24,加密第2个OSU帧的净荷。以此类推,对第k个OSU帧的净荷加密的具体说明在此不再赘述。Fig. 11 is a schematic diagram of encrypting the payload of 256 consecutive OSU frames by using multiple cipher blocks according to the embodiment of the present application. Please refer to FIG. 11 , the payloads of 256 consecutive OSU frames have been mapped to user service data. Assuming that the length of the payload of each OSU frame is 185 bytes, and the length of one cipher block is 16 bytes, then the sender can generate 2960 cipher blocks, and these 2960 cipher blocks include CB1, CB2, ... in the order of generation , CB2960. And, the sender can use the generated cipher block to encrypt the payloads of the 256 consecutive OSU frames. Specifically, taking the payload encryption of the k-th OSU frame among 256 consecutive OSU frames as an example, k is a positive integer, and k≤256. The sending end may determine a frame-crossing cipher block, where the frame-crossing cipher block is an incompletely used cipher block among the multiple cipher blocks used to encrypt the k-1th OSU frame. Then, the sending end may encrypt the payload of the k-th OSU frame by using the cross-frame cipher block and unused cipher blocks among the generated multiple cipher blocks. For example, when k=1, there is no cross-frame cipher block, so the sender can use 12 cipher blocks (including CB1 to CB12) to encrypt the payload of the first OSU frame, wherein all bits of CB1-CB11 are used To encrypt the payload of the first OSU frame, 9 bytes of CB12 are used to encrypt the payload of the first OSU frame, and the remaining 7 bytes of CB12 are not used to encrypt the payload of the first OSU frame. When k=2, the cross-frame cipher block is CB12, so that the sender can use the 7 bytes of CB12 that are not used to encrypt the payload of the first OSU frame and CB13 to CB24 to encrypt the net of the second OSU frame charge. By analogy, the specific description of the payload encryption of the k-th OSU frame will not be repeated here.
可以理解,基于图11所示的实施方式,当一个OSU帧的净荷的长度不是加密块的长度的整数倍时,上述使用多个密码块的第i比特,对多个数据中的第i比特加密的实施方式,可以实现将用于加密一个OSU帧的净荷的多个密码块中未完全使用的密码块,加密下一个OSU帧的净荷,从而实现一个密码块能够跨帧加密数据,从而避免浪费密码块,减少生成的密码块的数量,进而减少处理时间,进一步提升加密效率。It can be understood that, based on the implementation shown in FIG. 11 , when the length of the payload of an OSU frame is not an integer multiple of the length of the encrypted block, the i-th bit of the multiple encrypted blocks is used above, and the i-th bit in the multiple data The implementation of bit encryption can realize that the incompletely used cipher blocks among the multiple cipher blocks used to encrypt the payload of an OSU frame can encrypt the payload of the next OSU frame, so that one cipher block can encrypt data across frames , thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, thereby reducing processing time, and further improving encryption efficiency.
需要注意,上述步骤1和步骤2可以并行执行,从而提高加密效率。例如,假设一个密码块的长度为16字节,则在执行上述步骤1的过程中,发送端可以每生产一个密码块,就利用该密码块对多个数据中未被加密的16字节按位加密。当然上述步骤1也可以先于步骤2执行,本申请对此不作限定。It should be noted that the above step 1 and step 2 can be executed in parallel, so as to improve encryption efficiency. For example, assuming that the length of a cipher block is 16 bytes, then in the process of performing the above step 1, the sender can use the cipher block to encrypt the unencrypted 16 bytes in the multiple data every time a cipher block is produced. bit encryption. Of course, the above step 1 may also be performed prior to step 2, which is not limited in this application.
基于上述步骤1、步骤2的说明可知,发送端还可以在确保生成的密码块比特总数M大于或等于多个数据的比特总数N的前提下,生成尽可能少的密码块,以提升加密效率。并且,发送端可以使用与多个数据长度相同的密码块对多个数据加密,从而避免浪费密码块,减少生成的密码块的数量,进而减少处理时间,进一步提升加密效率。Based on the description of the above steps 1 and 2, it can be seen that the sending end can also generate as few cipher blocks as possible under the premise of ensuring that the total number of bits M of the generated cipher block is greater than or equal to the total number of bits N of multiple data, so as to improve the encryption efficiency . In addition, the sender can use a cipher block with the same length as the multiple data to encrypt multiple data, thereby avoiding wasting cipher blocks, reducing the number of generated cipher blocks, reducing processing time, and further improving encryption efficiency.
在上述S1001所示出的步骤中,发送端还可以根据加解密控制信息,对一个加密周期内的多个OSUv帧逐一加密,在具体实施时,将上述方法实施例中的OSU帧替换为OSUv帧即可,在此不做赘述。In the steps shown in the above S1001, the sending end can also encrypt multiple OSUv frames in one encryption cycle one by one according to the encryption and decryption control information. The frame is enough, so I won’t repeat it here.
本申请实施例中,发送端与接收端使用的加解密控制信息需要一致,接收端才能正确解密密文,得到与密文对应的明文。并且,每加密一次明文,加解密控制信息需要被更新一次,以确保每次加密明文所使用的加解密控制信息不重复。In the embodiment of the present application, the encryption and decryption control information used by the sending end and the receiving end need to be consistent, so that the receiving end can correctly decrypt the ciphertext and obtain the plaintext corresponding to the ciphertext. Moreover, the encryption and decryption control information needs to be updated every time the plaintext is encrypted, so as to ensure that the encryption and decryption control information used for each encryption of the plaintext is not repeated.
在实际应用时,以使用AES加密算法进行加密和解密,加解密控制信息包括初始向量和密钥举例,每使用一个密码块加密一次明文,则需要更新一次初始向量,并且每经过一段时间,需要更新一次密钥。其中,初始向量可以由计数器生成。由于计数器生成的数有上限值,因此在计数器生成的数到达上限之前,需要更新密钥,以确保每次加密明文所使用的密钥和初始向量不重复。这样,可以防止同样的明文块始终被加密成同样的密文块,从而提高数据安全性。In practical applications, the AES encryption algorithm is used for encryption and decryption. The encryption and decryption control information includes the initial vector and the key. For example, each time a cipher block is used to encrypt the plaintext, the initial vector needs to be updated, and every time after a period of time, the initial vector needs to be updated. Update the key once. Among them, the initial vector can be generated by a counter. Since the number generated by the counter has an upper limit, the key needs to be updated before the number generated by the counter reaches the upper limit, so as to ensure that the key and initial vector used for each encryption of plaintext are not repeated. In this way, the same plaintext block can be prevented from being encrypted into the same ciphertext block all the time, thereby improving data security.
为了使得发送端与接收端使用的加解密控制信息一致,每次更新加解密控制信息时,发送端需要向接收端发送更新后的加解密控制信息的指示信息。其中,加解密控制信息的指示信息可以由发送端使用的加密算法确定。示例性地,当发送端使用AES加密算法进行加密时,加解密控制信息的指示信息用于指示初始向量和密钥。换句话说,加解密控制信息的指示信息可以包括密钥的指示信息和初始向量的指示信息,密钥的指示信息可以包括切换指示信息和密钥数据流,切换指示信息用于指示密钥的切换位置(即下一个密钥周期的时间点),密钥数据流在发送端可以由密钥(或者称为密钥值)以及一定的安全算法确定,这里的安全算法不作限定。接收端根据密钥数据流可以得到密钥值,并将该密钥值作为下一个密钥周期使用的密钥。其中,切换指示信息的相关说明可以参照步骤3中的描述。In order to make the encryption and decryption control information used by the sending end and the receiving end consistent, each time the encryption and decryption control information is updated, the sending end needs to send indication information of the updated encryption and decryption control information to the receiving end. Wherein, the indication information of the encryption and decryption control information may be determined by the encryption algorithm used by the sender. Exemplarily, when the sending end uses the AES encryption algorithm for encryption, the indication information of the encryption and decryption control information is used to indicate the initial vector and the key. In other words, the indication information of the encryption and decryption control information may include the indication information of the key and the indication information of the initial vector, the indication information of the key may include the handover indication information and the key data stream, and the handover indication information is used to indicate the The switching position (that is, the time point of the next key period), and the key data flow at the sending end can be determined by the key (or called key value) and a certain security algorithm, and the security algorithm here is not limited. The receiving end can obtain the key value according to the key data flow, and use the key value as the key used in the next key cycle. Wherein, for the relevant description of the handover indication information, reference may be made to the description in step 3.
可选地,每次更新加解密控制信息时,发送端可以利用一个加密周期内的多个OSU帧向接收端发送更新后的加解密控制信息的指示信息。接收端接收到来自发送端的加解密控制信息的指示信息后,可以根据该指示信息确定更新后的加解密控制信息。换句话说,一 个加密周期内的多个OSU帧可以携带加解密控制信息的指示信息。Optionally, each time when the encryption and decryption control information is updated, the sending end may use multiple OSU frames within one encryption cycle to send indication information of the updated encryption and decryption control information to the receiving end. After receiving the indication information of the encryption and decryption control information from the transmission end, the receiving end may determine the updated encryption and decryption control information according to the indication information. In other words, multiple OSU frames within one encryption period may carry indication information of encryption and decryption control information.
其中,上述的密钥数据流在接收端可以经过相应的安全算法被还原为密钥,这样可以避免密钥以明文形式在网络中传输,提高数据安全性。以使用AES加密算法进行加密和解密举例,加解密控制信息的指示信息可以包括:初始向量的部分数据(比如帧间计数器)、根据密钥以及一定的安全算法确定的密钥数据流、切换指示信息。Wherein, the above-mentioned key data flow can be restored to a key through a corresponding security algorithm at the receiving end, which can prevent the key from being transmitted in the network in plain text and improve data security. Taking the encryption and decryption using the AES encryption algorithm as an example, the indication information of the encryption and decryption control information may include: some data of the initial vector (such as the inter-frame counter), the key data stream determined according to the key and a certain security algorithm, and the switching instruction information.
上述的密钥数据流、初始向量的部分数据、切换指示信息均可以通过一个加密周期内的多个OSU帧的开销传输,其中,一个加密周期内的多个OSU帧的开销可以被称为监控管理开销域,该监控管理开销域可以包括密钥安全管理通道(key exchange communication channel,KCC)。具体地,上述的密钥数据流可以通过密钥安全管理通道传输,上述的初始向量的部分数据、切换指示信息可以通过监控管理开销域中的部分开销传输。密钥安全管理通道也可以称为密钥交换通信通道。通过一个加密周期内的多个OSU帧的开销传输密钥数据流、初始向量的部分数据、切换指示信息的实施方式,可以参照下述表4-表7相关的描述,在此不再赘述。The above-mentioned key data flow, partial data of the initial vector, and switching instruction information can all be transmitted through the overhead of multiple OSU frames in one encryption cycle, where the overhead of multiple OSU frames in one encryption cycle can be called monitoring A management overhead domain, the monitoring management overhead domain may include a key security management channel (key exchange communication channel, KCC). Specifically, the above-mentioned key data flow may be transmitted through the key security management channel, and the above-mentioned partial data of the initial vector and handover instruction information may be transmitted through part of the overhead in the monitoring and management overhead domain. The key security management channel may also be called a key exchange communication channel. For the implementation of transmitting the key data stream, partial data of the initial vector, and switching instruction information through the overhead of multiple OSU frames in one encryption cycle, refer to the relevant descriptions in Table 4-Table 7 below, and will not repeat them here.
下面结合初始向量的结构示例,详细说明一个加密周期内的多个OSU帧携带加解密控制信息的指示信息的实施方式。The implementation manner in which multiple OSU frames within one encryption cycle carry the indication information of the encryption and decryption control information will be described in detail below with reference to the structure example of the initialization vector.
表4为本申请实施例提供的一种初始向量的结构。请参照表4,初始向量包括128位,从最高有效位(most significant bit,MSB)到最低有效位(least significant bit,LSB)依次包括:32位配置值(cfg_iv_fix)、32位帧间计数器(intra_mf_cnt)、32位帧间计数器、17个0位以及15位帧内计数器(inter_mf_cnt)。其中,配置值可以为固定值,可以由用户配置。帧间计数器可以由发送端生成,且每经过一个加密周期帧间计数器的值加1。帧内计数器在每个加密周期内从1开始计数,每生成1个加密块则帧内计数器的值加1。需要注意,表4中的初始向量包括2个相同的帧间计数器。Table 4 shows the structure of an initial vector provided by the embodiment of this application. Please refer to Table 4, the initial vector includes 128 bits, from the most significant bit (most significant bit, MSB) to the least significant bit (least significant bit, LSB) including: 32-bit configuration value (cfg_iv_fix), 32-bit inter-frame counter ( intra_mf_cnt), 32-bit inter-frame counter, 17 0-bits, and 15-bit intra-frame counter (inter_mf_cnt). Wherein, the configuration value may be a fixed value and may be configured by a user. The inter-frame counter can be generated by the sending end, and the value of the inter-frame counter increases by 1 every time an encryption period passes. The intra-frame counter starts counting from 1 in each encryption cycle, and the value of the intra-frame counter increases by 1 every time an encrypted block is generated. It should be noted that the initial vector in Table 4 includes 2 identical inter-frame counters.
表4Table 4
表5为本申请实施例提供的另一种初始向量的结构。请参照表5,初始向量包括128位,从最高有效位到最低有效位依次包括:32位配置值、32个0位、32位帧间计数器、17个0位以及15位帧内计数器。配置值、帧间计数器以及帧内计数器的说明可以参照上述表4相关说明,在此不再赘述。表5所示的初始向量与表4所示的初始向量的区别在于:帧间计数器不重复。可以理解,表4、表5提供了2种初始向量的结构示例,本申请对初始向量的具体结构不作限定。Table 5 shows the structure of another initial vector provided by the embodiment of this application. Please refer to Table 5, the initial vector includes 128 bits, including: 32-bit configuration value, 32 0-bits, 32-bit inter-frame counter, 17 0-bits and 15-bit intra-frame counter from the most significant bit to the least significant bit. For descriptions of configuration values, inter-frame counters, and intra-frame counters, reference may be made to relevant descriptions in Table 4 above, and details will not be repeated here. The difference between the initial vectors shown in Table 5 and the initial vectors shown in Table 4 is that the inter-frame counters do not repeat. It can be understood that Table 4 and Table 5 provide two structural examples of initial vectors, and this application does not limit the specific structure of initial vectors.
表5table 5
其中,发送端和接收端可以配置相同的配置值,帧内计数器在一个加密周期内是从1开始计数的,从而发送端可以仅向接收端发送帧间计数器,接收端根据帧间计数器可以确定出一个加密周期内的初始向量。换句话说,加解密控制信息的指示信息可以包括:上述表 4或表5所示初始向量的32位帧间计数器、根据密钥以及一定的安全算法确定的密钥数据流(比如,使用RSA加密算法加密后的密钥)、以及切换指示信息。在实际应用中,加解密控制信息的指示信息可以承载于一个加密周期内的多个OSU帧的开销中。Among them, the sending end and the receiving end can be configured with the same configuration value, and the intra-frame counter starts counting from 1 within an encryption period, so that the sending end can only send the inter-frame counter to the receiving end, and the receiving end can determine according to the inter-frame counter Generate an initial vector within an encryption cycle. In other words, the indication information of the encryption and decryption control information may include: the 32-bit inter-frame counter of the initial vector shown in Table 4 or Table 5 above, the key data stream determined according to the key and a certain security algorithm (for example, using RSA encryption algorithm encrypted key), and switching instruction information. In practical applications, the indication information of the encryption and decryption control information may be carried in the overhead of multiple OSU frames in one encryption cycle.
为了实现对数据的完整性校验,提高数据安全性,可选地,多个OSU帧可以携带认证信息。其中,认证信息可以由加解密控制信息和多个加密后的数据(即密文)确定。比如,当发送端使用AES加密算法对数据进行加密时,发送端可以利用密钥、初始向量、密文和认证标识生成函数,生成认证标识,并将该认证标识作为认证信息。具体地,认证标识的生成方式可以参照上述技术术语介绍中“AES的GCM模式”的相关说明,在此不再赘述。在实际应用中,上述认证信息可以承载于一个加密周期内的多个OSU帧的开销中。这样,接收端可以根据认证信息判断加密后的数据是否在传输过程中被篡改,实现对数据的完整性校验,提高数据安全性。In order to implement data integrity verification and improve data security, optionally, multiple OSU frames may carry authentication information. Wherein, the authentication information may be determined by encryption and decryption control information and multiple encrypted data (ie, ciphertext). For example, when the sender uses the AES encryption algorithm to encrypt data, the sender can use the key, initial vector, ciphertext, and authentication identifier generation function to generate an authentication identifier and use the authentication identifier as authentication information. Specifically, for the method of generating the authentication identifier, reference may be made to the relevant description of "GCM mode of AES" in the introduction of the above technical terms, and details are not repeated here. In practical applications, the above authentication information may be carried in the overhead of multiple OSU frames within one encryption period. In this way, the receiving end can judge whether the encrypted data has been tampered with in the transmission process according to the authentication information, so as to realize the integrity verification of the data and improve the data security.
S1002,发送端向接收端发送一个加密周期内的多个OSU帧。接收端接收来自发送端的一个加密周期内的多个OSU帧。S1002. The sending end sends multiple OSU frames within one encryption cycle to the receiving end. The receiving end receives multiple OSU frames within one encryption period from the sending end.
其中,发送端发送OSU帧和接收端接收OSU的过程可以参照上述图2中关于OTN设备收发数据的相关说明,在此不再赘述。Wherein, the process of sending OSU frames at the sending end and receiving OSU at the receiving end can refer to the relevant description about the OTN device sending and receiving data in FIG. 2 above, and will not be repeated here.
S1003,接收端根据加解密控制信息,对多个加密后的数据逐一解密。S1003. The receiving end decrypts the multiple encrypted data one by one according to the encryption and decryption control information.
其中,接收端对多个加密后的数据逐一解密所使用的算法与发送端所使用的算法一致。例如,当发送端使用AES加密算法加密数据时,接收端使用同样的AES加密算法对加密后的数据解密。S1003的具体实施方式可以参照上述S1001中的相关说明,在此不再赘述。Wherein, the algorithm used by the receiving end to decrypt the multiple encrypted data one by one is consistent with the algorithm used by the sending end. For example, when the sending end uses the AES encryption algorithm to encrypt data, the receiving end uses the same AES encryption algorithm to decrypt the encrypted data. For specific implementation manners of S1003, reference may be made to relevant descriptions in S1001 above, and details are not repeated here.
为了使得发送端与接收端使用的加解密控制信息一致,发送端除了向接收端发送加解密控制信息的指示信息,发送端与接收端之间还需要同步切换密钥。为了实现发送端与接收端之间同步切换密钥的目的,一些可能的实施例中,本申请实施例所提供的加密传输方法,还可以包括如下步骤:In order to make the encryption and decryption control information used by the sending end and the receiving end consistent, the sending end not only sends the indication information of the encryption and decryption control information to the receiving end, but also needs to switch keys synchronously between the sending end and the receiving end. In order to achieve the purpose of synchronously switching keys between the sending end and the receiving end, in some possible embodiments, the encrypted transmission method provided in the embodiment of the present application may also include the following steps:
步骤3,发送端向接收端发送切换指示信息。接收端接收来自发送端发送的切换指示信息。Step 3, the sending end sends handover indication information to the receiving end. The receiving end receives the handover indication information sent from the sending end.
其中,切换指示信息用于指示下一个密钥周期的密钥。密钥周期包括多个加密周期,且这多个加密周期使用相同的密钥。比如,密钥周期包括w个加密周期,w为正整数。例如,w=128、256、512或1024等。需要注意,上述密钥周期的长度小于帧间计数器循环计数1次的长度。例如,假设帧间计数器从0开始计数,其计数上限为65535,即帧间计数器的位数为16位。那么,密钥周期的长度小于65535个加密周期。Wherein, the switching indication information is used to indicate the key of the next key period. A key period includes multiple encryption periods, and the multiple encryption periods use the same key. For example, the key period includes w encryption periods, where w is a positive integer. For example, w=128, 256, 512 or 1024, etc. It should be noted that the length of the above-mentioned key period is less than the length of one cycle count of the inter-frame counter. For example, assuming that the inter-frame counter starts counting from 0, its counting upper limit is 65535, that is, the number of bits of the inter-frame counter is 16 bits. Then, the length of the key period is less than 65535 encryption periods.
一些可能的实施方式中,切换指示信息可以指示下一个密钥周期。示例性地,图12为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图一。请参照图12,发送端与接收端之间同步切换密钥的过程可以包括:In some possible implementation manners, the switching instruction information may indicate the next key period. Exemplarily, FIG. 12 is a schematic diagram 1 of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application. Referring to Figure 12, the process of synchronously switching keys between the sending end and the receiving end may include:
S1201,准备密钥。具体地,发送端可以首先生成下一个密钥周期的密钥,并根据该密钥确定该密钥的密钥数据流。然后,发送端可以通过密钥安全管理通道向接收端发送该密钥数据流。接收到来自发送端的密钥数据流后,接收端可以根据密钥数据流还原密钥。并且,接收端将还原的密钥写入备密钥区,等待密钥切换指示。S1201. Prepare a key. Specifically, the sending end may first generate a key for the next key period, and determine a key data stream of the key according to the key. Then, the sending end can send the key data stream to the receiving end through the key security management channel. After receiving the key data stream from the sender, the receiver can restore the key according to the key data stream. And, the receiving end writes the restored key into the backup key area, and waits for the key switching instruction.
可选地,接收端还原密钥后,可以通过密钥安全管理通道向发送端发送准备切换密钥信息。如此,发送端可以根据准备切换密钥信息判断接收端是否完成密钥的还原,从而可 以确保发送端在接收端还原密钥后发送切换指示信息,确保双方能够同步切换密钥。Optionally, after the receiving end restores the key, it may send key switching information to the sending end through the key security management channel. In this way, the sending end can judge whether the receiving end has completed the restoration of the key according to the information about the ready to switch key, so as to ensure that the sending end sends switching instruction information after the receiving end restores the key, and ensures that both parties can switch the key synchronously.
S1204,发送端向接收端发送切换指示信息,接收端接收来自发送端的切换指示信息。S1204. The sending end sends switching instruction information to the receiving end, and the receiving end receives the switching instruction information from the sending end.
示例性地,假设发送端和接收端当前均使用密钥0进行加密和解密,发送端可以向接收端发送切换指示信息,该切换指示信息用于指示下一个密钥周期的密钥为密钥1。并且,发送端在下一个密钥周期使用密钥1对数据进行加密。接收到来自发送端的切换指示信息后,接收端在下一个密钥周期使用密钥1对数据进行解密。For example, assuming that both the sending end and the receiving end currently use key 0 for encryption and decryption, the sending end can send switching instruction information to the receiving end, and the switching instruction information is used to indicate that the key of the next key cycle is the key 1. And, the sender uses key 1 to encrypt the data in the next key cycle. After receiving the switching instruction information from the sending end, the receiving end uses key 1 to decrypt the data in the next key cycle.
可选地,在同步切换密钥后,接收端和发送端还可以将帧间计数器清零,以进入下一个密钥周期的加解密。Optionally, after the key is switched synchronously, the receiving end and the sending end can also clear the inter-frame counter to enter the encryption and decryption of the next key period.
其中,切换指示信息可以承载于监控管理开销域中除密钥安全管理通道以外的其他部分开销。Wherein, the handover instruction information may be carried in other part of the overhead except the key security management channel in the monitoring and management overhead field.
本申请实施例中,发送端与接收端之间可以维护两个密钥,分别为主密钥和备密钥,主密钥为当前使用的密钥,备密钥为下一个密钥周期使用的密钥。假设当前密钥0为主密钥、密钥1为备密钥,在第一密钥周期中,发送端与接收端均使用密钥0进行加密和解密。此时,密钥1是备密钥,发送端更新密钥1并通过KCC将密钥1发送到接收端,并且,发送端与接收端均将密钥1更新到备密钥区域。在第二密钥周期中,通过上述的切换指示信息,发送端与接收端之间同步使用备密钥区域中的密钥1,也即是说,将使用的密钥从密钥0切换到密钥1。此时,密钥0是备密钥,发送端更新密钥0并通过KCC将密钥0发送到接收端,并且,发送端与接收端均将密钥0更新到备密钥区域。在第三密钥周期中,通过上述的切换指示信息,发送端与接收端之间同步使用备密钥区域中的密钥0,也即是说,将使用的密钥从密钥1切换到密钥0,以此类推,后续密钥周期的密钥切换不再赘述。这样,可以实现密钥的定时同步更新。从上面的过程可以看出,在启动密钥切换之前备密钥可以被更新,从而能够确保数据安全。In the embodiment of this application, two keys can be maintained between the sending end and the receiving end, namely the primary key and the backup key. The primary key is the key currently used, and the backup key is used for the next key period. key. Assuming that the current key 0 is the primary key and key 1 is the backup key, in the first key cycle, both the sending end and the receiving end use key 0 for encryption and decryption. At this time, key 1 is the backup key, and the sending end updates key 1 and sends key 1 to the receiving end through KCC, and both the sending end and the receiving end update key 1 to the backup key area. In the second key period, through the above-mentioned switching instruction information, the sending end and the receiving end use the key 1 in the backup key area synchronously, that is to say, switch the used key from key 0 to key 1. At this point, key 0 is the backup key, and the sender updates key 0 and sends key 0 to the receiver through KCC, and both the sender and receiver update key 0 to the backup key area. In the third key period, through the above-mentioned switching instruction information, the sending end and the receiving end use the key 0 in the standby key area synchronously, that is to say, switch the used key from key 1 to Key 0, and so on, the key switching of the subsequent key cycle will not be repeated. In this way, the timing and synchronous update of the key can be realized. It can be seen from the above process that the backup key can be updated before the key switching is started, so as to ensure data security.
基于步骤3的说明可知,本实施例可以通过切换指示信息实现发送端与接收端之间同步切换密钥。这样,每经过一段时间,如一个或多个加密周期,发送端和接收端之间可以同步切换一次密钥,以防止同样的明文块,始终加密成同样的密文块,从而提高数据安全性。Based on the description of step 3, it can be seen that in this embodiment, the key can be switched synchronously between the sending end and the receiving end through the switching indication information. In this way, after a period of time, such as one or more encryption cycles, the key can be switched synchronously between the sending end and the receiving end to prevent the same plaintext block from always being encrypted into the same ciphertext block, thereby improving data security .
可选地,步骤3,发送端向接收端发送切换指示信息之前,本申请实施例所提供的加密传输方法,还可以包括:发送端向接收端发送密钥切换请求信息,接收端接收来自发送端的密钥切换请求信息。其中,密钥切换请求信息用于指示接收端反馈密钥切换确认信息。接收端向发送端发送密钥切换确认信息,发送端接收来自接收端的密钥切换确认信息。其中,密钥切换确认信息用于指示发送端发送切换指示信息,表示接收端的备密钥已更新。Optionally, in step 3, before the sending end sends switching indication information to the receiving end, the encryption transmission method provided in the embodiment of the present application may further include: the sending end sends key switching request information to the receiving end, and the receiving end receives the key switching request information from the sending end. end key switching request information. Wherein, the key switching request information is used to instruct the receiving end to feed back key switching confirmation information. The receiving end sends key switching confirmation information to the sending end, and the sending end receives the key switching confirmation information from the receiving end. Wherein, the key switching confirmation information is used to instruct the sending end to send switching indication information, indicating that the backup key of the receiving end has been updated.
示例性地,请再参照图12,S1201,准备密钥之后,上述的发送端与接收端之间同步切换密钥的过程还可以包括:Exemplarily, please refer to FIG. 12 again, S1201. After the key is prepared, the above-mentioned process of synchronously switching the key between the sending end and the receiving end may also include:
S1202,发送端向接收端发送密钥切换请求信息,接收端接收来自发送端的密钥切换请求信息。S1202. The sending end sends key switching request information to the receiving end, and the receiving end receives the key switching request information from the sending end.
S1203,接收端向发送端发送密钥切换确认信息,发送端接收来自接收端的密钥切换确认信息。S1203. The receiving end sends key switching confirmation information to the sending end, and the sending end receives the key switching confirmation information from the receiving end.
例如,发送端可以向接收端发送密钥切换请求信息。收到该密钥切换请求信息后,接收端可以向发送端发送密钥切换确认信息,以通知发送端可以同步切换密钥。这样,在发 送端向接收端发送切换指示信息前,发送端与接收端之间还可以利用密钥切换请求信息、密钥切换确认信息确认双方之间的通信是否正常,避免发送端与接收端未同步切换密钥的情况,从而确保发送端与接收端之间能够同步切换密钥,以进一步提高数据安全性。For example, the sending end may send key switching request information to the receiving end. After receiving the key switching request information, the receiving end may send key switching confirmation information to the sending end to notify the sending end that keys can be switched synchronously. In this way, before the sending end sends the switching indication information to the receiving end, the sending end and the receiving end can also use the key switching request information and the key switching confirmation information to confirm whether the communication between the two parties is normal, so as to prevent the sending end from communicating with the receiving end. The key is not switched synchronously, so as to ensure that the key can be switched synchronously between the sender and the receiver to further improve data security.
可选地,上述密钥切换完成信息、密钥切换请求信息和密钥切换确认信息可以承载于密钥安全管理通道,或者承载于监控管理开销域中除密钥安全管理通道以外的其他部分开销,本申请对此不作限定。Optionally, the above-mentioned key switching completion information, key switching request information, and key switching confirmation information can be carried in the key security management channel, or in other part of the overhead in the monitoring and management overhead field except the key security management channel , which is not limited in this application.
可选地,步骤3,发送端向接收端发送切换指示信息之后,本申请实施例所提供的加密传输方法,还可以包括:接收端向发送端发送密钥切换完成信息。发送端接收来自接收端的密钥切换完成信息。其中,密钥切换完成信息用于指示接收端完成密钥切换。Optionally, in step 3, after the sending end sends switching indication information to the receiving end, the encrypted transmission method provided in the embodiment of the present application may further include: the receiving end sends key switching completion information to the sending end. The sending end receives the key switching completion information from the receiving end. Wherein, the key switching completion information is used to instruct the receiving end to complete the key switching.
示例性地,请再参照图12,S1204,发送端向接收端发送切换指示信息,接收端接收来自发送端的切换指示信息之后,上述的发送端与接收端之间同步切换密钥的过程还可以包括:For example, please refer to FIG. 12 again. In S1204, the sending end sends switching instruction information to the receiving end, and after the receiving end receives the switching instruction information from the sending end, the above-mentioned process of synchronously switching keys between the sending end and the receiving end can also be include:
S1205,接收端向发送端发送密钥切换完成信息,发送端接收来自接收端的密钥切换完成信息。S1205. The receiving end sends key switching completion information to the sending end, and the sending end receives the key switching completion information from the receiving end.
例如,发送端与接收端之间不仅同步将使用的密钥从密钥1切换到密钥2,接收端还可以向发送端发送密钥切换完成信息。这样,发送端可以根据密钥切换完成信息判断接收端是否完成密钥同步切换,从而确保发送端与接收端之间能够同步切换密钥,以进一步提高数据安全性。For example, the sending end and the receiving end not only switch the key used from key 1 to key 2 synchronously, but the receiving end can also send key switching completion information to the sending end. In this way, the sending end can judge whether the receiving end has completed the synchronous key switching according to the key switching completion information, so as to ensure that the key can be switched synchronously between the sending end and the receiving end, so as to further improve data security.
需要注意,上述步骤3中,发送端在向接收端发送切换指示信息时,可以在连续的多个加密周期发送切换指示信息。在收到来自接收端的密钥切换完成信息时,发送端停止发送切换指示信息。这样,即使偶然的丢包导致第一个切换指示信息未被接收端正确接收,接收端仍可以接收到第一个切换指示信息以后的切换指示信息,以确保同步切换密钥的可靠性。It should be noted that in the above step 3, when the sending end sends the switching instruction information to the receiving end, it may send the switching instruction information in multiple consecutive encryption periods. When receiving the key switching completion information from the receiving end, the sending end stops sending switching instruction information. In this way, even if the first handover indication information is not correctly received by the receiving end due to accidental packet loss, the receiving end can still receive handover indication information after the first handover indication information, so as to ensure the reliability of the synchronous handover key.
发送端与接收端之间交互密钥切换请求信息、密钥切换确认信息、切换指示信息、密钥切换完成信息的过程中,密钥切换请求信息、密钥切换确认信息、密钥切换完成信息可以通过KCC或监控管理开销域中除KCC以外的开销实现,本申请对此不作限定。During the process of exchanging key switching request information, key switching confirmation information, switching instruction information, and key switching completion information between the sender and the receiving end, the key switching request information, key switching confirmation information, and key switching completion information It can be realized through the KCC or the overhead other than the KCC in the monitoring and management overhead domain, which is not limited in this application.
发送端与接收端之间的传输是双向的业务,因此,接收端也可以通过开销向发送端发送信息,这里的信息可以包括上述的:密钥切换完成信息和密钥切换确认信息等。同时,上述KCC通道也是双向的,因此,KCC通道也可以返回一些用于确认的信息,比如上述S1201中的准备切换密钥信息。The transmission between the sender and the receiver is a two-way service. Therefore, the receiver can also send information to the sender through overhead. The information here can include the above-mentioned key switching completion information and key switching confirmation information. At the same time, the above-mentioned KCC channel is also bidirectional, therefore, the KCC channel can also return some information for confirmation, such as the information about preparing to switch the key in the above-mentioned S1201.
基于上述方法实施例可知,一个加密周期内的多个OSU帧的开销可以用于携带如下一项或多项信息:加解密控制信息的指示信息、认证信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息。其中,加解密控制信息的指示信息可以包括初始向量的指示信息和密钥的指示信息,密钥的指示信息可以包括:切换指示信息和密钥数据流。切换指示信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息可以统称为密钥同步信息。加解密控制信息的指示信息、认证信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息可以被统称为监控管理信息。Based on the above method embodiments, it can be seen that the overhead of multiple OSU frames in one encryption period can be used to carry one or more of the following information: indication information of encryption and decryption control information, authentication information, key switching completion information, key switching Request information and key switching confirmation information. Wherein, the indication information of the encryption and decryption control information may include the indication information of the initial vector and the indication information of the key, and the indication information of the key may include: switching indication information and a key data flow. The switching indication information, key switching completion information, key switching request information, and key switching confirmation information may be collectively referred to as key synchronization information. The instruction information, authentication information, key switching completion information, key switching request information, and key switching confirmation information of the encryption and decryption control information may be collectively referred to as monitoring and management information.
具体地,发送端可以向监控管理开销域写入如下一项或多项信息:加解密控制信息的指示信息、认证信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息。其中, 监控管理开销域可以包括一个加密周期内的多个OSU帧中每个OSU帧的部分开销。示例性地,假设一个加密周期包括256个OSU帧,监控管理开销域可以包括一个加密周期内的256个OSU帧中每个OSU帧的部分开销,比如,每个OSU帧的开销域中的保留(reserve,RES)开销中的1个比特。换句话说,一个加密周期内的256个OSU帧中每个OSU帧的部分开销组合在一起,作为监控管理开销域。Specifically, the sender can write one or more pieces of information into the monitoring and management overhead field: indication information of encryption and decryption control information, authentication information, key switching completion information, key switching request information, and key switching confirmation information. Wherein, the monitoring management overhead field may include a partial overhead of each OSU frame in a plurality of OSU frames within one encryption period. Exemplarily, assuming that an encryption period includes 256 OSU frames, the monitoring and management overhead field may include part of the overhead of each OSU frame in the 256 OSU frames in an encryption period, for example, the reserved value in the overhead field of each OSU frame 1 bit in (reserve, RES) overhead. In other words, part of the overhead of each OSU frame in the 256 OSU frames in one encryption cycle is combined together as the monitoring and management overhead field.
以一个加密周期内的256个OSU帧中每个OSU帧的RES的1个比特组合在一起,作为监控管理开销域为例,该监控管理开销域的长度为256比特。一些可能的实施例中,表6为本申请实施例提供的一种监控管理开销域携带的信息表。请参照表6,监控管理开销域包括帧对齐信号(frame alignment signal,FAS)、帧间计数器(即初始向量的指示信息)、切换指示信息(key_sw)、密钥切换请求信息(key_sw_req)、密钥切换确认信息(key_sw_ack)、密钥切换完成信息(key_sw_ok)、认证信息、密钥的指示信息以及保留开销。其中,帧对齐信号用于确定一个加密周期内监控管理开销域的起始位置,保留开销用于携带新增的管理维护功能对应的信息。切换指示信息用于指示下一个密钥周期使用密钥,比如,切换指示信息从“0000(十六进制数)”变化为“FFFF(十六进制数)”,指示对使用的密钥进行切换。具体地,例如,当前主密钥为密钥0、备密钥为密钥1,在第n个加密周期中切换指示信息为“0000(十六进制数)”,如果在第n+1个加密周期中切换指示信息从“0000(十六进制数)”变化为“FFFF(十六进制数)”,则发送端和接收端可以在第n+2个加密周期的帧头处将使用的密钥从密钥0切换为密钥1,此时,第n+2个加密周期为下一个密钥周期的第1个加密周期。帧间计数器、密钥切换请求信息、密钥切换确认信息、密钥切换完成信息、认证信息、密钥的指示信息的详细说明可以参考上述方法实施例,在此不再赘述。Taking 1 bit of the RES of each OSU frame in 256 OSU frames in one encryption period combined together as an example of the monitoring and management overhead field, the length of the monitoring and management overhead field is 256 bits. In some possible embodiments, Table 6 is an information table carried in the monitoring management overhead field provided by the embodiment of the present application. Please refer to Table 6. The monitoring and management overhead field includes frame alignment signal (frame alignment signal, FAS), inter-frame counter (that is, the indication information of the initial vector), switching indication information (key_sw), key switching request information (key_sw_req), encryption Key switching confirmation information (key_sw_ack), key switching completion information (key_sw_ok), authentication information, key indication information and reserved overhead. Wherein, the frame alignment signal is used to determine the starting position of the monitoring and management overhead field within an encryption period, and the reserved overhead is used to carry information corresponding to the newly added management and maintenance function. The switching indication information is used to indicate the key to be used in the next key cycle, for example, the switching indication information changes from "0000 (hexadecimal number)" to "FFFF (hexadecimal number)", indicating the key to be used to switch. Specifically, for example, the current master key is key 0, the backup key is key 1, and the switching indication information in the nth encryption cycle is "0000 (hexadecimal number)", if the n+1th In the first encryption cycle, the switching indication information changes from "0000 (hexadecimal number)" to "FFFF (hexadecimal number)", then the sending end and the receiving end can be at the frame header of the n+2th encryption cycle Switch the key used from key 0 to key 1. At this time, the n+2th encryption cycle is the first encryption cycle of the next key cycle. For detailed descriptions of the inter-frame counter, key switching request information, key switching confirmation information, key switching completion information, authentication information, and key indication information, reference may be made to the foregoing method embodiments, and details are not repeated here.
表6Table 6
监控管理开销域Monitor Administrative Overhead Domains | 携带的信息carry information |
第224比特-第255比特Bit 224 - Bit 255 | 帧对齐信号frame alignment signal |
第192比特-第223比特Bit 192 - Bit 223 | 帧间计数器inter frame counter |
第176比特-第191比特Bit 176 - Bit 191 | 切换指示信息switch instructions |
第168比特-第175比特Bit 168 - Bit 175 | 密钥切换请求信息Key switching request information |
第160比特-第167比特Bit 160 - Bit 167 | 密钥切换确认信息Key switching confirmation message |
第152比特-第159比特Bit 152 - Bit 159 | 密钥切换完成信息key switching completion message |
第24比特-第151比特Bit 24 - Bit 151 | 认证信息Certification Information |
第8比特-第23比特8th bit - 23rd bit | 密钥安全管理通道(KCC)Key Security Management Channel (KCC) |
第0比特-第7比特Bit 0- |
保留开销retention overhead |
需要注意,在实际应用中,上述表6中的切换指示信息的长度以及格式可以进行修改。具体地,上述表6中切换指示信息的长度为16比特,可选地,该切换指示信息的长度可以小于16比特,比如14比特、10比特等,本申请对此不作限定。当然,表6中的其他信息(包括密钥切换请求信息、密钥切换确认信息、密钥切换完成信息等)的长度以及格式,都可以像上述切换指示信息那样进行修改,具体修改方式可以参照上述切换指示信息,在此不再赘述。It should be noted that in practical applications, the length and format of the handover indication information in Table 6 above may be modified. Specifically, the length of the handover indication information in Table 6 is 16 bits. Optionally, the length of the handover indication information may be less than 16 bits, such as 14 bits, 10 bits, etc., which is not limited in this application. Of course, the length and format of other information in Table 6 (including key switching request information, key switching confirmation information, key switching completion information, etc.) can be modified like the above switching instruction information. For specific modification methods, please refer to The above handover instruction information will not be described in detail here.
其中,对于表6中的密钥同步信息,可以采用多数判决的方式确定密钥同步信息的值。以切换指示信息为例,假设切换指示信息的长度为16比特,当发送端向接收端发 送值为“FFFF(十六进制数)”的切换指示信息时,如果信道质量突然变差,接收端收到的切换指示信息为“FFF0(十六进制数)”,相当于切换指示信息中的部分比特出现跳变,此时,由于切换指示信息中的比特1有12个,比特0有4个,比特1占多数,接收端仍可以确定该切换指示信息实际为“FFFF(十六进制数)”,并根据该切换指示信息进行同步密钥切换。这样,可以确保信息传输的可靠性。Wherein, for the key synchronization information in Table 6, the value of the key synchronization information may be determined in a majority decision manner. Taking the handover instruction information as an example, assuming that the length of the handover instruction information is 16 bits, when the sending end sends the handover instruction information with the value "FFFF (hexadecimal number)" to the receiving end, if the channel quality suddenly deteriorates, the receiving end The handover indication information received by the end is "FFF0 (hexadecimal number)", which is equivalent to the jump of some bits in the handover indication information. At this time, since there are 12 bits 1 and 0 bits 4, and bit 1 is the majority, the receiving end can still determine that the switching indication information is actually "FFFF (hexadecimal number)", and perform synchronization key switching according to the switching indication information. In this way, the reliability of information transmission can be ensured.
另一些可能的实施例中,表7为本申请实施例提供的另一种监控管理开销域携带的信息表。请参照表7,监控管理开销域包括帧对齐信号、认证信息、密钥的指示信息、切换指示信息、加密类型指示信息、帧间计数器以及保留开销。其中,密钥的指示信息包括16比特,密钥的指示信息的高8位位于监控管理开销域的第95比特-第88比特,密钥的指示信息的低8位位于监控管理开销域的第87比特-第80比特。加密类型指示信息用于指示使用的加密算法,比如,当发送端使用AES加密算法时,则加密类型指示信息可以为“000001”。其中,表7中的切换指示信息也可以称为密钥编号(key index,KI)。密钥编号包括2比特,比如,当密钥编号为“00”时,指示下一个加密周期(或复帧周期)使用第一密钥(密钥0),当密钥编号为“01”时,指示下一个加密周期(或复帧周期)使用第二密钥(密钥1)。帧对齐信号、认证信息、帧间计数器以及保留开销的详细说明可以参考上述方法实施例,在此不再赘述。In some other possible embodiments, Table 7 is another information table carried in the monitoring management overhead field provided by the embodiment of the present application. Please refer to Table 7, the monitoring management overhead field includes frame alignment signal, authentication information, key indication information, switching indication information, encryption type indication information, inter-frame counter and reserved overhead. Wherein, the indication information of the key includes 16 bits, the upper 8 bits of the indication information of the key are located in the 95th to the 88th bits of the monitoring and management overhead domain, and the lower 8 bits of the indication information of the key are located in the 8th bit of the monitoring and management overhead domain. 87th bit - the 80th bit. The encryption type indication information is used to indicate the encryption algorithm used, for example, when the sending end uses the AES encryption algorithm, the encryption type indication information may be "000001". Wherein, the handover instruction information in Table 7 may also be called a key number (key index, KI). The key number includes 2 bits, for example, when the key number is "00", it indicates that the next encryption period (or multiframe period) uses the first key (key 0), when the key number is "01" , indicating that the next encryption period (or multiframe period) uses the second key (key 1). For detailed descriptions of the frame alignment signal, authentication information, inter-frame counter, and reserved overhead, reference may be made to the foregoing method embodiments, and details are not repeated here.
表7Table 7
监控管理开销域Monitor Administrative Overhead Domains | 携带的信息carry information |
第224比特-第255比特Bit 224 - Bit 255 | 帧对齐信号frame alignment signal |
第96比特-第223比特Bit 96 - Bit 223 | 认证信息Certification Information |
第80比特-第95比特80th bit - 95th bit | 密钥安全管理通道(KCC)Key Security Management Channel (KCC) |
第78比特-第79比特Bit 78-Bit 79 | 切换指示信息switch instructions |
第72比特-第77比特Bit 72-Bit 77 | 加密类型指示信息Encryption type indication |
第40比特-第71比特Bit 40 - Bit 71 | 帧间计数器inter frame counter |
第0比特-第39比特Bit 0-bit 39 | 保留开销retention overhead |
可以理解,上述通过利用监控管理开销域携带监控管理信息的方式中,监控管理开销域相当于一种传输监控管理信息的传输通道,发送端和接收端可以利用该传输通道实现监控管理信息的交互,比如,实现上述方法实施例中的加解密控制信息的指示信息、密钥同步信息的传输。表6中,通过监控管理开销域中的切换指示信息、密钥切换请求信息、密钥切换确认信息、密钥切换完成信息等,发送端与接收端可以实现同步切换密钥相关信息的传输,这种传输方式可以称为硬件握手。另外,密钥切换请求信息、密钥切换确认信息、密钥切换完成信息可以通过KCC通道传输,利用软件控制实现,这种传输方式可以称为软件握手。It can be understood that in the above method of carrying monitoring and management information by using the monitoring and management overhead field, the monitoring and management overhead field is equivalent to a transmission channel for transmitting monitoring and management information, and the sending end and the receiving end can use this transmission channel to realize the interaction of monitoring and management information For example, the transmission of the indication information of the encryption and decryption control information and the key synchronization information in the above method embodiment is realized. In Table 6, by monitoring the switching instruction information, key switching request information, key switching confirmation information, key switching completion information, etc. in the management overhead field, the sending end and the receiving end can realize the transmission of key switching related information synchronously, This transmission method can be called a hardware handshake. In addition, key switching request information, key switching confirmation information, and key switching completion information can be transmitted through the KCC channel and implemented by software control. This transmission method can be called a software handshake.
表7与表6的区别在于:表7中没有密钥切换请求信息、密钥切换确认信息、密钥切换完成信息,可以省掉硬件握手过程。具体地,应用表7进行同步切换密钥时,只需要接收端还原出密钥,并通过KCC向发送端反馈一个确认信息,以告知发送端可以进行同步切换密钥,发送端根据该确认信息即可进行同步切换密钥,从而相较于表6所示的同步切换密钥的方式能够简化握手过程。The difference between Table 7 and Table 6 is that there is no key switching request information, key switching confirmation information, and key switching completion information in Table 7, which can save the hardware handshake process. Specifically, when using Table 7 to switch keys synchronously, the receiver only needs to restore the key, and feed back a confirmation message to the sender through the KCC to inform the sender that the key can be switched synchronously. That is, the key can be switched synchronously, so that the handshake process can be simplified compared with the way of switching the key synchronously shown in Table 6.
下面分别结合表6、表7说明上述步骤3中发送端与接收端之间同步切换密钥的实施方 式。The implementation of synchronously switching keys between the sending end and the receiving end in the above step 3 will be described below in conjunction with Table 6 and Table 7 respectively.
当使用表6所示的监控管理开销域携带密钥同步信息时,发送端与接收端之间同步切换密钥的实施方式如下:When the monitoring and management overhead field shown in Table 6 is used to carry key synchronization information, the implementation of synchronously switching keys between the sending end and the receiving end is as follows:
图13为本申请实施例提供的发送端与接收端之间同步切换密钥的状态机示意图。请参照图13,发送端和接收端均默认进入初始状态,然后配置启动,各自进入下一个状态。其中,发送端进入发送请求状态,接收端进入等待请求状态。发送端在发送请求状态,可以向接收端发送密钥切换请求信息。接收端在等待请求状态,若收到来自发送端的密钥切换请求信息,则进入发送确认状态。接收端在发送确认状态可以向发送端发送密钥切换确认信息。发送端在发送请求状态,若收到来自接收端的密钥切换确认信息,则进入发送切换指示状态。发送端在发送切换指示状态可以向接收端发送切换指示信息,并且在下一个密钥周期将当前使用的密钥切换为切换指示信息所指示的密钥,比如,假设发送端和接收端当前使用的密钥为第一密钥,下一个密钥周期需要使用第二密钥,则发送端向接收端发送第二密钥的切换指示信息,并且发送端在下一个密钥周期将使用的密钥切换为第二密钥。接收端在发送确认状态,若收到来自发送端的切换指示信息,则可以进入完成密钥切换状态。接收端在完成密钥切换状态可以向发送端发送密钥切换完成信息,并在下一个密钥周期将当前使用的密钥切换为切换指示信息所指示的密钥,以及返回初始状态。发送端在发送切换指示状态,若收到来自接收端的密钥切换完成信息,则进入初始状态。FIG. 13 is a schematic diagram of a state machine for synchronously switching keys between the sending end and the receiving end provided by the embodiment of the present application. Please refer to Figure 13, both the sending end and the receiving end enter the initial state by default, and then the configuration starts, and each enters the next state. Among them, the sending end enters the sending request state, and the receiving end enters the waiting request state. The sending end is in the sending request state, and can send key switching request information to the receiving end. The receiving end is in the waiting request state, and if it receives the key switch request information from the sending end, it will enter the sending confirmation state. The receiving end can send key switching confirmation information to the sending end in the sending confirmation state. The sending end is in the sending request state, and if it receives the key switching confirmation information from the receiving end, it will enter the sending switching instruction state. The sending end can send switching instruction information to the receiving end in the state of sending the switching instruction, and switch the currently used key to the key indicated by the switching instruction information in the next key period, for example, assuming that the sending end and the receiving end are currently using The key is the first key, and the second key needs to be used in the next key cycle, then the sending end sends the second key switching instruction information to the receiving end, and the sending end will switch the key used in the next key cycle as the second key. The receiving end is in the state of sending confirmation, and if it receives switching instruction information from the sending end, it can enter the state of completing key switching. The receiving end can send key switching completion information to the sending end when the key switching is completed, and switch the currently used key to the key indicated by the switching instruction information in the next key period, and return to the initial state. The sending end is in the state of sending the switching instruction, and if it receives the key switching completion information from the receiving end, it will enter the initial state.
示例性地,图14为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图二。请参照图14,假设发送端和接收端当前使用的密钥为密钥0,下一个密钥周期从第n个加密周期开始,下一个密钥周期需要使用的密钥为密钥1。发送端可以在第n+1个加密周期向接收端发送密钥1的切换指示信息,并且发送端在第n+2个加密周期将使用的密钥切换为密钥1。接收端在第n+1个加密周期收到来自发送端的密钥1的切换指示信息,则可以在第n+2个加密周期将使用的密钥切换为密钥1,并向发送端发送密钥切换完成信息,从而完成发送端与接收端之间同步切换密钥。其中,切换指示信息可以指示在下一个加密周期将当前使用的密钥切换为指示的密钥。上述接收端接收到切换指示信息的判断方式可以为:第n个加密周期中的切换指示信息“0000(十六进制数)”,在第n+1个加密周期中的切换指示信息从“0000(十六进制数)”变化为“FFFF(十六进制数)”,则接收端确定接收到切换指示信息,并在第n+2个加密周期的帧头处切换密钥。Exemplarily, FIG. 14 is a second schematic diagram of synchronous key switching between the sending end and the receiving end provided in the embodiment of the present application. Please refer to FIG. 14 , assuming that the key currently used by the sender and the receiver is key 0, the next key period starts from the nth encryption period, and the key to be used in the next key period is key 1. The sending end may send key 1 switching instruction information to the receiving end in the (n+1) encryption cycle, and the sending end switches the key used to key 1 in the (n+2) encryption cycle. When the receiving end receives the switching instruction information of key 1 from the sending end in the n+1 encryption period, it can switch the used key to key 1 in the n+2 encryption cycle, and send the encryption key to the sending end key switching completion information, thereby completing the synchronous key switching between the sender and the receiver. Wherein, the switch instruction information may indicate to switch the currently used key to the indicated key in the next encryption cycle. The judgment method for the receiving end to receive the switching indication information may be: the switching indication information in the nth encryption cycle "0000 (hexadecimal number)", the switching indication information in the n+1th encryption cycle from " 0000 (hexadecimal number)" is changed to "FFFF (hexadecimal number)", then the receiving end determines that the switching instruction information is received, and switches the key at the frame header of the n+2th encryption cycle.
其中,若超时(比如超过等待时间阈值),发送端和接收端均会进行状态跳转,从当前的状态跳转到初始状态。若配置启动,发送端会从当前的状态跳转到发送请求状态,接收端会从当前的状态跳转到等待请求状态。上述配置启动可以理解为启动同步切换密钥。Wherein, if timeout occurs (such as exceeding the waiting time threshold), both the sending end and the receiving end will perform a state jump, jumping from the current state to the initial state. If the configuration is enabled, the sender will jump from the current state to the sending request state, and the receiving end will jump from the current state to the waiting request state. The above configuration startup can be understood as starting the synchronous key switching.
上述图13、图14中,在发送切换指示状态,发送端向接收端发送切换指示信息时,可以在连续的多个加密周期发送切换指示信息。并且,在收到来自接收端的密钥切换完成信息时,发送端停止发送切换指示信息。In the above-mentioned Fig. 13 and Fig. 14, when the switching instruction is sent and the sending end sends the switching instruction information to the receiving end, the switching instruction information may be sent in multiple consecutive encryption cycles. And, when receiving the key switching completion information from the receiving end, the sending end stops sending the switching instruction information.
当使用表7所示的监控管理开销域携带密钥同步信息时,发送端与接收端之间同步切换密钥的实施方式如下:When the monitoring and management overhead field shown in Table 7 is used to carry key synchronization information, the implementation of synchronously switching keys between the sending end and the receiving end is as follows:
图15为本申请实施例提供的发送端与接收端之间同步切换密钥的示意图三。请参照图15,复帧周期包括4个加密周期,也即是说,1个复帧周期中,发送端可以向接收端发送4个加密周期的OSU帧。KI是切换指示信息,当KI=00时,指示下一个复帧周期 使用密钥0;当KI=01时,指示下一个复帧周期使用密钥1。假设发送端和接收端当前使用的密钥为密钥0,下一个密钥周期从第n+2个复帧周期开始,下一个密钥周期需要使用的密钥为密钥1。发送端可以在第n个复帧周期向接收端发送KI=00,指示在第n+1个复帧周期使用的密钥为密钥0。在第n+1个复帧周期向接收端发送KI=01,指示在第n+2个复帧周期使用的密钥为密钥1,并在第n+2个复帧周期将使用的密钥切换为密钥1。相应地,接收端根据KI的值同步切换密钥,其中,在第n个复帧周期和第n+1个复帧周期使用的密钥为密钥0,在第n+2个复帧周期将使用的密钥切换为密钥1。FIG. 15 is a third schematic diagram of synchronous key switching between the sending end and the receiving end provided by the embodiment of the present application. Please refer to FIG. 15 , the multiframe period includes 4 encryption periods, that is to say, in one multiframe period, the sender can send OSU frames of 4 encryption periods to the receiver. KI is handover indication information. When KI=00, it indicates that key 0 is used in the next multiframe period; when KI=01, it indicates that key 1 is used in the next multiframe period. Assume that the key currently used by the sending end and the receiving end is key 0, the next key period starts from the n+2th multiframe period, and the key to be used in the next key period is key 1. The sending end may send KI=00 to the receiving end in the nth multiframe period, indicating that the key used in the n+1th multiframe period is key 0. Send KI=01 to the receiving end in the n+1 multiframe period, indicating that the key used in the n+2 multiframe period is key 1, and the key to be used in the n+2 multiframe period The key is switched to key 1. Correspondingly, the receiving end switches keys synchronously according to the value of KI, where the key used in the nth multiframe period and the n+1th multiframe period is key 0, and the key used in the n+2th multiframe period Switch the used key to key 1.
其中,1个复帧周期中的多个KI的值相同,接收端可以采用多数判决的方式确定1个复帧周期中的多个KI的值。假设在第n个复帧周期中,发送端向接收端发送的4个KI分别为“01”、“01”、“01”、“01”,如果信道质量突然变差,接收端在第n个复帧周期中收到的4个KI分别为“01”、“01”、“01”、“00”,相当于复帧周期中的部分KI出现跳变,此时,由于“01”的KI有3个,“00”的KI有1个,“01”的KI占多数,接收端仍可以确定该复帧周期中的4个KI分别为“01”、“01”、“01”、“01”,并根据这4个KI进行同步密钥切换。这样,可以确保信息传输的可靠性。Wherein, the values of multiple KIs in one multiframe period are the same, and the receiving end may determine the values of multiple KIs in one multiframe period by means of majority decision. Assume that in the n-th multiframe period, the four KIs sent by the sender to the receiver are "01", "01", "01", and "01" respectively. If the channel quality suddenly deteriorates, the receiver at the nth The four KIs received in a multiframe period are "01", "01", "01", and "00", which is equivalent to a jump in some KIs in a multiframe period. At this time, due to the "01" There are 3 KIs, 1 KI of "00", and KI of "01" are the majority, and the receiving end can still determine that the 4 KIs in the multiframe period are "01", "01", "01", "01", and perform synchronization key switching according to these 4 KIs. In this way, the reliability of information transmission can be ensured.
可以理解,表7与表6的区别在于:表7利用切换指示信息实现同步切换密钥,并且表7的切换指示信息仅占用2比特的监控管理开销域。表6中可以通过图13所示的状态机确保同步切换密钥的可靠性,具体可以参照上述图13、图14的相关描述。使用表7实现同步切换密钥时,发送端可以在多个加密周期向接收端发送同样的切换指示信息,以确保接收端正确接收到切换指示信息,确保同步切换密钥的可靠性。表7所示的同步切换密钥的方式中,接收端在完成密钥还原后,接收端可以通过KCC通道反馈准备切换密钥信息,以告知发送端可以进行同步切换密钥,从而相较于表6所示的同步切换密钥的方式能够简化握手过程。It can be understood that the difference between Table 7 and Table 6 lies in that: Table 7 uses the handover indication information to implement synchronous handover keys, and the handover indication information in Table 7 only occupies a 2-bit monitoring and management overhead field. In Table 6, the reliability of the synchronous switching key can be ensured through the state machine shown in FIG. 13 . For details, refer to the relevant descriptions in FIG. 13 and FIG. 14 above. When using Table 7 to implement synchronous key switching, the sending end can send the same switching instruction information to the receiving end in multiple encryption cycles to ensure that the receiving end correctly receives the switching instruction information and ensure the reliability of the synchronous switching key. In the method of synchronous key switching shown in Table 7, after the receiving end completes the key recovery, the receiving end can feed back the key switching information through the KCC channel to inform the sending end that the key can be switched synchronously. The way of switching keys synchronously shown in Table 6 can simplify the handshake process.
一些可能的实施例中,可以通过一个加密周期内的多个OSUv帧的开销传输上述的监控管理信息。具体地,表8为本申请实施例提供的一种OSUv帧的开销携带监控管理信息的信息表,并且,假设一个加密周期包括1024个OSUv帧。参照表8,VBR_OSUv帧(承载VBR业务的OSUv帧)中的VBR_POH1和VBR_POH2可以分别承载如下一项或多项监控管理信息:帧间计数器、密钥同步信息、64VBR复帧的计数器、密钥安全管理通道、认证信息。CBR_OSUv帧(承载CBR业务的OSUv帧)中的CBR_POH1和CBR_POH2可以分别承载如下一项或多项监控管理信息:帧间计数器、密钥同步信息、密钥安全管理通道、认证信息。其中,表8中的“#X(X为整数,且0≤X≤15)”表示一个加密周期中的第X个帧,比如VBR_POH1#0,表示一个加密周期中的第0个VBR_POH1。从而,VBR_POH1#0-#15[39:8]表示1个加密周期中的第0个VBR_POH1至第15个VBR_POH1中均承载有帧间计数器,并且每个VBR_POH1的第8-第39比特用于承载帧间计数器。“CBR_POH1#0-#7[19:4][1:0]”中的[1:0]表示CBR帧的POH1开销大小为2比特,具体地,“CBR_POH1#0-#7[19:4][1:0]”可以表示1个加密周期中的第0个CBR_POH1至第7个CBR_POH1中均承载有帧间计数器,并且每个CBR_POH1的第8-第38比特用于承载帧间计数器。以此类推,表8中的其他项的含义在此不再赘述。In some possible embodiments, the above monitoring and management information may be transmitted through the overhead of multiple OSUv frames within one encryption period. Specifically, Table 8 is an information table of OSUv frame overhead carrying monitoring management information provided by the embodiment of the present application, and it is assumed that one encryption cycle includes 1024 OSUv frames. Referring to Table 8, VBR_POH1 and VBR_POH2 in VBR_OSUv frames (OSUv frames carrying VBR services) can respectively carry one or more of the following monitoring and management information: inter-frame counters, key synchronization information, counters for 64VBR multiframes, key security Management channel, authentication information. CBR_POH1 and CBR_POH2 in a CBR_OSUv frame (an OSUv frame carrying CBR services) can respectively carry one or more of the following monitoring and management information: inter-frame counter, key synchronization information, key security management channel, and authentication information. Wherein, "#X (X is an integer, and 0≤X≤15)" in Table 8 indicates the Xth frame in an encryption period, for example, VBR_POH1#0 indicates the 0th VBR_POH1 in an encryption period. Thus, VBR_POH1#0-#15[39:8] indicates that the 0th VBR_POH1 to the 15th VBR_POH1 in one encryption cycle all carry an inter-frame counter, and the 8th-39th bits of each VBR_POH1 are used for Carries the interframe counter. [1:0] in "CBR_POH1#0-#7[19:4][1:0]" indicates that the POH1 overhead size of the CBR frame is 2 bits, specifically, "CBR_POH1#0-#7[19:4 ][1:0]" can indicate that the 0th CBR_POH1 to the 7th CBR_POH1 in one encryption cycle all carry the inter-frame counter, and the 8th-38th bits of each CBR_POH1 are used to carry the inter-frame counter. By analogy, the meanings of other items in Table 8 will not be repeated here.
表8Table 8
表9为本申请实施例提供的另一种OSUv帧的开销携带监控管理信息的信息表,并且,假设一个加密周期包括1024个OSUv帧。参照表9,VBR_OSUv帧(承载VBR业务的OSUv帧)中的VBR_POH1和VBR_POH2可以分别承载如下一项或多项监控管理信息:帧间计数器、切换指示信息、64VBR复帧的计数器、密钥安全管理通道、认证信息。CBR_OSUv帧(承载CBR业务的OSUv帧)中的CBR_POH1和CBR_POH2可以分别承载如下一项或多项监控管理信息:帧间计数器、切换指示信息、密钥安全管理通道、认证信息。其中,表9中的“#X(X为整数,且0≤X≤15)”表示一个加密周期中的第X个帧,比如VBR_POH1#0,表示一个加密周期中的第0个VBR_POH1。从而,VBR_POH1#0-#15[7:6]表示1个加密周期中的第0个VBR_POH1至第15个VBR_POH1中均承载有切换指示信息,并且每个VBR_POH1的第6-第7比特用于承载切换指示信息。以此类推,表中的其他项的含义在此不再赘述。Table 9 is an information table of another OSUv frame overhead carrying monitoring and management information provided by the embodiment of the present application, and it is assumed that one encryption period includes 1024 OSUv frames. Referring to Table 9, VBR_POH1 and VBR_POH2 in the VBR_OSUv frame (the OSUv frame carrying VBR services) can respectively carry one or more of the following monitoring and management information: inter-frame counter, switching instruction information, counter of 64VBR multiframe, key security management Channel, authentication information. CBR_POH1 and CBR_POH2 in the CBR_OSUv frame (the OSUv frame carrying the CBR service) can respectively carry one or more monitoring and management information as follows: inter-frame counter, handover instruction information, key security management channel, and authentication information. Wherein, "#X (X is an integer, and 0≤X≤15)" in Table 9 indicates the Xth frame in an encryption period, for example, VBR_POH1#0 indicates the 0th VBR_POH1 in an encryption period. Therefore, VBR_POH1#0-#15[7:6] indicates that the 0th VBR_POH1 to the 15th VBR_POH1 in one encryption cycle all carry switching instruction information, and the 6th-7th bits of each VBR_POH1 are used for Bearer handover indication information. By analogy, the meanings of other items in the table will not be repeated here.
表9Table 9
由于1个加密周期中的VBR_OSUv帧以第一个64VBR复帧的复帧帧头开销,作为识别该加密周期的帧头,为了区分该加密周期中的其他64VBR复帧,将VBR_POH1中的64VBR复帧的计数器用于识别1个加密周期中的64VBR复帧。换句话说,上述的64VBR复帧的计数器表示当前的64VBR复帧是1个加密周期中的第几个64VBR复帧。由于1个加密周期中的CBR_OSUv帧以第一个256CBR复帧的复帧帧头开销,作为识别该加密周期的帧头,而1个加密周期中包括1个256CBR复帧,因此,CBR_OSUv帧中不存在CBR复帧的计数器。上述表8、表9中的帧间计数器、密钥同步信息、切换指示信息、密钥安全管理通道、认证信息的说明可以参照上述实施例中表6、表7相关的描述,在此不再赘述。Since the VBR_OSUv frame in one encryption period is overhead with the multiframe header of the first 64VBR multiframe as the frame header to identify the encryption period, in order to distinguish other 64VBR multiframes in the encryption period, the 64VBR multiframe in VBR_POH1 is The frame counter is used to identify 64VBR multiframes in one encryption cycle. In other words, the above-mentioned 64VBR multiframe counter indicates which 64VBR multiframe is the current 64VBR multiframe in one encryption cycle. Since the CBR_OSUv frame in one encryption period uses the header overhead of the first 256CBR multiframe as the frame header to identify the encryption period, and one encryption period includes one 256CBR multiframe, therefore, the CBR_OSUv frame There is no counter for CBR multiframes. For the descriptions of the inter-frame counters, key synchronization information, handover instruction information, key security management channels, and authentication information in the above-mentioned Tables 8 and 9, reference may be made to the relevant descriptions in Tables 6 and 7 in the above-mentioned embodiments, and will not be repeated here. repeat.
使用上述表8所示的OSUv帧的开销携带监控管理信息,以实现同步切换密钥的具体实施方式时,可以参照上述图13-图14所示的同步切换密钥的实施方式。在具体实施时,将上述图13-图14所示的实施例中的携带监控管理信息的方式,替换为表8所示的携带监控管理信息的方式即可,在此不做赘述。When using the overhead of the OSUv frame shown in Table 8 to carry monitoring and management information to realize the specific implementation of synchronous key switching, reference can be made to the implementation of synchronous key switching shown in FIGS. 13-14 above. In specific implementation, the manner of carrying monitoring and management information in the above-mentioned embodiments shown in FIGS. 13-14 can be replaced with the manner of carrying monitoring and management information shown in Table 8, which will not be repeated here.
在上述表8、表9中,1个加密周期内VBR_OSUv帧传递了16次帧间计数器,1个加密周期内CBR_OSUv帧传递了8次帧间计数器。与之对应,在上述表6、表7所示的OSU帧在1个加密周期内仅传递了1次帧间计数器。因此,上述表8、表9所示的OSUv帧的开销携带监控管理信息的方式,即使偶然的丢包导致第一个帧间计数器未被接收端正确接收,接收端仍可以接收到第一个帧间计数器以后的帧间计数器,以确保加解密的可靠性。In Table 8 and Table 9 above, the VBR_OSUv frame transmits the inter-frame counter 16 times in one encryption period, and the CBR_OSUv frame transmits the inter-frame counter 8 times in one encryption period. Correspondingly, the OSU frames shown in Table 6 and Table 7 above only transmit the inter-frame counter once in one encryption cycle. Therefore, the OSUv frame overhead shown in Table 8 and Table 9 above carries monitoring and management information. Even if the first inter-frame counter is not received correctly by the receiving end due to accidental packet loss, the receiving end can still receive the first The inter-frame counter after the inter-frame counter ensures the reliability of encryption and decryption.
其中,1个加密周期内VBR_OSUv帧传递了16次帧间计数器,这16个帧间计数器的值相同;1个加密周期内CBR_OSUv帧传递了8次帧间计数器,这8个帧间计数器的值相同。这样,即使偶然的丢包导致第一个帧间计数器未被接收端正确接收,接收端仍可以接收到第一个帧间计数器以后的帧间计数器,提升确保加解密的可靠性。另外,还可以在异常情况下减少计数器的恢复时间。Among them, the VBR_OSUv frame passed the inter-frame counter 16 times in one encryption period, and the values of the 16 inter-frame counters were the same; the CBR_OSUv frame passed the inter-frame counter 8 times in one encryption period, and the values of the 8 inter-frame counters same. In this way, even if the first inter-frame counter is not correctly received by the receiving end due to accidental packet loss, the receiving end can still receive the inter-frame counters after the first inter-frame counter, which improves the reliability of encryption and decryption. In addition, it is possible to reduce the recovery time of the counter in abnormal situations.
在上述表9中,1个加密周期内VBR_OSUv帧和CBR_OSUv帧的开销中,切换指示信息可以称为密钥指示(key index,KI),KI可以包括2比特,比如,当KI为“00”时,指示下一个密钥周期使用第一密钥,当KI为“01”时,指示下一个密钥周期使用第二密钥。In the above Table 9, in the overhead of the VBR_OSUv frame and the CBR_OSUv frame in one encryption period, the switching indication information may be called a key indication (key index, KI), and KI may include 2 bits, for example, when KI is "00" When KI is "01", it indicates that the next key cycle uses the first key, and when KI is "01", it indicates that the next key cycle uses the second key.
使用上述表9所示的OSUv帧的开销携带监控管理信息,以实现发送端与接收端之间同步切换密钥的具体实施方式时,可以参照上述图15所示的同步切换密钥的实施方式,在此不做赘述。当然,由于1个加密周期内VBR_OSUv帧中,KI被传递了16次;1个加密周期内CBR_OSUv帧中,KI被传递了8次,因此,在具体实施时,可以不使用复帧周期,也即是说,发送端1次发送可以向接收端发送1个加密周期的OSUv帧,该加密周期的OSUv帧中KI被传递了8或16次。When using the overhead of the OSUv frame shown in Table 9 above to carry monitoring and management information to realize the specific implementation of synchronous key switching between the sending end and the receiving end, you can refer to the implementation of synchronous key switching shown in Figure 15 above. , which will not be described here. Of course, since KI is transmitted 16 times in a VBR_OSUv frame in one encryption period; and KI is transmitted 8 times in a CBR_OSUv frame in one encryption period, therefore, in specific implementation, the multiframe period may not be used, or That is to say, the sending end can send an OSUv frame of one encryption period to the receiving end in one transmission, and KI is transmitted 8 or 16 times in the OSUv frame of the encryption period.
其中,1个加密周期内VBR_OSUv帧中,KI被传递了16次,这16个KI的值相同;1个加密周期内CBR_OSUv帧中,KI被传递了8次,这8个KI的值相同。对于1个加密周期中被重复多次传递的KI,接收端可以采用多数判决的方式确定这1个加密周期中的多个KI的值,具体实现方式可以参照上述“接收端采用多数判决的方式确定1个复帧周期中的多个KI的值”的相关描述,在此不再赘述。Among them, KI is transmitted 16 times in VBR_OSUv frame in one encryption period, and the values of these 16 KIs are the same; in CBR_OSUv frame in one encryption period, KI is transmitted 8 times, and the values of these 8 KIs are the same. For KIs that have been repeatedly transmitted in one encryption cycle, the receiving end can determine the values of multiple KIs in this one encryption cycle by means of majority judgment. Determining multiple KI values in one multiframe period" related descriptions will not be repeated here.
表9所示的同步切换密钥的方式中,接收端在完成密钥还原后,接收端可以只需要通过KCC通道反馈准备切换密钥信息,以告知发送端可以进行同步切换密钥,从而相较于表8所示的同步切换密钥的方式能够简化握手过程。In the method of synchronous key switching shown in Table 9, after the receiving end completes the key recovery, the receiving end may only need to feed back the key switching information through the KCC channel to inform the sending end that the key can be switched synchronously. Compared with the synchronous key switching method shown in Table 8, the handshake process can be simplified.
一些可能的实施例中,上述监控管理信息可以承载于操作维护管理(operation administration and maintenance,OAM)信元。换句话说,发送端可以利用OAM信元向接收端发送监控管理信息。OAM信元的发送时间和周期可以根据实际需求调整,也即是说,发送端可以通过调整OAM的发送周期,改变对业务数据的加密周期的长度,可以提高小带宽业务的传输速度,以及调整发送端与接收端之间同步切换密钥的周期,使得对业务数据的加密更加灵活。In some possible embodiments, the above monitoring and management information may be carried in an operation administration and maintenance (OAM) information element. In other words, the sending end can use the OAM information element to send monitoring and management information to the receiving end. The sending time and cycle of OAM cells can be adjusted according to actual needs, that is to say, the sending end can adjust the sending cycle of OAM to change the length of the encryption cycle of service data, which can improve the transmission speed of small-bandwidth services, and adjust The cycle of switching keys synchronously between the sending end and the receiving end makes the encryption of business data more flexible.
下面,本申请提供一种实现上述加密传输方法的示例,具体如下:Next, this application provides an example of implementing the above encrypted transmission method, specifically as follows:
图16为本申请实施例提供的一种发送端与接收端之间交互的示意图。请参照图16,发送端向接收端发送OSU帧,接收端接收来自发送端的OSU帧的过程中,发送端可以执行如下三个步骤:业务数据处理、加密、开销处理,接收端可以执行如下三个步骤:开销处理、解密和业务数据处理。FIG. 16 is a schematic diagram of an interaction between a sending end and a receiving end provided by an embodiment of the present application. Please refer to Figure 16. The sender sends an OSU frame to the receiver. When the receiver receives the OSU frame from the sender, the sender can perform the following three steps: business data processing, encryption, and overhead processing. The receiver can perform the following three steps: steps: overhead processing, decryption, and business data processing.
在发送端,业务数据处理步骤可以为将业务数据映射至一个加密周期中的多个OSU帧的净荷中,以利用OSU帧携带业务数据;加密步骤可以为对携带业务数据的OSU帧的净荷加密;开销处理步骤可以为在携带业务数据的OSU帧的开销中写入监控管理信息。相应地,在接收端,开销处理步骤可以为从携带业务数据的OSU帧的开销中读出监控管理信息;解密步骤可以为对携带业务数据的OSU帧的净荷解密;业务数据处理步骤可以为从解密后的OSU帧的净荷获取解密后的业务数据。其中,监控管理信息可以包括:上述的加解密控制信息的指示信息、认证信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息。切换指示信息、密钥切换完成信息、密钥切换请求信息和密钥切换确认信息可以统称为密钥同步信息。At the sending end, the business data processing step can be to map the business data to the payload of multiple OSU frames in one encryption cycle, so as to use the OSU frame to carry the business data; payload encryption; the overhead processing step may be writing monitoring and management information in the overhead of the OSU frame carrying service data. Correspondingly, at the receiving end, the overhead processing step can be to read the monitoring and management information from the overhead of the OSU frame carrying service data; the decryption step can be to decrypt the payload of the OSU frame carrying service data; the service data processing step can be The decrypted service data is obtained from the payload of the decrypted OSU frame. Wherein, the monitoring management information may include: the indication information of the above-mentioned encryption and decryption control information, authentication information, key switching completion information, key switching request information, and key switching confirmation information. The switching indication information, key switching completion information, key switching request information, and key switching confirmation information may be collectively referred to as key synchronization information.
需要注意,在发送端,上述加密步骤可以在开销处理步骤之前执行,也可以在开销处理步骤之后执行,本申请对此不作限定。在接收端,上述解密步骤可以在开销处理步骤之前执行,也可以在开销处理步骤之后执行,本申请对此不作限定。It should be noted that at the sending end, the above encryption step may be performed before or after the overhead processing step, which is not limited in this application. At the receiving end, the above decryption step may be performed before the overhead processing step or after the overhead processing step, which is not limited in this application.
下面结合附图具体说明上述发送端执行业务数据处理、加密、开销处理步骤的过程,以及接收端执行开销处理、解密和业务数据处理的过程。The process of performing service data processing, encryption, and overhead processing steps at the sending end, and the process of performing overhead processing, decryption, and service data processing at the receiving end will be described in detail below with reference to the accompanying drawings.
图17为本申请实施例提供的一种发送端加密数据的流程示意图。请参照图17,该OTN设备可以是发送端或者是接收端。当该OTN设备为发送端时,发送端执行业务数据处理、加密、开销处理步骤的过程可以包括如下实施方式:FIG. 17 is a schematic flow diagram of a sending end encrypting data provided by an embodiment of the present application. Referring to FIG. 17, the OTN device can be a sending end or a receiving end. When the OTN device is the sending end, the process of the sending end performing service data processing, encryption, and overhead processing steps may include the following implementation methods:
发送端将业务数据映射至一个加密周期中的多个OSU帧的净荷中,并通过信元总线(也可以称为OSU总线)和通道映射将这多个OSU帧映射到处理通道。然后,发送端执行信息处理步骤,该信息处理步骤可以包括:发送端获取当前加密周期使用的密钥以及初始向量。并且,发送端执行开销处理步骤,该开销处理步骤可以包括:发送端确定当前加密周期使用的密钥以及初始向量的指示信息以及密钥同步信息等,并将该加解密控制信息的指示信息以及密钥同步信息等写入上述处理通道中的多个OSU帧的开销中。之后,发送端对这多个OSU帧的净荷加密,发送端可以利用密钥、初始向量、AES加密函数对该多个OSU帧的净荷加密,得到加密后的多个OSU帧。发送端还执行认证标识处理步骤,该认证标识处理步骤可以包括:发送端利用加密后的多个OSU帧的净荷确定第一认证标识。发送端还执行认证标识写入步骤,将第一认证标识写入多个OSU帧的开销中。最后,发送端通过信元总线和收发模块向接收端发送该多个OSU帧。The sending end maps service data to the payloads of multiple OSU frames in one encryption cycle, and maps the multiple OSU frames to processing channels through cell bus (also called OSU bus) and channel mapping. Then, the sending end performs an information processing step, and the information processing step may include: the sending end obtains the key and the initial vector used in the current encryption cycle. In addition, the sending end performs an overhead processing step, which may include: the sending end determines the key used in the current encryption cycle, the indication information of the initial vector, the key synchronization information, etc., and converts the encryption and decryption control information indication information and Key synchronization information and the like are written into the overhead of multiple OSU frames in the above processing channel. Afterwards, the sending end encrypts the payloads of the multiple OSU frames, and the sending end can encrypt the payloads of the multiple OSU frames by using a key, an initialization vector, and an AES encryption function to obtain multiple encrypted OSU frames. The sending end further executes an authentication identification processing step, and the authentication identification processing step may include: the sending end determines the first authentication identification by using the encrypted payloads of multiple OSU frames. The sending end also performs the step of writing the authentication identifier, and writes the first authentication identifier into the overhead of multiple OSU frames. Finally, the sending end sends the multiple OSU frames to the receiving end through the cell bus and the transceiver module.
相应地,当该OTN设备为接收端时,接收端执行开销处理、解密和业务数据处理的过程可以包括如下实施方式:Correspondingly, when the OTN device is the receiving end, the process of the receiving end performing overhead processing, decryption and service data processing may include the following implementation methods:
接收端利用收发模块接收来自发送端的多个OSU帧,并通过信元总线和通道映射将这多个OSU帧映射到处理通道。然后,接收端执行开销处理步骤,该开销处理步骤可以包括:接收端从处理通道中的多个OSU帧的开销中读取密钥的指示信息、初始向量的指示信息以及密钥同步信息。并且,接收端还执行信息处理步骤,该信息处理步骤可以包括:接收端 根据密钥的指示信息、初始向量的指示信息确定当前加密周期使用的密钥以及初始向量。之后,接收端执行认证标识处理步骤,该认证标识处理步骤可以包括:接收端利用未解密的OSU帧的净荷确定第二认证标识。最后,接收端对这多个OSU帧的净荷解密,即利用密钥、初始向量、AES加密函数对该多个OSU帧的净荷解密,得到解密后的多个OSU帧,进而得到解密后的业务数据。并且,接收端执行认证标识读取步骤,从多个OSU帧的开销中读取第一认证标识,并比较第一认证标识和第二认证标识是否一致,若不一致,则说明密文在传输过程中可能被篡改。The receiving end uses the transceiver module to receive multiple OSU frames from the transmitting end, and maps the multiple OSU frames to the processing channel through the cell bus and channel mapping. Then, the receiving end performs an overhead processing step, which may include: the receiving end reads key indication information, initial vector indication information, and key synchronization information from the overhead of multiple OSU frames in the processing channel. In addition, the receiving end also performs an information processing step, and the information processing step may include: the receiving end determines the key and the initial vector used in the current encryption cycle according to the indication information of the key and the indication information of the initial vector. Afterwards, the receiving end executes the authentication identification processing step, and the authentication identification processing step may include: the receiving end determines the second authentication identification by using the payload of the undecrypted OSU frame. Finally, the receiving end decrypts the payloads of the multiple OSU frames, that is, uses the key, the initial vector, and the AES encryption function to decrypt the payloads of the multiple OSU frames, and obtains multiple decrypted OSU frames, and then obtains the decrypted business data. And, the receiving end executes the authentication identification reading step, reads the first authentication identification from the overhead of multiple OSU frames, and compares whether the first authentication identification and the second authentication identification are consistent, if they are not consistent, it means that the ciphertext is being transmitted may be tampered with.
可以理解,上述发送端执行业务数据处理、加密、开销处理步骤的过程,以及接收端执行开销处理、解密和业务数据处理的详细实施方式,可以参照上述方法实施例,在此不再赘述。It can be understood that the detailed implementation manners of the sending end performing service data processing, encryption, and overhead processing steps, and the receiving end performing overhead processing, decryption, and service data processing can refer to the above method embodiments, and details are not repeated here.
一些可能的实施例中,信元总线可以为N×128(N为正整数,且N≤12,比如N可以为1、2、3、4、6、12等)。当N=12时,OTN设备一次可以处理1个OSU帧;当N<12时,1个OSU帧会被分为多个OSU子帧,此时,OSU帧的开销位于多个OSU子帧中的第一个OSU子帧。OTN设备对这多个OSU子帧的处理过程可以为:对第一个OSU子帧中的开销执行开销处理步骤、对第一个OSU子帧中的净荷执行加密或解密步骤,对第二个及第二个以后的OSU子帧执行加密或解密步骤。In some possible embodiments, the cell bus may be N×128 (N is a positive integer, and N≤12, for example, N may be 1, 2, 3, 4, 6, 12, etc.). When N=12, the OTN device can process one OSU frame at a time; when N<12, one OSU frame will be divided into multiple OSU subframes, and at this time, the overhead of the OSU frame is located in multiple OSU subframes of the first OSU subframe. The processing procedure of the OTN device for these multiple OSU subframes may be: perform an overhead processing step on the overhead in the first OSU subframe, perform an encryption or decryption step on the payload in the first OSU subframe, and perform an encryption or decryption step on the payload in the second OSU subframe. The first and second subsequent OSU subframes perform encryption or decryption steps.
基于图10-图17中任一项所示出的加密传输方法,发送端能够对一个加密周期内的多个OSU帧加密,并发送多个OSU帧。其中,在对多个OSU帧加密时,发送端可以将加密后的多个OSU帧映射到ODUk帧中,以利用ODUk帧携带多个加密后的OSU帧。换句话说,发送端能够对ODUk帧携带的部分业务数据进行单独加密,以提升数据安全性。另外,由于OSU帧可以承载小颗粒业务,通过对OSU帧加密相当于可以对小颗粒业务加密,从而能够为小颗粒业务的用户提供数据加密服务。并且,能够完善OTN中不同颗粒业务的加密,从而对任意用户业务均可支持加密,不介入用户业务,保证线速,实现端到端的安全管理。其中,加密后的OSU帧可以在OTN网络中透明传输,不影响OTN网络的监控管理。Based on the encrypted transmission method shown in any one of Fig. 10-Fig. 17, the sending end can encrypt multiple OSU frames within one encryption cycle and send multiple OSU frames. Wherein, when encrypting multiple OSU frames, the sending end may map the multiple encrypted OSU frames into the ODUk frame, so as to use the ODUk frame to carry the multiple encrypted OSU frames. In other words, the sender can separately encrypt part of the service data carried in the ODUk frame to improve data security. In addition, since the OSU frame can carry small-grain services, encrypting the OSU frame is equivalent to encrypting the small-grain services, thereby providing data encryption services for users of the small-grain services. In addition, it can improve the encryption of different granular services in the OTN, so that any user service can be encrypted without intervening in user services, ensuring line speed and realizing end-to-end security management. Among them, the encrypted OSU frame can be transparently transmitted in the OTN network without affecting the monitoring and management of the OTN network.
以上结合图10-图17详细说明了本申请实施例提供的加密传输方法。以下结合图10-图17详细说明用于执行本申请实施例提供的加密传输方法的加密传输装置。The encrypted transmission method provided by the embodiment of the present application has been described in detail above with reference to FIGS. 10-17 . The encrypted transmission device for implementing the encrypted transmission method provided by the embodiment of the present application will be described in detail below with reference to FIGS. 10-17 .
示例性地,图18是本申请实施例提供的加密传输装置的结构示意图一。如图18所示,加密传输装置1800包括:处理模块1801和收发模块1802。为了便于说明,图18仅示出了该加密传输装置的主要部件。Exemplarily, FIG. 18 is a first schematic structural diagram of an encryption transmission device provided by an embodiment of the present application. As shown in FIG. 18 , an encrypted transmission device 1800 includes: a processing module 1801 and a transceiver module 1802 . For ease of description, FIG. 18 only shows the main components of the encrypted transmission device.
一些实施例中,加密传输装置1800可适用于上文图1所述的网络架构,执行该网络架构中发送业务数据的OTN设备(即发送端)的功能。例如,假设图1所述网络架构中N1向N3发送业务数据,即N1为发送端,N3为接收端,那么加密传输装置1800可执行该网络架构中N1的功能。In some embodiments, the encrypted transmission device 1800 is applicable to the network architecture described in FIG. 1 above, and performs the function of an OTN device (that is, a sender) that sends service data in the network architecture. For example, assuming that N1 sends service data to N3 in the network architecture shown in FIG. 1 , that is, N1 is the sending end and N3 is the receiving end, then the encrypted transmission device 1800 can perform the function of N1 in the network architecture.
其中,处理模块1801,用于根据加解密控制信息,对一个加密周期内的多个数据逐一加密。收发模块1802,用于发送多个OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带加解密控制信息的指示信息。Wherein, the processing module 1801 is configured to encrypt multiple data in one encryption cycle one by one according to the encryption and decryption control information. The transceiver module 1802 is configured to send multiple OSU frames. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information of encryption and decryption control information.
一种可能的设计方案中,处理模块1801,还用于根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个数据的比特总数N,M、N均可以为正整数。处理模块1801,还用于使用多个密码块中的N个比特,对多个数据按位加密。In a possible design solution, the processing module 1801 is further configured to generate multiple cipher blocks according to the encryption and decryption control information. Wherein, the total number M of bits of multiple cipher blocks is greater than or equal to the total number N of bits of multiple data, and both M and N may be positive integers. The processing module 1801 is further configured to use the N bits in the multiple cipher blocks to encrypt multiple pieces of data bitwise.
可选地,处理模块1801,还用于使用N个比特中的第i比特,对多个数据中的第i比特加密。其中,i可以为正整数,i≤N。Optionally, the processing module 1801 is further configured to use the i-th bit in the N bits to encrypt the i-th bit in the plurality of data. Wherein, i can be a positive integer, i≤N.
一种可能的设计方案中,收发模块1802,还用于向接收端发送切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。In a possible design solution, the transceiver module 1802 is also configured to send switching indication information to the receiving end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
可选地,收发模块1802,还用于向接收端发送密钥切换请求信息。其中,密钥切换请求信息用于指示接收端反馈密钥切换确认信息。收发模块1802,还用于接收来自接收端的密钥切换确认信息。其中,密钥切换确认信息用于指示第三方面所述的加密传输装置发送切换指示信息。Optionally, the transceiver module 1802 is also configured to send key switching request information to the receiving end. Wherein, the key switching request information is used to instruct the receiving end to feed back key switching confirmation information. The transceiver module 1802 is also configured to receive key switching confirmation information from the receiving end. Wherein, the key switching confirmation information is used to instruct the encryption transmission device described in the third aspect to send switching instruction information.
可选地,收发模块1802,还用于接收来自接收端的密钥切换完成信息。其中,密钥切换完成信息用于指示接收端完成密钥切换。Optionally, the transceiver module 1802 is also configured to receive key switching completion information from the receiving end. Wherein, the key switching completion information is used to instruct the receiving end to complete the key switching.
一种可能的设计方案中,上述多个OSU帧携带认证信息,该认证信息由加解密控制信息和多个加密后的数据确定。In a possible design solution, the above multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
一些可能的实施例中,加密传输装置1800可适用于上文图1所述的网络架构,执行该网络架构中接收业务数据的OTN设备(即接收端)的功能。例如,假设图1所述网络架构中N1向N3发送业务数据,即N1为发送端,N3为接收端,那么加密传输装置1800可执行该网络架构中N3的功能。In some possible embodiments, the encrypted transmission device 1800 may be applicable to the network architecture described in FIG. 1 above, and perform the function of an OTN device (that is, a receiving end) receiving service data in the network architecture. For example, assuming that N1 sends service data to N3 in the network architecture shown in FIG. 1 , that is, N1 is the sending end and N3 is the receiving end, then the encrypted transmission device 1800 can perform the function of N3 in the network architecture.
其中,收发模块1802,用于接收一个加密周期内的多个OSU帧。其中,每个OSU帧携带一个加密后的数据,且多个OSU帧携带指示信息,指示信息用于指示加解密控制信息。处理模块1801,用于根据加解密控制信息,对多个加密后的数据逐一解密。Wherein, the transceiver module 1802 is configured to receive multiple OSU frames within one encryption cycle. Wherein, each OSU frame carries an encrypted data, and multiple OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information. The processing module 1801 is configured to decrypt multiple encrypted data one by one according to the encryption and decryption control information.
一种可能的设计方案中,处理模块1801,还用于根据加解密控制信息生成多个密码块。其中,多个密码块的比特总数M大于或等于多个加密后的数据的比特总数N,M、N均可以为正整数。处理模块1801,还用于使用多个密码块中的N个比特,对多个加密后的数据按位解密。In a possible design solution, the processing module 1801 is further configured to generate multiple cipher blocks according to the encryption and decryption control information. Wherein, the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and both M and N may be positive integers. The processing module 1801 is further configured to use the N bits in the multiple cipher blocks to decrypt multiple encrypted data bit by bit.
可选地,处理模块1801,还用于使用N个比特中的第i比特,对多个加密后的数据中的第i比特解密。其中,i可以为正整数,i≤N。Optionally, the processing module 1801 is further configured to use the i-th bit in the N bits to decrypt the i-th bit in the plurality of encrypted data. Wherein, i can be a positive integer, i≤N.
一种可能的设计方案中,收发模块1802,还用于接收来自发送端的切换指示信息。其中,切换指示信息用于指示下一个密钥周期的密钥,密钥周期可以包括多个加密周期。In a possible design solution, the transceiver module 1802 is also configured to receive switching instruction information from the sending end. Wherein, the switching indication information is used to indicate the key of the next key period, and the key period may include multiple encryption periods.
可选地,收发模块1802,还用于接收来自发送端的密钥切换请求信息。其中,密钥切换请求信息用于指示第四方面所述的加密传输装置反馈密钥切换确认信息。收发模块1802,还用于向发送端发送密钥切换确认信息。其中,密钥切换确认信息用于指示发送端发送切换指示信息。Optionally, the transceiver module 1802 is also configured to receive key switching request information from the sender. Wherein, the key switching request information is used to instruct the encryption transmission device described in the fourth aspect to feed back key switching confirmation information. The transceiver module 1802 is further configured to send key switching confirmation information to the sending end. Wherein, the key switching confirmation information is used to instruct the sender to send switching instruction information.
可选地,收发模块1802,还用于向发送端发送密钥切换完成信息。其中,密钥切换完成信息用于指示第四方面所述的加密传输装置完成密钥切换。Optionally, the transceiver module 1802 is also configured to send key switching completion information to the sender. Wherein, the key switching completion information is used to instruct the encryption transmission device described in the fourth aspect to complete the key switching.
一种可能的设计方案中,多个OSU帧携带认证信息,认证信息由加解密控制信息和多个加密后的数据确定。In a possible design solution, multiple OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and multiple encrypted data.
可选地,收发模块1802可以包括接收模块和发送模块(图18中未示出)。其中,发送模块用于实现加密传输装置1800的发送功能,接收模块用于实现加密传输装置1800的接收功能。Optionally, the transceiver module 1802 may include a receiving module and a sending module (not shown in FIG. 18 ). Wherein, the sending module is used to implement the sending function of the encrypted transmission device 1800 , and the receiving module is used to realize the receiving function of the encrypted transmission device 1800 .
可选地,加密传输装置1800还可以包括存储模块(图18中未示出),该存储模块存储 有程序或指令。当处理模块1801执行该程序或指令时,使得加密传输装置1800可以执行接收端的功能。Optionally, the encrypted transmission device 1800 may further include a storage module (not shown in FIG. 18 ), where programs or instructions are stored in the storage module. When the processing module 1801 executes the program or instruction, the encrypted transmission device 1800 can perform the function of the receiving end.
可选地,加密传输装置1800还可以包括存储模块(图18中未示出),该存储模块存储有程序或指令。当处理模块1801执行该程序或指令时,使得加密传输装置1800可以执行发送端的功能。Optionally, the encrypted transmission device 1800 may further include a storage module (not shown in FIG. 18 ), where programs or instructions are stored in the storage module. When the processing module 1801 executes the program or instruction, the encrypted transmission device 1800 can perform the function of the sending end.
应理解,加密传输装置1800中涉及的处理模块1801可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;收发模块1802可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。另外,上述处理模块1801也可以被称为处理单元,收发模块1802也可以被称为收发单元。It should be understood that the processing module 1801 involved in the encrypted transmission device 1800 may be implemented by a processor or a processor-related circuit component, and may be a processor or a processing unit; the transceiver module 1802 may be implemented by a transceiver or a transceiver-related circuit component, and may be transceiver or transceiver unit. In addition, the above-mentioned processing module 1801 may also be called a processing unit, and the transceiver module 1802 may also be called a transceiver unit.
需要说明的是,加密传输装置1800可以是OTN中的OTN设备,也可以是设置于上述OTN设备的芯片(系统)或其他部件或组件,或者包含该OTN设备的装置,本申请对此不做限定。It should be noted that the encrypted transmission device 1800 may be an OTN device in the OTN, or a chip (system) or other components or components installed in the above-mentioned OTN device, or a device including the OTN device, which is not covered by this application. limited.
此外,加密传输装置1800的技术效果可以参考上述方法实施例所述的加密传输方法的技术效果,此处不再赘述。In addition, for the technical effect of the encrypted transmission device 1800, reference may be made to the technical effect of the encrypted transmission method described in the foregoing method embodiments, which will not be repeated here.
示例性地,图19为本申请实施例提供的加密传输装置的结构示意图二。该加密传输装置可以是上述发送端或接收端,也可以是设置于发送端或接收端的芯片(系统)或其他部件或组件。如图19所示,加密传输装置1900可以包括处理器1901。可选地,加密传输装置1900还可以包括存储器1902和/或收发器1903。其中,处理器1901与存储器1902和收发器1903耦合,如可以通过通信总线连接。Exemplarily, FIG. 19 is a second structural schematic diagram of an encryption transmission device provided in an embodiment of the present application. The encrypted transmission device may be the above-mentioned sending end or receiving end, or may be a chip (system) or other components or components arranged at the sending end or receiving end. As shown in FIG. 19 , an encrypted transmission device 1900 may include a processor 1901 . Optionally, the encrypted transmission device 1900 may further include a memory 1902 and/or a transceiver 1903 . Wherein, the processor 1901 is coupled with the memory 1902 and the transceiver 1903, such as may be connected through a communication bus.
下面结合图19对加密传输装置1900的各个构成部件进行具体的介绍:The components of the encrypted transmission device 1900 will be specifically introduced below in conjunction with FIG. 19 :
其中,处理器1901是加密传输装置1900的控制中心,可以是一个处理器,也可以是多个处理元件的统称。例如,处理器1901是一个或多个中央处理器(central processing unit,CPU),也可以是特定集成电路(application specific integrated circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)。Wherein, the processor 1901 is the control center of the encrypted transmission device 1900, and may be one processor, or a general term for multiple processing elements. For example, the processor 1901 is one or more central processing units (central processing unit, CPU), may also be a specific integrated circuit (application specific integrated circuit, ASIC), or is configured to implement one or more An integrated circuit, for example: one or more microprocessors (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA).
可选地,处理器1901可以通过运行或执行存储在存储器1902内的软件程序,以及调用存储在存储器1902内的数据,执行加密传输装置1900的各种功能。Optionally, the processor 1901 may execute various functions of the encrypted transmission device 1900 by running or executing software programs stored in the memory 1902 and calling data stored in the memory 1902 .
在具体的实现中,作为一种实施例,处理器1901可以包括一个或多个CPU,例如图19中所示出的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 1901 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 19 .
在具体实现中,作为一种实施例,加密传输装置1900也可以包括多个处理器,例如图19中所示的处理器1901和处理器1904。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an example, the encrypted transmission apparatus 1900 may also include multiple processors, for example, the processor 1901 and the processor 1904 shown in FIG. 19 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
其中,所述存储器1902用于存储执行本申请方案的软件程序,并由处理器1901来控制执行,具体实现方式可以参考上述方法实施例,此处不再赘述。Wherein, the memory 1902 is used to store the software program for executing the solution of the present application, and the execution is controlled by the processor 1901 . The specific implementation may refer to the above-mentioned method embodiment, which will not be repeated here.
可选地,存储器1902可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器 (electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1902可以和处理器1901集成在一起,也可以独立存在,并通过加密传输装置1900的接口电路(图19中未示出)与处理器1901耦合,本申请实施例对此不作具体限定。Optionally, the memory 1902 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (random access memory, RAM) that can store information and Other types of dynamic storage devices for instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical discs storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or capable of carrying or storing desired program code in the form of instructions or data structures and any other medium that can be accessed by a computer, but is not limited to. The memory 1902 can be integrated with the processor 1901 or exist independently, and is coupled with the processor 1901 through an interface circuit (not shown in FIG. 19 ) of the encrypted transmission device 1900 , which is not specifically limited in this embodiment of the present application.
收发器1903,用于与其他加密传输装置之间的通信。例如,加密传输装置1900为客户端,收发器1903可以用于与服务器通信。The transceiver 1903 is used for communication with other encrypted transmission devices. For example, the encrypted transmission device 1900 is a client, and the transceiver 1903 can be used to communicate with the server.
可选地,收发器1903可以包括接收器和发送器(图19中未单独示出)。其中,接收器用于实现接收功能,发送器用于实现发送功能。Optionally, the transceiver 1903 may include a receiver and a transmitter (not separately shown in FIG. 19 ). Wherein, the receiver is used to realize the receiving function, and the transmitter is used to realize the sending function.
可选地,收发器1903可以和处理器1901集成在一起,也可以独立存在,并通过加密传输装置1900的接口电路(图19中未示出)与处理器1901耦合,本申请实施例对此不作具体限定。Optionally, the transceiver 1903 may be integrated with the processor 1901, or may exist independently, and be coupled with the processor 1901 through an interface circuit (not shown in FIG. 19 ) of the encryption transmission device 1900. This embodiment of the present application Not specifically limited.
需要说明的是,图19中示出的加密传输装置1900的结构并不构成对该加密传输装置的限定,实际的加密传输装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be noted that the structure of the encrypted transmission device 1900 shown in FIG. components, or different component arrangements.
此外,加密传输装置1900的技术效果可以参考上述方法实施例所述的加密传输方法的技术效果,此处不再赘述。In addition, for the technical effect of the encrypted transmission device 1900, reference may be made to the technical effect of the encrypted transmission method described in the foregoing method embodiments, which will not be repeated here.
本实施例还提供一种加密传输系统。该加密传输系统包括发送端和接收端。其中,发送端可以用于执行上述加密传输方法实施例中S1001、S1002,接收端可以用于执行上述加密传输方法中S1002、S1003。This embodiment also provides an encrypted transmission system. The encrypted transmission system includes a sending end and a receiving end. Wherein, the sending end may be used to execute S1001 and S1002 in the above encrypted transmission method embodiment, and the receiving end may be used to execute S1002 and S1003 in the above encrypted transmission method embodiment.
在本申请的描述中,除非另有说明,“至少一个”是指一个或多个,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the description of the present application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more than two. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not necessarily limit the difference.
另外,在本申请实施例中,“示例地”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。In addition, in the embodiments of the present application, words such as "exemplarily" and "for example" are used as examples, illustrations or descriptions. Any embodiment or design described herein as "example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of the word example is intended to present concepts in a concrete manner.
本申请实施例中,有时候下标如W
1可能会笔误为非下标的形式如W1,在不强调其区别时,其所要表达的含义是一致的。
In the embodiment of the present application, sometimes a subscript such as W 1 may be a clerical error into a non-subscript form such as W1. When the difference is not emphasized, the meanings they intend to express are consistent.
应理解,在本申请实施例中的处理器可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that the processor in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (digital signal processor, DSP), dedicated integrated Circuit (application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electronically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of random access memory (RAM) are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory Access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory Access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM).
上述实施例,可以全部或部分地通过软件、硬件(如电路)、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。The above-mentioned embodiments may be implemented in whole or in part by software, hardware (such as circuits), firmware, or other arbitrary combinations. When implemented using software, the above-described embodiments may be implemented in whole or in part in the form of computer program products. The computer program product comprises one or more computer instructions or computer programs. When the computer instruction or computer program is loaded or executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. 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 transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center that includes one or more sets of available media. The available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media. The semiconductor medium may be a solid state drive.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。It should be understood that the term "and/or" in this article is only an association relationship describing associated objects, which means that there may be three relationships, for example, A and/or B may mean: A exists alone, and A and B exist at the same time , there are three cases of B alone, where A and B can be singular or plural. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship, but it may also indicate an "and/or" relationship, which can be understood by referring to the context.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that, in various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, and should not be used in the embodiments of the present application. The implementation process constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装 置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.
Claims (29)
- 一种加密传输方法,其特征在于,包括:An encrypted transmission method, characterized in that, comprising:根据加解密控制信息,对一个加密周期内的多个数据逐一加密;Encrypt multiple data in one encryption period one by one according to the encryption and decryption control information;发送多个光业务单元OSU帧,每个OSU帧携带一个加密后的数据,且所述多个OSU帧携带所述加解密控制信息的指示信息。Send multiple optical service unit OSU frames, each OSU frame carries an encrypted data, and the multiple OSU frames carry indication information of the encryption and decryption control information.
- 根据权利要求1所述的方法,其特征在于,所述根据加解密控制信息,对一个加密周期内的多个数据逐一加密,包括:The method according to claim 1, wherein said encrypting a plurality of data in one encryption cycle one by one according to the encryption and decryption control information comprises:根据所述加解密控制信息生成多个密码块;所述多个密码块的比特总数M大于或等于所述多个数据的比特总数N,M、N均为正整数;Generate multiple cipher blocks according to the encryption and decryption control information; the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple data, and M and N are both positive integers;使用所述多个密码块中的N个比特,对所述多个数据按位加密。Bitwise encrypting the plurality of data by using N bits in the plurality of cipher blocks.
- 根据权利要求2所述的方法,其特征在于,所述使用所述多个密码块中的N个比特,对所述多个数据按位加密,包括:The method according to claim 2, wherein said using N bits in said plurality of cipher blocks to encrypt said plurality of data bit by bit comprises:使用所述N个比特中的第i比特,对所述多个数据中的第i比特加密,i为正整数,i≤N。Encrypting the i-th bit in the plurality of data by using the i-th bit in the N bits, i is a positive integer, i≤N.
- 根据权利要求1-3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-3, further comprising:向接收端发送切换指示信息,所述切换指示信息用于指示下一个密钥周期的密钥,所述密钥周期包括多个加密周期。Send switching indication information to the receiving end, where the switching indication information is used to indicate the key of the next key period, and the key period includes multiple encryption periods.
- 根据权利要求4所述的方法,其特征在于,在所述向接收端发送切换指示信息之前,所述方法还包括:The method according to claim 4, wherein, before sending the switching instruction information to the receiving end, the method further comprises:向所述接收端发送密钥切换请求信息,所述密钥切换请求信息用于指示所述接收端反馈密钥切换确认信息;Sending key switching request information to the receiving end, where the key switching request information is used to instruct the receiving end to feed back key switching confirmation information;接收来自所述接收端的所述密钥切换确认信息,所述密钥切换确认信息用于指示发送端发送所述切换指示信息。receiving the key switching confirmation information from the receiving end, where the key switching confirmation information is used to instruct the sending end to send the switching instruction information.
- 根据权利要求4或5所述的方法,其特征在于,在所述向接收端发送切换指示信息之后,所述方法还包括:The method according to claim 4 or 5, characterized in that, after sending the handover indication information to the receiving end, the method further comprises:接收来自所述接收端的密钥切换完成信息,所述密钥切换完成信息用于指示所述接收端完成密钥切换。receiving key switching completion information from the receiving end, where the key switching completion information is used to instruct the receiving end to complete key switching.
- 根据权利要求6所述的方法,其特征在于,所述多个OSU帧携带认证信息,所述认证信息由加解密控制信息和多个加密后的数据确定。The method according to claim 6, wherein the plurality of OSU frames carry authentication information, and the authentication information is determined by encryption and decryption control information and a plurality of encrypted data.
- 一种加密传输方法,其特征在于,包括:An encrypted transmission method, characterized in that, comprising:接收一个加密周期内的多个OSU帧,每个OSU帧携带一个加密后的数据,且所述多个OSU帧携带指示信息,所述指示信息用于指示加解密控制信息;receiving a plurality of OSU frames within an encryption period, each OSU frame carries an encrypted data, and the plurality of OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information;根据所述加解密控制信息,对多个加密后的数据逐一解密。According to the encryption and decryption control information, multiple encrypted data are decrypted one by one.
- 根据权利要求8所述的方法,其特征在于,所述根据所述加解密控制信息,对多个加密后的数据逐一解密,包括:The method according to claim 8, wherein said decrypting a plurality of encrypted data one by one according to said encryption and decryption control information comprises:根据所述加解密控制信息生成多个密码块;所述多个密码块的比特总数M大于或等于所述多个加密后的数据的比特总数N,M、N均为正整数;Generate multiple cipher blocks according to the encryption and decryption control information; the total number M of bits of the multiple cipher blocks is greater than or equal to the total number N of bits of the multiple encrypted data, and M and N are both positive integers;使用所述多个密码块中的N个比特,对所述多个加密后的数据按位解密。Using the N bits in the plurality of cipher blocks to decrypt the plurality of encrypted data bit by bit.
- 根据权利要求9所述的方法,其特征在于,所述使用所述多个密码块中的N个 比特,对所述多个加密后的数据按位解密,包括:The method according to claim 9, wherein said use of N bits in said plurality of cipher blocks to decrypt said plurality of encrypted data bitwise comprises:使用所述N个比特中的第i比特,对所述多个加密后的数据中的第i比特解密,i为正整数,i≤N。Using the i-th bit of the N bits to decrypt the i-th bit in the plurality of encrypted data, i is a positive integer, i≤N.
- 根据权利要求8-10中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-10, further comprising:接收来自发送端的切换指示信息,所述切换指示信息用于指示下一个密钥周期的密钥,所述密钥周期包括多个加密周期。Receive switching indication information from the sending end, where the switching indication information is used to indicate the key of the next key period, and the key period includes multiple encryption periods.
- 根据权利要求11所述的方法,其特征在于,在所述接收来自发送端的切换指示信息之前,所述方法还包括:The method according to claim 11, wherein, before receiving the handover indication information from the sending end, the method further comprises:接收来自所述发送端的密钥切换请求信息,所述密钥切换请求信息用于指示接收端反馈密钥切换确认信息;receiving key switching request information from the sending end, where the key switching request information is used to instruct the receiving end to feed back key switching confirmation information;向所述发送端发送所述密钥切换确认信息,所述密钥切换确认信息用于指示所述发送端发送所述切换指示信息。sending the key switching confirmation information to the sending end, where the key switching confirmation information is used to instruct the sending end to send the switching instruction information.
- 根据权利要求11或12所述的方法,其特征在于,在所述接收来自发送端的切换指示信息之后,所述方法还包括:The method according to claim 11 or 12, wherein after receiving the handover indication information from the sending end, the method further comprises:向所述发送端发送密钥切换完成信息,所述密钥切换完成信息用于指示接收端完成密钥切换。Send key switching completion information to the sending end, where the key switching completion information is used to instruct the receiving end to complete the key switching.
- 根据权利要求8-13中任一项所述的方法,其特征在于,所述多个OSU帧携带认证信息;其中,所述认证信息由加解密控制信息和多个加密后的数据确定。The method according to any one of claims 8-13, wherein the plurality of OSU frames carry authentication information; wherein the authentication information is determined by encryption and decryption control information and a plurality of encrypted data.
- 一种加密传输装置,其特征在于,包括:处理模块和收发模块;其中,An encrypted transmission device, characterized in that it includes: a processing module and a transceiver module; wherein,所述处理模块,用于根据加解密控制信息,对一个加密周期内的多个数据逐一加密;The processing module is used to encrypt multiple data in one encryption cycle one by one according to the encryption and decryption control information;所述收发模块,用于发送多个OSU帧,每个OSU帧携带一个加密后的数据,且所述多个OSU帧携带所述加解密控制信息的指示信息。The transceiver module is configured to send multiple OSU frames, each OSU frame carries an encrypted data, and the multiple OSU frames carry indication information of the encryption and decryption control information.
- 根据权利要求15所述的装置,其特征在于,所述处理模块,还用于根据所述加解密控制信息生成多个密码块;所述多个密码块的比特总数M大于或等于所述多个数据的比特总数N,M、N均为正整数;The device according to claim 15, wherein the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information; the total number M of bits of the multiple cipher blocks is greater than or equal to the multiple The total number of bits of data N, M, and N are all positive integers;所述处理模块,还用于使用所述多个密码块中的N个比特,对所述多个数据按位加密。The processing module is further configured to use the N bits in the plurality of cipher blocks to encrypt the plurality of data bit by bit.
- 根据权利要求16所述的装置,其特征在于,所述处理模块,还用于使用所述N个比特中的第i比特,对所述多个数据中的第i比特加密,i为正整数,i≤N。The device according to claim 16, wherein the processing module is further configured to use the i-th bit of the N bits to encrypt the i-th bit in the plurality of data, where i is a positive integer , i≤N.
- 根据权利要求15-17中任一项所述的装置,其特征在于,所述收发模块,还用于向接收端发送切换指示信息,所述切换指示信息用于指示下一个密钥周期的密钥,所述密钥周期包括多个加密周期。The device according to any one of claims 15-17, wherein the transceiver module is further configured to send switching instruction information to the receiving end, and the switching instruction information is used to indicate the encryption key of the next key period. key, the key period includes a plurality of encryption periods.
- 根据权利要求18所述的装置,其特征在于,所述收发模块,还用于向所述接收端发送密钥切换请求信息,所述密钥切换请求信息用于指示所述接收端反馈密钥切换确认信息;The device according to claim 18, wherein the transceiver module is further configured to send key switching request information to the receiving end, and the key switching request information is used to instruct the receiving end to feed back the key Toggle confirmation information;所述收发模块,还用于接收来自所述接收端的所述密钥切换确认信息,所述密钥切换确认信息用于指示所述装置发送所述切换指示信息。The transceiving module is further configured to receive the key switching confirmation information from the receiving end, and the key switching confirmation information is used to instruct the device to send the switching instruction information.
- 根据权利要求18或19所述的装置,其特征在于,所述收发模块,还用于接收 来自所述接收端的密钥切换完成信息,所述密钥切换完成信息用于指示所述接收端完成密钥切换。The device according to claim 18 or 19, wherein the transceiver module is further configured to receive key switching completion information from the receiving end, and the key switching completion information is used to indicate that the receiving end has completed Key switching.
- 一种加密传输装置,其特征在于,包括:处理模块和收发模块;其中,An encrypted transmission device, characterized in that it includes: a processing module and a transceiver module; wherein,所述收发模块,用于接收一个加密周期内的多个OSU帧,每个OSU帧携带一个加密后的数据,且所述多个OSU帧携带指示信息,所述指示信息用于指示加解密控制信息;The transceiver module is configured to receive a plurality of OSU frames within an encryption period, each OSU frame carries an encrypted data, and the plurality of OSU frames carry indication information, and the indication information is used to indicate encryption and decryption control information;所述处理模块,用于根据所述加解密控制信息,对多个加密后的数据逐一解密。The processing module is configured to decrypt a plurality of encrypted data one by one according to the encryption and decryption control information.
- 根据权利要求21所述的装置,其特征在于,所述处理模块,还用于根据所述加解密控制信息生成多个密码块;所述多个密码块的比特总数M大于或等于所述多个加密后的数据的比特总数N,M、N均为正整数;The device according to claim 21, wherein the processing module is further configured to generate multiple cipher blocks according to the encryption and decryption control information; the total number M of bits of the multiple cipher blocks is greater than or equal to the multiple The total number of bits of encrypted data N, M, and N are all positive integers;所述处理模块,还用于使用所述多个密码块中的N个比特,对所述多个加密后的数据按位解密。The processing module is further configured to use the N bits in the plurality of cipher blocks to decrypt the plurality of encrypted data bit by bit.
- 根据权利要求22所述的装置,其特征在于,所述处理模块,还用于使用所述N个比特中的第i比特,对所述多个加密后的数据中的第i比特解密,i为正整数,i≤N。The device according to claim 22, wherein the processing module is further configured to use the i-th bit in the N bits to decrypt the i-th bit in the plurality of encrypted data, i It is a positive integer, i≤N.
- 根据权利要求21-23中任一项所述的装置,其特征在于,所述收发模块,还用于接收来自发送端的切换指示信息,所述切换指示信息用于指示下一个密钥周期的密钥,所述密钥周期包括多个加密周期。The device according to any one of claims 21-23, wherein the transceiving module is further configured to receive switching indication information from the sending end, the switching indication information is used to indicate the encryption key of the next key period. key, the key period includes a plurality of encryption periods.
- 根据权利要求24所述的装置,其特征在于,所述收发模块,还用于接收来自所述发送端的密钥切换请求信息,所述密钥切换请求信息用于指示所述装置反馈密钥切换确认信息;The device according to claim 24, wherein the transceiver module is further configured to receive key switching request information from the sending end, and the key switching request information is used to instruct the device to feed back key switching confirmation information;所述收发模块,还用于向所述发送端发送所述密钥切换确认信息,所述密钥切换确认信息用于指示所述发送端发送所述切换指示信息。The transceiver module is further configured to send the key switching confirmation information to the sending end, and the key switching confirmation information is used to instruct the sending end to send the switching instruction information.
- 根据权利要求24或25所述的装置,其特征在于,所述收发模块,还用于向所述发送端发送密钥切换完成信息,所述密钥切换完成信息用于指示所述装置完成密钥切换。The device according to claim 24 or 25, wherein the transceiver module is further configured to send key switching completion information to the sending end, and the key switching completion information is used to instruct the device to complete encryption. key switch.
- 一种加密传输装置,其特征在于,包括:处理器,所述处理器与存储器耦合;An encrypted transmission device, characterized in that it includes: a processor coupled to a memory;所述处理器,用于执行所述存储器中存储的计算机程序,以使得所述加密传输装置执行如权利要求1-14中任一项所述的加密传输方法。The processor is configured to execute the computer program stored in the memory, so that the encrypted transmission device executes the encrypted transmission method according to any one of claims 1-14.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-14中任一项所述的加密传输方法。A computer-readable storage medium, characterized in that the computer-readable storage medium includes a computer program or instruction, and when the computer program or instruction is run on a computer, the computer executes the computer program described in claims 1-14. The encryption transmission method described in any one.
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-14中任一项所述的加密传输方法。A computer program product, characterized in that the computer program product comprises: a computer program or an instruction, when the computer program or instruction is run on a computer, the computer executes any one of claims 1-14 The encrypted transmission method described above.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110732933.X | 2021-06-29 | ||
CN202110732933.XA CN115549895A (en) | 2021-06-29 | 2021-06-29 | Encryption transmission method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023273712A1 true WO2023273712A1 (en) | 2023-01-05 |
Family
ID=84692496
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/094986 WO2023273712A1 (en) | 2021-06-29 | 2022-05-25 | Encryption transmission method and device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115549895A (en) |
WO (1) | WO2023273712A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117040846A (en) * | 2023-08-10 | 2023-11-10 | 广东九博科技股份有限公司 | Access type OTN device and data transmission encryption and decryption method thereof |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116961910B (en) * | 2023-07-11 | 2024-01-26 | 无锡摩芯半导体有限公司 | Hardware encryption and decryption realization method based on CAN bus transmission |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104718720A (en) * | 2012-10-17 | 2015-06-17 | 思科技术公司 | Timeslot encryption in an optical transport network |
US20160301669A1 (en) * | 2015-04-08 | 2016-10-13 | Microsemi Storage Solutions (U.S.), Inc. | Method and system for encrypting/decrypting payload content of an otn frame |
CN112929355A (en) * | 2021-01-29 | 2021-06-08 | 中兴通讯股份有限公司 | Safety management information processing method and device for optical transport network |
-
2021
- 2021-06-29 CN CN202110732933.XA patent/CN115549895A/en active Pending
-
2022
- 2022-05-25 WO PCT/CN2022/094986 patent/WO2023273712A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104718720A (en) * | 2012-10-17 | 2015-06-17 | 思科技术公司 | Timeslot encryption in an optical transport network |
US20160301669A1 (en) * | 2015-04-08 | 2016-10-13 | Microsemi Storage Solutions (U.S.), Inc. | Method and system for encrypting/decrypting payload content of an otn frame |
CN112929355A (en) * | 2021-01-29 | 2021-06-08 | 中兴通讯股份有限公司 | Safety management information processing method and device for optical transport network |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117040846A (en) * | 2023-08-10 | 2023-11-10 | 广东九博科技股份有限公司 | Access type OTN device and data transmission encryption and decryption method thereof |
CN117040846B (en) * | 2023-08-10 | 2024-08-02 | 广东九博科技股份有限公司 | Access type OTN device and data transmission encryption and decryption method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN115549895A (en) | 2022-12-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10567352B2 (en) | Flexible ethernet encryption systems and methods | |
EP3713158B1 (en) | Time transfer systems and methods over a stream of ethernet blocks | |
US10193688B2 (en) | Flexible Ethernet encryption systems and methods | |
US11101908B2 (en) | Service data transmission method and apparatus | |
US11489607B2 (en) | Methods and apparatus for configuring a flex ethernet node | |
WO2016184240A1 (en) | Method for implementing data transmission and optical channel transmission device | |
US10104047B2 (en) | Method and system for encrypting/decrypting payload content of an OTN frame | |
WO2018090856A1 (en) | Method and device for building flexible ethernet group | |
WO2019153253A1 (en) | Service data processing method and device in optical transport network | |
WO2023273712A1 (en) | Encryption transmission method and device | |
US20050177749A1 (en) | Method and architecture for security key generation and distribution within optical switched networks | |
Jain et al. | Physical layer group key agreement for automotive controller area networks | |
US11212265B2 (en) | Perfect forward secrecy (PFS) protected media access control security (MACSEC) key distribution | |
WO2020231877A1 (en) | Ethernet signal format using 256b/257b block encoding | |
WO2021244489A1 (en) | Method and apparatus for transmitting encryption control overhead in optical transport network | |
US10985847B2 (en) | Security over optical transport network beyond 100G | |
CN110248260B (en) | Method, device and system for processing Ethernet data in optical network | |
CN112929355A (en) | Safety management information processing method and device for optical transport network | |
JP5945244B2 (en) | Multiplex transmission system and multiple transmission method | |
US20230051477A1 (en) | Service Processing Method and Apparatus | |
CN115865499B (en) | Payload compatible encryption system of military and civil fusion optical transmission network based on slicing | |
WO2024046465A1 (en) | Data transmission method and apparatus | |
WO2024239888A1 (en) | Data security protection method and apparatus, and electronic device and computer-readable medium | |
JP2008281832A (en) | Common key encryption communication system and method, and PON transmitter and receiver used therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22831535 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22831535 Country of ref document: EP Kind code of ref document: A1 |