Ciphertext transmission method, device, equipment and medium based on confidentiality authentication mode

By using the ciphertext transmission method based on the confidentiality authentication mode in encrypted transmission, combining the counter mode and Galois mode, and using random numbers and authentication codes, the problem of insufficient transmission speed and security in the existing encrypted transmission technology is solved, and high efficiency is achieved. , reliable data transmission.

CN118300905BActive Publication Date: 2024-09-24ZHEJIANG CHINT INSTR & METER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410727703.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-24
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

Existing encrypted transmission technology has shortcomings in transmission speed and security. Attackers may intercept and replay encrypted messages, leading to unauthorized access or information leakage.

Method used

The ciphertext transmission method based on the confidentiality authentication mode is used, using random numbers as the initial vector, combined with the counter mode and Galois mode, to generate the key stream and authentication code to ensure the confidentiality and integrity of the data transmission, and perform double verification after identity authentication. layer verification.

Benefits of technology

It improves the security and reliability of communication transmission, prevents data tampering and unauthorized access, simplifies the decryption process, and improves transmission speed and data processing flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118300905B
    Figure CN118300905B
Patent Text Reader

Abstract

The present invention relates to the field of communication security technology, and discloses a ciphertext transmission method, device, equipment and medium based on a confidentiality authentication mode. The present invention provides a ciphertext transmission method based on a confidentiality authentication mode, which is applied to a data sending end and a data receiving end respectively. The data sending end obtains a random number transmitted by the receiving end as an initial vector, and encrypts the control command data in combination with a first key and additional authentication information, and generates a first authentication code to ensure the secure transmission of the data. The data receiving end performs identity authentication, and after the authentication is passed, receives the initial vector, key, authentication information and ciphertext of the data sending end, and calculates a second authentication code to verify the validity of the ciphertext. In this way, the two parties ensure the security of communication and the integrity of data through encryption, authentication code generation and comparison, and the use of random numbers, and effectively prevent unauthorized access and data tampering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication security technology, and in particular to a ciphertext transmission method, device, equipment and medium based on a confidentiality authentication mode. Background Art

[0002] Encrypted transmission is a very important technology in the field of communication security technology. Encrypted transmission is mainly implemented in two basic types, one is the encryption algorithm, and the other is the operation mode of the encryption algorithm. However, in the existing technology, if there is no appropriate operation mode, attackers may intercept encrypted messages and resend or replay them. This attack can lead to unauthorized access or information leakage in some cases. Therefore, the data transmission process with only encryption algorithms but no operation mode is unstable, unsafe and unreliable, and the transmission speed will also be greatly limited. Summary of the invention

[0003] In view of this, the present invention provides a ciphertext transmission method, device, equipment and medium based on a confidentiality authentication mode to solve how to improve the security and reliability of encrypted transmission in communication transmission while ensuring the transmission speed.

[0004] In a first aspect, the present invention provides a ciphertext transmission method based on a confidentiality authentication mode, which is applied to a data sending end, and the method includes:

[0005] When the identity authentication with the data receiving end is successful, a random number transmitted by the data receiving end is obtained as an initial vector;

[0006] Obtaining a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code;

[0007] Based on the confidentiality authentication mode, the ciphertext corresponding to the control command data to be transmitted is calculated using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and the additional authentication information is used to generate a first authentication code;

[0008] The initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code are transmitted to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

[0009] The embodiment of the present invention uses a random number as an initial vector to increase the randomness of the ciphertext, reduce the duplication of encryption keys, and prevent certain types of attacks; and after a one-time identity authentication, communication interaction between the two parties can be carried out without multiple identity authentications, thereby ensuring the transmission speed of communication data, by combining the transmission of ciphertext and additional authentication information; based on a confidentiality authentication mode combined with the transmission of ciphertext, additional authentication information, etc., the receiving end can verify the authentication code to determine the validity of the ciphertext, thereby achieving double-layer security protection for the transmitted data, while also ensuring that the data will not be tampered with during the transmission process, thereby further improving the data security and reliability during the communication transmission process.

[0010] In an optional implementation, when the identity authentication performed with the data receiving end is successful, before the step of obtaining the random number transmitted by the data receiving end as the initial vector, the method further includes:

[0011] Obtain a random number generated by itself, and encrypt the random number to obtain a first random number ciphertext;

[0012] The random number and the first random number ciphertext are transmitted to the data receiving end, so that the data receiving end performs identity authentication on the data sending end according to the random number and the first random number ciphertext.

[0013] The embodiment of the present invention uses encrypted random numbers in the identity authentication process, making the identity authentication information more complex and difficult to be cracked by a third party. The random number used in each authentication process is one-time, and even if someone intercepts the random number ciphertext data, it cannot be accessed, thereby effectively improving the security and reliability of identity authentication in communication ciphertext transmission.

[0014] In an optional implementation, the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode;

[0015] Based on the confidentiality authentication mode, the ciphertext corresponding to the control command data to be transmitted is calculated using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and the additional authentication information is used to generate a first authentication code, including:

[0016] Generate a key stream using an initial vector and a first key based on a CTR mode;

[0017] Performing an XOR operation on the key stream and the plaintext corresponding to the control command data to be transmitted bit by bit to calculate the ciphertext corresponding to the control command data to be transmitted;

[0018] A first authentication code is generated using the additional authentication information based on the Galois mode.

