WO2024174596A1 - 一种数据加密方法和相关装置 - Google Patents
一种数据加密方法和相关装置 Download PDFInfo
- Publication number
- WO2024174596A1 WO2024174596A1 PCT/CN2023/131400 CN2023131400W WO2024174596A1 WO 2024174596 A1 WO2024174596 A1 WO 2024174596A1 CN 2023131400 W CN2023131400 W CN 2023131400W WO 2024174596 A1 WO2024174596 A1 WO 2024174596A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- address
- server
- key
- traffic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/56—Routing software
- H04L45/566—Routing instructions carried by the data packet, e.g. active networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0407—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0825—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0838—Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Definitions
- the present application relates to the field of communications, and in particular to data encryption technology.
- One mode of network communication is routing forwarding based on the destination address. Its main working principle is: after the intermediate routing node receives a message from the sender or other intermediate routing nodes, it extracts the corresponding forwarding information from the message header, such as the corresponding output port, etc. The intermediate routing node forwards the message through the port to the next-hop routing node (such as an intermediate routing node or the destination) until the destination receives the message.
- the next-hop routing node such as an intermediate routing node or the destination
- the security of network communication is an important condition for measuring Internet services, client experience and operators.
- the security of network communication is mainly reflected in aspects such as communication security and privacy protection.
- various security detection software and hardware are mainly used to perform security detection on received messages, so as to reduce the risk of data tampering, traffic hijacking and communication being illegally obtained to a certain extent; as shown in Figure 1, when a terminal device requests data from a data storage server, the server can perform security detection on the request message or message confirmation message from the terminal device through a security hardware platform, and filter the detected malicious messages to further improve the security of network communication.
- the present application provides a data encryption method and related devices, which can reduce the possibility of leaking user privacy through the source address and destination address of the message and meet the current privacy protection needs.
- an embodiment of the present application provides a data encryption method, which is executed by a terminal device and includes:
- the source address of the message request message includes the terminal encryption address, which is obtained by encrypting the terminal address of the terminal device using the public key of the server;
- traffic data in the traffic message is acquired.
- an embodiment of the present application provides a data encryption method, which is executed by a server and includes:
- a traffic message returned in response to the message request message is sent to the terminal device.
- the source address of the traffic message includes the server encryption address, which is obtained by encrypting the server address of the server using the public key of the terminal device.
- an embodiment of the present application provides a data encryption device, including a sending unit, an acquiring unit, a decryption unit and a receiving unit;
- a sending unit used to send a message request message to the server, where the source address of the message request message includes a terminal encryption address, where the terminal encryption address is obtained by encrypting the terminal address of the terminal device using the public key of the server;
- An acquisition unit is used to receive a flow message returned by the server in response to the message request message, wherein the source address of the flow message includes a server encryption address, and the server encryption address is obtained by encrypting the server address of the server using the public key of the terminal device;
- a decryption unit used to decrypt the server encrypted address using the private key of the terminal device to obtain the server pending address
- the receiving unit is used to obtain the flow data in the flow message in response to the server pending address being consistent with the server address.
- an embodiment of the present application provides a data encryption device, including an acquisition unit, a decryption unit, and a sending unit;
- An acquisition unit is used to receive a message request message sent by a terminal device, wherein the source address of the message request message includes a terminal encryption address, and the terminal encryption address is obtained by encrypting the terminal address of the terminal device using a public key of a server;
- a decryption unit used to decrypt the terminal encrypted address using the server's private key to obtain the terminal address
- the sending unit is used to send a traffic message returned in response to a message request message to a terminal device according to the terminal address.
- the source address of the traffic message includes a server encryption address, which is obtained by encrypting the server address of the server using the public key of the terminal device.
- an embodiment of the present application provides a data encryption system, which includes a terminal device and a server, wherein the terminal device is used to execute the method described in the above aspects, and the server is used to execute the method described in the above aspects.
- an embodiment of the present application provides a computer device, the computer device comprising a processor and a memory:
- the memory is used to store computer programs and transmit program codes to the processor
- the processor is configured to execute the method described above according to instructions in the computer program.
- an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
- an embodiment of the present application provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the method described in the above aspects.
- the source addresses in the message request messages and traffic messages exchanged between them are encrypted by the public key of the receiving end, and the real source address of the message can only be obtained after decryption by the private key of the receiving end.
- the reason for hiding the source address is that a message in network communication generally carries the source address and the destination address in order to achieve correct forwarding.
- the attacker intercepts the message the relationship between the source address and the destination address can be obtained. Accordingly, it can be determined when the user of the terminal device What content services have been accessed online, thereby inferring the user's privacy information.
- the terminal device as the data receiving end can also restore the real source address of the received message through its own private key, ensuring the security of message reception.
- FIG1 is a schematic diagram of a security enhancement based on security hardware assistance
- FIG2 is a schematic diagram of a data encryption scenario provided in an embodiment of the present application.
- FIG3 is a schematic diagram of an attacker obtaining user privacy based on source address and destination address
- FIG4 is a flow chart of a data encryption method provided by an embodiment of the present application.
- FIG5 is a schematic diagram of a message request message provided in an embodiment of the present application.
- FIG6 is a schematic diagram of a flow message provided in an embodiment of the present application.
- FIG7 is a schematic diagram of a flow confirmation message provided in an embodiment of the present application.
- FIG8 is a schematic diagram of a key creation message provided in an embodiment of the present application.
- FIG9 is a schematic diagram of an intermediate routing node adding an intermediate shared key to a key creation message provided by an embodiment of the present application
- FIG10 is a schematic diagram of a key confirmation message provided in an embodiment of the present application.
- FIG11 is a schematic diagram of a flow message with encrypted source address and destination address provided in an embodiment of the present application.
- FIG12 is a specific flow chart of a data encryption method provided in an embodiment of the present application.
- FIG13 is a communication diagram of a data encryption method provided in an embodiment of the present application.
- FIG14 is a device structure diagram of a data encryption device provided in an embodiment of the present application.
- FIG15 is a device structure diagram of another data encryption device provided in an embodiment of the present application.
- FIG16 is a system structure diagram of a data encryption system provided in an embodiment of the present application.
- FIG17 is a structural diagram of a terminal device provided in an embodiment of the present application.
- FIG18 is a structural diagram of a server provided in an embodiment of the present application.
- network communication can be security-checked through various security detection software and hardware.
- security detection hardware can be used to perform security detection on various messages exchanged between terminal devices and data storage servers, and detect malicious messages to filter, thereby improving the security of network communication to a certain extent.
- the security of network communication can also be improved from the perspective of communication protocols, mainly by encrypting the data in the message through encryption, thereby reducing the risk of data being illegally obtained, tampered with, and redirected during message forwarding.
- TCP Transmission Control Protocol
- SSL Secure Sockets Layer
- TLS Transport Layer Security
- UDP User Datagram Protocol
- QUIC Quick UDP Internet Connection
- an embodiment of the present application provides a data encryption method and related apparatus to encrypt the source address in the message exchanged between the terminal device and the server, thereby reducing the possibility of attackers obtaining the terminal user's private information through the source address and destination address of the message, and improving the security of network communications in the dimension of the message address.
- the data encryption method provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
- the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, a smart TV, etc., but is not limited thereto.
- the terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
- Cloud storage is a new concept extended and developed from the concept of cloud computing.
- a distributed cloud storage system (hereinafter referred to as the storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
- the storage method of the storage system is: create a logical volume, and when creating a logical volume, allocate physical storage space for each logical volume.
- the physical storage space may be composed of disks of a storage device or several storage devices.
- the client stores data on a logical volume, that is, stores the data on the file system.
- the file system divides the data into many parts, each of which is an object.
- the object contains not only data but also additional information such as data identification (ID, ID entity).
- ID data identification
- the file system writes each object to the physical storage space of the logical volume, and the file system records the storage location information of each object.
- the file system can allow the client to access the data based on the storage location information of each object.
- the process of the storage system allocating physical storage space to logical volumes is as follows: according to the capacity estimation of the objects stored in the logical volumes (this estimation often has a large margin relative to the capacity of the actual objects to be stored) and the groups of independent redundant disk arrays (RAID, Redundant Array of Independent Disks), the physical storage space is pre-divided into stripes.
- One logical volume can be understood as a stripe, thereby allocating physical storage space to the logical volume.
- the server in the embodiment of the present application may be a cloud server that implements cloud storage.
- FIG 2 is a schematic diagram of a data encryption scenario provided in an embodiment of the present application, wherein the aforementioned computer devices are terminal devices and servers, and the terminal devices and the server can communicate over the network through interactive messages.
- the server can be a cloud server that can implement cloud storage, or it can be a non-cloud server, such as a traditional physical server, etc.
- the server can be a content server, which refers to a server that can implement the functions of a content distribution network (CDN, Content Delivery Network).
- CDN Content Delivery Network
- a message refers to a request message sent by a terminal device to a server.
- a message request message may be a request message sent by a terminal device to a server for requesting to obtain target content.
- the source address of the message request message is not directly disclosed, as shown in FIG2 . Instead, it is encrypted using the public key of the receiving end (server). Only after the server receives the message request message and decrypts it using the server's private key can the real source address of the message request message be obtained.
- the terminal device obtains traffic messages from the server.
- Traffic messages refer to messages sent by the server to the terminal device in response to the message request message.
- the traffic message may be a message sent by the server for the terminal device to obtain the target content.
- the source address of the traffic message is not directly disclosed. As shown in FIG2 , it is encrypted using the public key of the receiving end (terminal device). Only after the terminal device obtains the traffic message and decrypts it using the private key of the terminal device can the real source address of the traffic message be obtained.
- the reason for hiding the source address in the message request message and the traffic message is that in order to realize the correct forwarding of the message in the network communication, the message generally carries the source address and the destination address.
- the attacker intercepts the message the relationship between the source address and the destination address of the message can be obtained.
- the private information such as when the user of the terminal device went online and what content services were obtained can be inferred.
- the attacker between the terminal device and the server can obtain "a certain user is online" according to the source address and the destination address of the message request message and the traffic message.
- the attacker can determine the content service the user is obtaining based on whether the message request message or traffic message contains an address in the address set.
- the content Internet Protocol (IP) addresses used by a cloud service provider to provide services for a short video platform are: IP1, IP2, IP3, ..., IP100. If the source address or destination address in the message intercepted by the attacker contains the above IP addresses, the attacker can infer the user status of "the user is watching a short video.”
- the terminal device which is the receiving end of the traffic message, can restore the real source address of the received traffic message through its own private key, reducing the risk of the terminal device receiving messages at will and ensuring the security of message reception.
- FIG4 is a method flow chart of a data encryption method provided in an embodiment of the present application.
- a computer device is used as a terminal and a server for illustration. The method includes:
- the terminal device sends a message request message to the server.
- the source address of the message request message includes a terminal encryption address.
- the terminal encryption address is obtained by encrypting the terminal address of the terminal device using the public key of the server.
- the terminal device can communicate with the server through network interaction messages.
- a server can send messages to multiple terminal devices, and a terminal can also send request messages to multiple servers.
- This embodiment takes the network communication between a terminal device and a server as an example for explanation.
- the purpose of network communication between terminal devices and servers can be to allow terminal devices to obtain target content from the server.
- the terminal device When the terminal device obtains target content from the server through interactive messages, the terminal device is the data request end and the server is the data send end.
- the target content is the data content required by the terminal device.
- the target content can be various forms of data content, such as text, pictures, videos, live streams, etc. Since different servers can provide different data content, the terminal Before sending a message request message, the device may first determine a corresponding server according to the target content, and then send the corresponding message request message to the determined server.
- a message request message refers to a request message sent by a terminal device to a server.
- the source address in the message request message is encrypted in this embodiment, that is, the source address in the message message is hidden, so that even if the attacker intercepts the message, he can only know the destination address of the message, but cannot determine the source address of the message. That is, after intercepting the message, the attacker only knows that a device has sent a message to the server, but does not know which device sent it, and it is difficult to infer the user's privacy information.
- the source address in the message request message can be hidden, reducing the possibility of the attacker inferring the user's privacy information through the source address and destination address of the message request message.
- terminal address of the terminal device can be encrypted by the public key of the server to obtain the corresponding terminal encrypted address.
- IP_sec represents the terminal encryption address
- Key_pub_server represents the public key of the server
- IP_i represents the terminal address of the terminal device
- Enc ⁇ , ⁇ represents the encryption operation of data ⁇ using key ⁇ .
- the real terminal address can be encrypted by the public key of the server to obtain the corresponding terminal encrypted address, as shown in Figure 5.
- the terminal encrypted address can be carried in the message request message (Pkt_req), for example, it can be carried in the payload of the message request message, so that the server can determine the terminal address corresponding to the terminal device through the terminal encrypted address after obtaining the message request message, that is, the receiving end of the message request message can accurately determine the sending end of the message request message, so that in the subsequent steps, the receiving end can accurately generate a traffic message with the destination address as the sending end, thereby ensuring the security and accuracy of message transmission.
- Pkt_req message request message
- the destination address of the message request message in this embodiment is not encrypted, that is, the message request message includes the server address of the server in plain text, so that the message request message can be accurately forwarded to the server based on the server address in network communication.
- the source address of the message request message also includes a terminal hidden address, which is different from the terminal address.
- the terminal hidden address refers to the virtual source address of the plain text in the message request message.
- the terminal hidden address is obviously different from the real terminal address of the terminal device that sends the message request message.
- the message request message includes not only the terminal encryption address IP_sec, but also the terminal hidden address IP_j.
- the header of the message request message can carry the terminal hidden address, where IP_i and IP_j are not the same.
- Adding a hidden terminal address to a message request message can cause an attacker to be confused by the hidden terminal address in the message request message after intercepting the message request message, thereby tricking the attacker into making the wrong judgment that the source address of the message request message is the hidden terminal address, thereby further reducing the possibility that the attacker can obtain the real source address and destination address through the message request message and infer the user's privacy information based on this.
- the message format of the message request message will be The format of the message request message changes, and by adding the terminal hidden address to the source address of the message request message, the format of the message request message with the encrypted source address can be kept the same as that of the message with the unencrypted source address, so that in the network communication between the terminal device and the server, the forwarding device can successfully understand the meaning of the message request message according to the format of the message request message, thereby ensuring the successful forwarding of the message request message.
- S402 The server decrypts the terminal encrypted address using the server's private key to obtain the terminal address.
- the server After the server receives the message request message sent by the terminal device, it needs to determine the source address of the message request message in order to make an accurate response to the message request message. Since the source address in the message request message is hidden, the server cannot directly obtain the source address of the message request message. It is necessary to decrypt the terminal encrypted address in the message request message to obtain the corresponding terminal address.
- the terminal encryption address is obtained by encrypting the terminal address of the terminal device by the public key of the server, wherein the public key of the server refers to the public key corresponding to the server, and other devices can use the public key of the server to encrypt data, and the private key of the server is the private key of the server, and only the server has this key, that is, only the server can decrypt the data encrypted by the public key of the server through the private key of the server, so the server can decrypt the terminal encryption address through the private key of the server to obtain the terminal address.
- IP_i represents the terminal address of the terminal device
- Key_pri_server represents the private key of the server
- IP_sec represents the terminal encryption address
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- the terminal encrypted address can be decrypted by the server's private key to obtain the terminal address, which is the real source address of the message request message. That is to say, after the server obtains the message request message, it determines the real source address of the message request message by decrypting the terminal encrypted address therein, laying the foundation for the server to accurately send traffic messages to the terminal address in the subsequent steps.
- the terminal device receives a traffic message returned by the server in response to the message request message.
- the source address of the traffic message includes an encrypted address of the server.
- the encrypted address of the server is obtained by encrypting the server address of the server using the public key of the terminal device.
- a traffic message refers to a message sent by a server to a terminal device in response to a request in a message request message.
- the traffic message may be a message sent by the server for the terminal device to obtain the target content. If the target content is text required by the terminal device, the traffic message will include the data corresponding to the text. When the target content is text and pictures required by the terminal device, the traffic message will include the data corresponding to the text and pictures.
- the source address in the traffic message is also encrypted in this example, so that even if the attacker intercepts the message, he can only know the destination address of the message but cannot determine the source address of the message. That is, after intercepting the message, the attacker only knows that a device has sent a message to the terminal device, but does not know which device sent it. Accordingly, it is difficult to infer the user's private information.
- the source address in the traffic message is concealed, which reduces the possibility of the attacker inferring the user's private information through the source address and destination address of the message request message.
- server address can be encrypted using the public key of the terminal device to obtain the corresponding
- IP_sec_server represents the server encryption address
- Key_pub_client represents the public key of the terminal device
- IP_m represents the server address
- Enc ⁇ , ⁇ represents the encryption operation of data ⁇ using key ⁇ .
- the real server address can be encrypted by the public key of the terminal device to obtain the corresponding server encrypted address.
- the server encrypted address can be carried in the traffic message (Pkt_traffic), so that after the terminal device obtains the traffic message, when the source address of the traffic message is concealed, the source address of the traffic message can still be determined through subsequent steps, laying the foundation for ensuring the security of message transmission.
- the destination address of the traffic message in this embodiment is not encrypted, that is, the traffic message includes the terminal address of the terminal device in plain text, so that the traffic message can be accurately forwarded to the terminal device that sends the message request message based on the terminal address in network communication.
- the source address of the traffic message also includes a hidden server address, and the hidden server address is different from the server address.
- the server hidden address refers to the virtual source address of the plain text in the traffic message.
- the server hidden address is different from the real server address of the server sending the traffic message.
- the traffic message includes not only the server encryption address IP_sec_server, but also the terminal hidden address IP_n, where IP_n is not the same as IP_m.
- Adding the hidden server address to the traffic message can, on the one hand, allow attackers to be confused by the hidden server address in the traffic message after intercepting the traffic message, further reducing the possibility of attackers obtaining the real source address and destination address of the traffic message and inferring the user's privacy information based on this; on the other hand, it can ensure the message format of the traffic message, thereby ensuring the successful forwarding of the traffic message.
- S404 The terminal device decrypts the server encrypted address using the private key of the terminal device to obtain the server pending address.
- the terminal device In order to ensure the security of message transmission, the terminal device needs to determine the source of the obtained message to reduce the possibility of the terminal device being attacked by malicious messages. Therefore, after the terminal device obtains the traffic message from the server, it needs to determine the source address of the traffic message in order to determine the source of the traffic message. Since the source address of the traffic message is hidden, the terminal device cannot directly obtain the source address of the traffic message, and it is necessary to decrypt the server encrypted address in the traffic message to obtain the corresponding server pending address.
- the server encrypted address is obtained by encrypting the public key of the terminal device, so the terminal device can decrypt the server encrypted address by the private key of the terminal device to obtain the server pending address.
- IP_m 1 represents the server pending address
- Key_pri_client represents the private key of the terminal device
- IP_sec_server represents the server encryption address
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- the server encrypted address can be decrypted by the private key of the terminal device to obtain the server pending address, which is the real source address of the traffic message. That is to say, after the terminal device obtains the traffic message with the source address hidden, it can determine the source address of the traffic message by decrypting the server encrypted address in the traffic message. The real source address of the packet.
- the encrypted server address included in the traffic message may also be tampered with accordingly.
- the server address obtained by the terminal device after decrypting the encrypted server address may not be the real server address, that is, it is not the real address of the server itself encrypted; of course, when the traffic message is transmitted normally, the server address obtained by the terminal device after decrypting the encrypted server address in the traffic message is the real server address. Since the authenticity of the server address obtained by the terminal device after decrypting the encrypted server address cannot be confirmed for the time being, it is first referred to as the server pending address.
- the terminal device After the terminal device obtains the traffic message, it determines through S404 that the real source address of the traffic message is the server pending address, and at the same time, the destination address of the message request message sent by the terminal device is the server address of the server.
- the server address is consistent with the server pending address, it means that the destination address of the message request message sent by the terminal device is consistent with the real source address of the traffic message obtained by the terminal device, indicating that the traffic message is the message required by the terminal device to be returned for the message request message, and is not a malicious message or irrelevant message sent by other servers.
- the terminal device can receive the traffic data in the traffic message, so that the terminal device can obtain the data content in the traffic message.
- the data receiver may not be able to fully obtain the message content sent by the data sender, during the interaction between the terminal device and the server, it is necessary to determine whether the terminal device has successfully obtained the message content sent by the server.
- the terminal device may also determine a message reception result for the traffic message; and send a traffic confirmation message including the message reception result to the server, wherein the source address of the traffic confirmation message includes the terminal encryption address.
- the message reception result is used to indicate the reception status of the terminal device for the traffic message after the terminal device receives the traffic data of the traffic message, that is, the message reception result is used to reflect whether the terminal device actually successfully receives the traffic message.
- the server in the actual network communication process between the terminal device and the server, for the message request message sent by the terminal device, the server often needs to send multiple traffic messages to respond to the request in the message request message.
- the message request message is to request the server to obtain video content
- the server usually needs to send multiple traffic messages to achieve the complete transmission of the video content.
- the message reception result can be the reception status of the terminal device for the multiple traffic messages obtained by analyzing after the terminal device receives the multiple traffic messages.
- the message reception result of the terminal device for the multiple traffic messages can be reflected according to the message number range actually received (or not received) by the terminal device.
- the terminal device can periodically determine the message reception result, generate a corresponding traffic confirmation message after determining the message reception result each time, and report it to the server.
- the terminal device can send a traffic confirmation message including the message reception result to the server.
- the traffic confirmation message is used to indicate that the terminal device feeds back the message reception status to the server after receiving the traffic data of the traffic message.
- the source address in the traffic confirmation message is also hidden, that is, the source address in the traffic confirmation message is not the terminal address, but the terminal encrypted address, thereby reducing the attacker's source address through the traffic confirmation message. address and destination address, and the possibility of inferring the user's privacy information based on this.
- the source address of the flow confirmation message may also include a terminal concealed address.
- the traffic confirmation message (Pkt_ack) sent by the terminal device to the server may include the terminal hidden address IP_j, the terminal encrypted address IP_sec and the currently received message number range Pkt_num_range, wherein the terminal hidden address is used to confuse attackers and maintain the message format of the traffic confirmation message, the terminal encrypted address is used to provide the server with the encrypted real source address that only the server can decrypt, and the currently received message number range is used to indicate the message reception result of the terminal device.
- the destination address of the flow confirmation message in this embodiment is not encrypted, that is, the flow confirmation message includes the server address of the server in plain text.
- the terminal device can send a flow confirmation message including the message reception result to the server so that the server can determine the terminal device's reception status of the flow message, thereby verifying whether the flow message is successfully transmitted and ensuring the integrity of data transmission.
- the server receives a flow confirmation message including a message reception result sent by the terminal device, the source address of the flow confirmation message includes a terminal encryption address, and the message reception result is used to identify a reception status of the flow message by the terminal device;
- the server determines, based on the message reception result, that the terminal device has not received the target traffic message, the server sends the target traffic message as a traffic retransmission message to the terminal device, and the source address of the traffic retransmission message includes the server encryption address.
- the server can receive the traffic confirmation message sent by the terminal device.
- the traffic confirmation message includes a message reception result.
- the server can determine the terminal device's reception status of the target traffic message based on the message reception result.
- the server determines that the terminal device has received the target traffic message based on the message reception result, the server can determine that the target traffic message has been successfully transmitted and there is no need to retransmit the target traffic message.
- the server can send the target traffic message as a traffic retransmission message to the terminal device.
- the traffic retransmission message refers to the traffic message that the terminal device has not received as identified by the message reception result.
- the traffic retransmission message is used to retransmit the traffic message that the terminal device has not received.
- the server can retransmit the above-mentioned unreceived traffic message as a traffic retransmission message so that the terminal device can obtain the unreceived traffic message.
- the terminal device can obtain the unreceived target traffic message to ensure the reliability of message transmission between the terminal device and the server.
- the source address in the traffic retransmission message is also hidden, that is, the source address in the traffic retransmission message is not the server address, but the server encrypted address, thereby reducing the possibility of attackers inferring the user's privacy information through the source address and destination address of the traffic retransmission message.
- the source address of the traffic retransmission message may also include a server concealed address.
- the traffic retransmission message in this embodiment includes the server address of the server in plain text.
- the server After receiving the traffic confirmation message sent by the terminal device, the server can determine the terminal device's reception status of the traffic message based on the traffic confirmation message.
- the terminal device does not receive the target traffic message, that is, when the terminal device does not completely receive the traffic message returned by the server, a message reception result is generated indicating that the terminal device has not successfully received the target traffic message returned in response to the message request message, and the message is added to the traffic confirmation message.
- the server can send a traffic retransmission message to the terminal device in response to the traffic confirmation message to achieve packet retransmission and reduce the possibility of packet loss due to the message received by the terminal device.
- a terminal device receives a traffic retransmission message returned by a server in response to a traffic confirmation message.
- the traffic retransmission message is a traffic message not received by the terminal device as identified by a message reception result.
- the source address of the traffic retransmission message includes an encrypted address of the server.
- the terminal device may obtain, from the server, a traffic retransmission message returned in response to the traffic confirmation message.
- the traffic retransmission message refers to a message that the terminal device has not received and needs to retransmit.
- the terminal device may receive the unreceived traffic messages by obtaining the traffic retransmission message.
- the source address in the traffic retransmission message is also concealed.
- the source address of the traffic retransmission message may also include a server concealed address.
- the terminal device obtains the traffic retransmission message returned in response to the traffic confirmation message to achieve re-reception of the unreceived traffic message, thereby ensuring the reliability of message transmission between the terminal device and the server.
- the terminal device communicates with the server network through interactive messages
- the source addresses in the message request messages and traffic messages exchanged between them are encrypted by the public key of the receiving end, and the real source address of the message can only be obtained after decryption by the private key of the receiving end.
- the reason for hiding the source address is that since the message generally carries the source address and the destination address in the network communication in order to achieve correct forwarding, once the message is intercepted by the attacker, the attacker will obtain the relationship between the source address and the destination address, and then determine when the user of the terminal device goes online and what content services are obtained, thereby inferring the user's privacy information.
- the terminal device as the data receiving end can also restore the real source address of the received message through its own private key, ensuring the security of message reception.
- the source address of the message between the terminal device and the server is encrypted, thereby reducing the possibility of leaking user privacy through the source address and destination address of the message.
- network communication in the related art is mainly forwarded based on the destination address, if the destination address of the message is modified without authorization, the message will not be forwarded correctly, which will cause the user experience quality (QoE, Quality of Experience) and service quality (QoS, Quality of Services) to decline. Therefore, there will still be a plaintext destination address in the message, so that the message can be accurately forwarded based on the destination address, ensuring the reliable implementation of message interaction between the terminal device and the server.
- QoE Quality of Experience
- QoS Quality of Services
- the source address of the message between the terminal device and the server is encrypted, it can reduce the possibility of leaking user privacy through the source address and destination address of the message to a certain extent, but because the destination address in the message is not encrypted, it is still There is a risk of user privacy leakage, so the destination address of the largest number of traffic packets in the network communication process between the terminal device and the server can also be encrypted, so that when an attacker obtains the traffic packet, he cannot obtain the sender of the traffic packet, nor the receiver of the traffic packet, thereby further reducing the possibility of an attacker inferring the user's privacy information through the real source address and destination address.
- the terminal device receives a traffic message returned for the message request message, and accordingly, the server may send the traffic message returned for the message request message to the terminal device according to the terminal address, and in terms of the server sending the traffic message returned for the message request message to the terminal device according to the terminal address, the data encryption method specifically includes:
- the server determines a traffic link from the server to the terminal device according to the terminal address, where the traffic link includes N intermediate routing nodes, where N is an integer greater than or equal to 1.
- the server sends a traffic message returned in response to the message request message to the terminal device through N intermediate routing nodes in the traffic link.
- a traffic link refers to a link between a server and a terminal device for transmitting traffic messages.
- the server can determine the traffic link from the server to the terminal device for transmitting traffic messages based on the terminal address, where the traffic link includes N intermediate routing nodes.
- the intermediate routing node refers to the routing node included in the traffic link for forwarding traffic packets.
- the intermediate routing node is used to forward the traffic packets until the previous hop routing node of the terminal device successfully forwards the traffic packet to the terminal device.
- the server can first determine the traffic link from the server to the terminal device based on the terminal address, and then accurately forward the traffic messages from the server to the terminal device through the N intermediate routing nodes in the traffic link.
- the server can first send a key creation message to the terminal device based on the traffic link to obtain relevant information of the intermediate routing node of the traffic link, that is, in a possible implementation manner, the data encryption method also includes:
- the server generates a flow identifier and a shared key for the traffic link according to the terminal address and the server address;
- the server encrypts the shared key using the public key of the terminal device to obtain key-encrypted data
- the server sends a key creation message including key encryption data and a flow identifier to the terminal device through the traffic link.
- the source address of the key creation message includes the server encryption address.
- the key creation message is used to instruct N intermediate routing nodes to generate an intermediate shared key according to the flow identifier, encrypt the intermediate shared key by the public key of the terminal device, and add the encryption result to the key encryption data.
- FlowID represents the flow identifier
- IP_m represents the server address of the server
- IP_i represents the terminal address of the terminal device
- Port_server represents the server port of the server
- Port_client represents the terminal port of the terminal device.
- Protocol represents the communication protocol between the server and the terminal device
- Hash() represents the hash operation
- represents the concatenation operation.
- the flow identifier corresponding to the flow link for transmitting flow messages between the server and the terminal device can be determined.
- the shared key for the traffic link refers to the key information that the server calculates based on the flow identifier and shares with the terminal device.
- the shared key will be sent to the terminal device by the server after encryption, and will be used to encrypt the data sent by the terminal device to the server in subsequent steps.
- the shared key is generated by the server, it is not private to the server, but is key information that can be shared with the terminal device.
- Key_share represents the shared key
- info_server represents the server's own private information
- FlowID represents the flow identifier
- Hash() represents the hash operation
- represents the splicing operation.
- the server can calculate the shared key shared with the terminal device based on its own private information and flow identifier.
- the shared key can be encrypted according to the public key of the terminal device to obtain the corresponding key-encrypted data.
- Enc_share represents key encrypted data
- Key_pub_client represents the public key of the terminal device
- Key_share represents the shared key
- Enc ⁇ , ⁇ represents the encryption operation of data ⁇ using key ⁇ .
- the server can encrypt the shared key through the public key of the terminal device to obtain key-encrypted data that can only be decrypted by the terminal device.
- the server can send the flow identifier and key encryption data to the terminal device through a key creation message, wherein, in order to prevent the key creation message from being intercepted by an attacker during forwarding and then obtaining the relationship between the source address and the destination address in the message, the source address in the key creation message is also concealed, that is, the source address in the key creation message is not the server address, but the server encryption address, thereby reducing the possibility of an attacker inferring the user's privacy information through the source address and destination address of the key creation message.
- the source address of the key creation message can also include a server concealed address, as shown in FIG8 , the key creation message (Pkt_key) includes a server concealed address IP_n, a flow identifier FlowID, a server encryption address IP_sec_server, and key encryption data Enc_share.
- the destination address of the key creation message is not encrypted, that is, the key creation message includes the terminal address of the terminal device in plain text, so that the key creation message can be accurately forwarded to the terminal device based on the terminal address in network communication.
- the key creation message can be forwarded by the server to the terminal device through the intermediate routing node in the traffic link.
- the intermediate shared key refers to the key information calculated by the intermediate routing node according to the flow identifier and shared with the terminal device and the server.
- the intermediate shared key will be added to the key encryption data in the key creation message after encryption so as to be sent to the terminal device.
- the terminal device can send it to the server so that the server can encrypt the destination address of the traffic message according to the intermediate shared key.
- the intermediate shared key is generated by the intermediate routing node, it is not private to the intermediate routing node, but is key information that can be shared with the terminal device and the server.
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- info_i represents the private information of the i-th intermediate routing node
- FlowID represents the flow identifier
- Hash() represents the hash operation
- represents the splicing operation.
- each intermediate routing node in the traffic link can calculate the intermediate shared key shared with the terminal device and the server based on its own private information and flow identifier.
- the intermediate routing node After the intermediate routing node generates an intermediate shared key shared with the terminal device and the server according to the flow identifier, in order to allow only the terminal device to obtain the intermediate shared key according to the key confirmation message, the intermediate shared key can be encrypted according to the public key of the terminal device to obtain the corresponding encryption result.
- Enc_share_i represents the encryption result corresponding to the intermediate shared key of the i-th intermediate routing node
- Key_pub_client represents the public key of the terminal device
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- IP_router_i represents the IP address of the i-th intermediate routing node
- Enc ⁇ , ⁇ represents the encryption operation of data ⁇ using key ⁇
- represents the splicing operation.
- each intermediate routing node in the traffic link after each intermediate routing node in the traffic link generates an intermediate shared key, it can obtain the corresponding encryption result through the public key of the terminal device to the intermediate shared key.
- the intermediate shared key of each intermediate routing node in the encryption result corresponds to its IP address one by one.
- the server after the server generates the flow identifier and shared key for the traffic link, it can send a key creation message including key encryption data (including the encrypted shared key) and the flow identifier to the terminal device through the traffic link.
- the key creation message can instruct the intermediate routing node to generate an intermediate shared key based on the flow identifier, and add the encrypted intermediate shared key to the key encryption data, so that in the subsequent steps, after the terminal device obtains the key creation message, it can obtain the intermediate shared key corresponding to each intermediate routing node in the traffic link through the key encryption data in the key creation message, which lays the foundation for the subsequent step in which the server encrypts the destination address in the traffic message according to the intermediate shared key, thereby improving the reliability and security of message transmission.
- the data encryption method further includes:
- the terminal device receives a key creation message returned by the server in response to the message request message through a traffic link with the server, where the source address of the key creation message includes the server encryption address, and the key creation message includes key encryption data obtained by encrypting the public key of the terminal device;
- the terminal device decrypts the key-encrypted data using the private key of the terminal device to obtain a shared key between the terminal device and the server, and N intermediate shared keys, where the N intermediate shared keys correspond one-to-one to N intermediate routing nodes in the traffic link, and N is an integer greater than or equal to 1.
- the terminal device encrypts N intermediate shared keys using the shared key to obtain intermediate key encrypted data
- the terminal device sends a key confirmation message including the intermediate key encrypted data to the server, and the source address of the key confirmation message includes the terminal encryption address.
- the terminal device can receive the key creation message sent by the server through the traffic link. After obtaining the key creation message, it is necessary to determine the source address of the key creation message in order to make an accurate response to the key creation message. Since the source address in the key creation message is hidden, the server address of the server can be obtained by decrypting the server encrypted address in the key creation message.
- the key creation message includes key encryption data, which includes not only the encrypted shared key shared by the server and the terminal device, but also the encrypted intermediate shared key shared by each intermediate routing node in the traffic link and the terminal device and the server.
- the key-encrypted data is encrypted by the public key of the terminal device
- the key-encrypted data can be decrypted by the private key of the terminal device to obtain the shared key shared between the terminal device and the server, and the intermediate shared key corresponding to each intermediate routing node in the traffic link.
- Key_share represents the shared key
- Key_pri_client represents the private key of the terminal device
- Enc_share represents the key encrypted data corresponding to the shared key
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- IP_router_i represents the IP address of the i-th intermediate routing node
- Key_pri_client represents the private key of the terminal device
- Enc_share_i represents the encryption result corresponding to the intermediate shared key of the i-th intermediate routing node
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- the terminal device After the terminal device obtains the intermediate shared key corresponding to each intermediate routing node in the traffic link, it needs to send the intermediate shared key to the server.
- the N intermediate shared keys can be encrypted by the shared key between the terminal device and the server to obtain the intermediate key encrypted data.
- Enc_share_server_i represents the intermediate key encrypted data of the i-th intermediate routing node
- Key_share represents the shared key
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- IP_router_i represents the The IP addresses of i intermediate routing nodes
- Enc ⁇ , ⁇ indicates the encryption operation of data ⁇ using key ⁇
- indicates the concatenation operation.
- the intermediate shared key can be encrypted by the shared key to obtain the corresponding intermediate key encrypted data, in which the intermediate shared key of each intermediate routing node in the intermediate key encrypted data corresponds one-to-one to its IP address.
- the terminal device can send a key confirmation message including intermediate key encrypted data to the server, allowing the server to obtain the intermediate shared key corresponding to each intermediate routing node in the traffic link by obtaining the key confirmation message, laying the foundation for encrypting the destination address of the traffic message according to the intermediate shared key in the subsequent steps.
- the source address in the key confirmation message is also concealed, that is, the source address in the key confirmation message is not the terminal address, but the terminal encryption address, thereby reducing the possibility of an attacker inferring the user's privacy information through the source address and destination address of the key confirmation message.
- the source address of the key confirmation message can also include the terminal concealed address, as shown in Figure 10, the key confirmation message (Pkt_key_ack) includes the terminal concealed address IP_j, the terminal encryption address IP_sec and the intermediate key encrypted data Enc_share_server_i.
- the destination address of the key confirmation message is not encrypted, that is, the key confirmation message includes the server address of the server in plain text, so that the key confirmation message can be accurately forwarded to the server based on the server address in network communication.
- the key confirmation message does not need to be forwarded from the terminal device to the server based on the above-mentioned traffic link. That is, the key confirmation message only needs to be successfully forwarded from the terminal device to the server based on the server address, and does not necessarily need to be forwarded according to the intermediate routing nodes in the traffic link.
- the terminal device can determine the intermediate shared key corresponding to each intermediate routing node in the traffic link used to transmit the traffic message through the key encryption data in the key creation message, and send a key confirmation message including the intermediate key encryption data (the intermediate shared key encrypted according to the shared key) to the server, so that the server can obtain the intermediate shared key corresponding to the intermediate routing node, laying the foundation for the server to encrypt the destination address of the traffic message according to the intermediate shared key in the subsequent steps, thereby improving the reliability and security of message transmission.
- the data encryption method further includes:
- the server receives a key confirmation message returned by the terminal device in response to the key creation message.
- the source address of the key confirmation message includes the terminal encryption address.
- the key confirmation message includes intermediate key encrypted data.
- the intermediate key encrypted data is obtained by encrypting N intermediate shared keys with a shared key.
- the N intermediate shared keys correspond to N intermediate routing nodes one by one.
- the server decrypts the intermediate key encrypted data using the shared key to obtain N intermediate shared keys;
- the server obtains the encrypted routing information corresponding to each of the N intermediate routing nodes according to the N intermediate shared keys and the routing addresses of the N intermediate routing nodes.
- the corresponding encrypted routing information is obtained by encrypting the routing information of the i-th intermediate routing node and the routing information of the next hop node of the i-th intermediate routing node using the intermediate shared key corresponding to the i-th intermediate routing node.
- the server adds the encrypted routing information to the traffic message, and the destination address of the traffic message is through the target
- the intermediate shared key is obtained by encrypting the terminal address, and the target intermediate shared key is the intermediate shared key of the previous hop intermediate routing node of the terminal device in the traffic link.
- the server can receive the key confirmation message returned by the terminal device. After receiving the key confirmation message, the server needs to determine the source address of the key confirmation message so as to be able to determine that the terminal device has successfully obtained the key creation message and returned the corresponding key confirmation message. Since the source address in the key confirmation message is hidden, the terminal encrypted address in the key confirmation message can be decrypted to determine that the real source address of the key confirmation message is the terminal address of the terminal device.
- the intermediate key encrypted data is obtained by the terminal device encrypting the intermediate shared key corresponding to each intermediate routing node in the traffic link through the shared key
- the shared key is the key information shared between the terminal device and the server, so the server can decrypt the intermediate key encrypted data according to the shared key to obtain the intermediate shared key corresponding to each intermediate routing node in the traffic link.
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- IP_router_i represents the IP address of the i-th intermediate routing node
- Key_share represents the shared key
- Enc_share_server_i represents the intermediate key encrypted data of the i-th intermediate routing node
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- the server can decrypt the intermediate key encrypted data according to the shared key to obtain the intermediate shared key corresponding to each intermediate routing node in the traffic link.
- the intermediate shared key can be saved so that when a traffic message based on the traffic link is subsequently generated, the saved intermediate shared key can be directly obtained to encrypt each intermediate routing node in the traffic link.
- the server can determine the encrypted routing information used to indicate the next hop node for each intermediate routing node based on the routing information of each intermediate routing node in the traffic link, the routing information of the next hop node and the corresponding intermediate shared key, thereby encrypting each intermediate routing node in the traffic link, wherein the terminal address is the routing information of the next hop node of the previous hop intermediate routing node of the terminal device in the traffic link, and is also encrypted by the corresponding target intermediate shared key, and the target intermediate shared key refers to the intermediate shared key corresponding to the previous hop intermediate routing node of the terminal device.
- the encrypted routing information of the intermediate routing node refers to the information data encrypted by the corresponding intermediate shared key and used to indicate its next hop node.
- Enc_routing_i represents the encrypted routing information of the i-th intermediate routing node
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- IP_router_i represents the IP address of the i-th intermediate routing node
- IP_router_i+1 represents the IP address of the next hop node of the i-th intermediate routing node
- Enc ⁇ , ⁇ represents the encryption operation of data ⁇ using key ⁇
- represents the splicing operation.
- the routing information of the next hop node of the ith intermediate routing node can be encrypted by the intermediate shared key corresponding to the ith intermediate routing node to obtain the corresponding encrypted routing information.
- the intermediate routing node in the traffic link can only obtain the routing information of the next hop node, reducing the number of attackers who can hijack the traffic. The risk of using intermediate routing nodes to obtain the destination address of traffic packets.
- each intermediate routing node in the traffic link can decrypt the encrypted routing information according to the intermediate shared key corresponding to the intermediate routing node after receiving the traffic message, and obtain the routing information of the intermediate routing node and the routing information of the corresponding next-hop node.
- IP_router_i represents the IP address of the i-th intermediate routing node
- IP_router_i+1 represents the IP address of the next hop node of the i-th intermediate routing node
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- Enc_routing_i represents the encrypted routing information of the i-th intermediate routing node
- Dec ⁇ , ⁇ represents the decryption operation of data ⁇ using key ⁇ .
- the encrypted routing information can be decrypted according to the intermediate shared key of the ith intermediate routing node to obtain the IP address of the ith intermediate routing node and the IP address of the next hop node. If the IP address of the ith intermediate routing node matches its own IP address, the traffic message can be forwarded to the IP address of the next hop node; if the IP address of the ith intermediate routing node does not match its own IP address, the traffic message can be directly discarded. In other words, after the intermediate routing node decrypts the encrypted routing information according to its corresponding intermediate shared key, it will obtain the routing information of a certain intermediate routing node and the corresponding next hop node. If the routing information of the certain intermediate routing node is consistent with the routing information of the intermediate routing node itself, the intermediate routing node can forward the traffic message to the next hop node, that is, the encrypted routing information can complete the sequential forwarding of traffic messages on the traffic link.
- the server can add encrypted routing information to the traffic message, so that the traffic message does not include the plaintext destination address, but allows each intermediate routing node in the traffic link to forward the traffic message to the next-hop node in sequence according to its corresponding encrypted routing information until the traffic message is successfully forwarded to the terminal device, wherein the terminal address is encrypted by the target intermediate shared key corresponding to the previous-hop intermediate routing node of the terminal device in the traffic link.
- the terminal address as the routing information of the next-hop node of the previous-hop intermediate routing node of the terminal device, can be encrypted in the encrypted routing information of the previous-hop intermediate routing node through the target intermediate shared key, thereby realizing the encryption of the destination address in the traffic message.
- the source address in the traffic message is still hidden, that is, the source address in the traffic message is not the server address, but the server encrypted address.
- the source address of the traffic message can also include the server hidden address, and correspondingly, the destination address of the traffic message can also include the terminal hidden address.
- the traffic message (Pkt_traffic) can include the server hidden address IP_n, the terminal hidden address IP_j, the server encrypted address IP_sec_server and the encrypted routing information Enc_routing_i.
- the server After the server obtains the intermediate shared key corresponding to each intermediate routing node in the traffic link according to the key confirmation message, it can encrypt the next-hop routing information of each intermediate routing node in the traffic link according to the intermediate shared key, so that the traffic message can be accurately forwarded to the terminal device according to the encrypted routing information without including the plaintext destination address.
- the destination address can also be encrypted by encrypting the routing information, so that when the attacker intercepts the traffic message, not only can he not obtain the sender of the traffic message, but also the receiver of the traffic message, thereby further reducing the source address and destination address in the traffic message from being attacked. The inferred possibility improves the security of message transmission.
- the data encryption method specifically includes:
- the terminal device receives the traffic message returned by the server in response to the message request message through the traffic link.
- the destination address of the traffic message is obtained by encrypting the terminal address through the target intermediate shared key.
- the target intermediate shared key is the intermediate shared key of the previous hop intermediate routing node of the terminal device in the traffic link.
- the intermediate routing nodes in the traffic link can decrypt the encrypted routing information, so that the traffic message can be forwarded to the terminal device in sequence through the intermediate routing nodes in the traffic link.
- the traffic message does not include the plaintext terminal address, but the terminal address is encrypted by the target intermediate shared key in the traffic link (the intermediate shared key corresponding to the previous hop intermediate routing node of the terminal device), so that the source address and destination address of the traffic message are both encrypted in the message to achieve anonymity.
- the destination address can also be encrypted through the target intermediate shared key.
- the traffic message can be forwarded to the terminal device in sequence according to the intermediate routing nodes in the traffic link.
- the traffic message can be successfully forwarded from the server to the terminal device when both the source address and the destination address are encrypted, thereby further reducing the possibility of the source address and destination address in the traffic message being inferred by attackers and improving the security of message transmission.
- the server After the server obtains the key confirmation message sent by the terminal device, it needs to decrypt the intermediate key encrypted data in the key confirmation message according to the shared key. If the server always maintains the shared key shared with the terminal device for this purpose, this will undoubtedly increase the burden on the server. Therefore, in a possible implementation, before decrypting the intermediate key encrypted data according to the shared key in S42, the server can obtain the shared key in the following way:
- the server decrypts the terminal encrypted address using the server's private key to obtain the terminal address
- the server generates a flow identifier for the traffic link according to the terminal address and the server address;
- the server generates a shared key using the terminal address and stream identifier.
- the terminal encrypted address can be decrypted according to the server's private key to obtain the terminal address.
- FlowID represents the flow identifier
- IP_m represents the server address of the server
- IP_i represents the terminal address of the terminal device
- Port_server represents the server port of the server
- Port_client represents the terminal port of the terminal device
- Protocol represents the communication protocol between the server and the terminal device
- Hash() represents the hash operation
- represents the splicing operation.
- the server can further determine the shared key corresponding to the terminal device according to the terminal address and the flow identifier.
- Key_share represents the shared key
- info_server represents the server's own private information
- FlowID represents the flow identifier
- Hash() represents the hash operation
- represents the splicing operation.
- the server does not need to maintain the shared key shared with the terminal device all the time.
- the server can regenerate the stream based on the terminal address and server address.
- the flow identifier and shared key corresponding to the link are obtained, and the intermediate key encrypted data is decrypted by directly generating the shared key, thereby reducing the cost of the server for maintaining the shared key.
- the traffic message also includes a flow identifier, which is used to instruct the intermediate routing node to generate a corresponding intermediate shared key according to the flow identifier, and decrypt the encrypted routing information through the intermediate shared key to obtain the routing information of the next hop node.
- Key_share_i represents the intermediate shared key of the i-th intermediate routing node
- info_i represents the corresponding private information of the i-th intermediate routing node
- FlowID represents the flow identifier
- Hash() represents the hash operation
- represents the splicing operation.
- the intermediate routing nodes do not need to maintain the intermediate shared keys shared with the terminal devices and servers all the time.
- the intermediate routing nodes can regenerate the corresponding intermediate shared keys based on the flow identifier, so as to reduce the cost of the intermediate routing nodes for maintaining the intermediate shared keys.
- the specific process of the data encryption method includes:
- the terminal device sends a message request message carrying a hidden terminal address and an encrypted terminal address.
- the terminal device sends a message request message to the server, which can be used to request the server to obtain the target content.
- the message request message does not include a plain text terminal address, but instead carries the terminal encrypted address in the message request message, so as to hide the source address in the message request message by encrypting the source address. In order to further confuse attackers and maintain the message format, the message request message also carries a hidden terminal address.
- the server sends a key creation message.
- the server After receiving the message request message, the server will send a key creation message in order to obtain the intermediate shared key corresponding to the intermediate routing node included in the traffic link used to transmit the traffic message.
- the key creation message also does not include the plaintext server address. Instead, the server encrypted address is carried in the key creation message, so as to hide the source address of the key creation message by encrypting the source address. In order to further confuse attackers and maintain the message format, the key creation message also carries the server hidden address.
- the key creation message also carries the shared key shared between the server and the terminal device and the flow identifier corresponding to the traffic link.
- the intermediate routing node calculates the intermediate shared key, encrypts it and embeds it into the key creation message
- the intermediate routing node When forwarding the key creation message, the intermediate routing node will calculate the corresponding intermediate shared key through its own information and flow identification information, and encrypt the calculated intermediate shared key with the public key corresponding to the destination address (terminal device) and embed it into the key creation message, so that the terminal device can obtain the intermediate shared key through the key creation message.
- S1204 The terminal device decrypts the intermediate shared key, encrypts it, and transmits it back to the server via a key confirmation message.
- the terminal device can decrypt the encrypted intermediate shared key information carried in the key creation message according to its own private key, and encrypt the obtained intermediate shared key with the shared key shared with the server and embed it into the key confirmation message, so that the encrypted intermediate shared key can be transmitted back to the server through the key confirmation message.
- the key confirmation message does not include the plaintext terminal address, but carries the terminal encrypted address in the key confirmation message, so as to achieve the concealment of the source address in the key confirmation message by encrypting the source address. In order to further confuse attackers and maintain the message format, the key confirmation message also carries the terminal hidden address.
- the server decrypts to obtain an intermediate shared key, and uses the intermediate shared key to encrypt routing information of the traffic link.
- the server can decrypt the encrypted intermediate shared key information carried in the key confirmation message through the shared key shared with the terminal device, obtain the intermediate shared key shared with the intermediate routing node of the traffic link, and encrypt the routing information of the intermediate routing node in the traffic link through the intermediate shared key to obtain the corresponding encrypted routing information.
- Adding the encrypted routing information to the traffic message can enable the traffic message to be forwarded through the routing information corresponding to each hop of the encrypted intermediate routing node carried by the traffic message without including the plaintext destination address.
- the traffic message can encrypt the destination address through the intermediate shared key. On this basis, the traffic message can still encrypt the source address, thereby concealing both the source address and the destination address in the traffic message.
- the intermediate routing node calculates the intermediate shared key and verifies the encrypted routing information in the traffic message.
- the intermediate routing node After receiving the traffic message, the intermediate routing node can calculate the intermediate shared key again according to the flow identifier, and use the intermediate shared key to decrypt the encrypted routing information carried in the traffic message to obtain the decrypted routing information and the routing information of the corresponding next hop node.
- S1207 The intermediate routing node verifies whether its own routing information is consistent with the decrypted routing information.
- the intermediate routing node After decrypting the encrypted routing information carried in the traffic message, the intermediate routing node needs to verify whether its own routing information is consistent with the decrypted routing information.
- the traffic message can be forwarded to the next hop node to achieve sequential forwarding of the traffic message in the traffic link.
- the terminal device sends a traffic confirmation message to the server for packet loss retransmission.
- the terminal device After receiving the traffic message, the terminal device can send a traffic confirmation message to the server.
- the traffic confirmation message is used to allow the server to obtain the packet loss information of the terminal device, and when the terminal device loses packets, the server can retransmit the lost packet data by sending the traffic message again.
- the traffic confirmation message does not include the plaintext terminal address, but carries the terminal encrypted address in the traffic confirmation message, so as to hide the source address in the traffic confirmation message by encrypting the source address. In order to further confuse attackers and maintain the message format, the traffic confirmation message also carries the terminal hidden address.
- the above data encryption method is used to illustrate the network communication between the server and the terminal device B by taking the network communication between the server and the terminal device B as an example.
- the network communication between the terminal device B and the server is realized by sending a request message, a key creation message with an encrypted source address, a key confirmation message with an encrypted source address, a traffic message with an encrypted source address and a destination address, and a traffic confirmation message with an encrypted source address.
- At least one of the source address and the destination address of the message exchanged between the server and the terminal device is encrypted, and the source address and the destination address in the traffic message with the largest number are encrypted, thereby reducing the possibility of attackers obtaining user privacy through the source address and the destination address and enhancing the security of message interaction.
- FIG. 14 is a device structure diagram of a data encryption device provided in an embodiment of the present application.
- the data encryption device 1400 includes a sending unit 1401, an acquiring unit 1402, a decryption unit 1403 and a receiving unit 1404:
- the sending unit 1401 is used to send a message request message to the server, where the source address of the message request message includes a terminal encryption address, where the terminal encryption address is obtained by encrypting the terminal address of the terminal device using the public key of the server;
- the acquiring unit 1402 is configured to receive a traffic message returned by the server in response to the message request message, wherein the source address of the traffic message includes a server encryption address, and the server encryption address is obtained by encrypting the server address of the server using the public key of the terminal device;
- the decryption unit 1403 is used to decrypt the server encrypted address by using the private key of the terminal device to obtain the server pending address;
- the receiving unit 1404 is configured to obtain the flow data in the flow message in response to the pending address of the server being consistent with the server address.
- the source address of the message request message also includes a terminal hidden address, which is a virtual terminal address different from the terminal address;
- the source address of the traffic message also includes a server hidden address, which is a virtual server address different from the server address.
- the sending unit 1401 is further configured to:
- the key-encrypted data is decrypted using the private key of the terminal device to obtain a shared key between the terminal device and the server, and N intermediate shared keys, where the N intermediate shared keys correspond to N intermediate routing nodes in the traffic link, and N is an integer greater than or equal to 1;
- a key confirmation message including the intermediate key encrypted data is sent to the server, wherein the source address of the key confirmation message includes the terminal encryption address.
- the acquisition unit 1402 is used to receive, through a traffic link, a traffic message returned by the server in response to a message request message.
- the destination address of the traffic message is obtained by encrypting the terminal address using a target intermediate shared key.
- the target intermediate shared key is the intermediate shared key of the previous-hop intermediate routing node of the terminal device in the traffic link.
- the sending unit 1401 is further configured to:
- a flow confirmation message including a message reception result is sent to the server, wherein the source address of the flow confirmation message includes the terminal encryption address.
- the acquiring unit 1402 is further configured to:
- the receiving server obtains a traffic retransmission message returned in response to the traffic confirmation message.
- the traffic retransmission message is a traffic message not received by the terminal device identified by the message reception result.
- the source address of the traffic retransmission message includes the server encryption address.
- FIG. 15 is a device structure diagram of another data encryption device provided in an embodiment of the present application, wherein the data encryption device 1500 includes an acquisition unit 1501 , a decryption unit 1502 , and a sending unit 1503 ;
- the acquisition unit 1501 is used to receive a message request message sent by a terminal device, where the source address of the message request message includes a terminal encryption address, which is obtained by encrypting the terminal address of the terminal device using a public key of the server;
- the decryption unit 1502 is used to decrypt the terminal encrypted address by using the private key of the server to obtain the terminal address;
- the sending unit 1503 is used to send a traffic message returned in response to the message request message to the terminal device according to the terminal address.
- the source address of the traffic message includes a server encryption address, which is obtained by encrypting the server address of the server using the public key of the terminal device.
- the sending unit 1503 is configured to:
- the traffic link includes N intermediate routing nodes, where N is an integer greater than or equal to 1;
- the traffic message returned in response to the message request message is sent to the terminal device through N intermediate routing nodes in the traffic link.
- the sending unit 1503 is further configured to:
- a key creation message including key-encrypted data and a flow identifier is sent to the terminal device through the traffic link.
- the source address of the key creation message includes the server encryption address.
- the key creation message is used to instruct N intermediate routing nodes to generate an intermediate shared key according to the flow identifier, encrypt the intermediate shared key through the public key of the terminal device, and add the encryption result to the key-encrypted data.
- the acquiring unit 1501 is further configured to:
- the source address of the key confirmation message includes the terminal encryption address
- the key confirmation message includes intermediate key encrypted data
- the intermediate key encrypted data is obtained by encrypting N intermediate shared keys with a shared key
- the N intermediate shared keys correspond one-to-one to the N intermediate routing nodes
- the encrypted routing information corresponding to each of the N intermediate routing nodes is obtained.
- the corresponding encrypted routing information is obtained by encrypting the routing information of the i-th intermediate routing node and the routing information of the next hop node of the i-th intermediate routing node using the intermediate shared key corresponding to the i-th intermediate routing node;
- the encrypted routing information is added to the traffic message.
- the destination address of the traffic message is obtained by encrypting the terminal address through the target intermediate shared key.
- the target intermediate shared key is the previous hop intermediate routing node of the terminal device in the traffic link. Intermediate shared key.
- the acquiring unit 1501 is further configured to:
- the traffic message also includes a flow identifier, which is used to instruct the intermediate routing node to generate a corresponding intermediate shared key according to the flow identifier, and decrypt the encrypted routing information using the intermediate shared key to obtain the routing information of the next hop node.
- the sending unit 1503 is further used to: receive a flow confirmation message including a message reception result sent by the terminal device, the source address of the flow confirmation message includes a terminal encryption address, and the message reception result is used to identify a reception status of the terminal device for the flow message;
- the target traffic message is sent to the terminal device as a traffic retransmission message, and the source address of the traffic retransmission message includes the server encryption address.
- Figure 16 is a system structure diagram of a data encryption system provided in an embodiment of the present application, wherein the data encryption system 1600 includes a terminal device 1601 and a server 1602, wherein the terminal device 1601 is used to execute the method of the aforementioned method embodiment, and the server 1602 is used to execute the method of the aforementioned method embodiment.
- the embodiment of the present application also provides a computer device, which is the computer device described above and may include a terminal device or a server, and the data encryption device described above may be configured in the computer device.
- a computer device which is the computer device described above and may include a terminal device or a server, and the data encryption device described above may be configured in the computer device.
- the computer device is described below in conjunction with the accompanying drawings.
- the computer device is a terminal device
- the terminal device taking the terminal device as a mobile phone as an example:
- FIG17 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application.
- the mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490.
- RF radio frequency
- the RF circuit 1410 may be used for receiving and sending signals during information transmission or communication or during a call.
- the information is sent to the processor 1480 for processing.
- the uplink data is sent to the base station.
- the memory 1420 can be used to store software programs and modules.
- the processor 1480 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1420.
- the memory 1420 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc.
- the memory 1420 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
- the input unit 1430 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone.
- the input unit 1430 may include a touch panel 1431 and other input devices 1432 .
- the display unit 1440 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
- the display unit 1440 may include a display panel 1441.
- the mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
- a sensor 1450 such as a light sensor, a motion sensor, and other sensors.
- the audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.
- WiFi is a short-range wireless transmission technology.
- the mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1470. It provides users with wireless broadband Internet access.
- Processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and/or modules stored in memory 1420 and calling data stored in memory 1420.
- the mobile phone also includes a power source 1490 (such as a battery) for supplying power to various components.
- a power source 1490 such as a battery
- the processor 1480 included in the terminal device is also used to execute the data encryption method on the terminal device side provided in the embodiment of the present application.
- FIG. 18 is a structural diagram of a server 1500 provided in the embodiment of the present application.
- the server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) storing application programs 1542 or data 1544.
- the memory 1532 and the storage medium 1530 can be short-term storage or permanent storage.
- the program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server.
- the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.
- the server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and/or one or more operating systems 1541, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
- operating systems 1541 such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
- the steps performed by the server in the above embodiment may be based on the server structure shown in FIG. 18 .
- an embodiment of the present application further provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to execute the method provided in the above embodiment.
- the embodiments of the present application also provide a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiments.
- each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
- the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
- the device and system embodiments described above are merely schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
IP_sec=Enc{Key_pub_server,IP_i}
IP_i=Dec{Key_pri_server,IP_sec}
IP_sec_server=Enc{Key_pub_client,IP_m}
IP_m1=Dec{Key_pri_client,IP_sec_server}
FlowID=Hash(IP_m||IP_i||Port_server||Port_client||Protocol)
Key_share=Hash(info_server||FlowID)
Enc_share=Enc{Key_pub_client,Key_share}
Key_share_i=Hash(Info_i||FlowID)
Enc_share_i=Enc{Key_pub_client,Key_share_i||IP_router_i}
Key_share=Dec{Key_pri_client,Enc_share}
Key_share_i,IP_router_i=Dec{Key_pri_client,Enc_share_i}
Enc_share_server_i=Enc{Key_share,Key_share_i||IP_router_i}
Key_share_i,IP_router_i=Dec{Key_share,Enc_share_server_i}
Enc_routing_i=Enc{Key_share_i,IP_router_i||IP_router_i+1}
IP_router_i,IP_router_i+1=Dec{Key_share_i,Enc_routing_i}
FlowID=Hash(IP_m||IP_i||Port_server||Port_client||Protocol)
Key_share=Hash(info_server||FlowID)
Key_share_i=Hash(Info_i||FlowID)
Claims (19)
- 一种数据加密方法,所述方法由终端设备执行,所述方法包括:向服务器发送消息请求报文,所述消息请求报文的源地址包括终端加密地址,所述终端加密地址是通过所述服务器的公钥对所述终端设备的终端地址加密得到的;接收所述服务器针对所述消息请求报文返回的流量报文,所述流量报文的源地址包括服务器加密地址,所述服务器加密地址是通过所述终端设备的公钥对所述服务器的服务器地址加密得到的;通过所述终端设备的私钥对所述服务器加密地址进行解密,得到服务器待定地址;响应于所述服务器待定地址与所述服务器地址一致,获取所述流量报文中的流量数据。
- 根据权利要求1所述的方法,所述消息请求报文的源地址还包括终端隐匿地址,所述终端隐匿地址为与所述终端地址不同的虚拟终端地址;所述流量报文的源地址还包括服务器隐匿地址,所述服务器隐匿地址为与所述服务器地址不同的虚拟服务器地址。
- 根据权利要求1或2所述的方法,所述方法还包括:通过与所述服务器间的流量链路,接收所述服务器针对所述消息请求报文返回的密钥创建报文,所述密钥创建报文的源地址包括所述服务器加密地址,所述密钥创建报文包括通过所述终端设备的公钥加密得到的密钥加密数据;通过所述终端设备的私钥对所述密钥加密数据进行解密,得到所述终端设备与所述服务器间的共享密钥以及N个中间共享密钥,所述N个中间共享密钥与所述流量链路中的N个中间路由节点一一对应,所述N为大于等于1的整数;通过所述共享密钥对所述N个中间共享密钥进行加密,得到中间密钥加密数据;向所述服务器发送包括所述中间密钥加密数据的密钥确认报文,所述密钥确认报文的源地址包括所述终端加密地址。
- 根据权利要求3所述的方法,所述接收所述服务器针对所述消息请求报文返回的流量报文,包括:通过所述流量链路,接收所述服务器针对所述消息请求报文返回的所述流量报文,所述流量报文的目的地址是通过目标中间共享密钥对所述终端地址加密得到的,所述目标中间共享密钥为所述流量链路中所述终端设备的上一跳中间路由节点对应的中间共享密钥。
- 根据权利要求1至4任一项所述的方法,所述方法还包括:确定针对所述流量报文的报文接收结果;向所述服务器发送包括所述报文接收结果的流量确认报文,所述流量确认报文的源地址包括所述终端加密地址。
- 根据权利要求5所述的方法,所述方法还包括:接收所述服务器获取响应所述流量确认报文返回的流量重传报文,所述流量重传报文是所述报文接收结果标识的所述终端设备未接收到的流量报文,所述流量重传报文的源地址包括所述服务器加密地址。
- 一种数据加密方法,所述方法由服务器执行,所述方法包括:接收终端设备发送的消息请求报文,所述消息请求报文的源地址包括终端加密地址, 所述终端加密地址是通过所述服务器的公钥对所述终端设备的终端地址加密得到的;通过所述服务器的私钥对所述终端加密地址进行解密,得到所述终端地址;根据所述终端地址,向所述终端设备发送针对所述消息请求报文返回的流量报文,所述流量报文的源地址包括服务器加密地址,所述服务器加密地址是通过所述终端设备的公钥对所述服务器的服务器地址加密得到的。
- 根据权利要求7所述的方法,所述根据所述终端地址,向所述终端设备发送针对所述消息请求报文返回的流量报文,包括:根据所述终端地址,确定从所述服务器到所述终端设备的流量链路,所述流量链路包括N个中间路由节点,所述N为大于等于1的整数;通过所述流量链路中的所述N个中间路由节点,向所述终端设备发送所述流量报文。
- 根据权利要求8所述的方法,所述方法还包括:根据所述终端地址和所述服务器地址,生成针对所述流量链路的流标识和共享密钥;通过所述终端设备的公钥加密所述共享密钥,得到密钥加密数据;通过所述流量链路,向所述终端设备发送包括所述密钥加密数据和所述流标识的密钥创建报文,所述密钥创建报文的源地址包括所述服务器加密地址,所述密钥创建报文用于指示所述N个中间路由节点根据所述流标识生成中间共享密钥,并通过所述终端设备的公钥加密所述中间共享密钥,并将加密结果添加到所述密钥加密数据中。
- 根据权利要求9所述的方法,所述方法还包括:接收所述终端设备响应所述密钥创建报文返回的密钥确认报文,所述密钥确认报文的源地址包括所述终端加密地址,所述密钥确认报文包括中间密钥加密数据,所述中间密钥加密数据为通过所述共享密钥对N个中间共享密钥加密得到的,所述N个中间共享密钥与所述N个中间路由节点一一对应;通过所述共享密钥对所述中间密钥加密数据进行解密,得到所述N个中间共享密钥;根据所述N个中间共享密钥和所述N个中间路由节点的路由地址,得到所述N个中间路由节点各自对应的加密路由信息,针对所述N个中间路由节点中的第i个中间路由节点,其对应的加密路由信息是通过所述第i个中间路由节点对应的中间共享密钥,对所述第i个中间路由节点的路由信息、以及第i个中间路由节点的下一跳节点的路由信息加密得到的;将所述加密路由信息添加到所述流量报文中,所述流量报文的目的地址是通过目标中间共享密钥对所述终端地址加密得到的,所述目标中间共享密钥为所述流量链路中所述终端设备的上一跳中间路由节点的中间共享密钥。
- 根据权利要求10所述的方法,在所述通过所述共享密钥对所述中间密钥加密数据进行解密,得到所述N个中间共享密钥之前,所述方法还包括:通过所述服务器的私钥对所述终端加密地址进行解密,得到所述终端地址;根据所述终端地址和所述服务器地址,生成针对所述流量链路的流标识;通过所述终端地址和所述流标识生成所述共享密钥。
- 根据权利要求9至11任一项所述的方法,所述流量报文还包括流标识,所述流 标识用于指示所述中间路由节点根据所述流标识生成对应的中间共享密钥,并通过所述中间共享密钥对所述加密路由信息进行解密,得到下一跳节点的路由信息。
- 根据权利要求7至12任一项所述的方法,所述方法还包括:接收所述终端设备发送的包括报文接收结果的流量确认报文,所述流量确认报文的源地址包括所述终端加密地址,所述报文接收结果用于标识所述终端设备对所述流量报文的接收状态;当根据所述报文接收结果确定所述终端设备未接收到目标流量报文时,向所述终端设备发送作为流量重传报文的所述目标流量报文,所述流量重传报文的源地址包括所述服务器加密地址。
- 一种数据加密装置,所述装置包括发送单元,获取单元,解密单元和接收单元;所述发送单元,用于向服务器发送消息请求报文,所述消息请求报文的源地址包括终端加密地址,所述终端加密地址是通过所述服务器的公钥对所述终端设备的终端地址加密得到的;所述获取单元,用于接收所述服务器针对所述消息请求报文返回的流量报文,所述流量报文的源地址包括服务器加密地址,所述服务器加密地址是通过所述终端设备的公钥对所述服务器的服务器地址加密得到的;所述解密单元,用于通过所述终端设备的私钥对所述服务器加密地址进行解密,得到服务器待定地址;所述接收单元,用于响应于所述服务器待定地址与所述服务器地址一致,获取所述流量报文中的流量数据。
- 一种数据加密装置,所述装置包括获取单元,解密单元,发送单元;所述获取单元,用于接收终端设备发送的消息请求报文,所述消息请求报文的源地址包括终端加密地址,所述终端加密地址是通过所述服务器的公钥对所述终端设备的终端地址加密得到的;所述解密单元,用于通过所述服务器的私钥对所述终端加密地址进行解密,得到所述终端地址;所述发送单元,用于根据所述终端地址,向所述终端设备发送针对所述消息请求报文返回的流量报文,所述流量报文的源地址包括服务器加密地址,所述服务器加密地址是通过所述终端设备的公钥对所述服务器的服务器地址加密得到的。
- 一种数据加密系统,所述系统包括终端设备和服务器,所述终端设备用于执行权利要求1-6中任意一项所述的方法,所述服务器用于执行权利要求7-13中任意一项所述的方法。
- 一种计算机设备,所述计算机设备包括处理器以及存储器:所述存储器用于存储计算机程序,并将所述程序代码传输给所述处理器;所述处理器用于根据所述计算机程序中的指令执行权利要求1-6中任意一项所述的方法,或者,执行权利要求7-13中任意一项所述的方法。
- 一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述 计算机程序用于执行权利要求1-6中任意一项所述的方法,或者,执行权利要求7-13中任意一项所述的方法。
- 一种包括计算机程序的计算机程序产品,当其在计算机设备上运行时,使得所述计算机设备执行权利要求1-6中任意一项所述的方法,或者,执行权利要求7-13中任意一项所述的方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23923760.5A EP4614878A4 (en) | 2023-02-23 | 2023-11-14 | DATA ENCRYPTION METHOD AND ASSOCIATED APPARATUS |
| US19/074,710 US20250211425A1 (en) | 2023-02-23 | 2025-03-10 | Data encryption method and related apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310201907.3A CN118540087B (zh) | 2023-02-23 | 2023-02-23 | 一种数据加密方法和相关装置 |
| CN202310201907.3 | 2023-02-23 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US19/074,710 Continuation US20250211425A1 (en) | 2023-02-23 | 2025-03-10 | Data encryption method and related apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024174596A1 true WO2024174596A1 (zh) | 2024-08-29 |
Family
ID=92393376
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2023/131400 Ceased WO2024174596A1 (zh) | 2023-02-23 | 2023-11-14 | 一种数据加密方法和相关装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20250211425A1 (zh) |
| EP (1) | EP4614878A4 (zh) |
| CN (1) | CN118540087B (zh) |
| WO (1) | WO2024174596A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119854015A (zh) * | 2025-01-10 | 2025-04-18 | 北京汇元吉祥科技有限公司 | 一种端到端的安全通讯加密方法和系统 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110264908A1 (en) * | 2008-10-31 | 2011-10-27 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method and device for preventing network attacks |
| CN105978798A (zh) * | 2016-06-29 | 2016-09-28 | 深圳中兴网信科技有限公司 | 报文加密传输方法、终端和服务器 |
| CN109462594A (zh) * | 2018-11-28 | 2019-03-12 | 视联动力信息技术股份有限公司 | 一种基于视联网的数据处理方法及系统 |
| CN110493367A (zh) * | 2019-08-20 | 2019-11-22 | 清华大学 | 无地址的IPv6非公开服务器、客户机与通信方法 |
| CN114915583A (zh) * | 2021-02-08 | 2022-08-16 | 中兴通讯股份有限公司 | 报文处理方法、客户端设备、服务器端设备和介质 |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4434680B2 (ja) * | 2003-09-30 | 2010-03-17 | エヌ・ティ・ティ・ソフトウェア株式会社 | 電子メール処理装置用プログラム |
| KR101083127B1 (ko) * | 2010-08-25 | 2011-11-11 | 경희대학교 산학협력단 | 멀티홉 무선 통신 환경에서 센서 노드들의 비밀값 공유 방법 |
| US9143508B2 (en) * | 2010-12-30 | 2015-09-22 | Verizon Patent And Licensing Inc. | Service location based authentication |
| US10678709B2 (en) * | 2013-07-15 | 2020-06-09 | Infineon Technologies Ag | Apparatus and method for memory address encryption |
| US20160285834A1 (en) * | 2014-11-10 | 2016-09-29 | Qualcomm Incorporated | Techniques for encrypting fields of a frame header for wi-fi privacy |
| CN105847034B (zh) * | 2016-03-16 | 2019-02-05 | 清华大学 | 源验证和路径认证方法及装置 |
| CN108521331A (zh) * | 2018-04-11 | 2018-09-11 | 西安邮电大学 | 基于源地址的隐蔽信息发送系统及发送方法 |
| US11218454B2 (en) * | 2019-02-05 | 2022-01-04 | Cisco Technology, Inc. | Facilitating user privacy in communications involving semantic-bearing IPv6 addresses |
| CN111740943B (zh) * | 2020-03-31 | 2022-04-01 | 新华三信息安全技术有限公司 | 一种防攻击方法、装置、设备及机器可读存储介质 |
| US11658800B2 (en) * | 2020-06-19 | 2023-05-23 | Duality Technologies, Inc. | Privacy preserving routing |
| US11258774B1 (en) * | 2020-08-24 | 2022-02-22 | Juniper Networks, Inc. | Adaptive control of secure sockets layer proxy |
-
2023
- 2023-02-23 CN CN202310201907.3A patent/CN118540087B/zh active Active
- 2023-11-14 WO PCT/CN2023/131400 patent/WO2024174596A1/zh not_active Ceased
- 2023-11-14 EP EP23923760.5A patent/EP4614878A4/en active Pending
-
2025
- 2025-03-10 US US19/074,710 patent/US20250211425A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110264908A1 (en) * | 2008-10-31 | 2011-10-27 | Chengdu Huawei Symantec Technologies Co., Ltd. | Method and device for preventing network attacks |
| CN105978798A (zh) * | 2016-06-29 | 2016-09-28 | 深圳中兴网信科技有限公司 | 报文加密传输方法、终端和服务器 |
| CN109462594A (zh) * | 2018-11-28 | 2019-03-12 | 视联动力信息技术股份有限公司 | 一种基于视联网的数据处理方法及系统 |
| CN110493367A (zh) * | 2019-08-20 | 2019-11-22 | 清华大学 | 无地址的IPv6非公开服务器、客户机与通信方法 |
| CN114915583A (zh) * | 2021-02-08 | 2022-08-16 | 中兴通讯股份有限公司 | 报文处理方法、客户端设备、服务器端设备和介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4614878A4 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119854015A (zh) * | 2025-01-10 | 2025-04-18 | 北京汇元吉祥科技有限公司 | 一种端到端的安全通讯加密方法和系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118540087B (zh) | 2025-05-27 |
| EP4614878A4 (en) | 2025-10-08 |
| EP4614878A1 (en) | 2025-09-10 |
| CN118540087A (zh) | 2024-08-23 |
| US20250211425A1 (en) | 2025-06-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8364772B1 (en) | System, device and method for dynamically securing instant messages | |
| US11303431B2 (en) | Method and system for performing SSL handshake | |
| US8418242B2 (en) | Method, system, and device for negotiating SA on IPv6 network | |
| US11297115B2 (en) | Relaying media content via a relay server system without decryption | |
| AU2016369606A1 (en) | Systems and methods for secure multi-party communications using a proxy | |
| CN114844729B (zh) | 一种网络信息隐藏方法及系统 | |
| US20170126623A1 (en) | Protected Subnet Interconnect | |
| CN105516062B (zh) | 一种实现L2TP over IPsec接入的方法 | |
| CN110493367B (zh) | 无地址的IPv6非公开服务器、客户机与通信方法 | |
| CN112637069B (zh) | 数据报文的传输方法和装置 | |
| CN115378659A (zh) | 基于用户身份的高可靠文件加密和细粒度访问控制方法 | |
| CN113904809A (zh) | 一种通信方法、装置、电子设备及存储介质 | |
| CN108429682A (zh) | 一种网络传输链路的优化方法及系统 | |
| US20250211425A1 (en) | Data encryption method and related apparatus | |
| WO2014205703A1 (zh) | 一种共享接入的检测方法、设备和终端设备 | |
| CN113037762A (zh) | 通信方法、装置、设备及存储介质 | |
| CN119788436B (zh) | 数据保护方法、设备以及存储介质 | |
| CN103546442A (zh) | 浏览器的通讯监听方法及装置 | |
| CN115459949A (zh) | 一种数据传输方法及装置 | |
| JP5326815B2 (ja) | パケット送受信装置およびパケット送受信方法 | |
| CN110995730B (zh) | 数据传输方法、装置、代理服务器和代理服务器集群 | |
| CN117914525A (zh) | 一种数据报文处理方法及系统 | |
| CN111490988B (zh) | 一种数据传输方法、装置、设备及计算机可读存储介质 | |
| CN112470438B (zh) | 用于发现中间功能和选择两个通信装置之间的路径的方法 | |
| US9369442B2 (en) | System and method for the safe spontaneous transmission of confidential data over unsecure connections and switching computers |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23923760 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023923760 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023923760 Country of ref document: EP Effective date: 20250605 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2023923760 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |