Message transmission method, signature information generation method and device

By using asymmetric keys to perform signature authentication and integrity verification on message headers in SRv6 networks, the problem of difficulty in effective source routing attacks and trust domain protection in SRv6 networks is solved, and higher message transmission security is achieved.

CN114978519BActive Publication Date: 2025-04-04CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110200003.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-22
Publication Date
2025-04-04
Estimated Expiration
2041-02-22

AI Technical Summary

Technical Problem

SRv6 networks are facing the threat of source routing attacks, and existing trust domain protection measures are difficult to effectively improve the security of message transmission.

Method used

The SRv6 message header is signed and authenticated and integrity verification is performed using an asymmetric key. The signature information is generated by the controller and the public key is used in the network device to verify the source authenticity and integrity of the message.

Benefits of technology

It effectively prevents counterfeiting of message sources and tampering of message headers, avoids device capture and shared key leakage of the entire network, and improves the security of SRv6 message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114978519B_ABST
    Figure CN114978519B_ABST
Patent Text Reader

Abstract

A message sending method, a signature information generating method and a device, the method comprising: a first node receives a first SRv6 message, the first SRv6 message carries a first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm and a first private key; the first node uses the first hash algorithm and a first public key corresponding to the first private key to perform signature verification on the first signature information, and determines whether to forward the first SRv6 message based on the verification result. The embodiment of the present invention can improve the security of SRv6 message transmission. In addition, the embodiment of the present invention also provides an SRv6 message efficient verification and forwarding mechanism, in which the first packet is decrypted and verified, and subsequent packets are forwarded by table lookup, which further improves the forwarding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data communication, and in particular to a message sending method, a signature information generating method and a device. Background Art

[0002] IPv6 Segment Routing (SRv6) is a protocol designed based on the source routing concept to forward IPv6 packets on the network. SRv6 inserts a Segment Routing Header (SRH) into the IPv6 message, pushes an explicit IPv6 address stack into the SRH, and completes hop-by-hop forwarding by continuously updating the destination address and offset address stack through intermediate nodes. SRv6 can simplify network protocols, realize network intelligent programmability, provide efficient Fast Reroute (FRR) protection, etc., and will be widely used in network transmission.

[0003] like Figure 1 As shown, the source node R1 inserts SRH into the IPv6 message, pushes the IPv6 address stack into the SRH, such as SID[0]~SID[2], and encapsulates the SRv6 message. Among them, the LastEntry field indicates the last segment ID (SID) in the segment list (segmentlist) of the IPv6 address stack; SL (Segments Left) indicates the number of remaining segments, which is set to n-1, where n is the number of segment addresses; the destination address (DA) is set to the first segment ID in the segment route. The intermediate node (such as R3) searches the local SID table according to DA. If the SID is hit, the instruction action of the SID is executed, that is, SL is reduced by one, and the SID indicated by SL is copied to the DA field. At the same time, the message is forwarded according to the next hop associated with the SID. The end node R5 also performs operations similar to R3. In addition, when the penultimate hop pop-up is turned on, SL=0 is detected, which triggers the pop-up. At this time, the message is forwarded based on the IPv6 route. Figure 1 R2 and R4 in the example are not local SIDs or are not devices that support SRv6. They directly forward the above SRv6 packets based on IPv6 routing.

[0004] As an emerging source routing protocol, SRv6 faces various source routing attack threats. By defining SRH, attackers can construct various source routing attacks, such as bypassing key network detection nodes and constructing malicious loops.

[0005] SRv6 networks usually define SRv6 trust domains to provide basic security protection. Figure 2The SRv6 network shown includes nodes 1 to 6 and hosts 1 to 2 (Host 1 to Host 2). For example, the address space of the segment ID (SegmentID) within the SRv6 trust domain is first defined to prevent the leakage of the SRv6 trust domain address. Then, ACL filtering is enabled at the trust domain boundary (such as interface 11) to discard messages whose destination addresses are within the SRv6 trust domain, thereby preventing attack messages from performing source routing attacks on the SRv6 trust domain. At the same time, access control list (ACL) filtering can be enabled on the internal interfaces of the trust domain (such as interfaces 12 to 14) to discard messages whose source addresses are outside the trust domain address space, thereby blocking illegal messages again.

[0006] SRv6 trust domains are generally used to implement basic SRv6 security protection. On the basis of SRv6 trust domains, some enhanced security protection solutions are also needed to further improve the security of SRv6 message transmission. Summary of the invention

[0007] At least one embodiment of the present invention provides a message sending method, a signature information generating method and a device, which can improve the security of SRv6 message transmission.

[0008] According to one aspect of the present invention, at least one embodiment provides a message sending method, including:

[0009] The first node receives a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0010] The first node performs signature verification on the first signature information using the first hash algorithm and the first public key corresponding to the first private key, and determines whether to forward the first SRv6 message according to the verification result.

[0011] In addition, according to at least one embodiment of the present invention, determining whether to forward the first SRv6 message according to the verification result includes:

[0012] If the signature verification of the first signature information passes, forwarding the first SRv6 message;

[0013] If the signature verification of the first signature information fails, the first SRv6 message is discarded.

[0014] In addition, according to at least one embodiment of the present invention, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0015] In addition, according to at least one embodiment of the present invention, the target field includes at least one of the following fields:

[0016] IPv6 source address;

[0017] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0018] The D field in the signature authentication TLV field, the reserved field, the indication information of the first hash algorithm used for the signature, the indication information of the first asymmetric encryption algorithm used for the signature, and the indication information of the first public key for decrypting the first signature information.

[0019] In addition, according to at least one embodiment of the present invention, before performing signature verification on the first signature information, the method further includes:

[0020] The first node parses the signature authentication TLV field of the first SRv6 message to determine a first hash algorithm, a first asymmetric encryption algorithm, and a first public key for decrypting the first signature information.

[0021] In addition, according to at least one embodiment of the present invention, the first node performs signature verification on the first signature information using the first hash algorithm and a first public key corresponding to the first private key, including:

[0022] The first node calculates, by using the first hash algorithm, a first hash value corresponding to the target field of the first SRv6 message;

[0023] Decrypting the first signature information using the first public key corresponding to the first private key to obtain a decryption result;

[0024] Whether the signature verification of the first signature information passes is determined based on whether the first Hash value is consistent with the decryption result.

[0025] In addition, according to at least one embodiment of the present invention, before decrypting the first signature information using the first public key corresponding to the first private key, the method further includes:

[0026] According to the first hash value, searching the locally stored correspondence table of hash values ​​and signature information to determine whether there is second signature information corresponding to the first hash value;

[0027] If so, judging whether the signature verification of the first signature information passes according to whether the second signature information is consistent with the first signature information;

[0028] If it does not exist, execute the step of using the first public key corresponding to the first private key to decrypt the first signature information and obtain the decryption result.

[0029] In addition, according to at least one embodiment of the present invention, when the first Hash value is consistent with the decryption result, the correspondence between the first Hash value and the first signature information is added to the correspondence table.

[0030] In addition, according to at least one embodiment of the present invention, the method further includes: the first node establishing a secure connection with the controller;

[0031] The first node and the controller complete the public key certificate distribution and the first asymmetric encryption algorithm selection operation through the secure connection.

[0032] In addition, according to at least one embodiment of the present invention, the present invention further comprises:

[0033] The first node establishes a secure connection with the controller, and sends a public key certificate request message to the controller through the secure connection, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives the public key certificate sent by the controller and verifies it, and after the verification is passed, saves the public key certificate; the first node receives a reply message sent by the controller through the secure connection to indicate a target hash algorithm, a target asymmetric encryption algorithm and a public key certificate, and the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes;

[0034] or,

[0035] The first node establishes a secure connection with the controller, and sends a public key request message to the controller through the secure connection, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives the public key and public key identifier sent by the controller;

[0036] The target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0037] The target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0038] According to another aspect of the present invention, at least one embodiment provides a method for generating signature information, including:

[0039] The controller uses a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to sign a target field in a message header of a first SRv6 message generated according to the segment list to obtain first signature information;

[0040] The controller sends the segment list and the first signature information to the source node of the first SRv6 message.

[0041] In addition, according to at least one embodiment of the present invention, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0042] In addition, according to at least one embodiment of the present invention, the target field includes at least one of the following fields:

[0043] IPv6 source address;

[0044] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0045] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0046] In addition, according to at least one embodiment of the present invention, the present invention further comprises:

[0047] The controller and the first node complete the public key certificate distribution and the first asymmetric encryption algorithm selection operation through the secure connection established by the first node.

[0048] The controller establishes a secure connection with the multiple nodes, and receives, through the secure connection, a public key certificate request message sent by the multiple nodes, and receives indication information of the hash algorithm and asymmetric encryption algorithm supported by the multiple nodes sent by the multiple nodes; the controller sends a public key certificate to the multiple nodes; the controller selects a target hash algorithm and a target asymmetric encryption algorithm supported by the multiple nodes according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively;

[0049] or,

[0050] The controller establishes a secure connection with multiple nodes, and receives public key request messages sent by the multiple nodes through the secure connection, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller sends public keys and public key identifiers to the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes based on the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively.

[0051] According to another aspect of the present invention, at least one embodiment provides a message sending method, including:

[0052] The source node receives the segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0053] The source node generates and sends a first SRv6 message carrying the segment list and the first signature information.

[0054] In addition, according to at least one embodiment of the present invention, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0055] In addition, according to at least one embodiment of the present invention, the target field includes at least one of the following fields:

[0056] IPv6 source address;

[0057] The previous entry, flags, and segment list in the IPv6 address stack of the routing extension header;

[0058] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0059] According to another aspect of the present invention, at least one embodiment provides a first node including:

[0060] A receiving module, configured to receive a first SRv6 message, wherein the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0061] A forwarding module is used to use the first hash algorithm and the first public key corresponding to the first private key to perform signature verification on the first signature information, and determine whether to forward the first SRv6 message according to the verification result.

[0062] According to another aspect of the present invention, at least one embodiment provides a first node including a transceiver and a processor, wherein:

[0063] The transceiver is used to receive a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0064] The processor is configured to perform signature verification on the first signature information by using the first hash algorithm and a first public key corresponding to the first private key, and determine whether to forward the first SRv6 message according to a verification result.

[0065] According to another aspect of the present invention, at least one embodiment provides a first node comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method described above when executed by the processor.

[0066] According to another aspect of the present invention, at least one embodiment provides a controller comprising:

[0067] A signature module, configured to sign a target field in a message header of a first SRv6 message generated according to the segment list by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to obtain first signature information;

[0068] A sending module is used to send the segment list and the first signature information to the source node of the first SRv6 message.

[0069] According to another aspect of the present invention, at least one embodiment provides a controller including a transceiver and a processor, wherein:

[0070] The processor is configured to sign a target field in a message header of a first SRv6 message generated according to the segment list by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to obtain first signature information;

[0071] The transceiver is used to send the segment list and the first signature information to the source node of the first SRv6 message.

[0072] According to another aspect of the present invention, at least one embodiment provides a controller including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method described above when executed by the processor.

[0073] According to another aspect of the present invention, at least one embodiment provides a source node comprising:

[0074] A receiving module, configured to receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0075] A forwarding module is used to generate and send a first SRv6 message carrying the segment list and the first signature information.

[0076] According to another aspect of the present invention, at least one embodiment provides a source node including a transceiver and a processor, wherein:

[0077] The transceiver is used to receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm and a first private key;

[0078] The processor is configured to generate and send a first SRv6 message carrying the segment list and the first signature information.

[0079] According to another aspect of the present invention, at least one embodiment provides a source node comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program implements the steps of the method described above when executed by the processor.

[0080] According to another aspect of the present invention, at least one embodiment provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the steps of the method described above are implemented.

[0081] Compared with the prior art, the message sending method, signature information generation method and device provided in the embodiments of the present invention use asymmetric keys to authenticate and verify the integrity of the message header. A private key is used to sign the SRv6 message header on the controller, and a public key is used to verify the signature at the key nodes of the network device, so as to prevent the counterfeiting of the message source and the tampering of the message header, avoid a device being compromised, and avoid the shared key of the entire network being leaked. In addition, the embodiments of the present invention also provide two key distribution / update and algorithm selection mechanism implementation schemes, which are simple to implement, safe to operate, and easy to apply in the network. In addition, the embodiments of the present invention also provide an SRv6 message efficient verification and forwarding mechanism, which decrypts and verifies the first packet and forwards the subsequent packets by table lookup, thereby improving the forwarding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0083] Figure 1 A schematic diagram of SRv6 message forwarding in the prior art;

[0084] Figure 2 A schematic diagram of a SRv6 network in the prior art;

[0085] Figure 3 A flow chart of a message sending method provided by an embodiment of the present invention;

[0086] Figure 4 A schematic diagram of the structure of an SRv6 message provided in an embodiment of the present invention;

[0087] Figure 5 A schematic diagram of a key distribution process provided by an embodiment of the present invention;

[0088] Figure 6 Another schematic diagram of a key distribution process according to an embodiment of the present invention;

[0089] Figure 7 Another schematic diagram of a key distribution process according to an embodiment of the present invention;

[0090] Figure 8 Another schematic diagram of a key distribution process according to an embodiment of the present invention;

[0091] Fig. 9 A flow chart of a method for generating signature information provided by an embodiment of the present invention;

[0092] Fig.10 Another flow chart of the message sending method provided by the embodiment of the present invention;

[0093] Fig.11 An exemplary diagram of a message sending method provided by an embodiment of the present invention;

[0094] Fig.12 An example diagram of table lookup forwarding provided by an embodiment of the present invention;

[0095] Fig.13 A schematic diagram of the structure of a first node provided in an embodiment of the present invention;

[0096] Fig.14 Another structural schematic diagram of a first node provided in an embodiment of the present invention;

[0097] Fig.15 A schematic diagram of the structure of a controller provided by an embodiment of the present invention;

[0098] Fig.16 Another structural schematic diagram of a controller provided in an embodiment of the present invention;

[0099] Fig.17 A schematic diagram of the structure of a source node provided by an embodiment of the present invention;

[0100] Fig.18 Another structural schematic diagram of a source node provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0101] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0102] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable in appropriate circumstances, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. "And / or" in the specification and claims represents at least one of the connected objects.

[0103] The following description provides examples and does not limit the scope, applicability, or configuration set forth in the claims. Changes may be made to the functions and arrangements of the elements discussed without departing from the spirit and scope of the present disclosure. Various examples may appropriately omit, replace, or add various procedures or components. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.

[0104] The embodiment of the present invention provides a message sending method, which can implement an SRv6 message header authentication and verification method based on an asymmetric key on the basis of the SRv6 trust domain protection scheme, and can avoid the problem of key leakage easily occurring when using a shared key for authentication, thereby affecting network security. In addition, the embodiment of the present invention also proposes a table lookup forwarding method based on asymmetric verification results, which can further improve the forwarding efficiency of the data plane.

[0105] Please refer to Figure 3 The message sending method provided in the embodiment of the present invention is applied to an intermediate node device or a host server or other device (referred to as a first node here for ease of description) that forwards SRv6 messages. The first node may be a forwarding device at the boundary of an SRv6 trust domain or within an SRv6 trust domain, such as Figure 3 As shown, the message forwarding method includes:

[0106] In step 31, the first node receives a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key.

[0107] Here, in order to avoid the problem of key leakage that may occur easily when using a shared key for authentication, the embodiment of the present invention uses a private key in an asymmetric key to sign the target field in the SRv6 message header to obtain signature information. The signature information may be generated by a controller in the SRv6 trust domain and sent to the source node that sends the first SRv6 message.

[0108] Step 32: The first node uses the first hash algorithm and the first public key corresponding to the first private key to perform signature verification on the first signature information, and determines whether to forward the first SRv6 message according to the verification result.

[0109] Here, the first node uses the public key in the asymmetric key to perform signature verification. If the signature verification of the first signature information passes, the first SRv6 message can be forwarded; if the signature verification of the first signature information fails, the first SRv6 message can be discarded.

[0110] Specifically, the signature verification process may include:

[0111] The first node uses the first hash algorithm to calculate a first hash value corresponding to the target field of the first SRv6 message; then, uses the first public key corresponding to the first private key to decrypt the first signature information to obtain a decryption result; then, based on whether the first hash value and the decryption result are consistent, it is determined whether the signature verification of the first signature information passes.

[0112] When the message is not attacked, the decryption result is usually a hash value (such as the second hash value) and is consistent with the first hash value, and the signature verification can be determined to have passed. However, when the message is attacked, the decryption result may not be a hash value. When the decryption result is found to be inconsistent with the first hash value through comparison, the signature verification is determined to have failed.

[0113] The first public key corresponding to the first private key here refers to: a first public key generated based on the same asymmetric encryption algorithm as the first private key.

[0114] Through the above steps, the embodiment of the present invention uses an asymmetric key to verify the SRv6 message header, thereby avoiding the problem of key leakage that may occur when using a shared key for authentication, thereby affecting network security.

[0115] To implement SRv6 asymmetric key signature protection, an embodiment of the present invention provides a type-length-value (Auth TLV) field for SRv6 signature authentication to perform signature protection on a target field of an SRv6 message.

[0116] Specifically, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0117] Among them, the indication information of the first hash algorithm adopted by the signature can be indicated directly or indirectly, for example, directly indicating the algorithm name of the first hash algorithm, or indicating the agreed identifier or index of the first hash algorithm. The first node can determine the specific first hash algorithm by looking up the correspondence between the pre-agreed identifier / index and the hash algorithm.

[0118] Similarly, the indication information of the first asymmetric encryption algorithm used for the signature and the indication information of the first public key for decrypting the first signature information may also be indicated directly or indirectly. For example, the algorithm name of the first asymmetric encryption algorithm may be directly indicated, or the agreed identifier or index of the first asymmetric encryption algorithm may be indicated. The first node may determine the specific first asymmetric encryption algorithm by looking up the correspondence between the pre-agreed identifier / index and the asymmetric encryption algorithm. For another example, the first public key may be directly indicated, or the public key identifier or public key certificate of the first public key may be indicated. The first node may determine the specific first public key by looking up the correspondence between the pre-agreed public key identifier and the public key, or by looking up the corresponding public key certificate.

[0119] The target field may include at least one of the following fields:

[0120] IPv6 source address;

[0121] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0122] The D field in the signature authentication TLV field, the reserved field in the signature authentication TLV field, the indication information of the first hash algorithm used for the signature, the indication information of the first asymmetric encryption algorithm used for the signature, and the indication information of the first public key for decrypting the first signature information.

[0123] Optionally, the target field may also include at least one of the following fields: a type (Type) field and a length (Length) field in the signature authentication TVL field.

[0124] In this way, in the above method, before performing signature verification on the first signature information in step 32, the first node can parse the signature authentication TLV field of the first SRv6 message to determine the first hash algorithm, the first asymmetric encryption algorithm and the first public key for decrypting the first signature information used for the signature, and then use the above-mentioned first hash algorithm and the first public key corresponding to the first private key to perform signature verification on the first signature information in step 32.

[0125] Figure 4 A structure diagram of the signature authentication TLV field is given. It should be noted that: Figure 4 The given field structure is only an example that can be adopted in an embodiment of the present invention and is not intended to limit the present invention. The present invention can also adopt TLV fields of other structures, for example, adjusting the position or length of each part in the field to obtain a different field structure.

[0126] Specifically, Figure 4 The signature authentication TLV fields shown include:

[0127] 1) Type field, that is, the type field, can be a preset value. Figure 4 The value of 6 is taken as an example, which is used to indicate that the TLV field is a TLV field that uses an asymmetric key signature for authentication, and its length can be 8 bits.

[0128] 2) Length field, i.e., length field, is used to indicate the length of the signature authentication TLV field.

[0129] 3) The D field is used to indicate that the destination address is not checked when the reduce mode is used.

[0130] 4) Reserved: A reserved field in the signature authentication TLV field.

[0131] 5) Auth Key ID: information indicating the hash algorithm used for the signature, the asymmetric encryption algorithm used for the signature, and the public key for decrypting the signature information. For example, the first public key can be indicated by the certificate serial number or public key identifier of the public key certificate. Table 1 further gives an example of what the Auth Key ID includes.

[0132] Hash algorithm Signature algorithm Certificate Serial number Reserved

[0133] Table 1

[0134] In Table 1: Hash algorithm indicates the hash algorithm used for the hash calculation of the message header, such as SHA256, SHA3, etc.; Signature algorithm indicates the asymmetric signature algorithm, such as RSA2048, ECDSA, etc.; Certificate Serialnumber indicates the serial number of the public key certificate, which is used to identify the controller certificate public key used for decryption. Reserved indicates the reserved field in AuthKey ID

[0135] 6) Auth: Signature information field, including signature information, that is, the signature information generated previously for the target field using a hash algorithm, an asymmetric encryption algorithm and a private key, and its length is 8 to 32 bytes.

[0136] Figure 4 The signature verification range in is the field corresponding to the dotted box, that is, the target field includes:

[0137] IPv6 source address (IPv6 Source address);

[0138] Last Entry field;

[0139] Flags;

[0140] Segment List (for G-SRv6, it can be G-Segment ID List)

[0141] Reserved fields in the D field and the Signature Authentication TLV field;

[0142] Auth Key ID.

[0143] The embodiment of the present invention adopts an asymmetric key to perform signature verification on the forwarded message on the data side. In order to further improve the message forwarding processing efficiency, the embodiment of the present invention also provides an efficient signature verification table lookup forwarding mechanism, performs signature verification on the first packet of the data message, and records the correspondence between the hash value of the message header and the signature information in a locally maintained correspondence table, so that when subsequent packets arrive, the correspondence table can be directly searched, and the signature value can be compared to realize table lookup forwarding, thereby improving forwarding efficiency.

[0144] Specifically, in the above step 32, before using the first public key corresponding to the first private key to decrypt the first signature information, the embodiment of the present invention can search the locally stored correspondence table of hash values ​​and signature information according to the first hash value to determine whether there is second signature information corresponding to the first hash value:

[0145] If it exists, judging whether the signature verification of the first signature information passes according to whether the second signature information is consistent with the first signature information, for example, if they are consistent, the signature verification passes, and the first SRv6 message is forwarded at this time, and if they are inconsistent, the signature verification fails, and the first SRv6 message can be discarded at this time;

[0146] If it does not exist, execute step 32, use the first public key corresponding to the first private key to decrypt the first signature information, obtain the decryption result and subsequent steps.

[0147] In addition, when the calculated first hash value is consistent with the decryption result obtained by decryption, the first node adds the correspondence between the first hash value and the first signature information to the correspondence table, so that the correspondence table can be directly used to look up and forward related messages in the future, so as to improve data forwarding efficiency.

[0148] In the embodiment of the present invention, the controller signs the message header based on the private key, and the network forwarding device decrypts and verifies based on the public key. This requires key distribution between the controller and the forwarding device. In order to further improve confidentiality and enhance anti-attack capabilities, the embodiment of the present invention also needs to be able to update keys regularly and securely. Key update is similar to the key distribution process. That is, the first node establishes a secure connection with the controller, and through the secure connection, completes the distribution of the public key certificate and the selection of the first asymmetric encryption algorithm.

[0149] Two specific methods of key distribution / update are provided below.

[0150] As an implementation method, certificates are used between the controller and the first node (here, the first node can be any network forwarding device or host server that needs to perform signature verification on the SRv6 message) to implement authentication and key distribution. A CA certificate is pre-set on the first node to verify the public key certificate obtained from the controller and obtain the public key of the controller. In this implementation method, the first node establishes a secure connection with the controller, and through the secure connection, sends a public key certificate request message to the controller, and sends the controller indication information of the hash algorithm and asymmetric encryption algorithm supported by the node; the first node receives the public key certificate sent by the controller and verifies it, and after the verification is passed, saves the public key certificate; the first node receives a reply message sent by the controller through the secure connection to indicate the target hash algorithm, the target asymmetric encryption algorithm and the public key certificate, and the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0151] Figure 5 A schematic diagram of the interaction between the controller and the first node in the above implementation is provided, wherein the control plane between the first node (network forwarding device) and the controller can use an existing mature protection mechanism, for example, using certificate authentication, or account and password authentication, and after authentication, the control plane data is encrypted for transmission and integrity protection. Figure 5 As shown, including:

[0152] 51) The first node establishes a secure connection with the controller;

[0153] 52) The first node sends a certificate request to the controller, and at the same time, the first node sends a list of hash algorithms and asymmetric encryption algorithms supported by itself to the controller;

[0154] 53) The controller sends the public key certificate to the first node according to the algorithm supported by the first node;

[0155] 54) The first node verifies the public key certificate based on the preset root certificate, and the certificate verification is successful;

[0156] 55) The controller collects a list of algorithms supported by network forwarding nodes in the network that need to perform signature verification on SRv6 messages, and selects an algorithm supported by all network forwarding nodes to generate signature information (digital signature) for the message header.

[0157] In this implementation, the key update process is similar to the above distribution process. The controller sends the new public key certificate to the network forwarding device (such as the first node), and after receiving the response from the network forwarding device, uses the new private key to generate signature information (digital signature).

[0158] This implementation uses certificates to implement authentication and key distribution between the controller and the network forwarding device / host. Based on the existing secure connection between the controller and the network device, the controller can be authenticated again based on a publicly trusted CA to prevent counterfeit control centers from being counterfeited.

[0159] As another implementation method, the public key distribution and replacement are directly performed by relying on the secure connection between the controller and the control plane of the network device. In this implementation method, the first node establishes a secure connection with the controller, and sends a public key request message to the controller through the secure connection, and sends the controller indication information of the hash algorithm and asymmetric encryption algorithm supported by the node; the first node receives the public key and public key identifier sent by the controller; the first node receives a reply message sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric encryption algorithm. Among them, the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0160] Figure 6 A schematic diagram of the interaction between the controller and the first node in the above implementation is provided, wherein the control plane between the first node (network forwarding device or host) and the controller uses an existing mature protection mechanism, for example, certificate authentication, or account and password authentication, and after authentication, the control plane data is encrypted for transmission and integrity protection. Figure 6 As shown, including:

[0161] 61) The first node establishes a secure connection with the controller;

[0162] 62) The first node sends a public key request to the controller, and at the same time, the first node sends a list of hash algorithms and asymmetric encryption algorithms supported by itself to the controller;

[0163] 63) The controller sends the public key and the public key identifier to the first node in ciphertext form according to the algorithm supported by the first node;

[0164] 64) The controller collects a list of node algorithms for verification in the network, and selects an algorithm supported by all nodes to generate signature information (digital signature) for the message header.

[0165] In this implementation, the key update process is similar to the above distribution process. The controller sends the new public key and public key identifier to the first node, and after receiving the response from the first node, uses the new private key to generate signature information (digital signature).

[0166] In addition, the algorithms used by the controller and the nodes in the above embodiment may also be fixed, that is, no selection is required.

[0167] Specifically, the embodiment of the present invention requires the controller to sign the message header based on the private key and decrypt and verify based on the public key on the node, which requires the key distribution between the controller and the device. In order to improve confidentiality and anti-attack capabilities, it is also necessary to be able to update the key regularly and securely. The following provides two feasible implementation methods.

[0168] Method 1: If Figure 7 As shown in Figure 1, certificates are used between the controller and the node to implement authentication and key distribution. The CA certificate is pre-set on the node, the public key certificate obtained from the controller is verified, and the controller's public key is obtained.

[0169] The control plane between the node and the controller generally has a mature protection mechanism, which may use certificate authentication or account and password authentication. After authentication, the control plane data is encrypted for transmission and integrity protection. After establishing a secure connection between the controller and the node:

[0170] 1) The key node that needs to be verified sends a certificate request to the controller;

[0171] 2) The controller sends the public key certificate, the hash algorithm used for SRv6 verification, and the asymmetric encryption algorithm to the device (the key type in the certificate is consistent with the asymmetric encryption algorithm sent by the controller);

[0172] 3) The device verifies the public key certificate based on the preset root certificate and checks whether it supports the hash algorithm and asymmetric encryption algorithm sent by the controller;

[0173] 4) After the certificate and algorithm are successfully verified, the device sends a success response to the controller;

[0174] 5) If the certificate and algorithm verification fails, the device sends a failure message to the controller and reports the specific reason for the failure.

[0175] The certificate update process is similar to the above process. The controller sends the new certificate to the node, and after receiving the response from the node, it uses the new private key to generate a digital signature.

[0176] Using certificates to implement authentication and key distribution between the controller and the nodes can re-authenticate the controller based on the existing secure connection between the controller and the nodes and based on a publicly trusted CA, thus preventing counterfeit control centers from being counterfeited.

[0177] Method 2: If Figure 8 As shown, the public key distribution and replacement are performed directly by relying on the secure connection between the controller and the control plane between the nodes.

[0178] The control plane between the node and the controller generally has a mature protection mechanism, which may use certificate authentication or account and password authentication. After authentication, the control plane data is encrypted for transmission and integrity protection. After establishing a secure connection between the controller and the node:

[0179] 1) The key node that needs to be verified sends a public key request to the controller;

[0180] 2) The controller sends the hash algorithm, the asymmetric encryption algorithm, the public key of the asymmetric encryption algorithm and the public key identifier to the device in ciphertext form;

[0181] 3) The device checks whether it supports the hash algorithm and asymmetric encryption algorithm sent by the controller;

[0182] 4) After the algorithm is successfully verified, the device sends a success response to the controller;

