Source route dynamic jump protection method and system based on overlay network
By using source routing dynamic hopping protection method in overlay network, using shared keys and hash computing, the address hopping space and enhanced protection capabilities are achieved on the Internet, and the small hopping space and protection in the existing technology are solved. The problem of weak capabilities improves the ability to respond to the underlying network.
Patent Information
- Application Number
- CN202410905369.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
AI Technical Summary
In the prior art, strategies based on end information jump and subnet jump on the Internet due to scarce public IP addresses, resulting in small jump space, weak jump protection capability and anti-traffic monitoring and analysis capabilities, making it difficult to effectively deal with the underlying network. Faults and exceptions.
The dynamic hopping protection method of source routing based on overlay network is adopted. By obtaining the user's intranet address, the intranet IP data packet is generated, the transit user subnet is selected to determine the transmission channel, the data packet is encrypted and hashed by using the shared key to generate Encapsulate data packets and verify them on the receiving end to realize dynamic address hopping and secret message authentication transmission.
The address jump space has been expanded, the jump protection capability and traffic resistance capability have been enhanced, the ability to respond to underlying network failures and abnormalities has been improved, the entire network traffic has been hidden, and it is difficult to be tracked and monitored by external third-party attackers.
Smart Images

Figure CN118890176A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network information security, and in particular to a source routing dynamic hopping protection method and system based on an overlay network. Background Art
[0002] Overlay network refers to a virtualization technology model superimposed on the traditional network architecture; the general framework is to realize the bearing of applications on the network without large-scale modification of the basic network, and can be classified with other network services, mainly based on IP-based basic network technology. In other words, it relies on the traditional network architecture to build a virtual network on the existing physical network, and the upper-layer applications are only related to the virtual network; it realizes the bundling of upper-layer applications and virtual networks, while ignoring the transmission mode and technology of the underlying physical network.
[0003] With the development of dynamic network security defense technology, strategies and methods based on end information hopping and subnet hopping are constantly proposed. At present, in order to ensure the routability of both communicating parties in the core transmission network, the address hopping range is limited to the subnet host address space.
[0004] However, due to the extreme scarcity of public IP addresses that can be allocated on the Internet, the hop space is further compressed, resulting in weak hop protection capabilities and anti-traffic monitoring and analysis capabilities. As a result, the ability to respond to failures and anomalies of the underlying network during communication and the ability to resist traffic analysis attacks are poor. The practicality and scalability of hop protection are greatly limited. Summary of the invention
[0005] Based on this, it is necessary to provide a source routing dynamic hopping protection method and system based on an overlay network to address the above technical problems, which solves the current problems of small hopping space, weak hopping protection capability and weak anti-traffic monitoring and analysis capability.
[0006] On the one hand, the present invention provides a source routing dynamic hopping protection method based on an overlay network, which is used for communication between a first user in a first user subnet and a second user in a second user subnet, and the method comprises:
[0007] Obtain the intranet addresses of the first user and the second user, and generate an intranet IP data packet;
[0008] Select one or more transit user subnets, and determine the external routable addresses of the first user subnet, the second user subnet, and the transit user subnet to obtain a transmission channel of multiple tunnels connected in series;
[0009] Encrypting the intranet IP data packet using a first shared key to obtain a first encrypted data packet;
[0010] Generate a corresponding source route data packet according to the current tunnel, and encrypt the source route data packet using a second shared key, or encrypt a data packet composed of the source route data packet and the first encrypted data packet to obtain a second encrypted data packet;
[0011] Obtaining an encrypted data packet based on the external routable address, the first encrypted data packet and the second encrypted data packet, and calculating a hash value of the encrypted data packet using a third shared key to obtain an information digest, thereby generating an encapsulated data packet;
[0012] The encapsulated data packet is sent out from the output link corresponding to the external routable address in the current tunnel.
[0013] Furthermore, the first shared key is a shared encryption key of a tunnel between the first user subnet and the second user subnet.
[0014] Furthermore, the source routed data packet includes: an external routable address, a forwarding flag and an increasing sequence number of the source routed data packet.
[0015] Further, a second shared key and a third shared key corresponding to each other are set according to the current tunnel.
[0016] Furthermore, the second shared key includes:
[0017] A shared encryption key for the tunnel between the first user subnet and the transit user subnet;
[0018] or, a shared encryption key for a tunnel between a transit user subnet and a second user subnet;
[0019] Or, the shared encryption key for the tunnel between the transit user subnet and the transit user subnet.
[0020] Further, the third shared key includes:
[0021] A shared hash key for a tunnel between the first user subnet and the transit user subnet;
[0022] or, a shared hash key for a tunnel between a transit user subnet and a second user subnet;
[0023] Or, the shared hash key for the tunnel between the transit user subnet and the transit user subnet.
[0024] Furthermore, the encapsulated data packet includes: an external routable address of a user subnet to which the current tunnel is connected, an external routable address of a user subnet from which the current tunnel is transferred, a message digest of an encrypted data packet, a second encrypted data packet and a first encrypted data packet.
[0025] Further, when the jump gateway of the user subnet receives the encapsulated data packet, the encapsulated data packet is processed, including:
[0026] Determine whether the access target address is an external routable address of the user subnet accessed by the current tunnel; if not, discard the encapsulated data packet;
[0027] If yes, query the second shared key and the third shared key according to the outgoing source address in the encapsulated data packet, calculate the hash value based on the third shared key to obtain the current information digest, and determine whether the current information digest is consistent with the information digest of the encrypted data packet; if not, discard the encapsulated data packet;
[0028] If they are consistent, the second encrypted data packet is parsed based on the second shared key to obtain the external routable address, the forwarding flag, and the incremental serial number of the source routed data packet, and whether the incremental serial number is valid; if not, the encapsulated data packet is discarded;
[0029] If valid, continue to determine whether the forwarding flag is false, and determine whether the external routable address is the external routable address of the first user subnet. If so, use the external routable address of the first user subnet to query the first shared key, and parse the first encrypted data packet based on the first shared key to obtain the intranet IP data packet;
[0030] If not, re-encapsulate and send the re-encapsulated data packet out of the output link corresponding to the external routable address in the current tunnel.
[0031] Furthermore, the method for generating the intranet IP data packet includes: filling the intranet address of the first user and the intranet address of the second user into the source and destination address fields.
[0032] On the other hand, the present invention also proposes a source routing dynamic hopping protection system based on an overlay network, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0033] In general, the present invention provides a method and system for dynamic source routing hopping protection based on an overlay network. The technical solution conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0034] (1) The present invention encrypts the intranet IP data packet and the transmission channel respectively, and generates an encapsulated data packet, that is, on the basis of address hopping, realizes access link hopping and dynamic hopping forwarding of application layer nodes, and uses message authentication to realize address hopping verification; thereby, the tunnel sender can randomly perform address hopping of the source address and the destination address in the routable address space of both parties, and the tunnel receiver verifies the legitimacy of the address hopping based on the shared hash key between the sender and the receiver, so that while realizing message integrity authentication, end-to-end full-process dynamic address hopping protection is also realized. The present invention converts address hopping communication into message secret authentication transmission, avoiding the synchronization problem of hopping communication. External third-party attackers cannot carry out network attacks on the communicating parties except for cracking the encrypted hash or carrying out denial of service attacks; it not only increases the overall hopping space and enhances the hopping protection capability, but also greatly improves the anti-traffic monitoring and analysis capability.
[0035] (2) The present invention proposes multi-access link and tunnel encapsulation, and sets corresponding second shared keys and third shared keys according to the current tunnel, so that the external routable address and access link sent by each transit jump gateway are different, which increases the link switching and application layer detour routing. The addresses of data packets transmitted in all networks are not the final source and destination addresses, which effectively eliminates the address association of the tunnel from the source address to the destination address, making it difficult for external third-party attackers to effectively track and monitor the flow of transit data packets, and also unable to analyze the real communicating parties through address association, thereby concealing and confusing the entire network traffic, improving the ability of the entire network to resist traffic analysis attacks, and enhancing the ability to respond to failures and abnormalities of the underlying network during the communication process.
[0036] (3) The system of the present invention is used as the edge device of the user network and can be smoothly deployed to the existing user network exit to realize functions such as tunnel encapsulation and decapsulation, link dynamic switching, and source routing dynamic switching, which has a high value of promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 It is a method flow diagram of a source routing dynamic hopping protection method and system based on an overlay network provided by the present invention;
[0039] Figure 2It is a schematic diagram of a source routing dynamic hopping network architecture of a source routing dynamic hopping protection method and system based on an overlay network provided by the present invention;
[0040] Figure 3 It is a schematic diagram of a method for processing received encapsulated data packets of a source routing dynamic hopping protection method based on an overlay network and a system provided by the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in combination with the drawings and embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0042] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method, step or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such method, step or system. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the method, step or system including the element.
[0043] The present invention utilizes the encapsulation mechanism of the overlay network and the routing mechanism of the application layer, combined with the automatic switching of the access link, to provide a source routing dynamic hopping protection method and system based on the overlay network, such as Figure 1 As shown, a method flow diagram of a source routing dynamic hopping protection method and system based on an overlay network provided by the present invention, when a first user of a first user subnet communicates with a second user of a second user subnet, the method includes:
[0044] Step 101: Obtain the intranet addresses of the first user and the second user, and generate an intranet IP data packet.
[0045] More specifically, after obtaining the intranet address of the first user and the intranet address of the second user, the first user generates an intranet IP data packet and forwards it to the jump gateway at the first user's subnet exit.
[0046] It should be noted that each user subnet has one or more hop gateways for realizing network interconnection above the network layer, which can be used for wide area network interconnection or local area network interconnection.
[0047] As an embodiment, the method for generating an intranet IP data packet includes: filling the intranet address of the first user and the intranet address of the second user into the source and destination address fields.
[0048] For example, when user a' in user subnet A communicates with user c' in user subnet C, user a' obtains the intranet addresses sIP of user a' and user c' by querying the internal DNS and other address resolution services. a’ and dIP c’ , and the intranet addresses of user a' and user c' are sIP a’ and dIP c’ Fill in the source and destination address fields, generate an intranet IP data packet and forward it to the jump gateway at the exit of user subnet A.
[0049] Step 102: Select one or more transit user subnets, and determine the external routable addresses of the first user subnet, the second user subnet, and the transit user subnet to obtain a transmission channel of multiple tunnels connected in series.
[0050] It should be noted that the user subnet is allocated multiple external routable IP addresses by applying for multiple links in the core transmission network. The core transmission network includes the Internet and private networks. For the Internet, you can apply for links and public IP addresses from the same or different network service providers (ISP service providers); for private networks (intranets), you can plan and allocate multiple address segments; one link corresponds to one address segment, and any valid address in the address segment can be used as an external routable address.
[0051] After applying for the link and the corresponding external routable address, the current user subnet pre-configures the routable IP address / address segment of the current user subnet and other user subnets, as well as the pre-shared key of the tunnel between the current user subnet and other user subnets, thereby preparing for tunnel transmission.
[0052] The selection of the transit user subnet and the external routable address of the user subnet are random and can be selected by any random algorithm, such as RandNode() algorithm, LasVegas algorithm, MonteCarlo algorithm, etc.
[0053] Since when multiple transit user subnets are selected, the data packet transmission rate is much lower than the transmission rate when there is only one transit user subnet, therefore, as a preferred embodiment, Figure 2 As shown, the hopping gateway A' of the first user subnet A randomly selects a transit user subnet B using a random algorithm, and then determines the external routable addresses of the first user subnet A, the second user subnet C and the transit user subnet B by calling the random address algorithm multiple times, thereby dynamically selecting the tunnel Tun ABand Tunnel BC The transmission channels are connected in series, such as Figure 2 Shown by the yellow line.
[0054] Specifically, when the tunnel Tun is selected AB and Tunnel BC When the transmission channel is formed in series, the jump gateway A' corresponding to the user subnet A first transmits the relevant data from the tunnel Tun AB The data is sent to the jump gateway B' corresponding to the user subnet B, and then the jump gateway B' verifies the relevant data and then sends it to the tunnel Tun BC It is sent to the jump gateway C' corresponding to the user subnet C, so as to realize the communication between the user subnet A and the user subnet C.
[0055] For example, the external routable addresses of the first user subnet A, the second user subnet C and the transit user subnet B respectively determined by the hopping gateway A' through multiple calls to the random address algorithm can be represented as IP A-out 、IP B-in and IP C ;Tun AB Indicates the tunnel between user subnet A and user subnet B. BC Indicates the tunnel between user subnet B and user subnet C.
[0056] Similarly, the hopping gateway A' of the first user subnet A uses a random algorithm to randomly select multiple transit user subnets B1, B2, ..., B n When the random address algorithm is called multiple times, the first user subnet A, the second user subnet C and multiple transfer user subnets B1, B2, ..., B n The external routable address of the tunnel is dynamically selected. AB1 , Tunnel B1B2 , Tunnel B2B3 、...、Tunnel Bn-1Bn , Tunnel BnC The transmission channel is connected in series, and n is a positive integer.
[0057] It should be noted that the hopping gateway selects the corresponding access link while selecting the external routable address of the user subnet, that is, it realizes the hopping of the tunnel address, access link and transit route at the same time, and the communication is completely determined by the sender. The hopping rule of the tunnel cannot be used by the third party to achieve effective communication with the final receiver, which effectively eliminates the address association of the tunnel between the sender and the receiver.
[0058] Step 103: Encrypt the intranet IP data packet using the first shared key to obtain a first encrypted data packet.
[0059] Furthermore, the first shared key is a shared encryption key K of a tunnel between the first user subnet A and the second user subnet C. AC , use the first shared key to encrypt the intranet IP data packet packet to obtain the first encrypted data packet K AC That is, after selecting the transmission channel, the jump gateway uses the shared encryption key K AC Encrypt the intranet IP data packets to achieve end-to-end source information encryption protection.
[0060] Step 104: Generate a corresponding source route data packet according to the current tunnel, encrypt the source route data packet using the second shared key, or encrypt the data packet composed of the source route data packet and the first encrypted data packet to obtain a second encrypted data packet.
[0061] Specifically, the source routed data packet changes dynamically according to the change of the current tunnel, including: the external routable address IP, the forwarding flag F and the increasing sequence number Seq of the source routed data packet. That is to say, after the jump gateway obtains the partial routable address, the forwarding flag and the increasing sequence number of the source routed data packet, it splices them to obtain the source routed data packet.
[0062] The externally routable address in a source-routed packet is the externally routable address of the destination, such as IP C , or an externally routable address of the source, such as IP A .
[0063] For example, when Tunnel is selected AB and Tunnel BC When the transmission channel is connected in series, the tunnel AB The source routing data packet can be expressed as (F+IP C +Seq ab );Tunnel BC The source routing data packet can be expressed as (F+IP A +Seq bc ).
[0064] The forwarding flag F includes true and false; true means the forwarding flag is true, indicating that the current tunnel Tun AB The destination B is not the final destination and needs to be forwarded to the next hop gateway. false means the forwarding flag is false, indicating that the current tunnel Tun BC The end point C is the final destination. After the data packet reaches the hop gateway C' of the user subnet C, it does not need to be forwarded to the next hop gateway.
[0065] The increasing sequence number Seq of the source routing data packet indicates the number of data packets sent by the current tunnel, and is used to determine whether the data packet is forwarded repeatedly or lost.
[0066] For example, the hop gateway A' needs to pass through the tunnel Tun AB Send 100 data packets to the hop gateway B'. When the first data packet is sent, the source routing data packet is (true+IP C +1) Each time the hopping gateway A' sends one, Seq ab Increase by 1, if the jump gateway B' receives (true+IP C +20), and then received (true+IP C +20), it means the source routed data packet (true+IP C +20) repeat forwarding. If the jump gateway B' receives (true+IP C +100), it is found that all received data lack (true+IP C +80), it means source routing data packet (true+IP C +80) is lost; this is used to determine whether the data packet is forwarded repeatedly or lost.
[0067] As a preferred embodiment, the source routing data packet is encrypted using the second shared key to obtain a second encrypted data packet, thereby achieving encryption protection of the source routing information.
[0068] The second shared key is set according to the current tunnel, that is, the second shared key is set according to the current tunnel and changes with the change of the tunnel. The second shared key includes: the shared encryption key of the tunnel between the first user subnet and the transit user subnet; or, the shared encryption key of the tunnel between the transit user subnet and the second user subnet; or, the shared encryption key of the tunnel between the transit user subnet and the transit user subnet.
[0069] When a transit user subnet is randomly selected, the second shared key is a shared encryption key of a tunnel between the first user subnet and the transit user subnet; or, a shared encryption key of a tunnel between the transit user subnet and the second user subnet.
[0070] For example, when Tunnel is selected AB and Tunnel BC When the transmission channel is connected in series; the current tunnel is Tun AB When the second shared key is K AB , indicating a tunnel Tun AB The pre-shared encryption key of the second encrypted data packet is K AB (F+IP C +Seq ab); the current tunnel is Tun BC When the second shared key is K BC , indicating a tunnel Tun BC The pre-shared encryption key of the second encrypted data packet is K BC (F+IP A +Seq bc ).
[0071] When a plurality of transit user subnets are randomly selected, the second shared key may also be a shared encryption key of a tunnel between a transit user subnet and a transit user subnet.
[0072] For example, when Tunnel is selected AB1 , Tunnel B1B2 and Tunnel B2C When the transmission channel is connected in series; the current tunnel is Tun B1B2 When the second shared key is K B1B2 , indicating a tunnel Tun B1B2 The pre-shared encryption key of the second encrypted data packet is K B1B2 (F+IP C +Seq B1B2 ).
[0073] As another embodiment, a second shared key is used to encrypt a data packet composed of a source routing data packet and a first encrypted data packet to obtain a second encrypted data packet, thereby achieving encryption protection of the source routing information.
[0074] For example, when Tunnel is selected AB and Tunnel BC When the transmission channel is connected in series; the current tunnel is Tun AB When the second shared key is K AB , indicating a tunnel Tun AB The pre-shared encryption key of the second encrypted data packet is K AB (F+IP C +Seq ab +K AC (packet)); the current tunnel is Tun BC When the second shared key is K BC , indicating a tunnel Tun BC The pre-shared encryption key of the second encrypted data packet is K BC (F+IP A +Seq bc +K AC (packet)).
[0075] It should be noted that the second shared key and the third shared key corresponding to each other are set according to the current tunnel, that is, the second shared key and the third shared key are both set according to the current tunnel and change with the change of the tunnel.
[0076] Step 105: Obtain an encrypted data packet based on the external routable address, the first encrypted data packet and the second encrypted data packet, calculate a hash value of the encrypted data packet using the third shared key to obtain an information digest, and generate an encapsulated data packet.
[0077] The externally routable address includes the externally routable address of the user subnet to which the current tunnel is connected, the externally routable address of the user subnet from which the current tunnel is transferred, and the externally routable address of the destination.
[0078] More specifically, the encapsulated data packet includes: the external routable address of the user subnet to which the current tunnel is connected, the external routable address of the user subnet from which the current tunnel is transferred, the message digest of the encrypted data packet, the second encrypted data packet and the first encrypted data packet.
[0079] The third shared key changes with the change of the tunnel, and the third shared key includes: the shared hash key of the tunnel between the first user subnet and the transit user subnet; or, the shared hash key of the tunnel between the transit user subnet and the second user subnet; or, the shared hash key of the tunnel between the transit user subnet and the transit user subnet.
[0080] When a transit user subnet is randomly selected, the third shared key is a shared hash key of a tunnel between the first user subnet and the transit user subnet; or, is a shared hash key of a tunnel between the transit user subnet and the second user subnet.
[0081] For example, when Tunnel is selected AB and Tunnel BC When the transmission channel is connected in series; the current tunnel is Tun AB When the third shared key is K hash-AB , indicating a tunnel Tun AB The pre-shared hash key is then encapsulated as a packet PACKET {IP B-in , IP A-out , HMAC PACKET , K AB (F+IP C +Seq ab ), K AC (packet)}; the current tunnel is Tun BC When the third shared key is K hash-BC , indicating a tunnel Tun BC The pre-shared hash key is then encapsulated as a packet PACKET {IPC-in , IP B-out , HMAC PACKET , K BC (F+IP A +Seq bc ), K AC (packet)}.
[0082] When multiple transit user subnets are randomly selected, the third shared key may also be a shared hash key of a tunnel between a transit user subnet and a transit user subnet.
[0083] For example, when Tunnel is selected AB1 , Tunnel B1B2 and Tunnel B2C When the transmission channel is connected in series; the current tunnel is Tun B1B2 When the third shared key is K hash-B1B2 , indicating a tunnel Tun B1B2 The pre-shared hash key is then encapsulated as a packet PACKET {IP B2-in , IP B1-out , HMAC PACKET , K B1B2 (F+IP C +Seq B1B2 ), K AC (packet)}.
[0084] Step 106: Send the encapsulated data packet out from the output link corresponding to the external routable address in the current tunnel.
[0085] For example, the current tunnel is Tun AB When the hop gateway A' encapsulates the data packet PACKET from IP A-out The current tunnel is Tun. BC When the jump gateway B' encapsulates the data packet PACKET from IP B-out The corresponding link is sent out.
[0086] When the hop gateway of the user subnet receives the encapsulated data packet, it processes the encapsulated data packet, such as Figure 3 As shown, including:
[0087] Determine whether the access target address is an external routable address of the user subnet accessed by the current tunnel; if not, discard the encapsulated data packet;
[0088] If yes, query the second shared key and the third shared key according to the outgoing source address in the encapsulated data packet, calculate the hash value based on the third shared key to obtain the current information digest, and determine whether the current information digest is consistent with the information digest of the encrypted data packet; if not, discard the encapsulated data packet;
[0089] If they are consistent, the second encrypted data packet is parsed based on the second shared key to obtain the external routable address, the forwarding flag, and the incremental sequence number of the source routed data packet, and determine whether the incremental sequence number is valid; if not valid, the encapsulated data packet is discarded;
[0090] If valid, continue to determine whether the forwarding flag is false, and determine whether the external routable address is the external routable address of the first user subnet. If so, use the external routable address of the first user subnet to query the first shared key, parse the first encrypted data packet based on the first shared key, and obtain the intranet IP data packet;
[0091] If not, re-encapsulate and send the re-encapsulated data packet out of the output link corresponding to the external routable address in the current tunnel.
[0092] As a specific embodiment, when the tunnel Tun is selected AB and Tunnel BC When the transmission channel is formed in series, the jump gateway B' of user subnet B receives the encapsulated data packet PACKET{IP B-in , IP A-out , HMAC PACKET , K AB (F+IP C +Seq ab ), K AC (packet)}, the data packet is processed in the following ways:
[0093] Determine the access target IP address B-in Is it an external routable address of user subnet B? If not, discard the encapsulated data packet.
[0094] If yes, then according to the outgoing source IP address in the encapsulated data packet A-out Query the second shared key K AB and the third shared key K hash-AB , based on K hash-AB Calculate the hash value to get the current message digest HMAC PACKET -Current, and determine HMAC PACKET -HMAC of the current and encrypted data packets PACKET Are they consistent? If not, discard the encapsulated data packet;
[0095] If they are consistent, then based on the second shared key KAB Parse the second encrypted data packet K AB (F+IP C +Seq ab ), get the external routable address IP C , forwarding flag F, and the increasing sequence number Seq of the source routing data packet ab , and determine the increasing sequence number Seq ab Is it valid? If invalid, discard the encapsulated data packet. If valid, continue parsing the data packet.
[0096] If the forwarding flag F is true and IP C The external routing address of user subnet C indicates that it needs to be forwarded further. The jump gateway B' re-encapsulates the data packet and sends it through the tunnel Tun BC Keep forwarding.
[0097] The jump gateway B' also re-determines the tunnel Tun through the random address algorithm BC Externally routable IP address B-out 、IP C-in and IP A , and both are the same as the external routable IP address in the original encapsulation packet B-in 、IP C and IP A-out different.
[0098] Since the next destination forwarded by hop gateway B' is hop gateway C', and user subnet C is the final destination, hop gateway B' sets the forwarding flag F to false and sets IP C Replace with IP A Therefore, the packet re-encapsulated by the hop gateway B' is {IP C-in , IP B-out , HMAC PACKET , K BC (F+IP A +Seq bc ), K AC (packet)}, where HMAC PACKET is based on the third shared key K hash-BC The final hop gateway B' will re-encapsulate the data packet from IP B-out The corresponding link is sent out.
[0099] If the forwarding flag F is found to be false and IP A is the external routing address of user subnet A (that is, the source address of the data packet), then use the external routable address IP of user subnet A A Query the first shared key K AC , based on K ACParse the first encrypted data packet K AC (packet), and finally get the intranet IP data packet packet.
[0100] After receiving the intranet IP data packet, user subnet C forwards the data packet to the firewall, core switch and other devices in the intranet for subsequent forwarding and processing.
[0101] It should be noted that the IP address in the encapsulated data packet received by the transit hop gateway B' C with the IP in the re-encapsulated packet C-in Different, and the IP in the received encapsulated packet A-out with the IP in the re-encapsulated packet A The difference is to avoid the formation of plaintext and ciphertext comparison and reduce K AB (F+IP C +Seq ab ) and K BC (F+IP A +Seq bc ) is at risk of being cracked.
[0102] In addition, the address of the encapsulated data packet received by the transit jump gateway B' is (IP A-out , IP B-in ), and the address of the re-encapsulated forwarded data packet is (IP B-out , IP C-in ), and IP B-out With IP B-in The address of the corresponding link is also different, so that the third-party listener cannot match the address of the transit node B to the tunnel Tun AB and Tun BC It is difficult to effectively track and monitor the flow of transit packets, and thus it is impossible to analyze the real source and destination addresses.
[0103] Ideally, an attacker needs to monitor all access links and compare the payloads of all packets to locate the packet forwarding direction, but this is very costly.
[0104] Therefore, the present invention also proposes an implementable nested encryption encapsulation strategy, specifically: using a first shared key to encrypt an intranet IP data packet to obtain a first encrypted data packet; generating a corresponding source routing data packet according to the current tunnel, and using a second shared key to encrypt the source routing data packet and the first encrypted data packet to obtain a second encrypted data packet;
[0105] An encrypted data packet is obtained based on the external routable address, the first encrypted data packet and the second encrypted data packet, and a hash value is calculated on the encrypted data packet using a third shared key to obtain an information digest, thereby generating an encapsulated data packet.
[0106] At this time, the encapsulation packet format of the first user subnet A is: {IP B-in , IP A-out , HMAC PACKET , K AB (F+IP C +Seq ab +K AC (packet))}; The encapsulation packet format of the transit user subnet B is: {IP C-in , IP B-out , HMAC PACKET , K BC (F+IP A +Seq bc +K AC (packet))}, but the encryption and decryption processing time and transmission delay of the node hopping gateway will increase accordingly.
[0107] In addition, when the hopping gateway C' of user subnet C sends data to user subnet A, its operation is consistent with the operation of user subnet A described above, and the transit node is independently randomly selected, which can be transit user subnet B or transit user subnet D.
[0108] On the other hand, the present invention provides a source routing dynamic hopping protection system based on an overlay network, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any of the above methods.
[0109] It should be noted that, for the above-mentioned various embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, and according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. In the several embodiments provided in this application, it should be understood that the disclosed method or system can be implemented in other ways. For example, the embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application.
[0114] A person skilled in the art can understand that all or part of the various circuits in the above-mentioned embodiments can be completed by entering a program to instruct related hardware. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0115] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0116] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0117] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A source routing dynamic hopping protection method based on an overlay network, used for communication between a first user in a first user subnet and a second user in a second user subnet, characterized in that: The method comprises: Obtain the intranet addresses of the first user and the second user, and generate an intranet IP data packet; Select one or more transit user subnets, and determine the external routable addresses of the first user subnet, the second user subnet, and the transit user subnet to obtain a transmission channel of multiple tunnels connected in series; Encrypting the intranet IP data packet using a first shared key to obtain a first encrypted data packet; Generate a corresponding source route data packet according to the current tunnel, and encrypt the source route data packet using a second shared key, or encrypt a data packet composed of the source route data packet and the first encrypted data packet to obtain a second encrypted data packet; Obtaining an encrypted data packet based on the external routable address, the first encrypted data packet and the second encrypted data packet, and calculating a hash value of the encrypted data packet using a third shared key to obtain an information digest, thereby generating an encapsulated data packet; The encapsulated data packet is sent out from the output link corresponding to the external routable address in the current tunnel.
2. According to claim 1, a source routing dynamic hopping protection method based on an overlay network is characterized in that: The first shared key is a shared encryption key of a tunnel between the first user subnet and the second user subnet.
3. According to the overlay network-based source routing dynamic hopping protection method of claim 1, it is characterized in that: The source routing data packet includes: an external routable address, a forwarding flag and an increasing sequence number of the source routing data packet.
4. According to the overlay network-based source routing dynamic hopping protection method of claim 1, it is characterized in that: A second shared key and a third shared key corresponding to each other are set according to the current tunnel.
5. According to claim 4, a source routing dynamic hopping protection method based on overlay network is characterized in that: The second shared key includes: A shared encryption key for the tunnel between the first user subnet and the transit user subnet; or, a shared encryption key for a tunnel between a transit user subnet and a second user subnet; Or, the shared encryption key for the tunnel between the transit user subnet and the transit user subnet.
6. According to the overlay network-based source routing dynamic hopping protection method of claim 4, it is characterized in that: The third shared key includes: A shared hash key for a tunnel between the first user subnet and the transit user subnet; or, a shared hash key for a tunnel between a transit user subnet and a second user subnet; Or, the shared hash key for the tunnel between the transit user subnet and the transit user subnet.
7. The method for dynamic source routing hopping protection based on overlay network according to claim 1 is characterized in that: The encapsulated data packet includes: the external routable address of the user subnet accessed by the current tunnel, the external routable address of the user subnet transferred from the current tunnel, the message digest of the encrypted data packet, the second encrypted data packet and the first encrypted data packet.
8. The method for dynamic source routing hopping protection based on overlay network according to claim 1 is characterized in that: When the hopping gateway of the user subnet receives the encapsulated data packet, the encapsulated data packet is processed, including: Determine whether the access target address is an external routable address of the user subnet accessed by the current tunnel; if not, discard the encapsulated data packet; If yes, query the second shared key and the third shared key according to the outgoing source address in the encapsulated data packet, calculate the hash value based on the third shared key to obtain the current information digest, and determine whether the current information digest is consistent with the information digest of the encrypted data packet; if not, discard the encapsulated data packet; If they are consistent, the second encrypted data packet is parsed based on the second shared key to obtain the external routable address, the forwarding flag, and the incremental serial number of the source routed data packet, and whether the incremental serial number is valid; if not, the encapsulated data packet is discarded; If valid, continue to determine whether the forwarding flag is false, and determine whether the external routable address is the external routable address of the first user subnet. If so, use the external routable address of the first user subnet to query the first shared key, and parse the first encrypted data packet based on the first shared key to obtain the intranet IP data packet; If not, re-encapsulate and send the re-encapsulated data packet out of the output link corresponding to the external routable address in the current tunnel.
9. The method for dynamic source routing hopping protection based on overlay network according to claim 1, characterized in that: The method for generating the intranet IP data packet includes: filling the intranet address of the first user and the intranet address of the second user into the source and destination address fields.
10. A source routing dynamic jump protection system based on an overlay network, comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.