[0019] The confidentiality authentication mode of the embodiment of the present invention includes a CTR mode. The above-mentioned CTR mode does not directly use a key to encrypt the plaintext, but generates a key stream and performs an XOR operation with the plaintext data to encrypt the data to ensure the confidentiality of the data. Because there is no key stream, an attacker cannot restore the plaintext data; and the Galois mode can generate an authentication code for the data receiving end to verify whether the integrity and source of the data are legal and valid. The method of combining the CTR mode and the Galois mode can effectively enhance the confidentiality of the plaintext content of the communication data.

[0020] In an optional embodiment, the control command data to be transmitted includes at least: parameter setting command data, operation command data and key update command data, and the parameter setting command data, operation command data and key update command data all enable the data receiving end to execute corresponding parameter setting commands, operation commands and key update commands according to the corresponding plain texts of the control command data.

[0021] In the embodiment of the present invention, different types of command data can be distinguished and encrypted for transmission at the data receiving end according to different operation and configuration requirements. Different operations can be performed on different command data when data is received, reducing the risk of erroneous command execution.

[0022] In a second aspect, the present invention provides a ciphertext transmission method based on a confidentiality authentication mode, which is applied to a data receiving end, and the method comprises: performing identity authentication with a data sending end, and if the identity authentication is successful, transmitting a random number generated by itself to the data sending end;

[0023] Obtaining the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end;

[0024] Based on the confidentiality authentication mode, a second authentication code is calculated using the additional authentication information; the second authentication code is compared with the first authentication code, and if the second authentication code is the same as the first authentication code, the ciphertext is determined to be valid;

[0025] Based on the confidentiality authentication mode, the plain text corresponding to the control command data is calculated using the initial vector, the first key and the cipher text corresponding to the control command data, so as to execute the corresponding control command according to the plain text.

[0026] The embodiment of the present invention uses identity authentication and dual authentication codes (first authentication code and second authentication code) so that the data receiving end can effectively verify the legitimacy of the ciphertext, and compares the second authentication code calculated using the additional authentication information with the first authentication code provided by the data sending end, thereby preventing data tampering and effectively ensuring the security of communication data; at the same time, based on the confidentiality authentication mode, the plaintext corresponding to the control command data is calculated using the initial vector, the first key and the ciphertext corresponding to the control command data, thereby simplifying the decryption process on the basis of ensuring data security and effectiveness, improving the decryption speed, and ensuring the integrity, reliability and security of the data.

[0027] In an optional implementation, performing identity authentication with the data sending end includes:

[0028] Obtaining a random number and a first random number ciphertext transmitted by a data sending end;

[0029] Encrypting the random number transmitted by the data sending end to obtain a second random number ciphertext;

[0030] The second random number ciphertext is compared with the first random number ciphertext. If the second random number ciphertext is the same as the first random number ciphertext, it is confirmed that the identity authentication with the data sending end is successful; if the second random number ciphertext is different from the first random number ciphertext, it is confirmed that the identity authentication with the data sending end has failed.

[0031] The embodiment of the present invention prevents the intermediate process from being attacked by comparing the random number ciphertext transmitted by the sending end with the random number ciphertext encrypted by the receiving end. The receiving end re-encrypts the random number according to the encryption process and compares the ciphertext. The data receiving end also implements double verification (first random number ciphertext, second random number ciphertext) in the identity authentication. On the basis of ensuring data security, the authentication process is simplified.

[0032] In an optional implementation, the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode;

[0033] Based on the confidentiality authentication mode, a second authentication code is calculated using the additional authentication information, including:

[0034] generating a second authentication code based on the Galois mode using the additional authentication information;

[0035] Based on the confidentiality authentication mode, the plain text corresponding to the control command data is calculated using the initial vector, the first key and the cipher text corresponding to the control command data, including:

[0036] Generate a key stream using an initial vector and a first key based on a CTR mode;

[0037] The key stream and the ciphertext corresponding to the control command data are subjected to an XOR operation bit by bit to calculate the plaintext corresponding to the control command data.

[0038] The receiving end of the embodiment of the present invention uses the CTR mode. This mode does not directly use the key to encrypt the plaintext directly, but generates a key stream and performs an XOR operation with the plaintext data to encrypt the data. The receiving end uses the same operation to perform an XOR operation on the data of the sending end, and the plaintext can be directly obtained. Different from the complex decryption mechanism, the decryption process is simplified, and fast decryption can be achieved at the receiving end, while ensuring the confidentiality of the data, because without the key stream, the attacker cannot restore the plaintext data; the Galois mode can generate an authentication code, realize the verification of the sending end data, and effectively enhance the confidentiality of the plaintext content of the communication data.

[0039] In an optional implementation manner, the control command data at least includes: parameter setting command data, operation command data and key update command data;

[0040] The method also includes: executing corresponding parameter setting commands, operation commands and key updating commands according to the plain text corresponding to the parameter setting command data, the plain text corresponding to the operation command data and the plain text corresponding to the key updating command data.

[0041] In the embodiment of the present invention, different types of command data can be distinguished and received at the data receiving end according to different operation and configuration requirements. The receiving end can process and execute various types of control commands, realize multiple functions, and improve the flexibility of data processing at the receiving end.

[0042] In a third aspect, the present invention provides a ciphertext transmission device based on a confidentiality authentication mode, based on a data transmitting end, the device comprises: a vector acquisition module, for acquiring a random number transmitted by the data receiving end as an initial vector when the identity authentication with the data receiving end is successful;

[0043] A key and authentication information acquisition module, used to acquire a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code;

[0044] A ciphertext and authentication code generation module, used to calculate the ciphertext corresponding to the control command data to be transmitted based on the confidentiality authentication mode, using the plaintext corresponding to the control command data to be transmitted, as well as the initial vector and the first key, and to generate a first authentication code using the additional authentication information;