[0183] 5) If the algorithm verification fails, the device sends a failure message to the controller and reports the specific reason for the failure.

[0184] The public key update process is similar to the above process. The controller sends the new public key and public key identifier to the node. After receiving the node's response, the controller uses the new private key to generate a digital signature.

[0185] Please refer to Fig. 9 An embodiment of the present invention provides a method for generating signature information, which is applied to a controller in an SRv6 network, where the controller may be an SRv6 controller or a software defined network (SDN) controller. The method includes:

[0186] Step 71: The controller uses a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to sign a target field in a message header of a first SRv6 message generated according to the segment list to obtain first signature information.

[0187] Here, the first hash algorithm and the first asymmetric encryption algorithm are hash algorithms and asymmetric encryption algorithms supported by devices in the segment list (including network forwarding devices and hosts, etc.) that need to perform signature verification on the SRv6 message. Usually, the controller calculates the path according to the network topology and business needs to obtain a segment list (forwarding path), that is, a segment list in the SRv6 network. According to the segment list, a message header of the first SRv6 message corresponding to the first message is generated. Then, the first hash algorithm, the first asymmetric encryption algorithm and the first private key are used to sign the target field in the message header of the first SRv6 message to obtain the first signature information.

[0188] Step 72: The controller sends the segment list and the first signature information to the source node.

[0189] Here, the controller sends the segment list and the first signature information to the source node, so that the source node can encapsulate and generate a first SRv6 message carrying the segment list and the first signature information based on the first message according to the segment list and the first signature information.

[0190] Through the above steps, the embodiment of the present invention realizes the use of an asymmetric key to generate the signature information of the SRv6 message header, thereby avoiding the problem that the use of a shared key for authentication is prone to key leakage and thus affects network security.

[0191] Here, similarly, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0192] The target field includes at least one of the following fields:

[0193] IPv6 source address;

[0194] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0195] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0196] Corresponding to the first key distribution / update method provided above, the controller establishes a secure connection with multiple nodes, and through the secure connection, receives public key certificate request messages sent by the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller sends public key certificates to the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes based on the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively.

[0197] Corresponding to the second key distribution / update method provided above, the controller establishes a secure connection with multiple nodes, and through the secure connection, receives public key request messages sent by the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller sends public keys and public key identifiers to the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes based on the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes, and sends reply messages to the multiple nodes for indicating the target hash algorithm, target asymmetric encryption algorithm and public key certificates.

[0198] Please refer to Fig.10 An embodiment of the present invention provides a message sending method, which is applied to a source node sending a first SRv6 message, including:

[0199] In step 81, the source node receives a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key.

[0200] Step 82: The source node generates and sends a first SRv6 message carrying the segment list and the first signature information.

[0201] Through the above steps, the signature information generated by the controller based on the asymmetric key can be carried in the SRv6 message for sending, thereby avoiding the problem of key leakage that may occur when using a shared key for authentication, thereby affecting network security.

[0202] Here, similarly, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0203] The target field includes at least one of the following fields:

[0204] IPv6 source address;

[0205] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0206] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0207] The above introduces the relevant methods of the embodiments of the present invention from multiple device sides. It can be seen that the embodiments of the present invention use the certificate private key on the SRv6 controller to hash the SRH and IP header, encapsulate the SRv6 header and the digital signature generated by the controller at the SRv6 source node, and use the public key to verify the signature at the key network forwarding node (i.e., the forwarding node that needs to perform signature verification). In this way, even if the network device has a vulnerability and is compromised, the signature private key will not be leaked, and the attacker cannot use SRH to carry out various source routing attacks on the network, thereby improving the security performance of the network.

[0208] The above method is described below through a specific forwarding example.

[0209] Please refer to Fig.11 , taking certificate-based key distribution as an example. Fig. 9 The SRv6 network shown includes nodes 1 to 6 and hosts 1 to 2 (Host 1 to Host 2), and the SRv6 trust domain includes nodes 2 to 5.

[0210] Step A: Pre-set certificates. Pre-set private keys and controller certificates on the SRv6 controller, and pre-set CA root certificates on key network devices (nodes that need to verify the signature information of SRv6 messages).

[0211] Step B: After the controller and network device establish a secure connection on the control plane, public key certificate distribution and signature algorithm selection are performed.

[0212] Step C: The SRv6 controller uses the private key and the hash algorithm and asymmetric encryption algorithm selected in the previous step to sign the message header generated according to the segment list, and sends the segment list and signature information to the source node. The source node may be Node 1 that needs to communicate across domains, or Host 1 in the trust domain.

[0213] Step D: The source node encapsulates and forwards the SRv6 message with signature information.

[0214] Step E: Key network nodes, such as the external interface (interface 11) of node 2 at the border of the SRv6 trust domain, the access interface (interface 12) of the host in node 3 within the SRv6 trust domain, and the host node Host 2 (interface 14) providing services, start signature verification, first calculate the first hash value based on the message header, then use the public key to decrypt the signature information in the message to obtain the decryption result, and compare the two hash values ​​for consistency. If the verification fails, the message is discarded; if the verification succeeds, the message is forwarded and processed.

[0215] Step F: The SRv6 controller periodically updates the certificate based on security requirements.

[0216] In the case of using a corresponding relationship table for table lookup forwarding, the embodiment of the present invention can perform signature verification on the first packet of the data message, and record the hash value calculated based on the message header and the signature information in the message header into the corresponding relationship table. Subsequent packets can directly look up the corresponding relationship table and compare the signature information. Specifically, Fig.12 As shown, including:

[0217] Step a: When an SRv6 message is received on an interface with signature verification enabled, the hash value of the message header is calculated and the local corresponding table is checked to see if it matches.

[0218] Step b: If the local correspondence table is not hit, the signature is decrypted using the controller public key, and the decrypted hash value is compared with the calculated hash value to see if they are consistent. If they are inconsistent, the message is discarded; if they are consistent, the hash value and signature information are recorded in the local correspondence table, and the message is forwarded and processed.

[0219] Step c: When the local correspondence table is hit in step a, the signature information in the correspondence table is compared with the signature information carried in the message header to see if they are consistent. If they are consistent, the message is forwarded and processed; if they are inconsistent, the message is discarded.

[0220] In summary, the above method of the embodiment of the present invention proposes a new message header authentication and verification method based on the SRv6 trust domain protection. The embodiment of the present invention newly defines an SRv6 Auth TLV for authenticating and verifying the integrity of the message header using an asymmetric key. The private key is used to sign the SRv6 message header on the controller, and the public key is used to verify the signature at the key node of the network device to prevent the counterfeiting of the message source and the tampering of the message header, thereby preventing a device from being compromised and the shared key of the entire network from being leaked. In addition, the embodiment of the present invention also provides two key distribution / update and algorithm selection mechanism implementation schemes, which are simple to implement, safe to operate, and easy to apply in the network. In addition, the embodiment of the present invention also provides an SRv6 message efficient verification and forwarding mechanism, which decrypts and verifies the first packet and forwards the subsequent packets by table lookup, thereby improving the forwarding efficiency. The embodiment of the present invention can be applied to the standard SRv6 protocol, and can also be applied to extended protocols such as G-SRv6.

[0221] The above describes various methods of the embodiments of the present invention. The following further provides devices for implementing the above methods.

[0222] The embodiment of the present invention provides Fig.13 A first node is shown, comprising:

[0223] The receiving module 111 is used to receive a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0224] The forwarding module 112 is used to use the first hash algorithm and the first public key corresponding to the first private key to perform signature verification on the first signature information, and determine whether to forward the first SRv6 message according to the verification result.

