OpenVpn-based cloud edge data trusted communication method and system
By using the combination of OpenVPN virtual network channel and dynamic token in the power system, the problem of unsafe and high cost data transmission in cloud-edge collaborative communication is solved, a safe and reliable data transmission channel is realized, management costs are reduced and management is improved. improve system security.
Patent Information
- Application Number
- CN202410844495.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-24
AI Technical Summary
Existing technologies have problems with insecure data transmission, high cost, and limited transmission in cloud-edge collaborative communications in power systems, especially because the existing OpenVPN standard authentication method cannot effectively manage the number of devices and expired keys, and quantum encryption Key distribution requires high equipment and laying costs, and cannot meet the communication needs of wide areas.
Use OpenVPN to establish a virtual network channel, manage the authentication and encrypted communication between VPN clients and servers through the combination of digital certificates and dynamic tokens, use the authentication platform to uniformly manage certificates and keys, dynamically generate tokens and update them regularly, and enhance Communication security.
It realizes a trusted, reliable and secure data transmission channel between edge devices and the cloud, reduces management costs, improves system security and maintainability, avoids the risk of key leakage, and supports multicast and multicast Broadcast communication.
Smart Images

Figure CN118694592A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system data communication, and specifically relates to a method and system for ensuring trusted communication of cloud-edge data by using a VPN virtual network channel in edge computing applications. Background Art
[0002] The power system is a hierarchical physical system that carries a large amount of information. It requires a large amount of information collection, transmission and data processing tasks for automated and intelligent equipment. Through information interaction and functional coordination on the source side, grid side, load side and dispatch side, the power safety of users can be solved together. With the development of information technology, edge computing, as one of the key technologies of the Internet of Things, has gradually been applied to power metering data collection systems, providing efficient and reliable technical guarantees for the intelligent transformation of the power industry.
[0003] Edge computing allocates part of the original cloud business to the edge of the network for processing. Through the collaborative work of cloud computing and edge computing, the real-time requirements of various tasks are met while ensuring the overall performance of the system. The edge is responsible for the calculation, storage and transmission of data based on local information, which not only reduces the occupation of network bandwidth, but also reduces the risk of data leakage, and ensures the timeliness and accuracy of data collection and processing; at the same time, the cloud is responsible for big data analysis, model training, algorithm update and other tasks, realizing the unified aggregation, management and application of various gateway data, and effectively supporting the reform of the power market.
[0004] Due to the strict requirements of the power grid on network security, establishing a secure data transmission mechanism between edge devices and the cloud has become an unavoidable problem for the system. In the past, the power industry generally used 4G, WiFi, Ethernet, carrier and other communication methods to implement data exchange and transmission, but in the cloud-edge collaborative communication scenario, data may be transmitted directly on the Internet. Faced with threats such as viruses, DDoS attacks, and man-in-the-middle attacks on the Internet, these traditional communication methods cannot guarantee data security.
[0005] Since the existing OpenVPN standard only supports three authentication methods: pre-shared key, username / password and third-party certificate, all three methods require proper protection of key information such as passwords and keys, and lack key management methods, there are problems such as being unable to control the number of authentication devices and revoking expired device keys.
[0006] Prior art document 1 (CN107612899A) discloses an OpenVPN secure communication method and communication system based on quantum keys. The communication method of the present invention is implemented between a server and at least one client as two parties in OpenVPN network communication. The communication system of the present invention includes a server and at least one client as two parties in OpenVPN network communication. The two parties in communication are respectively matched with a quantum device. The quantum devices of the two parties in communication store corresponding quantum keys for identity authentication and data encryption transmission between the two parties in communication.
[0007] The existing technology still has the following technical problems: quantum key distribution requires highly precise quantum devices and equipment to implement, and requires the construction of dedicated quantum networks, all of which require high costs; at the same time, the quantum key distribution system is limited by the transmission distance of photons and cannot meet the needs of cloud-edge collaborative communication under wide-area conditions. Summary of the invention
[0008] In order to solve the deficiencies in the prior art, the present invention provides a method for establishing a virtual network channel using OpenVPN in edge computing applications to ensure trusted communication of cloud-edge data, which can solve the technical problems in the prior art of unreliable communication between edge devices and the cloud, high setup cost, and limited transmission.
[0009] The present invention adopts the following technical solution.
[0010] A cloud-edge data trusted communication method based on OpenVPN includes the following steps:
[0011] Step 1: Establish an authentication channel between the VPN client and the VPN server;
[0012] Step 2: The VPN client and VPN server exchange digital certificates, and both parties verify the legitimacy of the certificates and confirm the identity of the other party.
[0013] Step 3: The authentication platform is used to manage VPN clients and VPN servers. The VPN client sends a request to the authentication platform for a dynamic token. After processing the dynamic token, a digital token is obtained. The digital token is added to the control message of OpenVPN and sent to the VPN server. The VPN server verifies the received control message. After the verification is passed, the VPN client and the VPN server exchange keys and establish a VPN virtual network channel for data transmission.
[0014] Step 4: The VPN client periodically sends a request to the authentication platform to apply for a new dynamic token, and refreshes the dynamic token before the token expires;
[0015] In step 5, the VPN client and server use the key information exchanged in step 3 to symmetrically encrypt the network message on the VPN virtual network channel. The cloud computing platform and the edge device use the VPN server and VPN client as communication agents respectively, and communicate based on the encrypted message data.
[0016] Preferably, in step 3, applying for a dynamic token specifically includes:
[0017] The VPN client's request to the authentication platform for a dynamic token includes the following information: AppKey, timestamp, and request summary information. The request summary information is calculated as follows:
[0018] d = encrypt(data, AppSecret)
[0019]
[0020] In the formula, d is the summary information of the request, timestamp is the current timestamp when the request is initiated, and Q i is the i-th other business data parameter in the request, m is the number of other business parameters, and data represents intermediate data;
[0021] Preferably, the dynamic token returned by the authentication platform to the VPN client is encrypted using an asymmetric encryption algorithm, and the VPN client uses AppSecret to decrypt and obtain the character string of the dynamic token.
[0022] Preferably, the VPN server and the authentication platform are in the same trusted network, and the dynamic token sent by the authentication platform is synchronized to the VPN server through the trusted network.
[0023] Preferably, in step 3, the processing of the dynamic token specifically includes:
[0024] After the VPN client obtains the dynamic token from the authentication platform, it converts the dynamic token into a 64-bit digital token T and adds it to the attribute string structure of the OpenVPN control message.
[0025] T=H(token,packet_id)
[0026] Among them, packet_id is the increasing serial number of the control message, and H is the hash function that outputs a 64-bit number.
[0027] Preferably, in step 3, the VPN server verifies the received control message specifically including:
[0028] After receiving the control message, the VPN server calculates the verification digital token T' based on the dynamic token, and compares the verification digital token T' with the digital token T in the received control message to see if they are the same. If they are the same, the verification passes. If they are not the same, the data packet is discarded.
[0029] Preferably, in step 4, the dynamic token used by the VPN server has a time limit. The dynamic token is generated and managed by the authentication platform, and each token expires after a specified time.
[0030] Preferably, in step 5, OpenVpn uses virtual network card technology to intercept network layer IP messages, symmetrically encrypts the entire IP message and sends it from the real network card. The VPN gateway needs to add a new IP header and sequentially add the VPN gateway's HMAC header, IV header and data packet sequence number before encrypting the payload.
[0031] Preferably, in step 5, the VPN gateway needs to verify the integrity of the datagram before decrypting the received datagram, including:
[0032] Verify the HMAC header of the message to confirm the integrity of the data packet. If it is incomplete, the data packet will be discarded.
[0033] Perform CBC check on the IV header to confirm the integrity of the data packet. If it is incomplete, the data message will be discarded;
[0034] The data packets are reordered according to the data packet sequence numbers, including ascending order of the data packets according to the data packet sequence numbers, and packet discarding for data packets with duplicate sequence numbers.
[0035] A cloud-edge data trusted communication system based on OpenVPN, comprising: a cloud computing platform, an edge device, a VPN server, a VPN client, and an authentication platform;
[0036] The cloud computing platform is a cloud resource management platform that uses containerization technology to manage computing resources of edge devices and dispatch computing tasks, and send call requests and feedback on processing results;
[0037] The edge device is used to receive cloud computing platform requests and perform computing tasks, including data storage, processing, caching, and privacy protection, and feed back the results to the cloud computing platform;
[0038] The VPN server and VPN client are embedded gateway devices, which are used to encrypt and decrypt the inlet and outlet network traffic, integrate with other software platforms, intercept and customize the connection authentication process of OpenVpn; each VPN server device has a server certificate, and each VPN client device has a client certificate and a set of AppKey and AppSecret key information;
[0039] The authentication platform is used to manage VPN servers and VPN clients, and to issue and manage digital certificates for devices.
[0040] The present invention also provides a terminal, comprising a processor and a storage medium;
[0041] The storage medium is used to store instructions;
[0042] The processor is used to operate according to the instructions to execute the steps of the OpenVpn-based cloud-edge data trusted communication method.
[0043] The present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the OpenVPN-based cloud-edge data trusted communication method are implemented.
[0044] The beneficial effect of the present invention is that, compared with the prior art, the present invention proposes a method for establishing trusted communication of cloud-edge collaborative data using OpenVpn, and uses a combination of digital certificates and dynamic tokens to establish a VPN virtual network dedicated tunnel between edge devices and the cloud, ensuring the security and reliability of the entire communication process; the present invention integrates the functions of the OpenVpn device and the authentication platform, inserts a digital token into the OpenVpn control message and performs verification, provides new protection measures for the entire connection establishment process, increases the difficulty for attackers to forge data, can effectively prevent the risk of accidental leakage of digital certificates during manual distribution management, improves the security and maintainability of the system, and establishes a reliable, trusted and secure transmission channel between the cloud computing platform and the edge device. The present invention includes at least the following beneficial effects:
[0045] 1. It makes full use of the advantages of digital certificates. The key length of digital certificates is at least 2048 bits, which is much longer than the length of ordinary keys in the system. It is extremely difficult to crack under the existing computing power, providing a higher level of security for OpenVPN's private communications;
[0046] 2. The system uses the authentication platform as the device management platform and CA certificate issuing agency to allocate digital certificates to VPN server programs and digital certificates and AppKey and AppSecret keys to VPN client programs. The unified authentication platform is used to manage authentication credentials in a unified manner, standardize management and maintenance work, and reduce management costs;
[0047] 3. The present invention extends and modifies the options string of OpenVPN, and adds a calculated digital dynamic token to the message; the token has the characteristics of regular update, and is related to the implementation of the authentication platform algorithm, so that the digital dynamic token has a different value in each data packet, which increases the difficulty for attackers to crack and forge data. Even if the digital certificate and other information are leaked, it is difficult for the third party to use it, thereby reducing the security risks caused by the accidental leakage of digital certificates, keys and other information due to poor management;
[0048] 4. During the communication establishment process, the client and server VPN gateway first exchange digital certificates to verify the other party, thereby ensuring the identity of the other party is credible and encrypting the subsequent communication process; then the client periodically obtains the dynamic token and inserts the digital token into the control message header after processing. The server needs to verify whether the digital token is correct before decrypting the data. Incorrect and expired tokens can be directly discarded.
[0049] 5. The cloud computing platform and edge devices communicate data through the VPN channel. The entire IP data packet is encrypted as the payload of the OpenVPN protocol, ensuring the confidentiality and integrity of the entire data content including the IP address, and better protecting the user's privacy information. At the same time, because there is no need to modify the IP packet header, this method also supports multicast and multicast communications. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flow chart of the cloud-edge data trusted communication method based on OpenVPN in the present invention;
[0051] Figure 2 It is a structural diagram of the OpenVPN-based cloud-edge data trusted communication system of the present invention;
[0052] Figure 3 It is a timing diagram of the VPN gateway of the present invention establishing a trusted communication channel;
[0053] Figure 4 It is a structural diagram of an Ethernet control message of the present invention;
[0054] Figure 5 It is a structural diagram of a TLS payload of the present invention;
[0055] Figure 6 It is a structural diagram of an Ethernet data message of the present invention. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.
[0057] like Figure 1 As shown, Figure 1 A flowchart of a cloud-edge data trusted communication method based on OpenVPN (application layer VPN implementation based on OpenSSL library) provided in an embodiment of the present application. The method can be executed through a VPN gateway and an authentication platform to establish a virtual private network VPN (Virtual Private Network) channel for data transmission. The VPN gateway includes a VPN client and a VPN server, such as Figure 3 As shown, Figure 3 Sequence diagram for establishing a trusted communication channel for a VPN gateway.
[0058] Combination Figure 1 and Figure 3 The method comprises the following steps:
[0059] Step 1: An authentication channel is established between the VPN client and the VPN server via UDP (User Datagram Protocol).
[0060] Step 2: The VPN client and VPN server exchange digital certificates through the handshake protocol. Both parties verify the legitimacy of the certificates and confirm the identity of the other party.
[0061] If the certificate verification passes, go to step 3; if the certificate verification fails, the communication ends;
[0062] Step 3: The VPN client sends a request to the authentication platform for a dynamic token. After processing the dynamic token, the digital token is added to the control message of OpenVPN, and the link initialization and key exchange work are continued. After receiving the message, the VPN server needs to verify the validity of the token.
[0063] After successful authentication, the VPN server and VPN client can exchange key information and establish a data transmission channel; after token authentication fails, the communication ends;
[0064] Specifically, in step 3, the VPN client uses AppKey (unique identifier of the application) and AppSecret (key of the application) as business credentials for calling the authentication platform function, and the request for obtaining the dynamic token should contain the following information: AppKey, timestamp, and request summary information.
[0065] Among them, the digest calculation method selects an irreversible algorithm similar to HMAC, and the entire request content is signed by AppSecret to ensure the integrity of the data.
[0066] Further preferably, the calculation method of the request summary information in the present invention is:
[0067] d = encrypt(data, AppSecret)
[0068]
[0069] Among them, d is the summary information of the request, timestamp is the current timestamp when the request is initiated, Q i is the i-th other business data parameter in the request, m is the number of other business parameters, and data represents intermediate data.
[0070] The dynamic token returned by the authentication platform is encrypted using an asymmetric encryption algorithm, and the VPN client uses AppSecret to decrypt and obtain the token string.
[0071] In step 3 of this embodiment, the VPN client calls the authentication platform interface to obtain a dynamic token, performs the following calculation on the obtained dynamic token, converts the token into a 64-bit digital token T, and adds the digital token T to the OpenVpn control message header;
[0072] The digital token T is calculated as:
[0073] T=H(token,packet_id)
[0074] Among them, packet_id is the increasing serial number of the control message, and H is the hash function that outputs a 64-bit number.
[0075] OpenVPN channels include control channels and data channels, where different channel types are distinguished by operation codes. Control messages are mainly used to implement key exchange and ACK functions. The OpenVPN control message header is as follows: Figure 4 The OVPN header contains the OpenVpn operation code and session ID. The Session ID is the TLS session ID. The Packet ID is the message increment number. The control message and data message have independent logical channels, and the Packet IDs of the two are independent of each other.
[0076] The TLS payload structure in the control message is as follows Figure 5 As shown, the exchanged key information is included, and the attribute string (Options string) is a string ending with a null character, which is used to compare whether the configurations of the OpenVpn server and the client are consistent. In the present invention, the obtained 64-bit digital token T is added to the end of the Options string and passed to the server.
[0077] In step 3 of this embodiment, the VPN server and the authentication platform are in the same trusted network and can communicate securely. The creation and revocation of dynamic tokens should be synchronized to the VPN server. The VPN stores a complete token information for verifying each connected message.
[0078] After receiving the control message, the VPN server needs to recalculate the digital token T and compare it with the digital token in the message header. If the digital token T is different, the data packet is discarded.
[0079] Step 4: The VPN client periodically sends a request to the authentication platform to apply for a new dynamic token, and refreshes the dynamic token before the token expires;
[0080] In step 4, the encryption key used by the VPN server is time-limited. The VPN client needs to periodically refresh the local dynamic token to ensure the normal operation of the data channel. If the dynamic token fails to be obtained, the communication link should be terminated immediately.
[0081] Further preferably, the validity period of the dynamic token in the present invention is less than 10 minutes.
[0082] In step 5, the VPN client and server use the key information exchanged in step 3 to symmetrically encrypt the network message on the VPN virtual network channel, and the cloud computing platform and the edge device communicate data through the encrypted network message.
[0083] In step 5, OpenVPN uses virtual network card technology to intercept network layer IP packets, symmetrically encrypts the packets, and sends them out from the real network card. The format of the encrypted data packet is as follows: Figure 6 As shown in the figure, the original IP data packet is used as the payload of OpenVPN and is symmetrically encrypted using the key exchanged in step 3. Symmetric encryption has the advantages of high efficiency and speed, and is suitable for encrypting and decrypting large amounts of data. Because a new IP header is added, the original IP address does not need to be modified, and the data packet can be easily routed in the network, and multicast and multicast transmission modes are supported.
[0084] In step 5 of this embodiment, OpenVPN uses virtual network card technology to intercept network layer IP messages, symmetrically encrypts the entire IP message and sends it from the real network card. The VPN gateway needs to add a new IP header and sequentially add the VPN gateway's HMAC header, IV header and Packet ID before the encrypted payload to ensure that the data packet is not tampered with by a third party during transmission. The added data header is as follows: Figure 6 shown.
[0085] Among them, the HMAC (Hash-based Message Authentication Code) header is used to calculate the summary information of the transmission payload to ensure the integrity of the data packet;
[0086] The IV header is used to calculate the CBC cyclic redundancy check code of the payload, which is used to detect errors or tampering during data transmission;
[0087] Packet ID (data packet sequence number) is used to reorder data packets to prevent data replay.
[0088] Furthermore, before decrypting the received data packets, the VPN gateway needs to check the data header, including recalculating and comparing the HMAC header and IV header of the data packet. If the data is incomplete, the packet is discarded; and the data packets are reordered according to the Packet ID and handed over to the upper layer protocol for processing. The verification process specifically includes:
[0089] Verify the HMAC header of the message to confirm the integrity of the data packet. If the data is incomplete, the message will be discarded.
[0090] Perform CBC check (Cyclic Redundancy Check) on the IV header to confirm the integrity of the data packet. If the data is incomplete, the message will be discarded.
[0091] The data packets are reordered according to the Packet ID, including ascending order of the data packets according to the data packet sequence number, and packet discarding for the data packets with duplicate sequence numbers.
[0092] like Figure 2 As shown, the present invention also proposes a cloud-edge data trusted communication system based on OpenVPN, which is used to implement the above communication method. The system includes a cloud computing platform, an edge device, a VPN gateway, and an authentication platform;
[0093] Among them, the edge devices and VPN clients are located in the local area network of each substation, the cloud computing platform, authentication platform and VPN server are deployed on the public cloud, the VPN client and VPN server act as proxies for network traffic, and establish a VPN virtual network channel between the two networks for secure communication between cloud-edge devices.
[0094] The cloud computing platform is a cloud resource management platform that uses containerization technology. It can execute computing tasks, manage computing resources of edge devices, dispatch computing tasks, and send call requests and feedback of processing results.
[0095] Edge devices are used to receive requests from cloud computing platforms and perform computing tasks, including data storage, processing, caching, device management, privacy protection, and feed back computing results to the cloud computing platform.
[0096] The VPN gateway is an embedded gateway device that integrates the OpenVpn software program to encrypt and decrypt the inlet and outlet network traffic. At the same time, it uses the OpenVpn plugin mechanism to integrate with other software platforms to intercept the OpenVpn connection authentication process and customize the processing.
[0097] In the present invention, the VPN gateway includes a VPN server and a VPN client, and the authentication platform is used to manage the devices of the VPN server and the VPN client, and at the same time, as a public key infrastructure, issue certificates for all devices. A digital certificate is an encryption technology used for secure communication on a public network, used to verify the identities of both parties in communication and ensure the confidentiality and integrity of the communication content.
[0098] The authentication platform includes a CA certificate, which can issue device certificates for each VPN server and VPN client. Each VPN server device has a server certificate, and each VPN client device has a client certificate and a set of AppKey and AppSecret key information. The certificate and key information of the present invention are applied to the device side through a trusted secure network to avoid being intercepted by a third party.
[0099] The authentication platform centrally manages digital certificates and key information. Each VPN gateway in the system should be registered as an asset in the authentication platform. If necessary, the authentication platform can revoke the device's certificate and key information to limit device access.
[0100] AppKey is the unique identifier of the application, which is used to identify and verify the identity of the application; AppSecret is the key of the application, which is usually kept confidential. When calling the authentication platform related interface, the VPN client program will use AppSecret to encrypt communication with the authentication platform to ensure the security of communication.
[0101] A dynamic token is a set of digital passwords with a certain complexity generated in real time and valid for no more than 10 minutes.
[0102] The beneficial effect of the present invention is that, compared with the prior art, the present invention integrates the functions of the OpenVpn device and the authentication platform, proposes the use of dynamic tokens, effectively prevents the risk of accidental leakage of digital certificates during manual distribution and management, improves the security and maintainability of the system, and establishes a reliable, trustworthy and secure transmission channel between the cloud computing platform and the edge device.
[0103] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0104] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive lists) of computer readable storage medium include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), static random access memories (SRAM), portable compact disk read-only memories (CD-ROM), digital versatile disks (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or convex structures in grooves on which instructions are stored, and any suitable combination thereof. Computer readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (e.g., light pulses by optical fiber cables), or electrical signals transmitted by wires.
[0105] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0106] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages-such as Smalltalk, C++, etc., and conventional procedural programming languages-such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network-including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may be personalized by utilizing the state information of a computer-readable program instruction, and the electronic circuit may execute a computer-readable program instruction, thereby realizing various aspects of the present disclosure.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A cloud-edge data trusted communication method based on OpenVPN, characterized in that: The steps include: Step 1: Establish an authentication channel between the VPN client and the VPN server; Step 2: The VPN client and VPN server exchange digital certificates, and both parties verify the legitimacy of the certificates and confirm the identity of the other party. Step 3: The authentication platform is used to manage VPN clients and VPN servers. The VPN client sends a request to the authentication platform for a dynamic token. After processing the dynamic token, a digital token is obtained. The digital token is added to the control message of OpenVPN and sent to the VPN server. The VPN server verifies the received control message. After the verification is passed, the VPN client and the VPN server exchange keys and establish a VPN virtual network channel for data transmission. Step 4: The VPN client periodically sends a request to the authentication platform to apply for a new dynamic token, and refreshes the dynamic token before the token expires; In step 5, the VPN client and server use the key information exchanged in step 3 to symmetrically encrypt the network message on the VPN virtual network channel. The cloud computing platform and the edge device use the VPN server and VPN client as communication agents respectively, and communicate based on the encrypted message data.
2. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: In step 3, applying for a dynamic token specifically includes: The VPN client's request to the authentication platform for a dynamic token includes the following information: AppKey, timestamp, and request summary information. The request summary information is calculated as follows: d=encrypt(data,AppSecret) In the formula, d is the summary information of the request, timestamp is the current timestamp when the request is initiated, and Q i is the i-th other business data parameter in the request, m is the number of other business parameters, and data represents intermediate data.
3. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: The authentication platform returns the dynamic token to the VPN client, which is encrypted using an asymmetric encryption algorithm. The VPN client uses AppSecret to decrypt the dynamic token string.
4. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: The VPN server and the authentication platform are in the same trusted network, and the dynamic token sent by the authentication platform is synchronized to the VPN server through the trusted network.
5. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: In step 3, the processing of the dynamic token specifically includes: After the VPN client obtains the dynamic token from the authentication platform, it converts the dynamic token into a 64-bit digital token T and adds it to the attribute string structure of the OpenVPN control message. T=H(token,packet_id) Among them, packet_id is the increasing serial number of the control message, and H is the hash function that outputs a 64-bit number.
6. The OpenVPN-based cloud-edge data trusted communication method according to claim 4, characterized in that: In step 3, the VPN server verifies the received control message specifically including: After receiving the control message, the VPN server calculates the verification digital token T' based on the dynamic token, and compares the verification digital token T' with the digital token T in the received control message to see if they are the same. If they are the same, the verification passes. If they are not the same, the data packet is discarded.
7. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: In step 4, the dynamic token used by the VPN server is time-limited. The dynamic token is generated and managed by the authentication platform, and each token expires after a specified time.
8. The OpenVPN-based cloud-edge data trusted communication method according to claim 1, characterized in that: In step 5, OpenVpn uses virtual network card technology to intercept network layer IP messages, symmetrically encrypts the entire IP message and sends it from the real network card. The VPN gateway needs to add a new IP header and add the VPN gateway's HMAC header, IV header and data packet sequence number in sequence before the encrypted payload.
9. The OpenVPN-based cloud-edge data trusted communication method according to claim 8, characterized in that: In step 5, the VPN gateway needs to verify the integrity of the received data message before decrypting the data message, including: Verify the HMAC header of the message to confirm the integrity of the data packet. If it is incomplete, the data packet will be discarded. Perform CBC check on the IV header to confirm the integrity of the data packet. If it is incomplete, the data message will be discarded; The data packets are reordered according to the data packet sequence numbers, including ascending order of the data packets according to the data packet sequence numbers, and packet discarding for data packets with duplicate sequence numbers.
10. A cloud-edge data trusted communication system based on OpenVPN, using the cloud-edge data trusted communication method described in any one of claims 1 to 9, characterized in that: include: Cloud computing platform, edge devices, VPN servers, VPN clients, authentication platforms; The cloud computing platform is a cloud resource management platform that uses containerization technology to manage computing resources of edge devices and dispatch computing tasks, and send call requests and feedback on processing results; The edge device is used to receive cloud computing platform requests and perform computing tasks, including data storage, processing, caching, and privacy protection, and feed back the results to the cloud computing platform; The VPN server and VPN client are embedded gateway devices, which are used to encrypt and decrypt the inlet and outlet network traffic, integrate with other software platforms, intercept and customize the connection authentication process of OpenVpn; each VPN server device has a server certificate, and each VPN client device has a client certificate and a set of AppKey and AppSecret key information; The authentication platform is used to manage VPN servers and VPN clients, and to issue and manage digital certificates for devices.
11. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the cloud-edge data trusted communication method based on OpenVpn according to any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the cloud-edge data trusted communication method based on OpenVPN are implemented.
Citation Information
Cited By
Application client execution system
CN120415776A
Automatic OpenVPN account management method based on approval linkage
CN120934931A
Data isolation security access system and method based on SQL (Structured Query Language) analysis
CN121077833A