[0045] The data transmission module is used to transmit the initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

[0046] In a fourth aspect, the present invention provides a ciphertext transmission device based on a confidentiality authentication mode, based on a data receiving end, the device comprises: a vector transmission module, used to perform identity authentication with a data sending end, and if the identity authentication is successful, transmit a random number generated by itself to the data sending end;

[0047] A communication data acquisition module, used to acquire the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end;

[0048] The ciphertext authentication module is used to calculate a second authentication code based on the confidentiality authentication mode using the additional authentication information; compare the second authentication code with the first authentication code, and if the second authentication code is the same as the first authentication code, determine that the ciphertext is valid;

[0049] The ciphertext decryption module is used to calculate the plaintext corresponding to the control command data by using the initial vector, the first key and the ciphertext corresponding to the control command data based on the confidentiality authentication mode, so as to execute the corresponding control command according to the plaintext.

[0050] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above-mentioned first aspect or second aspect, as well as any corresponding implementation method of the ciphertext transmission method based on the confidentiality authentication mode by executing the computer instructions.

[0051] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the above-mentioned first aspect or second aspect, and any corresponding implementation of the ciphertext transmission method based on the confidentiality authentication mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1is a flow chart of a ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0054] Figure 2 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0055] Figure 3 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0056] Figure 4 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0057] Figure 5 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0058] Figure 6 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0059] Figure 7 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0060] Figure 8 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0061] Fig. 9 is a flow chart of another ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention;

[0062] Fig.10 is a structural block diagram of a ciphertext transmission device based on a confidentiality authentication mode according to an embodiment of the present invention;

[0063] Fig.11 is a structural block diagram of another ciphertext transmission device based on a confidentiality authentication mode according to an embodiment of the present invention;

[0064] Fig.12 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0066] According to an embodiment of the present invention, an embodiment of a ciphertext transmission method based on a confidentiality authentication mode is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0067] In this embodiment, a ciphertext transmission method based on a confidentiality authentication mode is provided, which is based on a data sending end and can be used in the above-mentioned computer. Figure 1 is a flow chart of a ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0068] Step S101, when the identity authentication with the data receiving end is successful, a random number transmitted by the data receiving end is obtained as an initial vector.

[0069] It should be noted that the data sender refers to the corresponding entity that sends encrypted data, which can be a client device, server, management device, etc. The data receiver refers to any entity that receives and processes encrypted data, such as a server, network device, physical device, etc. The initial vector refers to the data block used in the encryption process to increase the encryption strength of the plaintext. The initial vector is random and unique.

[0070] For example, the power company's main station (data transmitter) sends a control parameter modification instruction to the remote meter (data receiver). Before sending the instruction, the main station first authenticates the meter to confirm that the identities of both parties are legitimate. After the authentication is successful, the meter generates a random number and sends it to the main station. The main station uses this random number as the initial vector IV for the subsequent encryption process.

[0071] Step S102, obtaining a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code.

[0072] It should be noted that additional authentication information refers to additional data used to generate authentication codes, such as timestamps, serial numbers, etc., in order to provide security verification in addition to plain text command data for generating authentication codes. The first key refers to a key shared between the data sender and the data receiver. Both parties generate a key through a secure key exchange algorithm key exchange protocol, or the data sender can directly transmit the shared key.

[0073] Exemplarily, the master station uses an initial key K shared with the meter, which may be pre-set during initial configuration of the device. At the same time, the master station prepares additional authentication information, such as a current timestamp as an additional authentication information, to ensure the timeliness of the control instruction.

[0074] Step S103, based on the confidentiality authentication mode, the ciphertext corresponding to the control command data to be transmitted is calculated using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and the additional authentication information is used to generate a first authentication code.

[0075] It is understandable that the confidentiality-based authentication method includes not only the encryption process, but also the authentication process, ensuring the confidentiality, integrity and authenticity of the data. The authentication code is generated using the additional authentication information to verify the integrity and legality of the data at the data receiving end.

[0076] Exemplarily, the master station uses the initial vector IV, the first key K and the plaintext P of the control parameter modification instruction to calculate the corresponding ciphertext CODE. In addition, using additional authentication information, the master station also generates a first authentication code T to verify the integrity and legality of the data later.

[0077] Step S104, transmitting the initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

[0078] The embodiment of the present invention uses a random number as an initial vector to increase the randomness of the ciphertext, reduce the duplication of encryption keys, and prevent certain types of attacks; and after a one-time identity authentication, communication interaction between the two parties can be carried out without multiple identity authentications, thereby ensuring the transmission speed of communication data, by combining the transmission of ciphertext and additional authentication information; based on a confidentiality authentication mode combined with the transmission of ciphertext, additional authentication information, etc., the receiving end can verify the authentication code to determine the validity of the ciphertext, thereby achieving double-layer security protection for the transmitted data, while also ensuring that the data will not be tampered with during the transmission process, thereby further improving the data security and reliability during the communication transmission process.

[0079] In this embodiment, a ciphertext transmission method based on a confidentiality authentication mode is provided, which can be used for the above-mentioned computer. Figure 2 is a flow chart of a ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0080] Step S201, obtain a random number generated by itself, and encrypt the random number to obtain a first random number ciphertext.

[0081] It should be noted that the random number generated by the data sending end is used for subsequent encryption operations and identity authentication. It is a random number sent to the data receiving end. The random number transmitted by the data receiving end is used as an initial vector to respond to the sender's request. It is sent to the sender after successful identity authentication. The two random numbers are not the same random number and their respective uses are also different.