[0225] Optionally, the forwarding module 112 is further configured to forward the first SRv6 message if the signature verification of the first signature information passes; and discard the first SRv6 message if the signature verification of the first signature information fails.

[0226] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0227] Optionally, the target field includes at least one of the following fields:

[0228] IPv6 source address;

[0229] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0230] The D field in the signature authentication TLV field, the reserved field, the indication information of the first hash algorithm used for the signature, the indication information of the first asymmetric encryption algorithm used for the signature, and the indication information of the first public key for decrypting the first signature information.

[0231] Optionally, the first node further includes:

[0232] A parsing module is used to parse the signature authentication TLV field of the first SRv6 message to determine the first hash algorithm and the first asymmetric encryption algorithm used by the signature and the first public key for decrypting the first signature information.

[0233] Optionally, the forwarding module is also used for the first node to use the first hash algorithm to calculate a first hash value corresponding to the target field of the first SRv6 message; use the first public key corresponding to the first private key to decrypt the first signature information to obtain a decryption result; and determine whether the signature verification of the first signature information passes based on whether the first hash value and the decryption result are consistent.

[0234] Optionally, the forwarding module is also used to search a locally stored correspondence table of hash values ​​and signature information according to the first hash value before decrypting the first signature information using the first public key corresponding to the first private key, to determine whether there is second signature information corresponding to the first hash value; if so, determine whether the signature verification of the first signature information passes according to whether the second signature information is consistent with the first signature information; if not, execute the step of decrypting the first signature information using the first public key corresponding to the first private key to obtain a decryption result.

[0235] Optionally, the first node further includes:

[0236] A maintenance module is used to add the correspondence between the first Hash value and the first signature information to the correspondence table when the first Hash value is consistent with the decryption result.

[0237] Optionally, the first node further includes: a key obtaining module, configured to establish a secure connection with the controller;

[0238] The first node and the controller complete the public key certificate distribution and the first asymmetric encryption algorithm selection operation through the secure connection.

[0239] Specifically, the key acquisition module is used to establish a secure connection with the controller, and send a public key certificate request message to the controller through the secure connection; the first node receives the public key certificate sent by the controller and verifies it, and after the verification is passed, saves the public key certificate and sends the controller indication information of the hash algorithm and asymmetric encryption algorithm supported by the node; the first node receives a reply message sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric encryption algorithm;

[0240] or,

[0241] Establishing a secure connection with the controller, and sending a public key request message to the controller through the secure connection; the first node receives the public key and public key identifier sent by the controller, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives a reply message sent by the controller through the secure connection to indicate a target hash algorithm and a target asymmetric encryption algorithm;

[0242] The target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0243] It should be noted that the device in this embodiment is the same as the above Figure 3 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the device, and can also achieve the same technical effects. It should be noted that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effects, and the parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically described here.

[0244] Please refer to Fig.14 , an embodiment of the present invention provides a schematic diagram of a structure of a network side device, including: a processor 1201, a transceiver 1202, a memory 1203 and a bus interface, wherein:

[0245] In the embodiment of the present invention, the network side device further includes: a program stored in the memory 1203 and executable on the processor 1201, and the program implements the following steps when executed by the processor 1201:

[0246] Receive a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0247] Perform signature verification on the first signature information using the first hash algorithm and the first public key corresponding to the first private key, and determine whether to forward the first SRv6 message based on the verification result.

[0248] Optionally, when the processor executes the program, the processor further implements the following steps:

[0249] If the signature verification of the first signature information passes, forwarding the first SRv6 message;

[0250] If the signature verification of the first signature information fails, the first SRv6 message is discarded.

[0251] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0252] Optionally, the target field includes at least one of the following fields:

[0253] IPv6 source address;

[0254] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0255] The D field in the signature authentication TLV field, the reserved field, the indication information of the first hash algorithm used for the signature, the indication information of the first asymmetric encryption algorithm used for the signature, and the indication information of the first public key for decrypting the first signature information.

[0256] Optionally, when the processor executes the program, the processor further implements the following steps:

[0257] Before performing signature verification on the first signature information, the signature authentication TLV field of the first SRv6 message is parsed to determine a first hash algorithm, a first asymmetric encryption algorithm, and a first public key for decrypting the first signature information.

[0258] Optionally, when the processor executes the program, the processor further implements the following steps:

[0259] Using the first hash algorithm, calculate a first hash value corresponding to the target field of the first SRv6 message;

[0260] Decrypting the first signature information using the first public key corresponding to the first private key to obtain a decryption result;

[0261] Whether the signature verification of the first signature information passes is determined based on whether the first Hash value is consistent with the decryption result.

[0262] Optionally, when the processor executes the program, the processor further implements the following steps:

[0263] Before decrypting the first signature information using the first public key corresponding to the first private key, searching a locally stored correspondence table of hash values ​​and signature information according to the first hash value to determine whether there is second signature information corresponding to the first hash value;

[0264] If so, judging whether the signature verification of the first signature information passes according to whether the second signature information is consistent with the first signature information;

[0265] If it does not exist, execute the step of using the first public key corresponding to the first private key to decrypt the first signature information and obtain the decryption result.

[0266] Optionally, when the processor executes the program, the processor further implements the following steps:

[0267] When the first Hash value is consistent with the decryption result, the correspondence between the first Hash value and the first signature information is added to the correspondence table.

[0268] Optionally, when the processor executes the program, the processor further implements the following steps:

[0269] Establishing a secure connection with the controller, and sending a public key certificate request message to the controller through the secure connection; the first node receives the public key certificate sent by the controller and verifies it, and after the verification is passed, saves the public key certificate and sends the controller indication information of the hash algorithm and asymmetric encryption algorithm supported by the node; the first node receives a reply message sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric encryption algorithm;

[0270] or,

[0271] Establishing a secure connection with the controller, and sending a public key request message to the controller through the secure connection; the first node receives the public key and public key identifier sent by the controller, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives a reply message sent by the controller through the secure connection to indicate a target hash algorithm and a target asymmetric encryption algorithm;

[0272] The target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

[0273] It is understandable that in the embodiment of the present invention, when the computer program is executed by the processor 1201, the above Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0274] exist Fig.14 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1201 and memory represented by memory 1203. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1202 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.

[0275] The processor 1201 is responsible for managing the bus architecture and general processing, and the memory 1203 can store data used by the processor 1201 when performing operations.

[0276] It should be noted that the terminal in this embodiment is the same as the above Figure 3 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the terminal, and can also achieve the same technical effect. In the device, the transceiver 1202 and the memory 1203, as well as the transceiver 1202 and the processor 1201 can be connected through the bus interface communication, the function of the processor 1201 can also be implemented by the transceiver 1202, and the function of the transceiver 1202 can also be implemented by the processor 1201. It should be noted that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effect, and the parts and beneficial effects that are the same as the method embodiment in this embodiment will not be specifically repeated here.

[0277] In some embodiments of the present invention, a computer-readable storage medium is further provided, on which a program is stored, and when the program is executed by a processor, the following steps are implemented:

[0278] Receive a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0279] Perform signature verification on the first signature information using the first hash algorithm and the first public key corresponding to the first private key, and determine whether to forward the first SRv6 message based on the verification result.

[0280] When the program is executed by the processor, it can implement all the implementation methods of the above-mentioned message sending method applied to the first node, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0281] The embodiment of the present invention provides Fig.15 A controller as shown includes:

[0282] The signature module 131 is used to sign a target field in a message header of the SRv6 message generated according to the segment list by using a first hash algorithm, a first asymmetric encryption algorithm and a first private key to obtain first signature information;

[0283] The sending module 132 is used to send the segment list and the first signature information to the source node.

[0284] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0285] Optionally, the target field includes at least one of the following fields:

[0286] IPv6 source address;

[0287] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0288] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0289] Optionally, the controller further includes:

[0290] A distribution module, configured to establish a secure connection with a plurality of nodes, and receive public key certificate request messages sent by the plurality of nodes through the secure connection; the controller sends public key certificates to the plurality of nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the plurality of nodes sent by the plurality of nodes; the controller selects a target hash algorithm and a target asymmetric encryption algorithm supported by the plurality of nodes according to the hash algorithms and asymmetric encryption algorithms supported by the plurality of nodes respectively, and sends a reply message indicating the target hash algorithm, the target asymmetric encryption algorithm and the public key certificate to the plurality of nodes;

[0291] or,

[0292] Establish a secure connection with multiple nodes, and receive public key request messages sent by the multiple nodes through the secure connection; the controller sends public keys and public key identifiers to the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes based on the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively, and sends reply messages indicating the target hash algorithms, target asymmetric encryption algorithms and public key certificates to the multiple nodes.

[0293] It should be noted that the device in this embodiment is the same as the above Figure 7 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the device, and can also achieve the same technical effects. It should be noted that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effects, and the parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically described here.

[0294] Please refer to Fig.16 , an embodiment of the present invention provides a schematic diagram of a structure of a controller, including: a processor 1401, a transceiver 1402, a memory 1403 and a bus interface, wherein:

[0295] In the embodiment of the present invention, the network side device further includes: a program stored in the memory 1403 and executable on the processor 1401, and when the program is executed by the processor 1401, the following steps are implemented:

[0296] Using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key, a target field in a message header of a first SRv6 message generated according to the segment list is signed to obtain first signature information;

[0297] The segment list and the first signature information are sent to a source node of the first SRv6 message.

[0298] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0299] Optionally, the target field includes at least one of the following fields:

[0300] IPv6 source address;

[0301] The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header;

[0302] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0303] Optionally, when the processor executes the program, the processor further implements the following steps:

[0304] Establishing a secure connection with multiple nodes, and receiving public key certificate request messages sent by the multiple nodes through the secure connection; the controller sends public key certificates to the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes, and sends reply messages indicating the target hash algorithms, target asymmetric encryption algorithms and public key certificates to the multiple nodes;

[0305] or,

[0306] Establish a secure connection with multiple nodes, and receive public key request messages sent by the multiple nodes through the secure connection; the controller sends public keys and public key identifiers to the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes sent by the multiple nodes; the controller selects target hash algorithms and target asymmetric encryption algorithms supported by the multiple nodes based on the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively, and sends reply messages indicating the target hash algorithms, target asymmetric encryption algorithms and public key certificates to the multiple nodes.

[0307] It is understandable that in the embodiment of the present invention, when the computer program is executed by the processor 1401, the above Fig. 9 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0308] exist Fig.16 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1401 and memory represented by memory 1403. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1402 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.

[0309] The processor 1401 is responsible for managing the bus architecture and general processing, and the memory 1403 can store data used by the processor 1401 when performing operations.

[0310] It should be noted that the terminal in this embodiment is the same as the above Figure 7 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the terminal, and can also achieve the same technical effect. In the device, the transceiver 1402 and the memory 1403, as well as the transceiver 1402 and the processor 1401 can be connected through the bus interface communication, the function of the processor 1401 can also be implemented by the transceiver 1402, and the function of the transceiver 1402 can also be implemented by the processor 1401. It should be noted that the above device provided by the embodiment of the present invention can implement all the method steps implemented by the above method embodiment, and can achieve the same technical effect, and the parts and beneficial effects that are the same as the method embodiment in this embodiment will not be specifically repeated here.

[0311] In some embodiments of the present invention, a computer-readable storage medium is further provided, on which a program is stored, and when the program is executed by a processor, the following steps are implemented:

[0312] Using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key, a target field in a message header of a first SRv6 message generated according to the segment list is signed to obtain first signature information;

[0313] The segment list and the first signature information are sent to a source node of the first SRv6 message.

[0314] When the program is executed by the processor, the above application can be realized Fig. 9All implementation methods of the controller method shown can achieve the same technical effect. To avoid repetition, they will not be described here.

[0315] The embodiment of the present invention provides Fig.17 A source node is shown, comprising:

[0316] A receiving module 151 is configured to receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0317] The forwarding module 152 is configured to generate and send a first SRv6 message carrying the segment list and the first signature information.

[0318] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0319] Optionally, the target field includes at least one of the following fields:

[0320] IPv6 source address;

[0321] The previous entry, flags, and segment list in the IPv6 address stack of the routing extension header;

[0322] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0323] It should be noted that the device in this embodiment is the same as the above Figure 8 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the device, and can also achieve the same technical effects. It should be noted that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effects, and the parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically described here.

[0324] Please refer to Fig.18, an embodiment of the present invention provides a schematic diagram of a structure of a source node, including: a processor 1601, a transceiver 1602, a memory 1603 and a bus interface, wherein:

[0325] In the embodiment of the present invention, the network side device further includes: a program stored in the memory 1603 and executable on the processor 1601, and the program implements the following steps when executed by the processor 1601:

[0326] Receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0327] Generate and send a first SRv6 message carrying the segment list and the first signature information.

[0328] Optionally, the routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a length field of the signature authentication TLV, a D field, a reserved field, indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

[0329] Optionally, the target field includes at least one of the following fields:

[0330] IPv6 source address;

[0331] The previous entry, flags, and segment list in the IPv6 address stack of the routing extension header;

[0332] The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

[0333] It is understandable that in the embodiment of the present invention, when the computer program is executed by the processor 1601, the above Fig.10 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0334] exist Fig.18In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 1601 and memory represented by memory 1603. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1602 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.

[0335] The processor 1601 is responsible for managing the bus architecture and general processing, and the memory 1603 can store data used by the processor 1601 when performing operations.

[0336] It should be noted that the terminal in this embodiment is the same as the above Figure 8 The device corresponding to the method shown, the implementation methods in the above embodiments are all applicable to the embodiments of the terminal, and can also achieve the same technical effect. In the device, the transceiver 1602 and the memory 1603, as well as the transceiver 1602 and the processor 1601 can be connected through the bus interface communication, the function of the processor 1601 can also be implemented by the transceiver 1602, and the function of the transceiver 1602 can also be implemented by the processor 1601. It should be noted that the above device provided in the embodiment of the present invention can implement all the method steps implemented in the above method embodiment, and can achieve the same technical effect, and the parts and beneficial effects that are the same as the method embodiment in this embodiment will not be specifically repeated here.

[0337] In some embodiments of the present invention, a computer-readable storage medium is further provided, on which a program is stored, and when the program is executed by a processor, the following steps are implemented:

[0338] Receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key;

[0339] Generate and send a first SRv6 message carrying the segment list and the first signature information.

[0340] When the program is executed by the processor, it can implement all the implementation methods of the above-mentioned message sending method applied to the source node, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0341] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0342] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0343] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0344] 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 embodiments of the present invention.

[0345] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0346] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0347] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A message sending method, characterized in that: include: The first node receives a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key; The first node performs signature verification on the first signature information by using the first hash algorithm and a first public key corresponding to the first private key, and determines whether to forward the first SRv6 message according to the verification result; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

