5G encrypted communication method, device, electronic device and storage medium
By integrating the encryption chip in the 5G secure communication module and using random number two-way encryption and session keys to establish an encryption tunnel, the problems of high communication encryption transmission cost and poor compatibility are solved, and the security of data transmission is improved.
Patent Information
- Application Number
- CN202410743331.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-06-11
AI Technical Summary
In the existing technology, communication encryption and transmission costs are high, encryption chips have poor compatibility with terminal equipment, and security is low.
By integrating the encryption chip in the 5G secure communication module, it uses random number two-way encryption to interact with the main station, generates a session key, and establishes a data transmission encryption tunnel based on the session key to perform two-way identity authentication to ensure that the application layer and the chain Double encryption at the road level.
It reduces the cost of encrypted transmission, improves the compatibility of terminal equipment and data transmission security, and realizes remote security management and secure data transmission of multiple terminal equipment.
Smart Images

Figure CN118317299B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a 5G encrypted communication method, device, electronic device and storage medium. Background Art
[0002] The construction and application of new power systems and virtual power plants cannot be separated from the collaborative interaction of multiple access terminals such as photovoltaics, energy storage, adjustable loads, and charging piles. In the process of data interaction, the system often needs to use secure and efficient communication means to meet the needs of information exchange, interface adaptation, and secure access of various terminals. Existing technologies usually use built-in security chips or external security encryption boxes to achieve dedicated encrypted transmission of power terminal equipment.
[0003] However, in reality, built-in security chips usually require terminals to modify the PCB (Printed Circuit Board), which is costly. In addition, some terminals may not be compatible with the pins of the security chip, which is technically impossible to modify and can only be completely redesigned, resulting in poor compatibility.
[0004] The cost of an external security encryption box is as high as several thousand yuan. In the case of massive heterogeneous load-side resource access for new power systems, a large number of encryption boxes are required, making the data encryption and decryption transmission cost too high and not economical. In addition, the large-scale use of encryption boxes is prone to improper management, resulting in greater data transmission security risks and low security. Summary of the invention
[0005] The present invention provides a 5G encrypted communication method, device, electronic device and storage medium, which are used to solve or partially solve the problems in the existing related technologies of high communication encryption transmission cost, poor compatibility between encryption chips and terminal devices, and low security.
[0006] The present invention provides a 5G encrypted communication method, which is applied to a client side, and the client corresponds to a 5G secure communication module; the method comprises:
[0007] Interact with the master station through a random number two-way encryption method to generate a session key, and encrypt the session key and send it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station;
[0008] Based on the session key, bidirectional identity authentication is performed on the 5G secure communication module and the master station;
[0009] If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
[0010] Optionally, the 5G secure communication module is integrated with an encryption chip; the step of interacting with the master station by bidirectional encryption using random numbers to generate a session key includes:
[0011] Sending a client registration message to the main station, wherein the client registration message includes a local random number randomly generated by the encryption chip;
[0012] Receiving a registration response message returned by the master station after performing registration verification based on the client registration message, the registration response message including a gateway random number randomly generated by the master station and a first public key certificate of the master station;
[0013] Performing legitimacy verification on the first public key certificate, and after passing the legitimacy verification, sending the second public key certificate of the 5G secure communication module to the master station, so that the master station can call the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0014] The result of passing the security verification of the master station is received, and based on the local random number, the gateway random number and the master control key of the encryption chip, a session key is generated by the encryption chip using a cryptographic digest algorithm.
[0015] Optionally, encrypting the session key and sending it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station includes:
[0016] Encrypting the session key by using the first public key certificate to obtain a secondary encrypted session key;
[0017] The secondary encrypted session key is sent to the master station via the public network, so that the master station can use the first private key certificate to decrypt the secondary encrypted session key and obtain the session key to establish an encrypted data transmission tunnel between the 5G secure communication module and the master station.
[0018] Optionally, the performing bidirectional identity authentication on the 5G secure communication module and the master station based on the session key includes:
[0019] Calling the encryption chip to obtain a first encrypted random number, using the session key to encrypt the first encrypted random number to generate a first encrypted ciphertext, and sending the first encrypted ciphertext to the master station;
[0020] Receive a third encrypted ciphertext sent by the master station, wherein the third encrypted ciphertext is obtained by the master station first decrypting the first encrypted ciphertext using the session key to obtain a first encrypted random number, then calling the cipher machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext, and then encrypting the second encrypted ciphertext using the session key;
[0021] Decrypting the third encrypted ciphertext using the session key to obtain a second encrypted ciphertext;
[0022] Performing master station identity authentication on the second encrypted ciphertext through the encryption chip, and if the master station identity authentication passes, determining that the master station end is a trusted master station end;
[0023] Receiving a fourth encrypted ciphertext sent by the master station, wherein the fourth encrypted ciphertext is a ciphertext obtained by first randomly generating a second encrypted random number by the master station and then encrypting the second encrypted random number with the session key;
[0024] Decrypting the fourth encrypted ciphertext using the session key to obtain the second encrypted random number;
[0025] Encrypting the second encrypted random number by the encryption chip to obtain a fifth encrypted ciphertext;
[0026] The fifth encrypted ciphertext is sent to the main station end, so that the main station end performs client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications, and determines that the client is a trusted client when the client identity authentication passes.
[0027] Optionally, the 5G secure communication module further includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes:
[0028] When the client sends data to the main station, first data to be sent is obtained, and the first data to be sent is unpacked, encrypted, and spliced in sequence by the baseband chip and the encryption chip to obtain first complete ciphertext data;
[0029] Using the session key, re-encrypt the first complete ciphertext data to obtain second complete ciphertext data;
[0030] The second complete ciphertext data is sent to the main station, so that the main station uses the session key to decrypt the second complete ciphertext data to obtain the first complete ciphertext data, and calls the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0031] Optionally, the 5G secure communication module further includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes:
[0032] Receive fourth complete ciphertext data sent by the master station, wherein the fourth complete ciphertext data is ciphertext data obtained by the master station first calling the cipher machine to encrypt the second data to be sent to obtain third complete ciphertext data, and then encrypting the third complete ciphertext data by using the session key;
[0033] Decrypting the fourth complete ciphertext data using the session key to obtain third complete ciphertext data;
[0034] Based on the baseband chip and the encryption chip, data unpacking, decryption and data splicing are performed on the third complete ciphertext data in sequence to obtain second data to be sent.
[0035] Optionally, the method further comprises:
[0036] The encryption and decryption keys of the 5G secure communication module are distributed and written offline through the key management system, and the first CA certificate is distributed at the same time. The first CA certificate includes the second public key certificate of the 5G secure communication module.
[0037] The present invention also provides a 5G encrypted communication method, which is applied to a master station side, wherein the master station is connected to at least one client; each of the clients corresponds to a 5G secure communication module; for any of the clients, the method includes:
[0038] Interacting with the client through a random number bidirectional encryption method so that the client generates a session key;
[0039] According to the session key, establish a data transmission encryption tunnel between the master station and the 5G secure communication module;
[0040] Based on the session key, bidirectional identity authentication is performed on the 5G secure communication module and the master station;
[0041] If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
[0042] Optionally, establishing a data transmission encryption tunnel between the master station and the 5G secure communication module according to the session key includes:
[0043] Receiving a secondary encrypted session key sent by the client, where the secondary encrypted session key is a key obtained by the client after encrypting the session key;
[0044] The secondary encrypted session key is decrypted to obtain the session key to establish an encrypted data transmission tunnel between the master station and the 5G secure communication module.
[0045] Optionally, the 5G secure communication module is integrated with an encryption chip, and the master station corresponds to an SSL gateway device; the interacting with the client through a random number bidirectional encryption method so that the client generates a session key includes:
[0046] Receiving a client registration message sent by the client, wherein the client registration message includes a local random number, and the local random number is randomly generated based on the encryption chip;
[0047] Performing registration verification on the customer registration message, and when the registration verification passes, randomly generating a gateway random number based on the SSL gateway device;
[0048] Integrate the gateway random number and the first public key certificate of the master station into a registration response message, and send the message to the client, so that the client can verify the legitimacy of the first public key certificate;
[0049] Receive the second public key certificate of the 5G secure communication module sent by the client after the legitimacy verification is passed, and call the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0050] After the security verification is passed, the security verification result is sent to the client, so that the client can generate a session key through the encryption chip using a cryptographic digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
[0051] Optionally, the master station corresponds to a first private key certificate, and the decrypting of the secondary encrypted session key to obtain the session key to establish a data transmission encryption tunnel between the master station and the 5G secure communication module includes:
[0052] The first private key certificate is used to decrypt the secondary encrypted session key to obtain the session key, so as to establish an encrypted data transmission tunnel between the main station and the 5G secure communication module.
[0053] Optionally, the performing bidirectional identity authentication on the 5G secure communication module and the master station based on the session key includes:
[0054] receiving a first encrypted ciphertext sent by the client, where the first encrypted ciphertext is a ciphertext generated by the client first calling the encryption chip to obtain a first encrypted random number and then encrypting the first encrypted random number using the session key;
[0055] Decrypting the first encrypted ciphertext using the session key to obtain a first encrypted random number;
[0056] Calling a cryptographic machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext;
[0057] Encrypting the second encrypted ciphertext using the session key to obtain a third encrypted ciphertext;
[0058] The third encrypted ciphertext is sent to the client, so that the client first uses the session key to decrypt the third encrypted ciphertext to obtain the second encrypted ciphertext, and then performs master station identity authentication on the second encrypted ciphertext through the encryption chip, and when the master station identity authentication passes, determines that the master station is a trusted master station;
[0059] Randomly generate a second encrypted random number, encrypt the second encrypted random number using the session key to obtain a fourth encrypted ciphertext, and send the fourth encrypted ciphertext to the client;
[0060] receiving a fifth encrypted ciphertext sent by the client, wherein the fifth encrypted ciphertext is a ciphertext obtained by the client first decrypting the fourth encrypted ciphertext using the session key to obtain the second encrypted random number, and then encrypting the second encrypted random number using the encryption chip;
[0061] The client identity authentication is performed on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications. If the client identity authentication passes, it is determined that the client is a trusted client.
[0062] Optionally, the 5G secure communication module further includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes:
[0063] Receive second complete ciphertext data sent by the client, wherein the second complete ciphertext data is obtained by the client first performing packetization, encryption, and data splicing processing on the first data to be sent based on the baseband chip and the encryption chip, and then performing secondary encryption on the first complete ciphertext data according to the session key to obtain the first complete ciphertext data;
[0064] Decrypting the second complete ciphertext data using the session key to obtain the first complete ciphertext data;
[0065] The cryptographic machine is called to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0066] Optionally, the 5G secure communication module further includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes:
[0067] When the master station sends data to the client, obtaining second data to be sent;
[0068] Calling a cryptographic machine to encrypt the second data to be sent to obtain third complete ciphertext data;
[0069] Encrypting the third complete ciphertext data by using the session key to obtain fourth complete ciphertext data;
[0070] The fourth complete ciphertext data is sent to the client, so that the client uses the session key to decrypt the fourth complete ciphertext data to obtain the third complete ciphertext data, and then based on the baseband chip and the encryption chip, the third complete ciphertext data is unpacked, decrypted and spliced in sequence to obtain the second data to be sent.
[0071] Optionally, the method further comprises:
[0072] The encryption and decryption keys of the cipher machine at the master station are distributed and written offline through the key management system, and a second CA certificate is distributed at the same time. The second CA certificate includes the first public key certificate and the first private key certificate of the master station.
[0073] The present invention also provides a 5G encrypted communication device, which is applied to a client side, and the client corresponds to a 5G secure communication module; the device includes:
[0074] The first encryption tunnel establishment module is used to interact with the master station through a random number bidirectional encryption method, generate a session key, and encrypt the session key and send it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station;
[0075] A first bidirectional identity authentication module, used to perform bidirectional identity authentication on the 5G secure communication module and the master station based on the session key;
[0076] The first encryption and decryption communication module is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
[0077] The present invention also provides a 5G encrypted communication device, which is applied to a master station side, wherein the master station is connected to at least one client; each of the clients corresponds to a 5G secure communication module; for any of the clients, the device includes:
[0078] A random number two-way encryption module, used to interact with the client through a random number two-way encryption method, so that the client generates a session key;
[0079] The second encryption tunnel establishment module is used to establish an encryption tunnel for data transmission between the master station and the 5G secure communication module according to the session key;
[0080] A second two-way identity authentication module, used to perform two-way identity authentication on the 5G secure communication module and the master station based on the session key;
[0081] The second encryption and decryption communication module is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
[0082] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0083] The memory is used to store program code and transmit the program code to the processor;
[0084] The processor is used to execute the 5G encrypted communication method as described in any one of the above items according to the instructions in the program code.
[0085] The present invention also provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the 5G encrypted communication method as described in any one of the above items.
[0086] It can be seen from the above technical solutions that the present invention has the following advantages:
[0087] A 5G encrypted communication method is provided. During the data communication process, the client realizes the interaction with the main station through a random number two-way encryption method, generates a session key, and encrypts the session key and sends it to the main station to establish a data transmission encryption tunnel between the 5G secure communication module and the main station. Then, based on the session key, the 5G secure communication module and the main station are bidirectionally authenticated. If the bidirectional authentication is passed, the application layer data between the client and the main station is encrypted and decrypted through the session key. Therefore, by establishing a data transmission encryption tunnel and bidirectional authentication, dual encryption of the application layer and the link layer can be constructed to further improve the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0089] Figure 1 A schematic diagram of the overall design framework corresponding to a 5G encrypted communication method;
[0090] Figure 2 A flowchart of the steps of a 5G encrypted communication method;
[0091] Figure 3 A schematic diagram of a process of two-way identity authentication between a 5G secure communication module and a master station;
[0092] Figure 4 A schematic diagram of the communication process of application layer data encryption and decryption between a client and a main station;
[0093] Figure 5 A flowchart of another method for 5G encrypted communication;
[0094] Figure 6 It is a structural block diagram of a 5G encrypted communication device;
[0095] Figure 7 This is a structural block diagram of another 5G encrypted communication device. DETAILED DESCRIPTION
[0096] The embodiments of the present invention provide a 5G encrypted communication method, device, electronic device and storage medium, which are used to solve or partially solve the problems in the existing related technologies such as high communication encryption transmission cost, poor compatibility between encryption chips and terminal devices, and low security.
[0097] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions 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 embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0098] As an example, for dedicated encrypted transmission of power terminal equipment, the existing technology usually adopts a built-in security chip or an external security encryption box to achieve it.
[0099] However, in reality, built-in security chips usually require the terminal to modify the PCB board, which is costly. In addition, some terminals may not be compatible with the pins of the security chip, which is technically impossible to modify and can only be completely redesigned, resulting in poor compatibility.
[0100] The cost of an external security encryption box is as high as several thousand yuan. In the case of massive heterogeneous load-side resource access for new power systems, a large number of encryption boxes are required, making the data encryption and decryption transmission cost too high and not economical. In addition, the large-scale use of encryption boxes is prone to improper management, resulting in greater data transmission security risks and low security.
[0101] Therefore, one of the core invention points of the embodiment of the present invention is: first, fully reuse the processing power of the built-in 5G baseband chip of the 5G communication module, and directly integrate the power-specific encryption chip into the 5G communication module, so that there is no need to modify the PCB of the power terminal equipment separately, there is no need to customize the software development of the terminal, and there is no need to add an additional independent encryption box, so as to achieve rapid compatibility and greatly reduce costs. Secondly, on the basis of integrating the encryption chip into the 5G communication module, a 5G encryption communication method is provided. During the data communication process, the client realizes the interaction with the main station end through a random number two-way encryption method, generates a session key, and encrypts the session key and sends it to the main station end to establish a data transmission encryption tunnel between the 5G security communication module and the main station end; then, based on the session key, the 5G security communication module and the main station end are bidirectionally authenticated; if the bidirectional authentication is passed, the application layer data between the client and the main station end is encrypted and decrypted through the session key. Therefore, by establishing a data transmission encryption tunnel and bidirectional authentication, dual encryption of the application layer and the link layer can be constructed to further improve the security of data transmission. In combination with the 5G secure communication module and the 5G encrypted communication method provided by the present invention, interaction between power terminal equipment and power services can be realized, remote security management of multiple different terminal devices can be achieved, and access status analysis and data security transmission can be performed through the 5G secure communication module, thereby meeting the needs of distributed resources for secure access to the power business master station.
[0102] In reality, firstly, there is no design space for additional components inside the 5G communication module, so the layout and design need to be re-optimized to embed the encryption module. Secondly, in order to realize the encryption capability of the encryption module, the encryption module needs to share the same platform with the communication module, which requires optimization in software compatibility and business interaction.
[0103] Based on the above considerations, Figure 1 , showing a schematic diagram of the overall design framework corresponding to a 5G encrypted communication method.
[0104] Combination Figure 1 The overall design framework of the technical solution provided by the present invention can be mainly divided into two parts, one is the master station side (the master station side also includes an SSL (Secure Socket Layer, a network security protocol) gateway device and a 5G base station), and the other is the client side (which can be regarded as a complete device or terminal. For data communication, the complete device mainly includes a 5G secure communication module and a complete device MCU (Microcontroller Unit)). The master station side and the client side perform uplink or downlink data transmission through a 5G base station and a 5G antenna.
[0105] Among them, the 5G secure communication module mainly includes a radio frequency transceiver, a power-specific encryption chip, a baseband chip, and an SSL VPN SDK (Secure Socket Layer Virtual Private Network Software Development Kit, a virtual private network software) (the baseband chip and the SSL VPN SDK can be regarded as integrated in the same module). The module where the baseband chip is located communicates with the encryption chip through SPI (Serial Peripheral Interface). The 5G secure communication module can communicate with the MCU of the entire device (PCB motherboard of the power terminal device) through the original M.2 interface (such as USB) or Mini PCIe physical interface to complete the relevant functional requirements of the power 5G communication module hardware and software, so that the encryption function can be integrated and upgraded on the basis of the communication module.
[0106] In combination with the above description, exemplarily, taking the virtual power plant center as an example, the business platform (corresponding to the master station) can simultaneously access multiple different clients, such as accessing a test device or accessing a complete device with a built-in 5G security module through a gateway. The complete device can be different types of distributed load equipment, such as power terminal equipment related to photovoltaics, charging piles, energy storage or building loads.
[0107] In an embodiment of the present invention, a design idea of a 5G secure communication module in 5G encrypted communication is provided. The processing power of the built-in 5G baseband chip of the 5G communication module is fully reused, and the space originally reserved for the eSIM (Embedded-SIM, embedded SIM card) chip of the 5G communication module is replaced with a power-specific encryption chip, that is, the power-specific encryption chip is directly integrated into the 5G communication module, and the software layer encapsulates the interface of the encryption chip for external calls. Therefore, there is no need to perform separate PCB modification on the power terminal equipment, no need to customize the software development of the terminal, and no need to add additional independent encryption boxes. All encryption and decryption processes of the terminal are executed by the 5G communication module, which can reduce the difficulty of adapting the encryption chip and the terminal hardware, achieve rapid compatibility, and greatly reduce costs. And because the communication module is an essential functional module of the power terminal equipment, no additional hardware cost is added, and the needs of massive heterogeneous load-side resource access and regulation of the new power system can be met. In combination with the 5G encrypted communication method provided in the present invention, interaction between power terminal equipment and power services can be realized, remote security management of multiple different terminal devices can be achieved, and access status analysis and data security transmission can be performed through the 5G security communication module, thereby meeting the needs of distributed resources for secure access to the power business main station.
[0108] In order to enable those skilled in the art to better understand the technical solution of the present invention, the following is an example of applying the 5G encrypted communication method to the client side. The client corresponds to a 5G secure communication module.
[0109] Reference Figure 2 , shows a step flow chart of a 5G encrypted communication method provided by an embodiment of the present invention, which may specifically include the following steps:
[0110] Step 201, interacting with the master station through a random number bidirectional encryption method to generate a session key, and encrypting the session key and sending it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station;
[0111] In actual applications, before generating session keys through random number bidirectional encryption, the encryption and decryption keys of the 5G secure communication module can also be distributed and written offline through the key management system, and the first CA (Certificate Authority) certificate can be distributed at the same time, where the first CA certificate includes the public key certificate of the 5G secure communication module (i.e., the second public key certificate involved in the steps of the following embodiment) and the corresponding private key certificate.
[0112] Specifically, in conjunction with the master station, the key management system is mainly responsible for the offline distribution and writing of keys to the encryption chip in the 5G secure communication module, the SSL VPN SDK, and the cipher machine on the master station. Among them, each of the above devices distributes 3 keys, including a master key, an encryption key, and a decryption key. In this step, the symmetric encryption key is written, and the encryption algorithm in the data encryption and decryption communication process can use the usual SM4 symmetric encryption algorithm. At the same time, the CA certificate system (also called the CA server) can be used to distribute the CA certificate encrypted by the SM2 algorithm (including the corresponding public key certificate and private key certificate) to the client's 5G secure communication module and the SSL gateway device on the master station.
[0113] After the distribution and writing of relevant keys and CA certificates are completed, the entire device is powered on and put online. The 5G secure communication module contains a baseband chip, integrates the open Linux operating system, and installs the national secret SSL VPN SDK.
[0114] Combined with the above content, it can be seen that a power-specific encryption chip is integrated in the 5G secure communication module. The process of interacting with the master station through random number bidirectional encryption to generate a session key can be specifically implemented by executing the following steps S01 to S04:
[0115] Step S01: Sending a client registration message to the main station, the client registration message includes a local random number randomly generated by an encryption chip;
[0116] In the process of establishing the encrypted data transmission tunnel, for a better understanding, the 5G secure communication module on the client side can be regarded as the client of SSL VPN, and the SSL gateway device on the main station side can be regarded as the server of SSLVPN.
[0117] First, the 5G secure communication module sends a Client registration message to the SSL gateway device. The Client registration message content may include SSL version information, the local random number R1 (obtained from the encryption chip), and the list of cipher suites supported by the local device (such as the SM2 encryption algorithm).
[0118] Step S02: receiving a registration response message returned by the master station after performing registration verification based on the client registration message, wherein the registration response message includes a gateway random number randomly generated by the master station and a first public key certificate of the master station;
[0119] The 5G secure communication module receives the Server registration response message returned by the SSL gateway device after registration verification based on the Client registration message. Among them, the Server registration response message can mainly include: the determined SSL protocol version information, the type of encryption algorithm, the gateway random number R2 generated by the SSL gateway device, and the first public key certificate encrypted by the SM2 algorithm issued by the CA server of the power grid dispatching department.
[0120] Step S03: Verify the legitimacy of the first public key certificate, and after the legitimacy verification is passed, send the second public key certificate of the 5G secure communication module to the master station, so that the master station can call the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0121] After the 5G secure communication module receives the first public key certificate sent by the SSL gateway device, it needs to verify whether it is legitimate, such as whether the certificate is expired, whether the CA that issued the certificate is reliable, whether the returned public key certificate can decrypt the digital signature in the returned certificate, and whether the domain name matches.
[0122] After the first public key certificate is verified to be legitimate, in order to improve the reliability of security verification, the SSL gateway device will also request to verify whether the second public key certificate of the 5G secure communication module issued by the CA server is legitimate. At this time, the 5G secure communication module sends the second public key certificate to the SSL gateway device, so that the SSL gateway device verifies whether the public key certificate of the 5G secure communication module is safe and reliable with the CA server of the power grid dispatching department. This can prevent hackers from impersonating and improve the transmission reliability and security of both the 5G secure communication module and the SSL gateway device.
[0123] Step S04: Receive the result of the security verification from the master station, and generate a session key through the encryption chip using a cryptographic digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
[0124] When the certificate verification of the 5G secure communication module is passed, the 5G secure communication module sends a request instruction to the encryption chip to obtain the session key. Among them, the session key is generated by the master key of the encryption chip combined with the local random number R1 corresponding to the client and the gateway random number R2 corresponding to the master station, using the SM3 cryptographic digest algorithm. The session key is an SM4 symmetric encryption key. Exemplarily, in this step, the session key is generated by the master key of the encryption chip combined with the random numbers R1 and R2, and the combination method is: first convert R1, R2 and the master key according to the base64 encoding method, obtain R1', R2' and the master key', and then splice them in a preset order, such as splicing into R1'+master key'+R2'.
[0125] Since the local random number R1 and the gateway random number R2 are both random numbers, the session key will automatically change according to the service duration to ensure the security of the session as much as possible. The session key is generated using a digest algorithm, and the original master key cannot be obtained by decryption, thereby ensuring the security of data transmission as much as possible.
[0126] The 5G communication module used in the prior art does not have the ability to establish an encrypted tunnel with the main station. When data is transmitted, it can only be processed by the MCU or routing chip of the whole device where the 5G communication module is located. In the embodiment of the present invention, since a dedicated encryption chip and SDK are embedded and integrated in the 5G secure communication module, it can have the ability to establish a VPN encrypted tunnel with the main station.
[0127] Furthermore, the session key is encrypted and sent to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station, which can be achieved by executing the following sub-steps S11 to S12:
[0128] Step S11: Encrypt the session key using the first public key certificate to obtain a secondary encrypted session key;
[0129] The 5G secure communication module uses the public key in the first public key certificate sent by the SSL gateway device to encrypt the session key and obtain a secondary encrypted session key.
[0130] Step S12: Send the secondary encrypted session key to the master station through the public network, so that the master station can use the first private key certificate to decrypt the secondary encrypted session key and obtain the session key to establish a data transmission encryption tunnel between the 5G secure communication module and the master station.
[0131] The 5G secure communication module will then send the secondary encrypted session key to the SSL gateway device via the public network, so that the SSL gateway device can use the certificate private key to decrypt the session key.
[0132] At this point, the client side and the master side have obtained the same session key, which means that an encrypted data transmission tunnel has been established between the two ends. The session key can also be used as the key for symmetric encryption of application layer data SM4 to ensure the information security of the client and master communication process as much as possible.
[0133] It should be noted that the local random number R1 and the gateway random number R2 will remain valid after each encrypted tunnel is established until the encrypted tunnel expires. The expiration time of the confidential tunnel can be set independently according to the user's business needs. For example, the encrypted tunnel can be set to expire after 5 minutes. Before the next data communication, an encrypted tunnel needs to be re-established, which means that a new random number needs to be generated. When the expiration time is set short enough (for example, approximately equal to the session time for each data transmission), the shorter the expiration time is set, the more frequently the random number needs to be regenerated, the faster the real-time update frequency of the random number, and the higher the data transmission security between the two ends.
[0134] It is understandable that as the frequency of random number generation increases, it means that a certain computational burden may be imposed on the processor. Therefore, within the allowable range, those skilled in the art can flexibly set the expiration time according to actual needs. For example, when the security requirements for the transmitted data are not so high, the expiration time can be set longer, and when the security requirements for the transmitted data are higher, the expiration time can be set shorter. The present invention is not limited to this.
[0135] Step 202: Based on the session key, perform bidirectional identity authentication on the 5G secure communication module and the master station;
[0136] Before encrypting and decrypting the transmission data between the client and the main station, the 5G secure communication module on the client side and the main station need to be bidirectionally authenticated.
[0137] Among them, the process of two-way authentication between the 5G secure communication module and the master station based on the session key can be mainly divided into two authentication processes, namely the master station authentication process and the client authentication process.
[0138] Specifically, the master station end identity authentication process can be implemented by executing the following sub-steps S21 to S24:
[0139] Step S21: calling the encryption chip to obtain a first encrypted random number, using the session key to encrypt the first encrypted random number, generating a first encrypted ciphertext, and sending the first encrypted ciphertext to the master station;
[0140] Step S22: receiving the third encrypted ciphertext sent by the master station, the third encrypted ciphertext being obtained by firstly decrypting the first encrypted ciphertext by the master station using the session key to obtain the first encrypted random number, then invoking the cipher machine to encrypt the first encrypted random number to obtain the second encrypted ciphertext, and then encrypting the second encrypted ciphertext by using the session key;
[0141] Step S23: decrypt the third encrypted ciphertext using the session key to obtain the second encrypted ciphertext;
[0142] Step S24: the second encrypted ciphertext is authenticated by the encryption chip as the master station. If the master station identity authentication is passed, the master station is determined to be a trusted master station.
[0143] For better explanation, by way of example, refer to Figure 3 , showing a schematic diagram of the process of two-way identity authentication between a 5G secure communication module and a master station.
[0144] Combination Figure 3 , for the identity authentication process on the master side:
[0145] First, the client's device MCU calls the encryption chip in the 5G secure communication module to obtain the first encrypted random number A.
[0146] The first encrypted random number A is encrypted by the SSL VPN SDK (SSL VPN Client) on the client side to form a first encrypted ciphertext A'' (the encryption key is the session key).
[0147] After receiving the first encrypted ciphertext A'', the SSL VPN gateway device at the master station uses the session key to decrypt it into a first encrypted random number A (the decryption key is the previous session key 1), and transmits the first encrypted random number A to the master station application server at the master station.
[0148] The main site application server calls the cryptographic machine, which uses the master key corresponding to the 5G secure communication module to encrypt the first encrypted random number A, obtain the second encrypted ciphertext A', and then send the second encrypted ciphertext A' to the SSL VPN gateway device.
[0149] The SSL VPN gateway device encrypts the second encrypted ciphertext A' using the session key to obtain a third encrypted ciphertext A''', and sends it to the SSL VPN SDK.
[0150] After receiving the third encrypted ciphertext A''', the SSL VPN SDK uses the session key to decrypt it, obtains the second encrypted ciphertext A', and feeds it back to the MCU of the whole device.
[0151] The MCU of the whole device sends the second encrypted ciphertext A' returned by the master station to the 5G secure communication module, and performs master station identity authentication through the encryption chip.
[0152] If the authentication is successful, it means that the master station is trustworthy and data can be uploaded to the master station.
[0153] At the same time, the client identity authentication process can be implemented by executing the following sub-steps S31 to S34:
[0154] Step S31: receiving a fourth encrypted ciphertext sent by the master station, where the fourth encrypted ciphertext is a ciphertext obtained by first randomly generating a second encrypted random number at the master station, and then encrypting the second encrypted random number with a session key;
[0155] Step S32: Decrypt the fourth encrypted ciphertext using the session key to obtain a second encrypted random number;
[0156] Step S33: encrypting the second encrypted random number through the encryption chip to obtain a fifth encrypted ciphertext;
[0157] Step S34: Send the fifth encrypted ciphertext to the master station, so that the master station can perform client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications, and determine that the client is a trusted client if the client identity authentication passes.
[0158] Continue to combine Figure 3 , for the client's identity authentication process:
[0159] The MCU of the whole device sends an instruction to obtain a random number, which is encrypted by the SSL VPN SDK using the session key to obtain the random number ciphertext, and then sent to the SSL VPN gateway device.
[0160] The SSL VPN gateway device uses the session key to decrypt the random number ciphertext, and then based on the decrypted instruction to obtain the random number, calls the main station application server to obtain the random number interface to obtain the second encrypted random number B.
[0161] The SSL VPN gateway device uses the session key to encrypt the second encrypted random number B to obtain a fourth encrypted ciphertext B''', and then sends the fourth encrypted ciphertext B''' to the SSL VPN SDK.
[0162] The SSL VPN SDK uses the session key to decrypt the fourth encrypted ciphertext B''', obtains the second encrypted random number B, and transmits the second encrypted random number B back to the whole device MCU.
[0163] The whole device MCU sends the second encrypted random number B to the encryption chip of the 5G secure communication module for encryption to obtain the fifth encrypted ciphertext B', and then the encryption chip returns the fifth encrypted ciphertext B' to the whole device MCU.
[0164] The whole machine device MCU reports the fifth encrypted ciphertext B' to the main station, so that the main station can perform client identity authentication on the fifth encrypted ciphertext B' through two consecutive encryption and decryption authentications, specifically: first, the fifth encrypted ciphertext B' is encrypted by the SSL VPN SDK using the session key to obtain the sixth encrypted ciphertext B''; then the sixth encrypted ciphertext B'' is decrypted by the SSL VPN gateway device using the session key to obtain the fifth encrypted ciphertext B'; the main station application server calls the cryptographic machine to perform client identity authentication on the fifth encrypted ciphertext B', and obtains the authentication result of the fifth encrypted ciphertext B'; the authentication result of the fifth encrypted ciphertext B' is encrypted by the SSL VPN gateway device using the session key to obtain the authentication result ciphertext of the fifth encrypted ciphertext B'; then the authentication result ciphertext of the fifth encrypted ciphertext B' is decrypted by the SSL VPN SDK using the session key to obtain the authentication result of the fifth encrypted ciphertext B'; finally, the authentication result of the fifth encrypted ciphertext B' is transmitted back to the whole machine device MCU.
[0165] If the authentication result of the fifth encrypted ciphertext B' indicates that the identity authentication of the client by the master station is successful, it means that the client is trustworthy and the master station can receive data from the client.
[0166] It should be noted that the authentication of the master station and the client (mainly the 5G secure communication module) is carried out simultaneously. In the two-way authentication process, even if a data transmission encryption tunnel between the two ends is previously established and the session key is obtained, if one party fails to authenticate or the authentication fails, data cannot be transmitted subsequently. Therefore, through the data transmission encryption tunnel and two-way authentication, it is equivalent to providing double security protection for data transmission between the two ends, further improving the security and accuracy of data interaction.
[0167] Step 203: If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
[0168] Combined with the above content, it can be known that the 5G secure communication module also includes a baseband chip. When the client sends data to the main station (equivalent to the terminal / client encrypting and sending data, and the main station receiving and decrypting data), the process of encrypting and decrypting the application layer data between the client and the main station through the session key can be achieved by executing the following sub-steps S41 to S43:
[0169] Step S41: when the client sends data to the master station, first data to be sent is obtained, and the first data to be sent is unpacked, encrypted, and spliced in sequence by the baseband chip and the encryption chip to obtain first complete ciphertext data;
[0170] Step S42: using the session key, re-encrypt the first complete ciphertext data to obtain second complete ciphertext data;
[0171] Step S43: Send the second complete ciphertext data to the master station, so that the master station uses the session key to decrypt the second complete ciphertext data to obtain the first complete ciphertext data, and calls the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0172] For better explanation, exemplarily, Figure 4 A schematic diagram of the communication process of application layer data encryption and decryption between a client and a main station is shown.
[0173] Combination Figure 4 , when the client sends data to the master:
[0174] The first is the data encryption and packet sub-processing process: the MCU of the whole device sends the first data to be sent C (i.e., application layer data) in plain text to the 5G secure communication module; the baseband chip of the 5G secure communication module determines the length of the first data to be sent C, and compares it with the maximum byte length that the encryption chip can process at a single time; if packet sub-processing is required, the baseband chip divides the first data to be sent C into subdata1...subdata n for subsequent processing.
[0175] Next is the data encryption process: the baseband chip of the 5G secure communication module sends the subdata1...subdata n data to the encryption chip one by one, and calls the SM4 encryption interface of the encryption chip; the encryption chip encrypts the subdata1...subdata n data through the encryption key of the encryption chip (that is, the encryption key distributed to the encryption chip by the key management system), generates ciphertext data subdata1'...subdata n', and returns it to the baseband chip of the 5G secure communication module; after the baseband chip collects all the data, it splices subdata1'...subdata n' into a complete first complete ciphertext data C', and returns the first complete ciphertext data C' to the MCU of the whole device.
[0176] Then comes the data encryption process of the client: the MCU of the whole device sends the first complete ciphertext data C' to the 5G secure communication module, and sets the working mode of the 5G secure communication module to sending; the 5G secure communication module sends the first complete ciphertext data C' to the virtual network card of the SSL VPN SDK; the SSL VPN SDK uses the session key to encrypt the first complete ciphertext data C', generates the second complete ciphertext data C'', and sends it to the SSL VPN gateway device.
[0177] Finally, there is the data decryption process at the main site: after the SSL VPN gateway device receives the second complete ciphertext data C'', it first uses the session key to decrypt it, obtains the first complete ciphertext data C', and uploads the first complete ciphertext data C' to the main site application server; the main site application server calls the decryption interface of the cipher machine, and the key machine determines the decryption key corresponding to the client's local area according to which device (client) the message comes from, and uses the decryption key to decrypt the first complete ciphertext data C' to obtain the first plaintext data C to be sent.
[0178] In another case, when the main station sends data to the client (equivalent to the main station encrypting and sending data, and the terminal / client receiving and decrypting data), the process of encrypting and decrypting the application layer data between the client and the main station through the session key can also be implemented by executing the following sub-steps S51 to S53:
[0179] Step S51: receiving the fourth complete ciphertext data sent by the master station, wherein the fourth complete ciphertext data is the ciphertext data obtained by firstly invoking the cipher machine on the master station to encrypt the second data to be sent, obtaining the third complete ciphertext data, and then encrypting the third complete ciphertext data by using the session key;
[0180] Step S52: Decrypt the fourth complete ciphertext data using the session key to obtain the third complete ciphertext data;
[0181] Step S53: Based on the baseband chip and the encryption chip, the third complete ciphertext data is unpacked, decrypted, and spliced in sequence to obtain the second data to be sent.
[0182] For example, continue to combine Figure 4 , when the master sends data to the client:
[0183] Assuming that the plaintext data to be sent by the master station is the second data D to be sent, the master station application server first encrypts the second data D to be sent by calling the cipher machine using the encryption key (that is, the encryption key distributed to the cipher machine at the master station by the key management system) to obtain the third complete ciphertext data D'.
[0184] The main site application server returns the third complete ciphertext data D' to the SSL VPN gateway device.
[0185] The SSL VPN gateway device encrypts the third complete ciphertext data D' using the session key to obtain fourth complete ciphertext data D'', and sends it to the SSL VPN SDK.
[0186] The SSL VPN SDK uses the session key to decrypt the fourth complete ciphertext data D'' to obtain the third complete ciphertext data D', and transmits the third complete ciphertext data D' back to the whole device MCU through the 5G secure communication module.
[0187] After receiving the third complete ciphertext data D', the whole device MCU sends it to the 5G security communication module and sets the working mode of the 5G security communication module to the decryption mode.
[0188] The baseband chip of the 5G secure communication module subpackets the third complete ciphertext data D' into d-subdata1...d-subdatan, and sends it to the encryption chip.
[0189] The encryption chip uses the stored decryption key of the master station to decrypt d-subdata1…d-subdatan, and returns the decrypted data to the 5G secure communication module.
[0190] The 5G secure communication module splices the decrypted data into the second plaintext data D to be sent, and then sends it to the MCU of the whole device.
[0191] It should be noted that the 5G communication encryption and decryption method introduced in the above embodiment is based on data security. In practical applications, there may be a scenario where the transmission data does not need to be encrypted, but a plaintext transparent transmission method can be directly adopted for data transmission. In this case, those skilled in the art can choose a plaintext transparent transmission method according to actual needs, or adopt a method of transmitting data after encryption by the encryption module provided in the embodiment of the present invention. It is understandable that the present invention is not limited to this.
[0192] In an embodiment of the present invention, a 5G encrypted communication method is provided. For the client side, during the data communication process, the client realizes the interaction with the main station end through a random number two-way encryption method, generates a session key, and encrypts the session key and sends it to the main station end to establish a data transmission encryption tunnel between the 5G secure communication module and the main station end; then based on the session key, the 5G secure communication module and the main station end are bidirectionally authenticated; if the bidirectional authentication is passed, the application layer data between the client and the main station end is encrypted and decrypted through the session key. Thus, by establishing a data transmission encryption tunnel and bidirectional authentication, double encryption of the application layer and the link layer can be constructed to further improve the security of data transmission. In combination with the 5G secure communication module and the 5G encrypted communication method provided by the present invention, the interaction between the power terminal equipment and the power business can be realized, and remote security management of multiple different terminal equipment can be realized. Access status analysis and data security transmission can be performed through the 5G secure communication module, thereby meeting the distributed resource security access to the power business main station requirements.
[0193] Accordingly, the following is an example of applying the 5G encrypted communication method to the master station side. The master station can communicate with at least one client; each client corresponds to a 5G secure communication module.
[0194] For any client, refer to Figure 5 , shows a flowchart of another 5G encrypted communication method provided by an embodiment of the present invention, which may specifically include the following steps:
[0195] Step 501, interacting with the client through a random number bidirectional encryption method, so that the client generates a session key;
[0196] Combined with the above-mentioned client's offline key distribution instructions, similarly, for the main station, before generating the session key through the random number two-way encryption method, the encryption and decryption keys of the main station's cipher machine can also be distributed and written offline through the key management system, and the second CA certificate can be distributed at the same time. The second CA certificate includes the first public key certificate and the first private key certificate of the main station.
[0197] The specific key and CA certificate distribution and writing may refer to the relevant content in step 201 of the aforementioned embodiment, which will not be repeated here.
[0198] Combined with the above content, it can be seen that a power-specific encryption chip is integrated in the 5G secure communication module. At the same time, the master station corresponds to an SSL gateway device. The process of interacting with the client through random number bidirectional encryption so that the client generates a session key can be achieved by executing the following sub-steps S61 to S65:
[0199] Step S61: receiving a client registration message sent by the client, the client registration message including a local random number, the local random number being randomly generated based on an encryption chip;
[0200] Similarly, the 5G secure communication module on the client side can be regarded as the client of SSL VPN, and the SSL gateway device on the main station side can be regarded as the server of SSL VPN.
[0201] The SSL gateway device can receive the Client registration message sent by the 5G secure communication module. The Client registration message content may include SSL version information, the local random number R1 (obtained from the encryption chip) and the list of cipher suites supported by the local device (such as the SM2 encryption algorithm).
[0202] Step S62: Performing registration verification on the customer registration message. When the registration verification is passed, a gateway random number is randomly generated based on the SSL gateway device;
[0203] After receiving the registration message from the Client, the SSL gateway device performs registration verification on it, such as checking the SSL version information, determining the type of encryption algorithm, etc. When the verification is passed, a gateway random number R2 can be randomly generated.
[0204] Step S63: Integrate the gateway random number and the first public key certificate of the master station into a registration response message, and send it to the client, so that the client can verify the legitimacy of the first public key certificate;
[0205] Then the Server registration response message is returned to the 5G secure communication module of the client, so that the 5G secure communication module can verify the legitimacy of the first public key certificate. Among them, the Server registration response message can mainly include: the determined SSL protocol version information, the type of encryption algorithm, the gateway random number R2 generated by the SSL gateway device, and the first public key certificate encrypted by the SM2 algorithm issued by the CA server of the power grid dispatching department.
[0206] Step S64: receiving the second public key certificate of the 5G secure communication module sent by the client after the legitimacy verification is passed, and calling the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0207] After receiving the second public key certificate of the 5G secure communication module, the second public key certificate can be securely verified by calling the CA server of the power grid dispatching department. This can prevent hackers from impersonating and improve the transmission reliability and security of both the 5G secure communication module and the SSL gateway device.
[0208] Step S65: After the security verification is passed, the security verification result is sent to the client, so that the client can generate a session key through the encryption chip using a cryptographic digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
[0209] After the client generates the session key, it can also encrypt the session key using the first public key certificate to obtain a secondary encrypted session key.
[0210] The session key sent from the client side is generated by the master key of the encryption chip in the 5G secure communication module, the local random number R1 corresponding to the client, and the gateway random number R2 corresponding to the master station, using the SM3 cryptographic digest algorithm. The session key is the SM4 symmetric encryption key.
[0211] Step 502: establishing a data transmission encryption tunnel between the master station and the 5G secure communication module according to the session key;
[0212] In a specific implementation, based on the session key, an encrypted data transmission tunnel is established between the main station and the 5G secure communication module. The method can be as follows: first, a secondary encrypted session key is received from the client, wherein the secondary encrypted session key is the key obtained after the client encrypts the session key; then, the secondary encrypted session key is decrypted to obtain the session key to establish an encrypted data transmission tunnel between the main station and the 5G secure communication module.
[0213] Combined with the above content, it can be known that the master station corresponds to the first private key certificate issued by the CA server, and the secondary encrypted session key is decrypted to obtain the session key to establish an encrypted data transmission tunnel between the master station and the 5G secure communication module. Specifically, it can be: use the first private key certificate to decrypt the secondary encrypted session key to obtain the session key to establish an encrypted data transmission tunnel between the master station and the 5G secure communication module.
[0214] Step 503: Based on the session key, perform bidirectional identity authentication on the 5G secure communication module and the master station;
[0215] Combined with the above content, it can be seen that the process of two-way authentication between the 5G secure communication module and the main station based on the session key can be mainly divided into the main station authentication process and the client authentication process.
[0216] Specifically, in combination with the master station identity authentication process provided by the client side, for the master station, its identity authentication process can be implemented by executing the following sub-steps S71 to S75:
[0217] Step S71: receiving a first encrypted ciphertext sent by a client, where the first encrypted ciphertext is a ciphertext generated by the client first calling an encryption chip to obtain a first encrypted random number and then encrypting the first encrypted random number with a session key;
[0218] Step S72: Decrypt the first encrypted ciphertext using the session key to obtain a first encrypted random number;
[0219] Step S73: calling a cryptographic machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext;
[0220] Step S74: encrypting the second encrypted ciphertext using the session key to obtain a third encrypted ciphertext;
[0221] Step S75: Send the third encrypted ciphertext to the client, so that the client first uses the session key to decrypt the third encrypted ciphertext to obtain the second encrypted ciphertext, and then uses the encryption chip to authenticate the second encrypted ciphertext as the main station, and when the main station authentication passes, determines that the main station is a trusted main station.
[0222] Specifically, in combination with the client identity authentication process provided by the client side, for the client, its identity authentication process can be implemented by executing the following sub-steps S81 to S83:
[0223] Step S81: randomly generate a second encrypted random number, encrypt the second encrypted random number using the session key to obtain a fourth encrypted ciphertext, and send the fourth encrypted ciphertext to the client;
[0224] Step S82: receiving a fifth encrypted ciphertext sent by the client, where the fifth encrypted ciphertext is obtained by first decrypting the fourth encrypted ciphertext using the session key by the client to obtain a second encrypted random number, and then encrypting the second encrypted random number using the encryption chip;
[0225] Step S83: Perform client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications. If the client identity authentication passes, the client is determined to be a trusted client.
[0226] Step 504: If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
[0227] In combination with the encryption and decryption communication process of sending data from the client to the main station side (the terminal / client encrypts and sends data, and the main station receives and decrypts data) given on the client side in the aforementioned embodiment, for the main station side, the encryption and decryption communication process corresponding to this process can be implemented by executing the following sub-steps S91 to S93:
[0228] Step S91: receiving second complete ciphertext data sent by the client, wherein the second complete ciphertext data is the ciphertext data obtained by the client first performing packetization, encryption, and data splicing processing on the first to-be-sent data based on the baseband chip and the encryption chip, and then performing secondary encryption on the first complete ciphertext data according to the session key;
[0229] Step S92: Decrypt the second complete ciphertext data using the session key to obtain the first complete ciphertext data;
[0230] Step S93: Call the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0231] Similarly, in combination with the encryption and decryption communication process of sending data from the main station to the client (the main station encrypts and sends data, and the terminal / client receives and decrypts data) given on the client side in the above embodiment, for the main station, the encryption and decryption communication process corresponding to the process can be implemented by executing the following sub-steps S101 to S103:
[0232] Step S101: when the master station sends data to the client, obtain second data to be sent;
[0233] Step S102: calling a cryptographic machine to encrypt the second data to be sent to obtain third complete ciphertext data;
[0234] Step S103: encrypting the third complete ciphertext data by using the session key to obtain fourth complete ciphertext data;
[0235] Step S104: Send the fourth complete ciphertext data to the client, so that the client can use the session key to decrypt the fourth complete ciphertext data to obtain the third complete ciphertext data, and then unpack, decrypt and splice the third complete ciphertext data in sequence based on the baseband chip and the encryption chip to obtain the second data to be sent.
[0236] It should be noted that, in order to enable those skilled in the art to better distinguish data of the same type but with different actual meanings, the embodiments of the present invention use terms such as first and second to distinguish and explain some technical features. The terms such as first and second are only used to distinguish data and have no other special meanings. It can be understood that the present invention is not limited to this.
[0237] In an embodiment of the present invention, a 5G encrypted communication method is provided. For the master station side, during the data communication process, the master station interacts with the client through a random number bidirectional encryption method, so that the client generates a session key and a secondary encrypted session key obtained after encrypting the session key; the secondary encrypted session key sent by the client is received, the secondary encrypted session key is decrypted, and the session key is obtained to establish a data transmission encryption tunnel between the master station and the 5G secure communication module; based on the session key, the 5G secure communication module and the master station are bidirectionally authenticated; if the bidirectional authentication passes, the application layer data between the client and the master station is encrypted and decrypted through the session key. Thus, by establishing a data transmission encryption tunnel and bidirectional authentication, dual encryption of the application layer and the link layer can be constructed, further improving the security of data transmission. In combination with the 5G secure communication module and the 5G encrypted communication method provided by the present invention, the interaction between the power terminal equipment and the power business can be realized, and remote security management of multiple different terminal equipment can be realized, and access status analysis and data security transmission can be performed through the 5G secure communication module, thereby meeting the distributed resource security access to the power business master station requirements.
[0238] Reference Figure 6 , shows a structural block diagram of a 5G encryption communication device provided by an embodiment of the present invention, wherein the 5G encryption communication device is applied to a client side, and the client corresponds to a 5G security communication module; the 5G encryption communication device may specifically include:
[0239] The first encryption tunnel establishment module 601 is used to interact with the master station through a random number bidirectional encryption method, generate a session key, and encrypt the session key and send it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station;
[0240] A first two-way identity authentication module 602, configured to perform two-way identity authentication on the 5G secure communication module and the master station based on the session key;
[0241] The first encryption and decryption communication module 603 is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
[0242] In an optional embodiment, the 5G secure communication module is integrated with an encryption chip; the first encryption tunnel establishment module 601 includes:
[0243] A client registration message sending module, used to send a client registration message to the main station, wherein the client registration message includes a local random number randomly generated by the encryption chip;
[0244] A registration response message receiving module, used to receive a registration response message returned by the master station after performing registration verification based on the client registration message, wherein the registration response message includes a gateway random number randomly generated by the master station and a first public key certificate of the master station;
[0245] A legitimacy verification module, used to verify the legitimacy of the first public key certificate, and after the legitimacy verification is passed, send the second public key certificate of the 5G secure communication module to the master station end, so that the master station end can call the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0246] The session key generation module is used to receive the security verification result of the master station, and generate a session key through the encryption chip using a password digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
[0247] In an optional embodiment, the encrypted tunnel first establishing module 601 further includes:
[0248] A secondary encryption session key generation module, used for encrypting the session key by using the first public key certificate to obtain a secondary encryption session key;
[0249] The secondary encrypted session key sending module is used to send the secondary encrypted session key to the main station through the public network, so that the main station can use the first private key certificate to decrypt the secondary encrypted session key and obtain the session key to establish a data transmission encryption tunnel between the 5G secure communication module and the main station.
[0250] In an optional embodiment, the two-way identity first authentication module 602 includes:
[0251] A first encrypted ciphertext generation module, used to call the encryption chip to obtain a first encrypted random number, encrypt the first encrypted random number using the session key, generate a first encrypted ciphertext, and send the first encrypted ciphertext to the master station;
[0252] A third encrypted ciphertext receiving module is used to receive a third encrypted ciphertext sent by the master station, wherein the third encrypted ciphertext is obtained by the master station first decrypting the first encrypted ciphertext using the session key to obtain a first encrypted random number, then calling the cipher machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext, and then encrypting the second encrypted ciphertext using the session key;
[0253] A third encrypted ciphertext decryption module, used to decrypt the third encrypted ciphertext using the session key to obtain a second encrypted ciphertext;
[0254] A master station identity authentication module, used to perform master station identity authentication on the second encrypted ciphertext through the encryption chip, and if the master station identity authentication passes, the master station end is determined to be a trusted master station end;
[0255] a fourth encrypted ciphertext receiving module, configured to receive a fourth encrypted ciphertext sent by the master station, wherein the fourth encrypted ciphertext is a ciphertext obtained by first randomly generating a second encrypted random number by the master station, and then encrypting the second encrypted random number with the session key;
[0256] a fourth encrypted ciphertext decryption module, configured to decrypt the fourth encrypted ciphertext using the session key to obtain the second encrypted random number;
[0257] a fifth encrypted ciphertext generating module, configured to encrypt the second encrypted random number through the encryption chip to obtain a fifth encrypted ciphertext;
[0258] The fifth encrypted ciphertext sending module is used to send the fifth encrypted ciphertext to the main station end, so that the main station end can perform client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications, and determine that the client is a trusted client when the client identity authentication passes.
[0259] In an optional embodiment, the 5G secure communication module further includes a baseband chip, and the encryption and decryption first communication module 603 includes:
[0260] A first complete ciphertext data generating module is used to obtain first data to be sent when the client sends data to the master station, and perform data unpacking, encryption and data splicing processing on the first data to be sent in sequence through the baseband chip and the encryption chip to obtain first complete ciphertext data;
[0261] A second complete ciphertext data generating module, used to perform secondary encryption on the first complete ciphertext data by using the session key to obtain second complete ciphertext data;
[0262] The second complete ciphertext data sending module is used to send the second complete ciphertext data to the main station end, so that the main station end uses the session key to decrypt the second complete ciphertext data to obtain the first complete ciphertext data, and calls the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0263] In an optional embodiment, the 5G secure communication module further includes a baseband chip, and the encryption and decryption first communication module 603 includes:
[0264] a fourth complete ciphertext data receiving module, configured to receive fourth complete ciphertext data sent by the master station, wherein the fourth complete ciphertext data is ciphertext data obtained by the master station first invoking a cryptographic machine to encrypt the second data to be sent to obtain third complete ciphertext data, and then encrypting the third complete ciphertext data using the session key;
[0265] a fourth complete ciphertext data decryption module, configured to decrypt the fourth complete ciphertext data using the session key to obtain third complete ciphertext data;
[0266] The third complete ciphertext data processing module is used to perform data unpacking, decryption and data splicing processing on the third complete ciphertext data in sequence based on the baseband chip and the encryption chip to obtain second data to be sent.
[0267] In an optional embodiment, the 5G encryption communication device further includes:
[0268] The first key distribution module is used to distribute and write encryption and decryption keys to the 5G secure communication module offline through a key management system, and distribute a first CA certificate at the same time, wherein the first CA certificate includes the second public key certificate of the 5G secure communication module.
[0269] Reference Figure 7, shows a structural block diagram of a 5G encryption communication device provided by an embodiment of the present invention, wherein the 5G encryption communication device is applied to a master station side, and the master station is connected to at least one client for communication; each of the clients corresponds to a 5G security communication module; for any of the clients, the 5G encryption communication device may specifically include:
[0270] A random number two-way encryption module 701 is used to interact with the client through a random number two-way encryption method so that the client generates a session key;
[0271] The second encryption tunnel establishment module 702 is used to establish a data transmission encryption tunnel between the master station and the 5G secure communication module according to the session key;
[0272] A two-way identity second authentication module 703, configured to perform a two-way identity authentication on the 5G secure communication module and the master station based on the session key;
[0273] The second encryption and decryption communication module 704 is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
[0274] In an optional embodiment, the encrypted tunnel second establishing module 702 includes:
[0275] A secondary encrypted session key receiving module, used to receive a secondary encrypted session key sent by the client, wherein the secondary encrypted session key is a key obtained by the client after encrypting the session key;
[0276] The secondary encrypted session key decryption module is used to decrypt the secondary encrypted session key to obtain the session key so as to establish an encrypted data transmission tunnel between the master station and the 5G secure communication module.
[0277] In an optional embodiment, the 5G secure communication module is integrated with an encryption chip, and the master station corresponds to an SSL gateway device; the random number bidirectional encryption module 701 includes:
[0278] A client registration message receiving module, used for receiving a client registration message sent by the client, wherein the client registration message includes a local random number, and the local random number is randomly generated based on the encryption chip;
[0279] A gateway random number generation module, used for performing registration verification on the customer registration message, and when the registration verification is passed, randomly generating a gateway random number based on the SSL gateway device;
[0280] A registration response message sending module, used for integrating the gateway random number and the first public key certificate of the master station into a registration response message, and sending the message to the client, so that the client can verify the legitimacy of the first public key certificate;
[0281] A second public key certificate security verification module is used to receive the second public key certificate of the 5G secure communication module sent by the client after the legitimacy verification is passed, and call the CA server of the power grid dispatching department to perform security verification on the second public key certificate;
[0282] The security verification result sending module is used to send the security verification result to the client after the security verification is passed, so that the client can generate a session key through the encryption chip using a password digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
[0283] In an optional embodiment, the master station corresponds to the first private key certificate, and the secondary encrypted session key decryption module is specifically used for:
[0284] The first private key certificate is used to decrypt the secondary encrypted session key to obtain the session key, so as to establish an encrypted data transmission tunnel between the main station and the 5G secure communication module.
[0285] In an optional embodiment, the two-way identity second authentication module 703 includes:
[0286] A first encrypted ciphertext receiving module is used to receive a first encrypted ciphertext sent by the client, where the first encrypted ciphertext is a ciphertext generated by the client first calling the encryption chip to obtain a first encrypted random number and then encrypting the first encrypted random number with the session key;
[0287] A first encrypted ciphertext decryption module, used to decrypt the first encrypted ciphertext using the session key to obtain a first encrypted random number;
[0288] A second encrypted ciphertext generation module, used for calling a cryptographic machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext;
[0289] A second encrypted ciphertext encryption module, used to encrypt the second encrypted ciphertext using the session key to obtain a third encrypted ciphertext;
[0290] A third encrypted ciphertext sending module is used to send the third encrypted ciphertext to the client, so that the client first uses the session key to decrypt the third encrypted ciphertext to obtain a second encrypted ciphertext, and then performs a master station identity authentication on the second encrypted ciphertext through the encryption chip, and when the master station identity authentication passes, determines that the master station end is a trusted master station end;
[0291] A second encrypted random number encryption module is used to randomly generate a second encrypted random number, encrypt the second encrypted random number using the session key to obtain a fourth encrypted ciphertext, and send the fourth encrypted ciphertext to the client;
[0292] a fifth encrypted ciphertext receiving module, configured to receive a fifth encrypted ciphertext sent by the client, wherein the fifth encrypted ciphertext is a ciphertext obtained by firstly decrypting the fourth encrypted ciphertext by the client using the session key to obtain the second encrypted random number, and then encrypting the second encrypted random number by the encryption chip;
[0293] The client identity authentication module is used to perform client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications. If the client identity authentication passes, the client is determined to be a trusted client.
[0294] In an optional embodiment, the 5G secure communication module further includes a baseband chip, and the encryption and decryption second communication module 704 includes:
[0295] A second complete ciphertext data receiving module is used to receive second complete ciphertext data sent by the client, wherein the second complete ciphertext data is the ciphertext data obtained by the client after first performing packetization, encryption, and data splicing processing on the first data to be sent based on the baseband chip and the encryption chip, and then performing secondary encryption on the first complete ciphertext data according to the session key;
[0296] A second complete ciphertext data decryption module, used to decrypt the second complete ciphertext data using the session key to obtain the first complete ciphertext data;
[0297] The first complete ciphertext data decryption module is used to call the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
[0298] In an optional embodiment, the 5G secure communication module further includes a baseband chip, and the encryption and decryption second communication module 704 includes:
[0299] A second data to be sent acquisition module, used for acquiring second data to be sent when the master station sends data to the client;
[0300] A second data encryption module to be sent, used for calling a cryptographic machine to encrypt the second data to be sent to obtain third complete ciphertext data;
[0301] A third complete ciphertext data encryption module, used to encrypt the third complete ciphertext data by using the session key to obtain fourth complete ciphertext data;
[0302] The fourth complete ciphertext data sending module is used to send the fourth complete ciphertext data to the client, so that the client uses the session key to decrypt the fourth complete ciphertext data to obtain the third complete ciphertext data, and then based on the baseband chip and the encryption chip, the third complete ciphertext data is unpacked, decrypted and spliced in sequence to obtain the second data to be sent.
[0303] In an optional embodiment, the 5G encryption communication device further includes:
[0304] The second key distribution module is used to distribute and write encryption and decryption keys to the cipher machine of the master station offline through the key management system, and distribute the second CA certificate at the same time. The second CA certificate includes the first public key certificate and the first private key certificate of the master station.
[0305] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the aforementioned method embodiment.
[0306] An embodiment of the present invention further provides an electronic device, the device comprising a processor and a memory:
[0307] The memory is used to store the program code and transmit the program code to the processor;
[0308] The processor is used to execute the 5G encrypted communication method of any embodiment of the present invention according to the instructions in the program code.
[0309] An embodiment of the present invention also provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the 5G encrypted communication method of any embodiment of the present invention.
[0310] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0311] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0312] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0313] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0314] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0315] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A 5G encrypted communication method, It is characterized in that Applied to the client side, the client corresponds to a 5G secure communication module; The method comprises: Perform two round-trip information exchanges with the master station through random number bidirectional encryption, generate a session key, and encrypt the session key and send it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station; Based on the session key, the 5G secure communication module and the master station are simultaneously authenticated in both directions in combination with encrypted random number bidirectional verification; If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
2. The 5G encrypted communication method according to claim 1, It is characterized in that The 5G secure communication module is integrated with an encryption chip; the two round-trip information interactions with the master station are performed in a random number bidirectional encryption manner to generate a session key, including: Sending a client registration message to the main station, wherein the client registration message includes a local random number randomly generated by the encryption chip; Receiving a registration response message returned by the master station after performing registration verification based on the client registration message, the registration response message including a gateway random number randomly generated by the master station and a first public key certificate of the master station; Performing legitimacy verification on the first public key certificate, and after passing the legitimacy verification, sending the second public key certificate of the 5G secure communication module to the master station, so that the master station can call the CA server of the power grid dispatching department to perform security verification on the second public key certificate; The result of passing the security verification of the master station is received, and based on the local random number, the gateway random number and the master control key of the encryption chip, a session key is generated by the encryption chip using a cryptographic digest algorithm.
3. The 5G encrypted communication method according to claim 2, It is characterized in that The step of encrypting the session key and sending it to the master station to establish an encrypted data transmission tunnel between the 5G secure communication module and the master station includes: Encrypting the session key by using the first public key certificate to obtain a secondary encrypted session key; The secondary encrypted session key is sent to the master station via the public network, so that the master station can use the first private key certificate to decrypt the secondary encrypted session key and obtain the session key to establish an encrypted data transmission tunnel between the 5G secure communication module and the master station.
4. The 5G encrypted communication method according to claim 2, It is characterized in that The method of performing two-way identity authentication on the 5G secure communication module and the master station at the same time based on the session key and in combination with the encrypted random number two-way verification includes: Calling the encryption chip to obtain a first encrypted random number, using the session key to encrypt the first encrypted random number to generate a first encrypted ciphertext, and sending the first encrypted ciphertext to the master station; Receive a third encrypted ciphertext sent by the master station, wherein the third encrypted ciphertext is obtained by the master station first decrypting the first encrypted ciphertext using the session key to obtain a first encrypted random number, then calling the cipher machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext, and then encrypting the second encrypted ciphertext using the session key; Decrypting the third encrypted ciphertext using the session key to obtain a second encrypted ciphertext; Performing master station identity authentication on the second encrypted ciphertext through the encryption chip, and if the master station identity authentication passes, determining that the master station end is a trusted master station end; Receiving a fourth encrypted ciphertext sent by the master station, wherein the fourth encrypted ciphertext is a ciphertext obtained by first randomly generating a second encrypted random number by the master station and then encrypting the second encrypted random number with the session key; Decrypting the fourth encrypted ciphertext using the session key to obtain the second encrypted random number; Encrypting the second encrypted random number by the encryption chip to obtain a fifth encrypted ciphertext; The fifth encrypted ciphertext is sent to the main station end, so that the main station end performs client identity authentication on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications, and determines that the client is a trusted client when the client identity authentication passes.
5. The 5G encrypted communication method according to claim 2, It is characterized in that The 5G secure communication module also includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes: When the client sends data to the main station, first data to be sent is obtained, and the first data to be sent is unpacked, encrypted, and spliced in sequence by the baseband chip and the encryption chip to obtain first complete ciphertext data; Using the session key, re-encrypt the first complete ciphertext data to obtain second complete ciphertext data; The second complete ciphertext data is sent to the main station, so that the main station uses the session key to decrypt the second complete ciphertext data to obtain the first complete ciphertext data, and calls the cryptographic machine to decrypt the first complete ciphertext data to obtain the first data to be sent.
6. The 5G encrypted communication method according to claim 2, It is characterized in that The 5G secure communication module also includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes: Receive fourth complete ciphertext data sent by the master station, wherein the fourth complete ciphertext data is ciphertext data obtained by the master station first calling the cipher machine to encrypt the second data to be sent to obtain third complete ciphertext data, and then encrypting the third complete ciphertext data by using the session key; Decrypting the fourth complete ciphertext data using the session key to obtain third complete ciphertext data; Based on the baseband chip and the encryption chip, data unpacking, decryption and data splicing are performed on the third complete ciphertext data in sequence to obtain second data to be sent.
7. The 5G encrypted communication method according to any one of claims 2 to 6, It is characterized in that Also includes: The encryption and decryption keys of the 5G secure communication module are distributed and written offline through the key management system, and the first CA certificate is distributed at the same time. The first CA certificate includes the second public key certificate of the 5G secure communication module.
8. A 5G encrypted communication method, It is characterized in that Applied to a master station side, the master station is in communication connection with at least one client; Each of the clients corresponds to a 5G secure communication module; For any of the clients, the method includes: Performing two round-trip information exchanges with the client through a random number bidirectional encryption method, so that the client generates a session key; According to the session key, a data transmission encryption tunnel is established between the master station and the 5G secure communication module; Based on the session key, the 5G secure communication module and the master station are simultaneously authenticated in both directions in combination with encrypted random number bidirectional verification; If the two-way identity authentication is passed, the session key is used to encrypt and decrypt the application layer data between the client and the main station.
9. The 5G encrypted communication method according to claim 8, It is characterized in that The step of establishing a data transmission encryption tunnel between the master station and the 5G secure communication module according to the session key includes: Receiving a secondary encrypted session key sent by the client, where the secondary encrypted session key is a key obtained by the client after encrypting the session key; The secondary encrypted session key is decrypted to obtain the session key to establish an encrypted data transmission tunnel between the master station and the 5G secure communication module.
10. The 5G encrypted communication method according to claim 8, It is characterized in that The 5G secure communication module is integrated with an encryption chip, and the master station corresponds to an SSL gateway device; The performing two round-trip information interactions with the client through a random number bidirectional encryption method so that the client generates a session key includes: Receiving a client registration message sent by the client, wherein the client registration message includes a local random number, and the local random number is randomly generated based on the encryption chip; Performing registration verification on the customer registration message, and when the registration verification passes, randomly generating a gateway random number based on the SSL gateway device; Integrate the gateway random number and the first public key certificate of the master station into a registration response message, and send the message to the client, so that the client can verify the legitimacy of the first public key certificate; Receive the second public key certificate of the 5G secure communication module sent by the client after the legitimacy verification is passed, and call the CA server of the power grid dispatching department to perform security verification on the second public key certificate; After the security verification is passed, the security verification result is sent to the client, so that the client can generate a session key through the encryption chip using a cryptographic digest algorithm based on the local random number, the gateway random number and the master key of the encryption chip.
11. The 5G encrypted communication method according to claim 9, It is characterized in that The master station corresponds to the first private key certificate, and the decrypting of the secondary encrypted session key to obtain the session key to establish a data transmission encryption tunnel between the master station and the 5G secure communication module includes: The first private key certificate is used to decrypt the secondary encrypted session key to obtain the session key, so as to establish an encrypted data transmission tunnel between the main station and the 5G secure communication module.
12. The 5G encrypted communication method according to claim 10, It is characterized in that The method of performing two-way identity authentication on the 5G secure communication module and the master station at the same time based on the session key and in combination with the encrypted random number two-way verification includes: receiving a first encrypted ciphertext sent by the client, where the first encrypted ciphertext is a ciphertext generated by the client first calling the encryption chip to obtain a first encrypted random number and then encrypting the first encrypted random number using the session key; Decrypting the first encrypted ciphertext using the session key to obtain a first encrypted random number; Calling a cryptographic machine to encrypt the first encrypted random number to obtain a second encrypted ciphertext; Encrypting the second encrypted ciphertext using the session key to obtain a third encrypted ciphertext; The third encrypted ciphertext is sent to the client, so that the client first uses the session key to decrypt the third encrypted ciphertext to obtain the second encrypted ciphertext, and then performs master station identity authentication on the second encrypted ciphertext through the encryption chip, and when the master station identity authentication passes, determines that the master station is a trusted master station; Randomly generate a second encrypted random number, encrypt the second encrypted random number using the session key to obtain a fourth encrypted ciphertext, and send the fourth encrypted ciphertext to the client; receiving a fifth encrypted ciphertext sent by the client, wherein the fifth encrypted ciphertext is a ciphertext obtained by the client first decrypting the fourth encrypted ciphertext using the session key to obtain the second encrypted random number, and then encrypting the second encrypted random number using the encryption chip; The client identity authentication is performed on the fifth encrypted ciphertext through two consecutive encryption and decryption authentications. If the client identity authentication passes, it is determined that the client is a trusted client.
13. The 5G encrypted communication method according to claim 10, It is characterized in that The 5G secure communication module also includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes: Receive second complete ciphertext data sent by the client, wherein the second complete ciphertext data is obtained by the client first performing packetization, encryption, and data splicing processing on the first data to be sent based on the baseband chip and the encryption chip, and then performing secondary encryption on the first complete ciphertext data according to the session key to obtain the first complete ciphertext data; Decrypting the second complete ciphertext data using the session key to obtain the first complete ciphertext data; The cryptographic machine is called to decrypt the first complete ciphertext data to obtain the first data to be sent.
14. The 5G encrypted communication method according to claim 10, It is characterized in that The 5G secure communication module also includes a baseband chip, and the encryption and decryption communication of application layer data between the client and the master station through the session key includes: When the master station sends data to the client, obtaining second data to be sent; Calling a cryptographic machine to encrypt the second data to be sent to obtain third complete ciphertext data; Encrypting the third complete ciphertext data by using the session key to obtain fourth complete ciphertext data; The fourth complete ciphertext data is sent to the client, so that the client uses the session key to decrypt the fourth complete ciphertext data to obtain the third complete ciphertext data, and then based on the baseband chip and the encryption chip, the third complete ciphertext data is unpacked, decrypted and spliced in sequence to obtain the second data to be sent.
15. The 5G encrypted communication method according to any one of claims 10 to 14, It is characterized in that Also includes: The encryption and decryption keys of the cipher machine at the master station are distributed and written offline through the key management system, and a second CA certificate is distributed at the same time. The second CA certificate includes the first public key certificate and the first private key certificate of the master station.
16. A 5G encrypted communication device, It is characterized in that Applied to the client side, the client corresponds to a 5G secure communication module; The device comprises: The first encryption tunnel establishment module is used to perform two round-trip information exchanges with the master station through a random number bidirectional encryption method, generate a session key, and encrypt the session key and send it to the master station to establish a data transmission encryption tunnel between the 5G secure communication module and the master station; A first two-way identity authentication module, used to perform two-way identity authentication on the 5G secure communication module and the master station at the same time based on the session key and in combination with encrypted random number two-way verification; The first encryption and decryption communication module is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
17. A 5G encrypted communication device, It is characterized in that Applied to a master station side, the master station is in communication connection with at least one client; Each of the clients corresponds to a 5G secure communication module; For any of the above-mentioned clients, the device includes: A random number two-way encryption module, used to perform two round-trip information interactions with the client through a random number two-way encryption method, so that the client generates a session key; The second encryption tunnel establishment module is used to establish an encryption tunnel for data transmission between the master station and the 5G secure communication module according to the session key; A second two-way identity authentication module, used to perform two-way identity authentication on the 5G secure communication module and the master station at the same time based on the session key and in combination with encrypted random number two-way verification; The second encryption and decryption communication module is used to encrypt and decrypt the application layer data between the client and the main station through the session key when the two-way identity authentication is passed.
18. An electronic device, It is characterized in that The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the 5G encrypted communication method described in any one of claims 1-15 according to the instructions in the program code.
19. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the 5G encrypted communication method described in any one of claims 1-15.