[0082] Step S202: transmitting the random number and the first random number ciphertext to the data receiving end, so that the data receiving end performs identity authentication on the data sending end according to the random number and the first random number ciphertext.

[0083] It is understandable that the encryption of random numbers is mainly used to safely transmit random numbers on an unsecured transmission channel before authentication, for the process of identity authentication. Therefore, it is only necessary to use ordinary symmetric encryption and wait for the receiving end to crack the authentication. The encryption in the confidentiality authentication mode not only encrypts the data, but also ensures the integrity and validity of the data. It transmits data on a secure transmission channel after identity authentication. This confidentiality authentication encryption mode has a more obvious security effect than the ordinary encryption mode.

[0084] The embodiment of the present invention uses encrypted random numbers in the identity authentication process, making the identity authentication information more complex and difficult to be cracked by a third party. The random number used in each authentication process is one-time, and even if someone intercepts the random number ciphertext data, it cannot be accessed, thereby effectively improving the security and reliability of identity authentication in communication ciphertext transmission.

[0085] Step S203: When the identity authentication with the data receiving end is successful, the random number transmitted by the data receiving end is obtained as the initial vector. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0086] Step S204, obtain the first key and additional authentication information; wherein the first key represents the initial key stored by the data sending end, and the additional authentication information is used to generate the authentication code. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0087] Step S205, based on the confidentiality authentication mode, the ciphertext corresponding to the control command data to be transmitted is calculated using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and the additional authentication information is used to generate a first authentication code.

[0088] The confidentiality authentication mode includes a counter mode and a Galois mode; the counter mode is a CTR mode, and the Galois mode is a Galois mode;

[0089] It should be noted that the confidentiality authentication mode is the GCM mode (Galois / Counter Mode). The CTR mode refers to a symmetric key encryption mode that performs an XOR operation on a plaintext data block and a continuous key stream generated by the encryption algorithm. If only the CTR mode is used, authentication checks cannot be performed. The Galois mode is an operation mode that uses the message authentication data (additional authentication information) on the Galois field to generate an authentication code. Combined with the CTR mode, it can provide complete data confidentiality and authentication.

[0090] Specifically, the above step S205 includes:

[0091] Step S2051: Generate a key stream using an initial vector and a first key based on the CTR mode.

[0092] Exemplarily, the initial vector IV and the first key K are used to generate a key stream. The CTR mode uses the IV as a counter, increases the counter by 1 each time a block of data is encrypted, and then encrypts the counter value with the key to generate a key stream of the same length as the plaintext.

[0093] Step S2052, performing an XOR operation on the key stream and the plaintext corresponding to the control command data to be transmitted bit by bit, and calculating the ciphertext corresponding to the control command data to be transmitted.

[0094] Exemplarily, the generated key stream is subjected to bit-by-bit XOR operation with the plain text P of the control command data to be transmitted to generate the ciphertext C.

[0095] Step S2053: Generate a first authentication code based on the Galois mode using the additional authentication information.

[0096] Exemplarily, additional authentication information (a timestamp) is used to generate a first authentication code T based on a Galois pattern (the pattern may use an authentication code calculation method of a Galois field), and the first authentication code is used to verify the integrity of the data and whether the source is legitimate.

[0097] Step S206: transmit the initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0098] The confidentiality authentication mode of the embodiment of the present invention includes a CTR mode. The above-mentioned CTR mode does not directly use a key to encrypt the plaintext, but generates a key stream and performs an XOR operation with the plaintext data to encrypt the data to ensure the confidentiality of the data. Because there is no key stream, an attacker cannot restore the plaintext data; and the Galois mode can generate an authentication code for the data receiving end to verify whether the integrity and source of the data are legal and valid. The method of combining the CTR mode and the Galois mode can effectively enhance the confidentiality of the plaintext content of the communication data.

[0099] In an optional embodiment, the control command data to be transmitted includes at least: parameter setting command data, operation command data and key update command data, and the parameter setting command data, operation command data and key update command data all enable the data receiving end to execute corresponding parameter setting commands, operation commands and key update commands according to the corresponding plain texts of the control command data.

[0100] For example, if there are commands for the power company's master station to control the meter, these commands may include parameter setting commands (such as configuring the meter's measurement unit, adjusting the meter's data collection frequency, etc.), operation commands (remote power off or power on commands), and key update commands (sending a new encryption key to the meter). Encrypted transmission based on the confidentiality authentication mode ensures the security of command data transmission and the legality and validity of the source, so that the master station can remotely control the meter safely and effectively.

[0101] In the embodiment of the present invention, different types of command data can be distinguished and encrypted for transmission at the data receiving end according to different operation and configuration requirements. Different operations can be performed on different command data when data is received, reducing the risk of erroneous command execution.

[0102] In this embodiment, a ciphertext transmission method based on a confidentiality authentication mode is also provided, which can be used in the above-mentioned computer based on a data receiving end. Figure 3 is a flow chart of a ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0103] Step S301, perform identity authentication with the data sending end, and if the identity authentication is successful, transmit the random number generated by itself to the data sending end.

[0104] For example, when the power company's main station performs identity authentication, once the meter verifies the identity of the main station, a random number is generated and sent back to the main station, and the random number can be used as an initialization vector IV.

[0105] Step S302: Acquire the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end.

[0106] Step S303, based on the confidentiality authentication mode, a second authentication code is calculated using the additional authentication information; the second authentication code is compared with the first authentication code, and if the second authentication code is the same as the first authentication code, the ciphertext is determined to be valid.