2. The method according to claim 1, characterized in that The determining whether to forward the first SRv6 message according to the verification result includes: If the signature verification of the first signature information passes, forwarding the first SRv6 message; If the signature verification of the first signature information fails, the first SRv6 message is discarded.

3. The method according to claim 1, characterized in that The signature authentication TLV field also includes at least one of the following information: a signature authentication TLV type field, a signature authentication TLV length field, a D field, and a reserved field.

4. The method according to claim 1, characterized in that The target field includes at least one of the following fields: IPv6 source address; The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header; The D field in the signature authentication TLV field, the reserved field, the indication information of the first hash algorithm used for the signature, the indication information of the first asymmetric encryption algorithm used for the signature, and the indication information of the first public key for decrypting the first signature information.

5. The method according to claim 1, characterized in that Before performing signature verification on the first signature information, the method further includes: The first node parses the signature authentication TLV field of the first SRv6 message to determine a first hash algorithm, a first asymmetric encryption algorithm, and a first public key for decrypting the first signature information.

6. The method according to any one of claims 1 to 5, characterized in that: The first node performs signature verification on the first signature information by using the first hash algorithm and a first public key corresponding to the first private key, including: The first node calculates, by using the first hash algorithm, a first hash value corresponding to the target field of the first SRv6 message; Decrypting the first signature information using the first public key corresponding to the first private key to obtain a decryption result; Whether the signature verification of the first signature information passes is determined based on whether the first Hash value is consistent with the decryption result.

7. The method according to claim 6, characterized in that Before decrypting the first signature information using the first public key corresponding to the first private key, the method further includes: According to the first hash value, searching the locally stored correspondence table of hash values ​​and signature information to determine whether there is second signature information corresponding to the first hash value; If so, judging whether the signature verification of the first signature information passes according to whether the second signature information is consistent with the first signature information; If it does not exist, execute the step of using the first public key corresponding to the first private key to decrypt the first signature information and obtain the decryption result.

8. The method according to claim 7, characterized in that When the first Hash value is consistent with the decryption result, the correspondence between the first Hash value and the first signature information is added to the correspondence table.

9. The method according to claim 1, characterized in that: Also includes: The first node establishes a secure connection with the controller; The first node and the controller complete the public key certificate distribution and the first asymmetric encryption algorithm selection operation through the secure connection.

10. The method according to claim 9, characterized in that Also includes: The first node establishes a secure connection with the controller, and sends a public key certificate request message to the controller through the secure connection, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives the public key certificate sent by the controller and verifies it, and after the verification is passed, saves the public key certificate; the first node receives a reply message sent by the controller through the secure connection to indicate a target hash algorithm, a target asymmetric encryption algorithm and a public key certificate, and the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes; or, The first node establishes a secure connection with the controller, and sends a public key request message to the controller through the secure connection, and sends indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives the public key and public key identifier sent by the controller; The target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.

11. A method for generating signature information, characterized in that: include: The controller uses a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to sign a target field in a message header of a first SRv6 message generated according to the segment list to obtain first signature information; The controller sends the segment list and the first signature information to the source node of the first SRv6 message; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

12. The method according to claim 11, characterized in that The signature authentication TLV field also includes at least one of the following information: a signature authentication TLV type field, a signature authentication TLV length field, a D field, and a reserved field.

13. The method according to claim 12, characterized in that The target field includes at least one of the following fields: IPv6 source address; The Last Entry field, flags, and segment list in the IPv6 address stack of the routing extension header; The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

14. The method according to claim 11, characterized in that Also includes: The controller and the first node complete the public key certificate distribution and the selection operation of the first asymmetric encryption algorithm through the secure connection established by the first node.

15. The method according to claim 14, characterized in that Also includes: The controller establishes a secure connection with the multiple nodes, and receives, through the secure connection, public key certificate request messages sent by the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes; The controller sends a public key certificate to the multiple nodes; The controller selects a target hash algorithm and a target asymmetric encryption algorithm supported by the multiple nodes according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively; or, The controller establishes a secure connection with the multiple nodes, and receives, through the secure connection, public key request messages sent by the multiple nodes, and receives indication information of hash algorithms and asymmetric encryption algorithms supported by the multiple nodes; The controller sends a public key and a public key identifier to the multiple nodes; the controller selects a target hash algorithm and a target asymmetric encryption algorithm supported by the multiple nodes according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively.

16. A message sending method, characterized in that: include: The source node receives the segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key; The source node generates and sends a first SRv6 message carrying the segment list and the first signature information; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

17. The method according to claim 16, characterized in that The signature authentication TLV field also includes at least one of the following information: a signature authentication TLV type field, a signature authentication TLV length field, a D field, and a reserved field.

18. The method according to claim 17, characterized in that The target field includes at least one of the following fields: IPv6 source address; The previous entry, flags, and segment list in the IPv6 address stack of the routing extension header; The D field in the signature authentication TLV field, the reserved field, the first hash algorithm used for the signature, the first asymmetric encryption algorithm used for the signature, and indication information of the public key for decrypting the first signature information.

19. A first node, characterized in that: include: A receiving module, configured to receive a first SRv6 message, wherein the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key; a forwarding module, configured to perform signature verification on the first signature information by using the first hash algorithm and the first public key corresponding to the first private key, and determine whether to forward the first SRv6 message according to the verification result; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

20. A first node, characterized in that: comprising a transceiver and a processor, wherein: The transceiver is used to receive a first SRv6 message, where the first SRv6 message carries first signature information obtained by signing a target field in a message header using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key; The processor is configured to perform signature verification on the first signature information by using the first hash algorithm and a first public key corresponding to the first private key, and determine whether to forward the first SRv6 message according to a verification result; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

21. A first node, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method according to any one of claims 1 to 10 are implemented.

22. A controller, characterized in that: include: A signature module, configured to sign a target field in a message header of a first SRv6 message generated according to the segment list by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to obtain first signature information; A sending module, configured to send the segment list and the first signature information to a source node of the first SRv6 message; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

23. A controller, characterized in that: comprising a transceiver and a processor, wherein: The processor is configured to sign a target field in a message header of a first SRv6 message generated according to the segment list by using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key to obtain first signature information; The transceiver is used to send the segment list and the first signature information to the source node of the first SRv6 message; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

24. A controller, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method according to any one of claims 11 to 15 are implemented.

25. A source node, characterized in that: include: A receiving module, configured to receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm, and a first private key; A forwarding module, configured to generate and send a first SRv6 message carrying the segment list and the first signature information; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

26. A source node, characterized in that: comprising a transceiver and a processor, wherein: The transceiver is used to receive a segment list and first signature information sent by the controller, where the first signature information is obtained by signing a target field in a message header of a first SRv6 message generated according to the segment list using a first hash algorithm, a first asymmetric encryption algorithm and a first private key; The processor is configured to generate and send a first SRv6 message carrying the segment list and the first signature information; The routing extension header of the first SRv6 message carries a signature authentication TLV field, and the signature authentication TLV field includes the following information: indication information of the first hash algorithm used for the signature, indication information of the first asymmetric encryption algorithm used for the signature, indication information of the first public key for decrypting the first signature information, and the first signature information.

27. A source node, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the method according to any one of claims 16 to 18 are implemented.

28. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.

Citation Information

Patent Citations

  • Abnormal network flow detection and control method, apparatus and system thereof

    CN105763390A

  • Intrusion prevention method and apparatus based on OSPF routing protocol

    CN108055285A