[0107] It is understandable that after receiving the data sent by the main station, the electric meter will use the same shared key and the additional authentication information received to calculate an authentication code T1 (second authentication code) by itself. The electric meter will compare this newly calculated second authentication code with the first authentication code received from the main station. If the two authentication codes match, it proves that the received ciphertext is complete and has not been tampered with, thereby verifying the integrity and validity of the data.

[0108] Step S304, based on the confidentiality authentication mode, the plain text corresponding to the control command data is calculated using the initial vector, the first key and the cipher text corresponding to the control command data, so as to execute the corresponding control command according to the plain text.

[0109] Exemplarily, after the authentication codes are consistent, the electric meter will use the received initial vector and shared key to decrypt the ciphertext, restore the plaintext control command, and then the electric meter will perform corresponding operations according to these decrypted instructions.

[0110] The embodiment of the present invention uses identity authentication and dual authentication codes (first authentication code and second authentication code) so that the data receiving end can effectively verify the legitimacy of the ciphertext, and compares the second authentication code calculated using the additional authentication information with the first authentication code provided by the data sending end, thereby preventing data tampering and effectively ensuring the security of communication data; at the same time, based on the confidentiality authentication mode, the plaintext corresponding to the control command data is calculated using the initial vector, the first key and the ciphertext corresponding to the control command data, thereby simplifying the decryption process on the basis of ensuring data security and effectiveness, improving the decryption speed, and ensuring the integrity, reliability and security of the data.

[0111] In this embodiment, a ciphertext transmission method based on a confidentiality authentication mode is provided, which can be used for the above-mentioned computer. Figure 4is a flow chart of a ciphertext transmission method based on a confidentiality authentication mode according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0112] Step S401, perform identity authentication with the data sending end, and if the identity authentication is successful, transmit the random number generated by itself to the data sending end.

[0113] Specifically, the above step S401 includes:

[0114] Step S4011, obtaining a random number and a first random number ciphertext transmitted by a data sending end.

[0115] Step S4012, encrypt the random number transmitted by the data sending end to obtain a second random number ciphertext.

[0116] Step S4013, compare the second random number ciphertext with the first random number ciphertext. If the second random number ciphertext is the same as the first random number ciphertext, it is confirmed that the identity authentication with the data sending end is successful; if the second random number ciphertext is different from the first random number ciphertext, it is confirmed that the identity authentication with the data sending end has failed.

[0117] Step S4014: If the identity authentication is successful, the random number generated by itself is transmitted to the data sending end.

[0118] Exemplarily, a data receiving end (such as a remote electric meter) receives a random number and its corresponding ciphertext form from a data sending end (such as a power company main station). The receiving end uses the same encryption algorithm and key as the sending end to encrypt the received random number and generate a second random number ciphertext. It can verify whether the received random number has been sent by a legitimate sending end. The receiving end uses encryption verification instead of decryption authentication to ensure the legitimacy of the identities of both parties. There is no need to contact the plaintext data. The entire process is verified through ciphertext to ensure data security. The receiving end compares the second random number ciphertext generated by itself with the first random number ciphertext received from the sending end. If the two are the same, it means that the identity of the sending end has been verified, and the random number is also confirmed to be safe and not tampered with. Once the identity authentication is successful, that is, the second random number ciphertext matches the first random number ciphertext, the receiving end transmits the random number generated by itself to the sending end.

[0119] The embodiment of the present invention prevents the intermediate process from being attacked by comparing the random number ciphertext transmitted by the sending end with the random number ciphertext encrypted by the receiving end. The receiving end re-encrypts the random number according to the encryption process and compares the ciphertext. The data receiving end also implements double verification (first random number ciphertext, second random number ciphertext) in the identity authentication. On the basis of ensuring data security, the authentication process is simplified.

[0120] Step S402: Acquire the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end.

[0121] Step S403, based on the confidentiality authentication mode, a second authentication code is calculated using the additional authentication information; the second authentication code is compared with the first authentication code, and if the second authentication code is the same as the first authentication code, the ciphertext is determined to be valid.

[0122] The confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode and the Galois mode is a Galois mode;

[0123] Specifically, the above step S403 includes:

[0124] Step S4031, generating a second authentication code based on the Galois mode using the additional authentication information; comparing the second authentication code with the first authentication code, if the second authentication code is the same as the first authentication code, determining that the ciphertext is valid.

[0125] In the embodiment of the present invention, the implementation principle of step S4031 is shown in Figure 2 Step S2053 is not described here in detail.

[0126] Step S404, based on the confidentiality authentication mode, the plain text corresponding to the control command data is calculated using the initial vector, the first key and the cipher text corresponding to the control command data, so as to execute the corresponding control command according to the plain text.

[0127] Specifically, the above step S404 includes:

[0128] Step S4041: Generate a key stream using an initial vector and a first key based on the CTR mode.

[0129] Step S4042, performing an XOR operation on the key stream and the ciphertext corresponding to the control command data bit by bit to calculate the plaintext corresponding to the control command data.

[0130] In the embodiment of the present invention, the implementation principle of step S4041 and step S4042 is shown in Figure 2 Steps S2051 and S2052 are not described in detail here.

[0131] In an optional embodiment, after the identity authentication succeeds or fails, the identity authentication data is responded to the data sending end according to the communication protocol format; after comparing the second authentication code with the first authentication code to be the same or different, the ciphertext authentication data is responded to the data sending end according to the communication protocol format.

[0132] The receiving end of the embodiment of the present invention uses the CTR mode. This mode does not directly use the key to encrypt the plaintext directly, but generates a key stream and performs an XOR operation with the plaintext data to encrypt the data. The receiving end uses the same operation to perform an XOR operation on the data of the sending end, and the plaintext can be directly obtained. Different from the complex decryption mechanism, the decryption process is simplified, and fast decryption can be achieved at the receiving end, while ensuring the confidentiality of the data, because without the key stream, the attacker cannot restore the plaintext data; the Galois mode can generate an authentication code, realize the verification of the sending end data, and effectively enhance the confidentiality of the plaintext content of the communication data.

[0133] In an optional implementation manner, the control command data includes at least: parameter setting command data, operation command data and key update command data; the method also includes: executing corresponding parameter setting commands, operation commands and key update commands according to the plaintext corresponding to the parameter setting command data, the plaintext corresponding to the operation command data and the plaintext corresponding to the key update command data.

[0134] In the embodiment of the present invention, different types of command data can be distinguished and received at the data receiving end according to different operation and configuration requirements. The receiving end can process and execute various types of control commands, realize multiple functions, and improve the flexibility of data processing at the receiving end.

[0135] In the embodiment of the present invention, an embodiment of the entire communication transmission process between the data sending end and the data receiving end can refer to Figure 5 , the encryption party needs four inputs: vector IV, additional authentication information AAD, key K and plaintext P. The decryption party needs five pieces of data information: vector IV, additional authentication information AAD, key K and ciphertext C, and the first authentication code T.

[0136] In another embodiment of the present invention, the entire process of communication transmission between the data transmitting end and the data receiving end can be referred to Figure 6 , identity authentication is performed, the master station sends a random number 1 and a ciphertext, the meter encrypts the random number according to the key, and after the obtained ciphertext is consistent, the authentication is successful, and the response random number 2 is used as the subsequent initialization vector IV.

[0137] In another embodiment of the present invention, the entire process of communication transmission between the data transmitting end and the data receiving end can be referred to Figure 7 , parameter setting transmission is carried out, the communicating parties save the initialization vector IV, encrypt the data with the key and the initialization vector IV, and transmit the data in the format of ciphertext + authentication code T. The meter compares the calculated authentication code T' (i.e., the second authentication code) with the received T. If they are the same, the ciphertext is further decrypted. After executing the corresponding parameter setting operation, a response is given.

[0138] In another embodiment of the present invention, the entire process of communication transmission between the data transmitting end and the data receiving end can be referred to Figure 8 , the key update command is transmitted, the communicating parties save the initialization vector IV, encrypt the key data with the key and the initialization vector IV, and transmit the data in the format of ciphertext + authentication code T. The meter compares the calculated authentication code T' (i.e., the second authentication code) with the received T. If they are the same, the ciphertext is further decrypted. After executing the corresponding key update operation, a response is given.

[0139] In another embodiment of the present invention, the entire process of communication transmission between the data transmitting end and the data receiving end can be referred to Fig. 9 , and transmit other control commands. The communicating parties save the initialization vector IV, use the key and the initialization vector IV to encrypt the switch command word and the deadline data, and transmit data in the format of ciphertext + authentication code T. The meter compares the calculated authentication code T' (i.e., the second authentication code) with the received T. If they are the same, the ciphertext is further decrypted. After executing the corresponding operation, a response is given.

[0140] In this embodiment, a ciphertext transmission device based on a confidentiality authentication mode is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0141] This embodiment provides a ciphertext transmission device based on a confidentiality authentication mode, such as Fig.10 As shown, including:

[0142] The vector acquisition module 1001 is used to acquire a random number transmitted by the data receiving end as an initial vector when the identity authentication with the data receiving end is successful;

[0143] The key and authentication information acquisition module 1002 is used to acquire a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code;

[0144] The ciphertext and authentication code generation module 1003 is used to calculate the ciphertext corresponding to the control command data to be transmitted based on the confidentiality authentication mode, using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and to generate the first authentication code using the additional authentication information;

[0145] The data transmission module 1004 is used to transmit the initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

[0146] In some optional embodiments, the above device further includes:

[0147] A random number encryption module, used to obtain a random number generated by itself, and encrypt the random number to obtain a first random number ciphertext;

[0148] The random number transmission module is used to transmit the random number and the first random number ciphertext to the data receiving end, so that the data receiving end performs identity authentication on the data sending end according to the random number and the first random number ciphertext.

[0149] In some optional implementations, the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode; the ciphertext and authentication code generation module 1003 includes:

[0150] A key stream generating unit, configured to generate a key stream using an initial vector and a first key based on a CTR mode;

[0151] A ciphertext encryption unit, used for performing an XOR operation on the key stream and the plaintext corresponding to the control command data to be transmitted bit by bit, and calculating the ciphertext corresponding to the control command data to be transmitted;

[0152] The authentication code generating unit is used to generate a first authentication code based on the Galois mode using the additional authentication information.

[0153] In some optional implementations, the control command data to be transmitted includes at least: parameter setting command data, operation command data and key update command data, and the parameter setting command data, operation command data and key update command data all enable the data receiving end to execute corresponding parameter setting commands, operation commands and key update commands according to the corresponding plain texts of the control command data.

[0154] In this embodiment, a ciphertext transmission device based on a confidentiality authentication mode is also provided. Based on a data receiving end, the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0155] This embodiment provides a ciphertext transmission device based on a confidentiality authentication mode, such as Fig.11 As shown, including:

[0156] The vector transmission module 1101 is used to perform identity authentication with the data transmission end, and if the identity authentication is successful, transmit the random number generated by itself to the data transmission end;

[0157] The communication data acquisition module 1102 is used to acquire the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end;

[0158] The ciphertext authentication module 1103 is used to calculate a second authentication code based on the confidentiality authentication mode using the additional authentication information; compare the second authentication code with the first authentication code, and if the second authentication code is the same as the first authentication code, determine that the ciphertext is valid;

[0159] The ciphertext decryption module 1104 is used to calculate the plaintext corresponding to the control command data using the initial vector, the first key and the ciphertext corresponding to the control command data based on the confidentiality authentication mode, so as to execute the corresponding control command according to the plaintext.

[0160] In some optional implementations, the vector transmission module 1101 includes:

[0161] A random number acquisition unit, used to acquire a random number and a first random number ciphertext transmitted by a data sending end;

[0162] A random number encryption unit, used to encrypt the random number transmitted by the data sending end to obtain a second random number ciphertext;

[0163] The identity authentication unit is used to compare the second random number ciphertext with the first random number ciphertext. If the second random number ciphertext is the same as the first random number ciphertext, it is confirmed that the identity authentication with the data sending end is successful; if the second random number ciphertext is different from the first random number ciphertext, it is confirmed that the identity authentication with the data sending end has failed.

[0164] In some optional implementations, the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode;

[0165] Based on the confidentiality authentication mode, calculating the second authentication code using the additional authentication information includes: generating the second authentication code using the additional authentication information based on the Galois mode;

[0166] Based on the confidentiality authentication mode, the plaintext corresponding to the control command data is calculated using the initial vector, the first key and the ciphertext corresponding to the control command data, including: generating a key stream based on the CTR mode using the initial vector and the first key; performing an XOR operation on the key stream and the ciphertext corresponding to the control command data bit by bit to calculate the plaintext corresponding to the control command data.

[0167] In some optional implementations, the control command data at least includes: parameter setting command data, operation command data and key update command data; the device further includes:

[0168] The command execution module is used to execute corresponding parameter setting commands, operation commands and key updating commands according to the plain text corresponding to the parameter setting command data, the plain text corresponding to the operation command data and the plain text corresponding to the key updating command data.

[0169] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0170] The ciphertext transmission device based on the confidentiality authentication mode in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0171] The embodiment of the present invention also provides a computer device having the above Fig.10 or Fig.11 The ciphertext transmission device based on the confidentiality authentication mode is shown.

[0172] See also Fig.12 , Fig.12 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.12As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.12 A processor 10 is taken as an example.

[0173] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0174] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0175] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0176] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0177] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0178] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0179] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the claims.

Claims

1. A ciphertext transmission method based on a confidentiality authentication mode, characterized in that: Applied to a data sending end, the method comprises: Obtaining a random number generated by itself, and encrypting the random number to obtain a first random number ciphertext; Transmitting the random number and the first random number ciphertext to the data receiving end, so that the data receiving end performs identity authentication on the data sending end according to the random number and the first random number ciphertext; When the identity authentication with the data receiving end is successful, obtaining a random number transmitted by the data receiving end as an initial vector; Obtaining a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code; Based on the confidentiality authentication mode, the ciphertext corresponding to the control command data to be transmitted is calculated using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and the additional authentication information is used to generate a first authentication code; the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode; Based on the confidentiality authentication mode, using the plain text corresponding to the control command data to be transmitted, the initial vector, and the first key to calculate the cipher text corresponding to the control command data to be transmitted, and using the additional authentication information to generate a first authentication code, including: Generate a key stream based on the CTR mode using the initial vector and the first key; specifically comprising: using the initial vector as a counter based on the CTR mode, adding 1 to the counter each time a block of data is encrypted, encrypting the value of the counter using the first key, and generating a key stream of the same length as the plaintext; Performing an XOR operation on the key stream and the plaintext corresponding to the control command data to be transmitted bit by bit to calculate the ciphertext corresponding to the control command data to be transmitted; generating a first authentication code based on the Galois mode using the additional authentication information; The initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code are transmitted to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

2. The method according to claim 1, characterized in that The control command data to be transmitted includes at least: parameter setting command data, operation command data and key update command data, and the parameter setting command data, operation command data and key update command data all enable the data receiving end to execute corresponding parameter setting commands, operation commands and key update commands according to the corresponding plain texts of the control command data.

3. A ciphertext transmission method based on a confidentiality authentication mode, characterized in that: Applied to a data receiving end, the method comprises: Perform identity authentication with the data sending end, and if the identity authentication is successful, transmit the random number generated by itself to the data sending end; wherein, the identity authentication with the data sending end includes: obtaining the random number transmitted by the data sending end and the first random number ciphertext; encrypting the random number transmitted by the data sending end to obtain a second random number ciphertext; comparing the second random number ciphertext with the first random number ciphertext, if the second random number ciphertext is the same as the first random number ciphertext, confirming that the identity authentication with the data sending end is successful; if the second random number ciphertext is different from the first random number ciphertext, confirming that the identity authentication with the data sending end has failed; Obtaining the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end; Based on the confidentiality authentication mode, a second authentication code is calculated using the additional authentication information; the second authentication code is compared with the first authentication code, and if the second authentication code is the same as the first authentication code, it is determined that the ciphertext is valid; the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode; The method of calculating a second authentication code based on the confidentiality authentication mode using the additional authentication information includes: generating a second authentication code based on the Galois pattern using the additional authentication information; Based on the confidentiality authentication mode, the initial vector, the first key and the ciphertext corresponding to the control command data are used to calculate the plaintext corresponding to the control command data, so as to execute the corresponding control command according to the plaintext; the method of calculating the plaintext corresponding to the control command data based on the confidentiality authentication mode by using the initial vector, the first key and the ciphertext corresponding to the control command data includes: Generate a key stream based on the CTR mode using the initial vector and the first key; specifically comprising: using the initial vector as a counter based on the CTR mode, adding 1 to the counter each time a block of data is encrypted, encrypting the value of the counter using the first key, and generating a key stream of the same length as the ciphertext; The key stream and the ciphertext corresponding to the control command data are subjected to an XOR operation bit by bit to calculate the plaintext corresponding to the control command data.

4. The method according to claim 3, characterized in that The control command data at least includes: parameter setting command data, operation command data and key update command data; The method further includes: executing corresponding parameter setting commands, operation commands and key updating commands according to the plain text corresponding to the parameter setting command data, the plain text corresponding to the operation command data and the plain text corresponding to the key updating command data.

5. A communication ciphertext transmission device based on a confidentiality authentication mode, characterized in that: Based on the data sending end, the device includes: A random number encryption module, used to obtain a random number generated by itself, and encrypt the random number to obtain a first random number ciphertext; A random number transmission module, used to transmit the random number and the first random number ciphertext to the data receiving end, so that the data receiving end performs identity authentication on the data sending end according to the random number and the first random number ciphertext; A vector acquisition module, used for acquiring a random number transmitted by the data receiving end as an initial vector when the identity authentication with the data receiving end is successful; A key and authentication information acquisition module, used to acquire a first key and additional authentication information; wherein the first key represents an initial key stored by the data sending end, and the additional authentication information is used to generate an authentication code; A ciphertext and authentication code generation module, for calculating the ciphertext corresponding to the control command data to be transmitted based on a confidentiality authentication mode, using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key, and generating a first authentication code using the additional authentication information; the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode; based on the confidentiality authentication mode, using the plaintext corresponding to the control command data to be transmitted, the initial vector, and the first key to calculate the ciphertext corresponding to the control command data to be transmitted The method comprises: generating a key stream based on the CTR mode using the initial vector and the first key; specifically comprising: using the initial vector as a counter based on the CTR mode, increasing the counter by 1 each time a block of data is encrypted, encrypting the value of the counter with the first key, and generating a key stream with the same length as the ciphertext; performing an XOR operation on the key stream and the plaintext corresponding to the control command data to be transmitted bit by bit, and calculating the ciphertext corresponding to the control command data to be transmitted; generating a first authentication code based on the Galois mode using the additional authentication information; a data transmission module, configured to transmit the initial vector, the first key, the additional authentication information, the ciphertext, and the first authentication code to the data receiving end, so that the data receiving end generates a second authentication code based on the additional authentication information, and then compares the second authentication code with the first authentication code to verify whether the ciphertext is valid.

6. A communication ciphertext transmission device based on a confidentiality authentication mode, characterized in that: Based on the data receiving end, the device includes: A vector transmission module, used for performing identity authentication with a data sending end, and if the identity authentication is successful, transmitting a random number generated by itself to the data sending end; wherein the identity authentication with the data sending end includes: obtaining a random number and a first random number ciphertext transmitted by the data sending end; encrypting the random number transmitted by the data sending end to obtain a second random number ciphertext; comparing the second random number ciphertext with the first random number ciphertext, and if the second random number ciphertext is the same as the first random number ciphertext, confirming that the identity authentication with the data sending end is successful; if the second random number ciphertext is different from the first random number ciphertext, confirming that the identity authentication with the data sending end has failed; A communication data acquisition module, used to acquire the initial vector, the first key, the additional authentication information, the ciphertext corresponding to the control command data, and the first authentication code transmitted by the data sending end; A ciphertext authentication module, configured to calculate a second authentication code based on a confidentiality authentication mode using additional authentication information; compare the second authentication code with the first authentication code, and if the second authentication code is the same as the first authentication code, determine that the ciphertext is valid; the confidentiality authentication mode includes a counter mode and a Galois mode; wherein the counter mode is a CTR mode, and the Galois mode is a Galois mode; the method of calculating the second authentication code based on the confidentiality authentication mode using the additional authentication information includes: generating a second authentication code based on the Galois mode using the additional authentication information; A ciphertext decryption module is used to calculate the plaintext corresponding to the control command data based on the confidentiality authentication mode using the initial vector, the first key and the ciphertext corresponding to the control command data, so as to execute the corresponding control command according to the plaintext; the method of calculating the plaintext corresponding to the control command data based on the confidentiality authentication mode using the initial vector, the first key and the ciphertext corresponding to the control command data includes: generating a key stream based on the CTR mode using the initial vector and the first key; specifically including: using the initial vector as a counter based on the CTR mode, adding 1 to the counter each time a block of data is encrypted, encrypting the value of the counter with the first key, and generating a key stream of the same length as the ciphertext; performing an XOR operation on the key stream and the ciphertext corresponding to the control command data bit by bit to calculate the plaintext corresponding to the control command data.

7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the ciphertext transmission method based on the confidentiality authentication mode according to any one of claims 1 to 2, or the ciphertext transmission method based on the confidentiality authentication mode according to any one of claims 3 to 4 by executing the computer instructions.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the ciphertext transmission method based on the confidentiality authentication mode described in any one of claims 1-2, or the ciphertext transmission method based on the confidentiality authentication mode described in any one of claims 3-4.