WO2022174739A1 - 报文发送方法、签名信息的生成方法及设备 - Google Patents

报文发送方法、签名信息的生成方法及设备 Download PDF

Info

Publication number
WO2022174739A1
WO2022174739A1 PCT/CN2022/075388 CN2022075388W WO2022174739A1 WO 2022174739 A1 WO2022174739 A1 WO 2022174739A1 CN 2022075388 W CN2022075388 W CN 2022075388W WO 2022174739 A1 WO2022174739 A1 WO 2022174739A1
Authority
WO
WIPO (PCT)
Prior art keywords
signature
information
public key
node
signature information
Prior art date
Application number
PCT/CN2022/075388
Other languages
English (en)
French (fr)
Inventor
鲁冬杰
陈美玲
庄小君
Original Assignee
中国移动通信有限公司研究院
中国移动通信集团有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国移动通信有限公司研究院, 中国移动通信集团有限公司 filed Critical 中国移动通信有限公司研究院
Publication of WO2022174739A1 publication Critical patent/WO2022174739A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present disclosure relates to the technical field of data communication, and in particular, to a method for sending a message, a method for generating signature information, and a device.
  • IPv6 Segment Routing based on Internet Protocol Version 6 (IPv6) is a protocol designed to forward IPv6 packets on the network based on the concept of source routing.
  • SRv6 inserts a Segment Routing Header (SRH) into the IPv6 packet, pushes an explicit IPv6 address stack into the SRH, and continuously updates the destination address and offset address stack through intermediate nodes. operation to complete hop-by-hop forwarding.
  • SRv6 can simplify network protocols, realize network intelligence programmability, and provide efficient Fast Reroute (FRR) protection, etc., and will be widely used in network transmission.
  • FRR Fast Reroute
  • the source node R1 inserts an SRH into the IPv6 packet, and pushes the IPv6 address stack, such as SID[0] to SID[2], into the SRH, and encapsulates the SRv6 packet.
  • the last item (LastEntry) field represents the last segment identifier (Segment ID, SID) in the segment list (Segment List) of the IPv6 address stack;
  • SL (Segments Left) represents the number of remaining segments, set to n-1, n is the number of segment addresses;
  • the destination address (DA) is set as the first segment identifier in segment routing.
  • the intermediate node (such as R3) searches the local SID table according to the DA.
  • the command action of the SID is executed, that is, the SL is decremented by one, and the SID indicated by the SL is copied to the DA field. hop for packet forwarding.
  • the end node R5 also performs an operation similar to that of R3.
  • R2 and R4 in Figure 1 are not local SIDs or devices that support SRv6, and they directly forward the above SRv6 packets based on IPv6 routing.
  • SRv6 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 detection nodes in the network and constructing malicious loops.
  • the SRv6 network usually protects the basic security by defining the SRv6 trust domain.
  • the SRv6 network shown in Figure 2 includes nodes 1 to 6 and hosts 1 to 2 (Host 1 to Host 2). For example, first define the address space of the segment ID (SegmentID) in the SRv6 trust domain to avoid address leakage in the SRv6 trust domain . Then, enable ACL filtering at the border of the trust zone (eg, interface 11), and discard the packets whose destination address is an address in the SRv6 trust zone, so as to avoid source routing attacks on the SRv6 trust zone by the attack packets. At the same time, you can enable access control list (ACL) filtering on the internal interfaces of the trust domain (such as interfaces 12 to 14), discard packets whose source addresses are addresses outside the address space of the trust domain, and block illegal packets again. .
  • ACL access control list
  • the SRv6 trust domain is generally used to implement SRv6 basic security protection. On the basis of the SRv6 trust domain, some enhanced security protection solutions are required to further improve the security of SRv6 packet transmission.
  • At least one embodiment of the present disclosure provides a message sending method, a method and device for generating signature information, which can improve the security of SRv6 message transmission.
  • At least one method for sending a message including:
  • the first node receives the first SRv6 message, where the first SRv6 message carries the data obtained by signing the target field in the message header by using the first hash algorithm, the first asymmetric encryption algorithm and the first private key.
  • first signature information ;
  • 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 signature according to the verification result.
  • An SRv6 packet An SRv6 packet.
  • the determining whether to forward the first SRv6 packet according to the verification result includes:
  • the first SRv6 packet is discarded.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: a signature authentication TLV type field , the length field of the signature authentication TLV, the D field, the reserved field, the indication information of the first hash algorithm adopted by the signature, the indication information of the first asymmetric encryption algorithm adopted by the signature, and the first public key to decrypt the first signature information. key indication information and the first signature information.
  • the target field includes at least one of the following fields: an IPv6 source address;
  • the method 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, and determines the first hash algorithm, the first asymmetric encryption algorithm, and the first public key for decrypting the first signature information used for the signature.
  • the first node performs signature verification on the first signature information by using the first hash algorithm and the first public key corresponding to the first private key, including:
  • the first node uses the first hash algorithm to calculate and obtain the first hash value corresponding to the target field of the first SRv6 packet;
  • the method before using the first public key corresponding to the first private key to decrypt the first signature information, the method further includes:
  • the first hash value look up the correspondence table between the locally stored hash value and the signature information, and determine whether there is second signature information corresponding to the first hash value;
  • the step of decrypting the first signature information by using the first public key corresponding to the first private key to obtain a decryption result is performed.
  • the correspondence between the first hash value and the first signature information is added to the correspondence in the table.
  • the first node establishing a secure connection with the controller
  • the first node and the controller complete the public key certificate distribution and the selection of the first asymmetric encryption algorithm through the secure connection.
  • 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 the hash algorithm and asymmetric encryption supported by the node to the controller the instruction information of the algorithm; the first node receives the public key certificate sent by the controller and verifies it, and saves the public key certificate after the verification is passed; the first node receives the public key certificate sent by the controller through the secure connection the reply message for indicating the target hash algorithm, the target asymmetric encryption algorithm and the public key certificate, the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes;
  • 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 hash algorithm and asymmetric hash algorithm supported by the node to the controller Indication information of the encryption algorithm; the first node receives the public key and the public key identifier sent by the controller;
  • the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.
  • At least one method for generating signature information including:
  • the controller adopts the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header of the first SRv6 message generated according to the segment list to obtain the 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 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: a signature authentication TLV type field , the length field of the signature authentication TLV, the D field, the reserved field, the indication information of the first hash algorithm adopted by the signature, the indication information of the first asymmetric encryption algorithm adopted by the signature, and the first public key to decrypt the first signature information. key indication information and the first signature information.
  • the target field includes at least one of the following fields: an IPv6 source address;
  • the controller and the first node complete the public key certificate distribution and the selection of the first asymmetric encryption algorithm through the secure connection established by the first node.
  • the controller establishes a secure connection with multiple nodes, and through the secure connection, receives the public key certificate request messages sent by the multiple nodes, and receives the hash algorithm and the hash algorithm supported by the node sent by the multiple nodes.
  • the instruction information of the asymmetric encryption algorithm the controller sends the public key certificate to the multiple nodes; the controller selects the multiple nodes according to the hash algorithm and asymmetric encryption algorithm supported by the multiple nodes.
  • the controller establishes a secure connection with multiple nodes, and through the secure connection, receives the public key request messages sent by the multiple nodes, and receives the hash algorithm supported by the node sent by the multiple nodes and the instruction information of the asymmetric encryption algorithm; the controller sends the public key and the public key identifier to the multiple nodes; the controller selects the hash algorithm and asymmetric encryption algorithm supported by the multiple nodes according to the The target hash algorithm and the target asymmetric encryption algorithm supported by the multiple nodes are obtained.
  • At least one method for sending a message including:
  • the source node receives the segment list and the first signature information sent by the controller. Obtained by signing the target field in the header of an SRv6 message;
  • the source node generates and sends a first SRv6 packet carrying the segment list and the first signature information.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: a signature authentication TLV type field , the length field of the signature authentication TLV, the D field, the reserved field, the indication information of the first hash algorithm adopted by the signature, the indication information of the first asymmetric encryption algorithm adopted by the signature, and the first public key to decrypt the first signature information. key indication information and the first signature information.
  • the target field includes at least one of the following fields: an IPv6 source address;
  • At least one first node including:
  • a receiving module configured to receive a first SRv6 message, where the first SRv6 message carries a first hash algorithm, a first asymmetric encryption algorithm and a first private key to sign the target field in the message header The obtained first signature information;
  • 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 signature information according to the verification result An SRv6 packet.
  • At least a first node including a transceiver and a processor, wherein,
  • the transceiver is configured to receive a first SRv6 packet, where the first SRv6 packet carries a first hash algorithm, a first asymmetric encryption algorithm, and a first private key, and the target field in the packet header is updated.
  • the first signature information obtained by signing;
  • the processor is 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 signature information according to the verification result. Describe the first SRv6 packet.
  • At least a first node including: a processor, a memory, and a program stored on the memory and executable on the processor, the program being executed by the The processor implements the steps of the method of the first aspect when executed.
  • At least one controller including:
  • the signature module is configured to use the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header of the first SRv6 message generated according to the segment list to obtain the first signature information;
  • a sending module configured to send the segment list and the first signature information to the source node of the first SRv6 message.
  • At least a controller including a transceiver and a processor, wherein,
  • the processor is configured to use the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header of the first SRv6 message generated according to the segment list, and obtain the first SRv6 message. a signature information;
  • the transceiver is configured to send the segment list and the first signature information to the source node of the first SRv6 message.
  • a controller comprising: a processor, a memory, and a program stored on the memory and executable on the processor, the program being processed by the processor.
  • At least one source node including:
  • the receiving module is configured to receive the segment list and first signature information sent by the controller, where the first signature information adopts the first hash algorithm, the first asymmetric encryption algorithm and the first private key, and the segment list is based on the first signature information. Obtained by signing the target field in the header of the generated first SRv6 message;
  • a forwarding module configured to generate and send a first SRv6 packet carrying the segment list and the first signature information.
  • At least one source node including a transceiver and a processor, wherein,
  • the transceiver is configured to receive the segment list and the first signature information sent by the controller, where the first signature information adopts the first hash algorithm, the first asymmetric encryption algorithm and the first private key, and the Obtained by signing the target field in the header of the first SRv6 message generated by the segment list;
  • the processor is configured to generate and send a first SRv6 packet carrying the segment list and the first signature information.
  • At least one source node including: a processor, a memory, and a program stored on the memory and executable on the processor, the program being executed by the When executed by the processor, the steps of the method described in the third aspect are implemented.
  • At least one computer-readable storage medium is provided, where a program is stored on the computer-readable storage medium, and when the program is executed by a processor, the first aspect and the second aspect are implemented.
  • an asymmetric key is used to authenticate and verify the integrity of the message header.
  • the private key is used to sign the SRv6 packet header
  • the public key is used to verify the signature on the key nodes of the network device, so as to prevent the counterfeiting of the packet source and the tampering of the packet header, and prevent a device from being compromised.
  • the shared key of the entire network is compromised.
  • the embodiments of the present disclosure also provide two implementation schemes of key distribution/update and algorithm selection mechanisms, which are simple to implement, safe to operate, and easy to apply in the network.
  • the embodiments of the present disclosure also provide an efficient verification and forwarding mechanism for SRv6 packets, the first packet is decrypted and verified, and the subsequent packets are forwarded by looking up a table, which improves the forwarding efficiency.
  • Figure 1 is a schematic diagram of SRv6 packet forwarding
  • Fig. 2 is a kind of schematic diagram of SRv6 network
  • FIG. 3 is a flowchart of a method for sending a message according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of an SRv6 packet provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of a key distribution provided by an embodiment of the present disclosure.
  • FIG. 6 is another schematic flowchart of key distribution provided by an embodiment of the present disclosure.
  • FIG. 7 is another schematic flowchart of key distribution provided by an embodiment of the present disclosure.
  • FIG. 8 is another schematic flowchart of key distribution provided by an embodiment of the present disclosure.
  • FIG. 9 is a flowchart of a method for generating signature information provided by an embodiment of the present disclosure.
  • FIG. 10 is another flowchart of a message sending method provided by an embodiment of the present disclosure.
  • FIG. 11 is an exemplary diagram of a message sending method provided by an embodiment of the present disclosure.
  • FIG. 12 is an example diagram of table lookup forwarding provided by an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a first node according to an embodiment of the present disclosure.
  • FIG. 14 is another schematic structural diagram of a first node according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram of a controller provided by an embodiment of the present disclosure.
  • FIG. 16 is another schematic structural diagram of a controller provided by an embodiment of the present disclosure.
  • FIG. 17 is a schematic structural diagram of a source node according to an embodiment of the present disclosure.
  • FIG. 18 is another schematic structural diagram of a source node according to an embodiment of the present disclosure.
  • the embodiments of the present disclosure provide a packet sending method, which can implement an asymmetric key-based SRv6 packet header authentication and verification method based on the SRv6 trust domain protection scheme, and can avoid using a shared key for authentication It is easy to cause key leakage and thus affect network security.
  • the embodiments of the present disclosure also propose a table lookup forwarding method based on the asymmetric verification result, which can further improve the forwarding efficiency of the data plane.
  • the packet sending method is applied to a device such as an intermediate node device or a host server that forwards SRv6 packets (herein referred to as the first node for the convenience of description), and the first node may It is a forwarding device at the boundary of the SRv6 trust domain or within the SRv6 trust domain.
  • the packet sending method includes:
  • Step 31 the first node receives the first SRv6 packet, the first SRv6 packet carries the first hash algorithm, the first asymmetric encryption algorithm and the first private key, and performs the processing on the target field in the packet header.
  • the first signature information obtained by signing.
  • the embodiment of the present disclosure uses the private key in the asymmetric key to sign the target field in the SRv6 packet 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, the source node sends the first SRv6 packet, and the first node receives the first SRv6 packet.
  • Step 32 the first node performs 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 determines whether to forward the information according to the verification result. the first SRv6 packet.
  • the first node uses the public key in the asymmetric key to perform signature verification, and if the signature verification of the first signature information is passed, the first node may forward the An SRv6 packet; and in the case that the signature verification of the first signature information fails, the first SRv6 packet may be discarded.
  • the above-mentioned signature verification process may include: the first node uses the first hash algorithm to calculate and obtain the first hash value corresponding to the target field of the first SRv6 packet Utilize the first public key corresponding to the first private key to decrypt the first signature information to obtain a decryption result; according to whether the first hash value and the decryption result are consistent, judge the first signature information Whether the signature verification passed.
  • the decryption result is usually a certain hash value (eg, the second hash value) and is consistent with the first hash value. At this time, it can be determined that the signature verification is passed.
  • the decryption result may not be a hash value. When it is found through comparison that the decryption result is inconsistent with the first hash value, it is determined that the signature verification fails (signature verification fails).
  • the first public key corresponding to the first private key refers to the first public key generated based on the same asymmetric encryption algorithm as the first private key.
  • the embodiment of the present disclosure adopts an asymmetric key to verify the SRv6 packet header, which avoids the problem that the shared key is used for authentication, which is prone to key leakage and thus affects network security.
  • the embodiment of the present disclosure provides an SRv6 signature authentication type length value (Auth TLV) field to perform signature protection on the target field of the SRv6 message.
  • Auth TLV SRv6 signature authentication type length value
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, a signature The length field, D field, reserved field of the authentication TLV, the indication information of the first hash algorithm used in the signature, the indication information of the first asymmetric encryption algorithm used in the signature, and the indication information of the first public key used to decrypt the first signature information. indication information and the first signature information.
  • the indication information of the first hash algorithm used in the signature may be indicated in the form of direct indication or indirect indication. 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 The first hash algorithm.
  • 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 in the form of direct indication or indirect indication.
  • the first node directly indicating the algorithm name of the first asymmetric encryption algorithm, or indicating the agreed identifier or index of the first asymmetric encryption algorithm, the first node can find the correspondence between the pre-agreed identifier/index and the asymmetric encryption algorithm, A specific first asymmetric encryption algorithm is determined.
  • directly indicating the first public key, or indicating the public key identifier or public key certificate of the first public key the first node searches for the pre-agreed correspondence between the public key identifier and the public key, or searches for the corresponding public key. key certificate, the specific first public key can be determined.
  • the target field may include at least one of the following fields: IPv6 source address;
  • 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 in the signature, the indication information of the first asymmetric encryption algorithm used in the signature, and the decrypted first signature information The indication information of the first public key.
  • the target field may further include at least one of the following fields: a type (Type) field and a length (Length) field in the signature authentication TVL field.
  • a type (Type) field and a length (Length) field in the signature authentication TVL field.
  • the first node may parse the signature authentication TLV field of the first SRv6 packet to determine the signature used in the signature.
  • the first hash algorithm, the first asymmetric encryption algorithm, and the first public key for decrypting the first signature information and then use the first hash algorithm and the first public key corresponding to the first private key in step 32.
  • Signature verification is performed on the first signature information.
  • FIG. 4 shows a structure diagram of the signature authentication TLV field. It should be noted that the field structure shown in FIG. 4 is only an example that can be used by the embodiments of the present disclosure, and is not used to limit the present disclosure. TLV fields with other structures can also be used, for example, the positions or lengths of various parts in the fields can be adjusted to obtain different field structures.
  • the signature authentication TLV field shown in FIG. 4 includes:
  • Type field that is, the type field, the value can be a certain preset value, the value of 6 is taken as an example in FIG. 4, which is used to indicate that the TLV field is a TLV field authenticated by an asymmetric key signature, and its length is Can be 8 bits (bits).
  • the Length field that is, the length field, is used to indicate the length of the signature authentication TLV field.
  • the D field is used to indicate that the destination address is not verified when the reduce mode is used.
  • Reserved reserved field, reserved field in the signature authentication TLV field.
  • Auth Key ID the indication information used to indicate the hash algorithm used for the signature, the asymmetric encryption algorithm used for the signature, and the public key for decrypting the signature information.
  • the first public key may be indicated by a certificate serial number or public key identification of the public key certificate. Table 1 further gives an example of what the Auth Key ID includes.
  • Hash algorithm represents the hash algorithm used in the packet header hash calculation, such as SHA256, SHA3, etc.
  • Signature algorithm represents asymmetric signature algorithms, such as RSA2048, ECDSA, etc.
  • Certificate Serial number represents the serial number of the public key certificate, Used to identify the controller certificate public key used for decryption. Reserved represents a reserved field in the Auth Key ID.
  • Signature information field including signature information, that is, using a hash algorithm, asymmetric encryption algorithm and a private key to perform the previously generated signature information on the target field, and its length is 8 to 32 bytes.
  • the signature verification range in Figure 4 is the field corresponding to the dotted box, that is, the target field includes:
  • IPv6 Source Address IPv6 Source Address
  • Segment List (Segment List, G-Segment ID List for G-SRv6)
  • the embodiment of the present disclosure uses an asymmetric key to perform signature verification on the forwarded message on the data face.
  • the embodiment of the present disclosure also provides an efficient forwarding mechanism for signature verification look-up table, which is used for data verification.
  • the first packet of the message is subjected to signature verification, and the correspondence between the hash value of the message header and the signature information is recorded in the locally maintained correspondence table, so that when subsequent packets arrive, the correspondence table can be directly searched.
  • the table lookup forwarding can be realized by comparing the signature values, which improves the forwarding efficiency.
  • the embodiments of the present disclosure may Hash value, look up the correspondence table between the locally stored hash value and signature information, and determine whether there is second signature information corresponding to the first hash value; if there is a second signature corresponding to the first hash value.
  • the signature verification of the first signature information passes, for example, if they are consistent, the signature verification passes, and then forwarding If the first SRv6 message is inconsistent, the signature verification fails, and the first SRv6 message may be discarded at this time; if there is no second signature information corresponding to the first hash value , then step 32 is performed, and the first signature information is decrypted by using the first public key corresponding to the first private key to obtain a decryption result and subsequent steps.
  • the first node matches the first hash value with the first signature information.
  • the corresponding relationship is added to the corresponding relationship table, so that the corresponding message can be directly searched and forwarded by using the corresponding relationship table subsequently, so as to improve the data forwarding efficiency.
  • the controller signs the message header based on the private key, and decrypts and verifies the packet based on the public key on the network forwarding device, so that it is necessary to implement key distribution between the controller and the forwarding device.
  • the embodiment of the present disclosure also needs to be able to regularly update the key 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.
  • a certificate is used to implement authentication and key distribution between the controller and the first node (here, the first node may be any network forwarding device or host server that needs to perform signature verification on SRv6 packets).
  • the CA certificate is preset on the first node, the public key certificate obtained from the controller is verified, and the public key of the controller is obtained.
  • 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 to the controller the hash supported by the node algorithm and the instruction information of the asymmetric encryption algorithm; the first node receives the public key certificate sent by the controller and verifies it, and after the verification passes, saves the public key certificate; the first node receives the public key certificate sent by the controller A reply message sent by the secure connection for indicating a target hash algorithm, a target asymmetric encryption algorithm and a public key certificate, where the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.
  • FIG. 5 provides a schematic diagram of the interaction between the controller and the first node in the above implementation manner, wherein the control plane between the first node (network forwarding device) and the controller can utilize an existing mature protection mechanism, for example, using For certificate authentication, account and password authentication may also be used. After the authentication is passed, the data on the control plane is encrypted and transmitted and integrity protected. As shown in Figure 5, including:
  • the first node establishes a secure connection with the controller
  • the first node sends a certificate request to the controller, and at the same time, the first node sends the list of hash algorithms and asymmetric encryption algorithms supported by itself to the controller;
  • the controller sends the public key certificate to the first node according to the algorithm supported by the first node;
  • the first node verifies the public key certificate based on the preset root certificate, and the certificate verification is successful;
  • the controller collects a list of algorithms supported by the network forwarding nodes that need to perform signature verification on the SRv6 message in the network, and selects the algorithms supported by the network forwarding nodes to generate signature information (digital signature) for the message header.
  • 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 a new private key to generate Signature information (digital signature).
  • This implementation uses certificates between the controller and the network forwarding device/host to implement authentication and key distribution, and can re-authenticate the controller based on the trusted CA based on the existing secure connection between the controller and the network device, preventing the Counterfeit Control Center is counterfeited.
  • the first node relying on the secure connection of the control plane between the controller and the network device, directly performs public key distribution and replacement.
  • the first node establishes a secure connection with the controller, and through the secure connection, sends a public key request message to the controller, and sends to the controller a hash algorithm supported by the node and the indication information of the asymmetric encryption algorithm; the first node receives the public key and the public key identifier sent by the controller; the first node receives the information sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric Encryption algorithm's reply message.
  • the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.
  • FIG. 6 provides a schematic diagram of the interaction between the controller and the first node in the above-mentioned implementation manner, wherein the control plane between the first node (network forwarding device or host) and the controller utilizes an existing mature protection mechanism, for example, Use certificate authentication, or account and password authentication. After the authentication is passed, the data on the control plane is encrypted for transmission and integrity protection. As shown in Figure 6, including:
  • the first node establishes a secure connection with the controller
  • the first node sends a public key request to the controller, and at the same time the first node sends the list of hash algorithms and asymmetric encryption algorithms supported by itself to the controller;
  • 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;
  • the controller collects a list of node algorithms for verification in the network, and selects algorithms supported by all nodes to generate signature information (digital signature) for the packet header.
  • 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).
  • the controller needs to sign the message header based on the private key, and the node needs to decrypt and verify the message based on the public key, so that the key distribution between the controller and the device needs to be realized.
  • the key distribution between the controller and the device needs to be realized.
  • Method 1 As shown in Figure 7, certificates are used between the controller and the nodes to implement authentication and key distribution. Preset the CA certificate on the node, verify the public key certificate obtained from the controller, and obtain the public key of the controller.
  • the control plane between the node and the controller generally has a mature protection mechanism, which may be authenticated by a certificate, or by an account and password. After authentication, the data on the control plane is encrypted for transmission and integrity protection. After establishing a secure connection between the controller and the node:
  • the key node that needs to be verified sends a certificate request to the controller to request the certificate and algorithm;
  • the controller sends the public key certificate, the hash algorithm used for SRv6 verification and the asymmetric encryption algorithm to the node (the key type in the certificate is consistent with the asymmetric encryption algorithm sent by the controller);
  • the node 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;
  • the node After the certificate and algorithm verification is successful, the node sends a certificate verification success response to the controller;
  • the node If the certificate and algorithm verification fails, the node sends a failure message to the controller and reports the specific failure reason.
  • 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, uses the new private key to generate a digital signature.
  • the certificate is used between the controller and the node to realize the authentication and key distribution. Based on the existing secure connection between the controller and the node, the controller can be authenticated again based on a trusted CA to prevent the counterfeiting control center from being counterfeited.
  • Method 2 As shown in Figure 8, relying on the secure connection between the controller and the control plane between the nodes, directly distribute and replace the public key.
  • the control plane between the node and the controller generally has a mature protection mechanism, which may be authenticated by a certificate, or by an account and password. After authentication, the data on the control plane is encrypted for transmission and integrity protection. After establishing a secure connection between the controller and the node:
  • the key node that needs to be verified sends a public key request to the controller to request the public key and algorithm;
  • the controller sends the hash algorithm, the asymmetric encryption algorithm, the public key and the public key identifier of the asymmetric encryption algorithm to the node in the form of ciphertext;
  • the node checks whether it supports the hash algorithm and asymmetric encryption algorithm sent by the controller
  • the node After the algorithm verification is successful (that is, it supports the algorithm itself), the node sends a certificate verification success response to the controller;
  • the node If the algorithm verification fails (that is, it does not support the algorithm itself), the node sends a failure message to the controller and reports the specific failure reason.
  • 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, and after receiving the node's response, uses the new private key to generate a digital signature.
  • an embodiment of the present disclosure 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 (Software Defined Network, SDN) controller,
  • the method includes:
  • Step 71 the controller adopts the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header of the first SRv6 message generated according to the segment list to obtain the first signature information.
  • the first hash algorithm and the first asymmetric encryption algorithm are hash algorithms supported by the devices in the segment list that need to perform signature verification on the SRv6 packet (which may include network forwarding devices and hosts, etc.). and asymmetric encryption algorithms.
  • the controller calculates paths according to the network topology and service requirements, and obtains a segment list (forwarding path), that is, a segment list in the SRv6 network.
  • a segment list forwarding path
  • a header of the first SRv6 packet corresponding to the first packet is generated.
  • the target field in the message header of the first SRv6 message is signed to obtain the first signature information.
  • Step 72 the controller sends the segment list and the first signature information to the source node.
  • 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 packet containing the first packet according to the segment list and the first signature information.
  • the segment list and the first SRv6 message of the first signature information sends the segment list and the first signature information to the source node, so that the source node can encapsulate and generate a packet containing the first packet according to the segment list and the first signature information.
  • the embodiment of the present disclosure realizes the use of an asymmetric key to generate the signature information of the SRv6 packet header, and avoids the problem that the shared key is used for authentication, which is prone to key leakage and thus affects network security.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: The type field, the length field of the signature authentication TLV, the D 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 first information to decrypt the first signature information. Indication information of a public key, and the first signature information.
  • the target field includes at least one of the following fields:
  • the controller and the first node complete the public key certificate distribution and the selection of the first asymmetric encryption algorithm through a secure connection established by the first node.
  • the controller establishes a secure connection with multiple nodes, and receives the data sent by the multiple nodes through the secure connection.
  • public key certificate request message and receive the indication information of the hash algorithm and asymmetric encryption algorithm supported by this node sent by the multiple nodes; the controller sends the public key certificate to the multiple nodes; the controller According to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes, the target hash algorithm and the target asymmetric encryption algorithm supported by the multiple nodes are selected.
  • the controller establishes a secure connection with multiple nodes, and through the secure connection, the controller communicates with multiple nodes
  • the node establishes a secure connection, and through the secure connection, receives the public key certificate request messages sent by the multiple nodes, and receives the indication information of the hash algorithm and asymmetric encryption algorithm supported by the node sent by the multiple nodes ;
  • the controller sends the public key and the public key identifier to the plurality of nodes; the controller selects the plurality of nodes to support the hash algorithm and asymmetric encryption algorithm supported by the plurality of nodes respectively.
  • target hash algorithm and target asymmetric encryption algorithm and send a reply message indicating the target hash algorithm, target asymmetric encryption algorithm and public key certificate to the plurality of nodes.
  • an embodiment of the present disclosure provides a message sending method, which is applied to a source node sending a first SRv6 message, including:
  • Step 81 The source node receives the segment list and the first signature information sent by the controller.
  • the first signature information adopts the first hash algorithm, the first asymmetric encryption algorithm and the first private key. It is obtained by signing the target field in the packet header of the generated first SRv6 packet.
  • Step 82 the source node generates and sends a first SRv6 packet carrying the segment list and the first signature information.
  • the signature information generated by the controller based on the asymmetric key can be carried in the SRv6 message for transmission, which avoids the problem that the shared key is used for authentication, which is prone to key leakage and thus affects network security.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: a type field of the signature authentication TLV, The length field, D field, reserved field of the signature authentication TLV, 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 first public key for decrypting the first signature information the indication information and the first signature information.
  • the target field includes at least one of the following fields:
  • the certificate private key is used on the SRv6 controller to hash the SRH and the IP header, the SRv6 header and the digital signature generated by the controller are encapsulated at the SRv6 source node, and the key network forwarding node (that is, the required The public key is used to verify the signature on the forwarding node that performs signature verification. In this way, even if the network device is compromised, the private key of the signature will not be leaked. Attackers cannot use SRH to carry out various source routing attacks on the network, thereby improving the the security performance of the network.
  • the SRv6 network shown in FIG. 9 includes nodes 1 to 6 and hosts 1 to 2 (Host 1 to Host 2).
  • the SRv6 trust domain includes nodes 2 to 5.
  • Step A Preset a certificate, preset a private key and a controller certificate on the SRv6 controller, and preset a CA root certificate on a key network device (a node that needs to perform signature verification on the signature information of the SRv6 message).
  • Step B After the controller and the network device establish a secure connection on the control plane, perform public key certificate distribution and signature algorithm selection.
  • 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 packet header generated according to the segment list, and sends the segment list and signature information to the source node.
  • the source node may be a node 1 that needs to communicate across domains, or it may be a host (Host) 1 in the trust domain.
  • Step D The source node encapsulates and forwards the SRv6 message with signature information.
  • Step E key network nodes, such as the external interface (interface 11) of the border node 2 of the SRv6 trust domain, the access interface (interface 12) of the host in the SRv6 trust domain on the node 3, the host providing the service (Host) 2 (interface 14), etc. , start signature verification, first calculate the first hash value according to the message header, then use the public key to decrypt the signature information in the message to obtain the decryption result, and compare whether the two hash values are consistent. If the verification fails, the packet is discarded; if the verification succeeds, the packet is forwarded and processed.
  • key network nodes such as the external interface (interface 11) of the border node 2 of the SRv6 trust domain, the access interface (interface 12) of the host in the SRv6 trust domain on the node 3, the host providing the service (Host) 2 (interface 14), etc.
  • start signature verification first calculate the first hash value according to the message header, then use the public key to decrypt the signature information in
  • Step F The SRv6 controller periodically renews the certificate according to security requirements.
  • the embodiment of the present disclosure can perform signature verification on the first packet of the data packet, and compare the hash value calculated based on the packet header with the signature in the packet header.
  • the information is recorded in the correspondence table, and subsequent packages can directly look up the correspondence table and compare the signature information.
  • Figure 12 it includes:
  • Step a On the interface with signature verification enabled (interface with asymmetric verification), when receiving the SRv6 packet, calculate the Hash value of the packet header, and check whether it hits the local correspondence table (local hash). hope table).
  • Step b If the local correspondence table (local hash table) is not hit, use the controller public key to decrypt the signature, and compare the decrypted hash value (decryption result) with the calculated hash value. If If inconsistent, discard the packet; if consistent, record the hash value and signature information in the local correspondence table (local hash table), and forward and process the packet.
  • Step c When the local correspondence table (local hash table) is hit in step a, compare whether the signature information in the local correspondence table (local hash table) is consistent with the signature information carried in the message header, and if they are consistent, then Forward and process the packets, and discard the packets if they are inconsistent.
  • the above methods of the embodiments of the present disclosure propose a new packet header authentication and verification method based on the SRv6 trust domain protection.
  • the embodiment of the present disclosure newly defines an SRv6 Auth TLV, which is used to perform authentication and integrity check on the packet header by using an asymmetric key.
  • the private key is used to sign the SRv6 packet header
  • the public key is used to verify the signature on the key nodes of the network device, so as to prevent the counterfeiting of the packet source and the tampering of the packet header, and prevent a device from being compromised.
  • the shared key of the entire network is compromised.
  • the embodiments of the present disclosure also provide two implementation schemes of key distribution/update and algorithm selection mechanisms, which are simple to implement, safe to operate, and easy to apply in the network.
  • the embodiments of the present disclosure also provide an efficient verification and forwarding mechanism for SRv6 packets, the first packet is decrypted and verified, and the subsequent packets are forwarded by looking up a table, which improves the forwarding efficiency.
  • the embodiments of the present disclosure can be applied to the standard SRv6 protocol, and can also be applied to extended protocols such as G-SRv6.
  • An embodiment of the present disclosure provides a first node shown in FIG. 13 , including:
  • the receiving module 111 is configured to receive a first SRv6 packet, where the first SRv6 packet carries a first hash algorithm, a first asymmetric encryption algorithm, and a first private key, and performs the processing on the target field in the packet header.
  • the first signature information obtained by signing;
  • the forwarding module 112 is configured 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 signature information according to the verification result The first SRv6 packet.
  • the forwarding module 112 is configured to forward the first SRv6 message when the signature verification of the first signature information passes; when the signature verification of the first signature information fails. In this case, the first SRv6 packet is discarded.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the signature authentication TLV length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • the first node further includes: a parsing module, configured to parse the signature authentication TLV field of the first SRv6 packet, and determine the first hash algorithm, the first asymmetric encryption algorithm, and the decryption method used for the signature.
  • the first public key of the first signature information is included in the first node.
  • the forwarding module is configured to calculate, by the first node, the first hash value corresponding to the target field of the first SRv6 packet by using the first hash algorithm;
  • the first public key corresponding to the private key decrypts the first signature information to obtain a decryption result; according to whether the first hash value and the decryption result are consistent, determine whether the signature verification of the first signature information passes .
  • the forwarding module is configured to, before decrypting the first signature information by using the first public key corresponding to the first private key, search for the locally stored value according to the first hash value.
  • the correspondence table between the hash value and the signature information is used to determine whether there is second signature information corresponding to the first hash value; if there is second signature information corresponding to the first hash value, according to the Determine whether the second signature information is consistent with the first signature information, and determine whether the signature verification of the first signature information passes; if there is no second signature information corresponding to the first hash value, then The step of decrypting the first signature information by using the first public key corresponding to the first private key to obtain a decryption result is performed.
  • the first node further includes: a maintenance module configured to, when the first hash value is consistent with the decryption result, match the first hash value with the first signature information The relationship is added to the corresponding relationship table.
  • a maintenance module configured to, when the first hash value is consistent with the decryption result, match the first hash value with the first signature information The relationship is added to the corresponding relationship table.
  • the first node further includes: a key obtaining module configured to establish a secure connection with the controller; the first node and the controller complete the distribution of the public key certificate through the secure connection and a selection operation of the first asymmetric encryption algorithm.
  • a key obtaining module configured to establish a secure connection with the controller; the first node and the controller complete the distribution of the public key certificate through the secure connection and a selection operation of the first asymmetric encryption algorithm.
  • the key obtaining module is configured 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 controller The sent public key certificate is verified, and after the verification is passed, the public key certificate is saved and the instruction information of the hash algorithm and asymmetric encryption algorithm supported by the node is sent to the controller; the first node receives the information passed by the controller. a reply message sent by the secure connection for indicating the target hash algorithm and the target asymmetric encryption algorithm;
  • the first node establish a secure connection with the controller, and send a public key request message to the controller through the secure connection; the first node receives the public key and the public key identifier sent by the controller, and Send the indication information of the hash algorithm and asymmetric encryption algorithm supported by the node to the controller; the first node receives the reply sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric encryption algorithm information;
  • the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.
  • the apparatus in this embodiment is a device corresponding to the method shown in FIG. 3 above, and the implementation manners in each of the above embodiments are applicable to the embodiments of the device, and the same technical effect can also be achieved.
  • the above-mentioned nodes provided by the embodiments of the present disclosure can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effects, and the same as the method embodiments in this embodiment will not be repeated here. The parts and beneficial effects will be described in detail.
  • an embodiment of the present disclosure provides another schematic structural diagram of a first node, including: a processor 1201, a transceiver 1202, a memory 1203, and a bus interface, wherein:
  • the first node further includes: a program stored in the memory 1203 and executable on the processor 1201, and when the program is executed by the processor 1201, the following steps are implemented: receiving a first SRv6 message, the first SRv6 message carrying There is first signature information obtained by using the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header; using the first hash algorithm, the first The first public key corresponding to the private key performs signature verification on the first signature information, and determines whether to forward the first SRv6 message according to the verification result.
  • a program stored in the memory 1203 and executable on the processor 1201, and when the program is executed by the processor 1201, the following steps are implemented: receiving a first SRv6 message, the first SRv6 message carrying There is first signature information obtained by using the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header; using the first hash algorithm, the first The first public key corresponding to the private key performs
  • the processor 1201 further implements the following steps when executing the program: if the signature verification of the first signature information is passed, forward the first SRv6 packet; If the signature verification of the information fails, the first SRv6 packet is discarded.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the signature authentication TLV length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • the processor 1201 when executing the program, the processor 1201 further implements the following steps: before performing signature verification on the first signature information, parsing the signature authentication TLV field of the first SRv6 message, and determining the source of the signature.
  • the processor 1201 when executing the program, the processor 1201 further implements the following steps: using the first hash algorithm to obtain a first hash value corresponding to the target field of the first SRv6 packet; the first public key corresponding to the first private key, decrypt the first signature information, and obtain a decryption result; according to whether the first hash value and the decryption result are consistent, determine the signature verification of the first signature information pass the test.
  • the processor 1201 further implements the following steps when executing the program: before decrypting the first signature information by using the first public key corresponding to the first private key, according to the first Hash value, look up the correspondence table between the locally stored hash value and signature information, and determine whether there is second signature information corresponding to the first hash value; if there is a second signature corresponding to the first hash value In the case of information, according to whether the second signature information is consistent with the first signature information, it is judged whether the signature verification of the first signature information has passed; if there is no first hash value corresponding to the first hash value In the case of two signature information, the step of decrypting the first signature information by using the first public key corresponding to the first private key to obtain a decryption result is performed.
  • the processor 1201 further implements the following steps when executing the program: in the case that the first hash value is consistent with the decryption result, compare the first hash value with the first signature information The corresponding relationship is added to the corresponding relationship table.
  • the processor 1201 further implements the following steps when executing the program: establishing a secure connection with the controller, and sending a public key certificate request message to the controller through the secure connection; the The first node receives and verifies the public key certificate sent by the controller, and after the verification passes, saves the public key certificate and sends the controller the indication information of the hash algorithm and asymmetric encryption algorithm supported by the node; receiving, by the first node, a reply message sent by the controller through the secure connection for indicating the target hash algorithm and the target asymmetric encryption algorithm; or,
  • the first node receives the public key and the public key identifier sent by the controller, and sends the public key to the controller
  • the controller sends the indication information of the hash algorithm and the asymmetric encryption algorithm supported by the node; the first node receives the reply message sent by the controller through the secure connection to indicate the target hash algorithm and the target asymmetric encryption algorithm;
  • the target hash algorithm and the target asymmetric encryption algorithm are algorithms supported by multiple nodes.
  • the bus architecture may include any number of interconnected buses and bridges, in particular one or more processors represented by processor 1201 and various circuits of memory represented by memory 1203 linked together.
  • 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, therefore, will not be described further herein.
  • the bus interface provides the interface.
  • Transceiver 1202 may be a number of elements, including a transmitter and a receiver, that provide a means for communicating with various other devices over a transmission medium.
  • the processor 1201 is responsible for managing the bus architecture and general processing, and the memory 1203 may store data used by the processor 1201 in performing operations.
  • the node in this embodiment is a device corresponding to the method shown in FIG. 3 above, and the implementation manners in the above embodiments are all applicable to the embodiments of the node, and the same technical effect can also be achieved.
  • the transceiver 1202 and the memory 1203, as well as the transceiver 1202 and the processor 1201 can be communicated and connected through a bus interface, 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 realized.
  • a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the following steps are implemented: receiving a first SRv6 message, the first SRv6 message The message carries the first signature information obtained by using the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header; using the first hash algorithm, the described The first public key corresponding to the first private key performs signature verification on the first signature information, and determines whether to forward the first SRv6 message according to the verification result.
  • An embodiment of the present disclosure provides a controller shown in FIG. 15 , including:
  • the signature module 131 is configured to use the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the message header of the SRv6 message generated according to the segment list to obtain the first signature information ;
  • the sending module 132 is configured to send the segment list and the first signature information to the source node.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the type field of the signature authentication TLV. length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • controller further includes:
  • the distribution module is configured to complete the public key certificate distribution and the selection of the first asymmetric encryption algorithm with the first node through the secure connection established by the first node.
  • the distribution module is configured to establish a secure connection with multiple nodes, and through the secure connection, receive public key certificate request messages sent by the multiple nodes; send the public key certificate to the multiple nodes , and receive the indication information of the hash algorithms and asymmetric encryption algorithms supported by the node sent by the multiple nodes; according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes, select the multiple The target hash algorithm and target asymmetric encryption algorithm supported by the nodes, and send a reply message indicating the target hash algorithm, the target asymmetric encryption algorithm and the public key certificate to the multiple nodes; Establish a secure connection, and receive the public key request message sent by the multiple nodes through the secure connection; send the public key and the public key identifier to the multiple nodes, and receive the support from the node sent by the multiple nodes The indication information of the hash algorithm and asymmetric encryption algorithm; according to the hash algorithm and asymmetric encryption algorithm supported by the multiple nodes respectively, select the target hash algorithm and the target asymmetric encryption algorithm supported
  • controller in this embodiment is a device corresponding to the method shown in FIG. 9 above, and the implementation manners in the above embodiments are all applicable to the embodiments of the device, and the same technical effect can also be achieved .
  • the above-mentioned device provided by the embodiment of the present disclosure can realize all the method steps realized by the above-mentioned method embodiment, and can achieve the same technical effect, and the same as the method embodiment in this embodiment is not repeated here. The parts and beneficial effects will be described in detail.
  • an embodiment of the present disclosure provides another schematic structural diagram of a controller, including: a processor 1401, a transceiver 1402, a memory 1403, and a bus interface, wherein: the controller further includes: stored on the memory 1403 and available in The program running on the processor 1401, when the program is executed by the processor 1401, implements the following steps: using the first hash algorithm, the first asymmetric encryption algorithm and the first private key, to the first SRv6 report generated according to the segment list.
  • the target field in the header of the message is signed to obtain the first signature information; the segment list and the first signature information are sent to the source node of the first SRv6 message.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the signature authentication TLV length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • the processor 1401 when executing the program, the processor 1401 further implements the following steps: establishing a secure connection with the first node through the first node, completing public key certificate distribution and the first asymmetric encryption algorithm selection operation.
  • the processor 1401 when executing the program, the processor 1401 further implements the following steps: establishing a secure connection with multiple nodes, and receiving public key certificate request messages sent by the multiple nodes through the secure connection;
  • the multiple nodes send the public key certificates, and receive the indication information of the hash algorithms and asymmetric encryption algorithms supported by the node sent by the multiple nodes; according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes respectively algorithm, select the target hash algorithm and target asymmetric encryption algorithm supported by the multiple nodes, and send a reply indicating the target hash algorithm, the target asymmetric encryption algorithm and the public key certificate to the multiple nodes or, establish a secure connection with multiple nodes, and receive public key request messages sent by the multiple nodes through the secure connection; send the public key and public key identifier to the multiple nodes, and receive the Indication information of the hash algorithms and asymmetric encryption algorithms supported by the node sent by multiple nodes; according to the hash algorithms and asymmetric encryption algorithms supported by the multiple nodes, the
  • the bus architecture may include any number of interconnected buses and bridges, in particular one or more processors represented by processor 1401 and various circuits of memory represented by memory 1403 linked together.
  • 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, therefore, will not be described further herein.
  • the bus interface provides the interface.
  • Transceiver 1402 may be a number of elements, including a transmitter and a receiver, that provide a means for communicating with various other devices over a transmission medium.
  • the processor 1401 is responsible for managing the bus architecture and general processing, and the memory 1403 may store data used by the processor 1401 in performing operations.
  • the controller in this embodiment is a device corresponding to the method shown in FIG. 9 above, and the implementation manners in the above-mentioned embodiments are all applicable to the embodiments of the controller, and the same technology can also be achieved Effect.
  • the transceiver 1402 and the memory 1403, as well as the transceiver 1402 and the processor 1401 can be communicated and connected through a bus interface, the function of the processor 1401 can also be realized by the transceiver 1402, and the function of the transceiver 1402 can also be realized by the processor The device 1401 is implemented.
  • a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the following steps are implemented: adopting a first hash algorithm, a first asymmetric encryption algorithm and the first private key, sign the target field in the header of the first SRv6 message generated according to the segment list, and obtain the first signature information; send the segment list and the first signature information to the first Source node of SRv6 packets.
  • the embodiment of the present disclosure also provides a source node shown in FIG. 17 , including:
  • the receiving module 151 is configured to receive the segment list and the first signature information sent by the controller. Obtained by signing the target field in the header of the first SRv6 message generated by the list;
  • the forwarding module 152 is configured to generate and send a first SRv6 packet carrying the segment list and the first signature information.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the signature authentication TLV length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • the source node in this embodiment is a device corresponding to the method shown in FIG. 10 above, and the implementation manners in the above embodiments are all applicable to the embodiments of the source node, and the same technology can also be achieved Effect. It should be noted here that the above-mentioned source node provided by the embodiments of the present disclosure can implement all the method steps implemented by the above-mentioned method embodiments, and can achieve the same technical effect, and the method and method embodiments in this embodiment will not be discussed here. The same parts and beneficial effects will be described in detail.
  • an embodiment of the present disclosure provides another schematic structural diagram of a source node, including: a processor 1601, a transceiver 1602, a memory 1603, and a bus interface, wherein: the source node further includes: stored on the memory 1603 and available in the The program running on the processor 1601, when the program is executed by the processor 1601, implements the following steps: receiving the segment list and the first signature information sent by the controller, the first signature information is the first hash algorithm, the first The asymmetric encryption algorithm and the first private key are obtained by signing the target field in the header of the first SRv6 message generated according to the segment list; generating and sending the segment list and the first The first SRv6 packet of the signature information.
  • the routing extension header of the first SRv6 packet carries a signature authentication TLV field
  • the signature authentication TLV field includes at least one of the following information: the type field of the signature authentication TLV, the signature authentication TLV length field, D field, reserved field, indication information of the first hash algorithm used in the signature, indication information of the first asymmetric encryption algorithm used in the signature, indication information of the first public key used to decrypt the first signature information, the first signature information.
  • the target field includes at least one of the following fields:
  • the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1601 and various circuits of memory represented by memory 1603 linked together.
  • 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, therefore, will not be described further herein.
  • the bus interface provides the interface.
  • Transceiver 1602 may be a number of elements, including a transmitter and a receiver, that provide a means for communicating with various other devices over a transmission medium.
  • the processor 1601 is responsible for managing the bus architecture and general processing, and the memory 1603 may store data used by the processor 1601 in performing operations.
  • the source node in this embodiment is a device corresponding to the method shown in FIG. 10 above, and the implementation manners in the above embodiments are all applicable to the embodiments of the source node, and the same technology can also be achieved Effect.
  • the transceiver 1602 and the memory 1603, as well as the transceiver 1602 and the processor 1601 can be communicatively connected through a bus interface, 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 realized.
  • a computer-readable storage medium on which a program is stored, and when the program is executed by the processor, the following steps are implemented: receiving a segment list and first signature information sent by the controller, The first signature information is obtained by using the first hash algorithm, the first asymmetric encryption algorithm and the first private key to sign the target field in the header of the first SRv6 message generated according to the segment list. ; generate and send the first SRv6 packet carrying the segment list and the first signature information.
  • the disclosed apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solutions of the embodiments of the present disclosure.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present disclosure can be embodied in the form of software products in essence, or the parts that contribute to the prior art or the parts of the technical solutions.
  • the computer software products are stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开实施例公开了一种报文发送方法、签名信息的生成方法及设备,该方法包括:第一节点接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。

Description

报文发送方法、签名信息的生成方法及设备
相关申请的交叉引用
本公开基于申请号为202110200003.X、申请日为2021年02月22日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本公开。
技术领域
本公开涉及数据通信技术领域,具体涉及一种报文发送方法、签名信息的生成方法及设备。
背景技术
基于互联网协议第6版(Internet Protocol Version 6,IPv6)的分段路由(IPv6 Segment Routing,SRv6)是基于源路由理念而设计的在网络上转发IPv6数据包的一种协议。SRv6通过在IPv6报文中插入一个分段路由扩展头(Segment Routing Header,SRH),在SRH中压入一个显式的IPv6地址栈,通过中间节点不断的进行目的地址和偏移地址栈的更新操作来完成逐跳转发。SRv6能够简化网络协议,实现网络智慧可编程能力,提供高效率的快速重路由(Fast Reroute,FRR)保护等,在网络传输上将会有广泛的应用。
如图1所示,源节点R1在IPv6报文中插入SRH,在SRH中压入IPv6地址栈,如SID[0]~SID[2],封装得到SRv6报文。其中,最后一项(LastEntry)字段表示IPv6地址栈的段列表(Segment List)中的最后一个段标识(Segment ID,SID);SL(Segments Left)表示剩余段的数量,设置为n-1,n为分段地址的数量;目的地址(Destination Address,DA)设置为分段路 由中的第一个段标识。中间节点(如R3),根据DA查找本地SID表,若命中SID,则执行SID的指令动作,即将SL减一,并将SL指示的SID拷贝到DA字段中,同时,根据SID关联的下一跳进行报文转发。在末端节点R5也执行类似于R3的操作,另外开启倒数第二跳弹出时,检测到SL=0,则触发弹出,此时基于IPv6路由转发报文。图1中的R2和R4不是本地SID,或者不是支持SRv6的设备,它们直接基于IPv6路由转发上述SRv6报文。
SRv6作为一种新兴的源路由协议,面临各种源路由攻击威胁,攻击者通过定义SRH,可构造各种源路由攻击,如绕过网络关键检测节点、构造恶意循环等。
SRv6网络通常通过定义SRv6信任域来进行基础安全的保护。如图2所示的SRv6网络,包括节点1~6以及主机1~2(Host 1~Host 2),例如,首先定义SRv6信任域内的段标识(SegmentID)的地址空间,避免SRv6信任域地址泄露。然后在信任域边界(如接口11)开启ACL过滤,丢弃目的地址是SRv6信任域内地址的报文,避免攻击报文对SRv6信任域进行源路由攻击。同时可在信任域内部接口(如接口12~14),开启访问控制列表(Access Control List,ACL)过滤,丢弃源地址为信任域地址空间范围外的地址的报文,再次阻断非法报文。
SRv6信任域一般用来实现SRv6基础安全防护,在SRv6信任域基础上,还需要一些增强安全防护方案,来进一步提高SRv6报文传输的安全性。
发明内容
本公开的至少一个实施例提供了一种报文发送方法、签名信息的生成方法及设备,能够提高SRv6报文传输的安全性。
根据本公开实施例的第一方面,至少提供了一种报文发送方法,包括:
第一节点接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈 希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
根据本公开的至少一个实施例,所述根据校验结果确定是否转发所述第一SRv6报文,包括:
在所述第一签名信息的签名校验通过的情况下,转发所述第一SRv6报文;
在所述第一签名信息的签名校验失败的情况下,丢弃所述第一SRv6报文。
根据本公开的至少一个实施例,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
根据本公开的至少一个实施例,所述目标字段包括以下字段中的至少一种:IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息。
根据本公开的至少一个实施例,在对所述第一签名信息进行签名校验之前,所述方法还包括:
所述第一节点解析所述第一SRv6报文的签名认证TLV字段,确定签名所采用的第一哈希算法、第一非对称加密算法以及解密第一签名信息的第一公钥。
根据本公开的至少一个实施例,所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,包括:
所述第一节点利用所述第一哈希算法,计算得到所述第一SRv6报文的目标字段对应的第一哈希值;
利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果;
根据所述第一哈希值和解密结果是否一致,判断所述第一签名信息的签名校验是否通过。
根据本公开的至少一个实施例,在利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密之前,所述方法还包括:
根据所述第一哈希值,查找本地保存的哈希值与签名信息的对应关系表,判断是否存在所述第一哈希值对应的第二签名信息;
若存在,则根据所述第二签名信息与所述第一签名信息是否一致,判断所述第一签名信息的签名校验是否通过;
若不存在,则执行所述利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果的步骤。
根据本公开的至少一个实施例,在所述第一哈希值与解密结果一致的情况下,将所述第一哈希值与所述第一签名信息的对应关系,添加至所述对应关系表中。
根据本公开的至少一个实施例,还包括:所述第一节点建立与控制器之间的安全连接;
所述第一节点与所述控制器通过所述安全连接,完成公钥证书分发以 及所述第一非对称加密算法的选择操作。
根据本公开的至少一个实施例,还包括:
所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥证书请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥证书并进行验证,在验证通过后,保存所述公钥证书;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法、和目标非对称加密算法和公钥证书的回复消息,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法;
或者,所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥及公钥标识;
其中,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
根据本公开实施例的第二方面,至少提供了一种签名信息的生成方法,包括:
控制器采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
所述控制器将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
根据本公开的至少一个实施例,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保 留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
根据本公开的至少一个实施例,所述目标字段包括以下字段中的至少一种:IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
根据本公开的至少一个实施例,还包括:
所述控制器与所述第一节点通过所述第一节点建立的安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥证书;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法;
或者,所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥及公钥标识;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法。
根据本公开实施例的第三方面,至少提供了一种报文发送方法,包括:
源节点接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
所述源节点生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
根据本公开的至少一个实施例,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
根据本公开的至少一个实施例,所述目标字段包括以下字段中的至少一种:IPv6源地址;
路由扩展头的IPv6地址栈中的上一个入口、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
根据本公开实施例的第四方面,至少提供了一种第一节点,包括:
接收模块,配置为接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
转发模块,配置为利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
根据本公开实施例的第五方面,至少提供了一种第一节点,包括收发 机和处理器,其中,
所述收发机,用于接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
所述处理器,用于利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
根据本公开实施例的第六方面,至少提供了一种第一节点,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现第一方面所述方法的步骤。
根据本公开实施例的第七方面,至少提供了一种控制器,包括:
签名模块,配置为采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
发送模块,配置为将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
根据本公开实施例的第八方面,至少提供了一种控制器,包括收发机和处理器,其中,
所述处理器,用于采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
所述收发机,用于将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
根据本公开实施例的第九方面,至少提供了一种控制器,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述 程序被所述处理器执行时实现第二方面所述方法的步骤。
根据本公开实施例的第十方面,至少提供了一种源节点,包括:
接收模块,配置为接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
转发模块,配置为生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
根据本公开实施例的第十一方面,至少提供了一种源节点,包括收发机和处理器,其中,
所述收发机,用于接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
所述处理器,用于生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
根据本公开实施例的第十二方面,至少提供了一种源节点,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现第三方面所述方法的步骤。
根据本公开实施例的第十三方面,至少提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有程序,所述程序被处理器执行时,实现第一方面、第二方面或第三方面所述方法的步骤。
本公开实施例提供的报文发送方法、签名信息的生成方法及设备,采用非对称密钥对报文头进行认证和完整性校验。在控制器上采用私钥对SRv6报文头进行签名,在网络设备关键节点采用公钥对签名进行验证,实 现防止报文源的仿冒和报文头的篡改,避免了一台设备被攻陷,整个网络的共享密钥被泄露。另外,本公开实施例还提供了两种密钥分发/更新,算法选择机制的实现方案,实现简单,操作安全,易于在网络中应用。另外,本公开实施例还提供了一种SRv6报文高效校验转发机制,首包解密校验,后续包查表转发,提高了转发效率。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本公开的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为SRv6报文转发的一种示意图;
图2为SRv6网络的一种示意图;
图3为本公开实施例提供的报文发送方法的一种流程图;
图4为本公开实施例提供的SRv6报文的一种结构示意图;
图5为本公开实施例提供的密钥分发的一种流程示意图;
图6为本公开实施例提供的密钥分发的另一种流程示意图;
图7为本公开实施例提供的密钥分发的另一种流程示意图;
图8为本公开实施例提供的密钥分发的另一种流程示意图;
图9为本公开实施例提供的签名信息的生成方法的一种流程图;
图10为本公开实施例提供的报文发送方法的另一种流程图;
图11为本公开实施例提供的报文发送方法的一种示例图;
图12为本公开实施例提供的查表转发的一种示例图;
图13为本公开实施例提供的第一节点的一种结构示意图;
图14为本公开实施例提供的第一节点的另一种结构示意图;
图15为本公开实施例提供的控制器的一种结构示意图;
图16为本公开实施例提供的控制器的另一种结构示意图;
图17为本公开实施例提供的源节点的一种结构示意图;
图18为本公开实施例提供的源节点的另一种结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。说明书以及权利要求中“和/或”表示所连接对象的至少其中之一。
以下描述提供示例而并非限定权利要求中阐述的范围、适用性或者配置。可以对所讨论的要素的功能和布置作出改变而不会脱离本公开的精神和范围。各种示例可恰适地省略、替代、或添加各种规程或组件。例如,可以按不同于所描述的次序来执行所描述的方法,并且可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
本公开实施例提供了一种报文发送方法,可以在SRv6信任域防护方案 基础上,实现一种基于非对称密钥的SRv6报文头认证及校验方法,可以避免采用共享密钥进行认证容易发生密钥泄露进而影响网络安全的问题。另外,本公开实施例还提出基于非对称校验结果的查表转发方法,可以进一步提升数据面的转发效率。
请参照图3,本公开实施例提供的报文发送方法,应用于转发SRv6报文的中间节点设备或主机服务器等设备(为了便于描述,这里称之为第一节点),该第一节点可以是SRv6信任域边界或SRv6信任域内的转发设备,如图3所示,该报文发送方法包括:
步骤31,第一节点接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息。
本实施方式中,为了避免采用共享密钥进行认证容易发生密钥泄露的问题,本公开实施例采用非对称密钥中的私钥对SRv6报文头中的目标字段进行签名以获得签名信息。该签名信息可以是SRv6信任域内的控制器生成并发送给源节点的,所述源节点发送第一SRv6报文,第一节点接收所述第一SRv6报文。
步骤32,所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
在一些可选实施例中,针对步骤32,第一节点利用非对称密钥中的公钥进行签名校验,在所述第一签名信息的签名校验通过的情况下,可以转发所述第一SRv6报文;而在所述第一签名信息的签名校验失败的情况下,则可以丢弃所述第一SRv6报文。
在一些可选实施例中,上述签名校验的过程可以包括:所述第一节点利用所述第一哈希算法,计算得到所述第一SRv6报文的目标字段对应的第 一哈希值;利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果;根据所述第一哈希值和解密结果是否一致,判断所述第一签名信息的签名校验是否通过。
在报文未受到攻击的情况下,所述解密结果通常为某个哈希值(如第二哈希值)并且与所述第一哈希值一致,此时可以确定签名校验通过。而在报文受到攻击的情况下,所述解密结果可能不是哈希值,通过比较发现解密结果与第一哈希值不一致时,即确定签名校验失败(签名校验不通过)。
其中,与第一私钥对应的第一公钥指的是:与第一私钥基于同样的非对称加密算法生成的第一公钥。
通过以上步骤,本公开实施例采用了非对称密钥对SRv6报文头进行校验,避免了采用共享密钥进行认证容易发生密钥泄露进而影响网络安全的问题。
为实现SRv6非对称密钥签名保护,本公开实施例提供了一种SRv6签名认证的类型长度值(Auth TLV)字段,对SRv6报文的目标字段进行签名保护。
在一些可选实施例中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
其中,所述签名所采用的第一哈希算法的指示信息,可以采用直接指示或者间接指示的方式进行指示。例如,直接指示第一哈希算法的算法名称,或者,指示第一哈希算法的约定标识或索引,第一节点通过查找预先约定的标识/索引与哈希算法的对应关系,可以确定出具体的第一哈希算法。
类似的,签名所采用的第一非对称加密算法的指示信息以及解密第一签名信息的第一公钥的指示信息也可以采用直接指示或者间接指示的方式。例如,直接指示第一非对称加密算法的算法名称,或者,指示第一非对称加密算法的约定标识或索引,第一节点通过查找预先约定的标识/索引与非对称加密算法的对应关系,可以确定出具体的第一非对称加密算法。又例如,直接指示第一公钥,或者,指示第一公钥的公钥标识或公钥证书,第一节点通过查找预先约定的公钥标识与公钥的对应关系,或者通过查找对应的公钥证书,可以确定出具体的第一公钥。
在一些可选实施例中,所述目标字段则可以包括以下字段中的至少一种:IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、签名认证TLV字段中的保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息。
可选的,所述目标字段还可以包括以下字段中的至少一种:签名认证TVL字段中的类型(Type)字段和长度(Length)字段。
在一些可选实施例中中,在步骤32中对所述第一签名信息进行签名校验之前,所述第一节点可以解析所述第一SRv6报文的签名认证TLV字段,确定签名所采用的第一哈希算法、第一非对称加密算法以及解密第一签名信息的第一公钥,进而在步骤32中利用上述第一哈希算法、所述第一私钥对应的第一公钥对第一签名信息进行签名校验。
图4给出了签名认证TLV字段的一种结构图,需要说明的是,图4所给出的字段结构仅为本公开实施例可以采用的一种示例,并非用于限定本公开,本公开还可以采用其他结构的TLV字段,例如,调整字段中的各个部分的位置或长度,从而得到不同的字段结构。
具体的,图4所示的签名认证TLV字段,包括:
1)Type字段,即类型字段,取值可以为某个预设值,图4中以取值为6为例,用于表示该TLV字段是采用非对称密钥签名认证的TLV字段,其长度可以是8比特(bits)。
2)Length字段,即长度字段,用于表示签名认证TLV字段长度。
3)D字段,用于表示采用reduce模式时不校验目的地址。
4)Reserved:保留字段,签名认证TLV字段中的保留字段。
5)签名秘钥标识(Auth Key ID):用于指示签名所采用的哈希算法、签名所采用的非对称加密算法、解密签名信息的公钥的指示信息。例如,第一公钥可以通过公钥证书的证书序列号或公钥标识来进行指示。表1进一步给出了Auth Key ID包括的内容的一个示例。
表1
Figure PCTCN2022075388-appb-000001
表1中:Hash algorithm表示报文头哈希计算采用的哈希算法,如SHA256、SHA3等;Signature algorithm表示非对称签名算法,如RSA2048、ECDSA等;Certificate Serial number表示公钥证书的序列号,用于标识用于解密的控制器证书公钥。Reserved表示Auth Key ID中的保留字段。
6)Auth:签名信息字段,包括有签名信息,即采用哈希算法、非对称加密算法和私钥,对目标字段进行前面所生成的签名信息,其长度为8~32字节。
图4中的签名校验范围为虚线框对应的字段,即所述目标字段包括:
IPv6源地址(IPv6 Source Address);
Last Entry字段;
标志位(Flags);
段列表(Segment List,对于G-SRv6可以为G-Segment ID List)
D字段和签名认证TLV字段中的保留(Reserved)字段;
Auth Key ID。
本公开实施例采用非对称密钥在数据面对转发报文进行签名验证,为了进一步提高报文转发处理效率,本公开实施例还提供了一种高效的签名校验查表转发机制,对数据报文的首包做签名校验,并将报文头的哈希值和签名信息的对应关系记录在本地维护的对应关系表中,从而在后续包到达时,可以直接查找该对应关系表,对签名值做比对即可实现查表转发,提高了转发效率。
在一些可选实施例中,在上述步骤32中,在利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密之前,本公开实施例可以根据所述第一哈希值,查找本地保存的哈希值与签名信息的对应关系表,判断是否存在所述第一哈希值对应的第二签名信息;在存在所述第一哈希值对应的第二签名信息的情况下,则根据所述第二签名信息与所述第一签名信息是否一致,判断所述第一签名信息的签名校验是否通过,例如,一致时则签名校验通过,此时转发所述第一SRv6报文,而在不一致时则签名校验未通过,此时可以丢弃所述第一SRv6报文;在不存在所述第一哈希值对应的第二签名信息的情况下,则执行所述步骤32,利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果及其后续的步骤。
在一些可选实施例中,在计算得到的所述第一哈希值与解密得到的解密结果一致的情况下,第一节点将所述第一哈希值与所述第一签名信息的对应关系,添加至所述对应关系表中,这样后续可以直接利用该对应关系表对相关报文进行查表转发,以提高数据转发效率。
本公开实施例在控制器基于私钥对报文头签名,在网络转发设备上基于公钥解密验证,这样就需要在实现控制器和转发设备之间的进行密钥分 发。为进一步提升保密性,提高抗攻击能力,本公开实施例还需要能够安全的定期更新密钥。密钥更新类似于密钥分发过程。也即第一节点与控制器建立安全连接,并通过安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
下面提供两种密钥分发/更新的具体方式。
作为一种实现方式,在控制器和第一节点(这里,第一节点可以是任何需要对SRv6报文进行签名验证的网络转发设备或主机服务器等设备)间采用证书实现认证和密钥分发。在第一节点上预置CA证书,验证从控制器端获取的公钥证书,并获取控制器的公钥。该实现方式中,所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥证书请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥证书并进行验证,在验证通过后,保存所述公钥证书;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法、和目标非对称加密算法和公钥证书的回复消息,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
图5提供了上述实现方式在控制器和第一节点之间的交互示意图,其中,第一节点(网络转发设备)和控制器之间的控制面可以利用已有成熟的保护机制,例如,使用证书认证,也可能使用账号和密码认证,认证通过后对控制面数据进行加密传输和完整性保护。如图5所示,包括:
51)第一节点建立与控制器之间的安全连接;
52)第一节点向控制器发送证书请求,同时第一节点将自身支持的哈希算法、非对称加密算法列表发送给控制器;
53)控制器根据第一节点支持的算法,将公钥证书发送给第一节点;
54)第一节点基于预置的根证书验证公钥证书,证书验证成功;
55)控制器搜集网络中需要对SRv6报文进行签名验证的网络转发节点所支持的算法列表,选用网络转发节点都支持的算法对报文头生成签名信息(数字签名)。
该实现方式中,密钥更新流程与上述分发流程类似,控制器将新的公钥证书发送给网络转发设备(如第一节点),收到网络转发设备的响应后,采用新的私钥生成签名信息(数字签名)。
该实现方式在控制器和网络转发设备/主机间采用证书实现认证和密钥分发,能够在控制器和网络设备已有的安全连接基础上,基于公信的CA,再次对控制器进行认证,防止仿冒控制中心被仿冒。
作为另一种实现方式,依赖控制器和网络设备间控制面的安全连接,直接进行公钥分发和替换。该实现方式中,所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥及公钥标识;第一节点接收控制器通过安全连接发送的用于指示目标哈希算法和目标非对称加密算法的回复消息。其中,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
图6提供了上述实现方式在控制器和第一节点之间的交互示意图,其中,第一节点(网络转发设备或主机)和控制器之间的控制面利用已有成熟的保护机制,例如,使用证书认证,也可能使用账号和密码认证,认证通过后对控制面数据进行加密传输和完整性保护。如图6所示,包括:
61)第一节点建立与控制器之间的安全连接;
62)第一节点向控制器发送公钥请求,同时第一节点将自身支持的哈希算法、非对称加密算法列表发送给控制器;
63)控制器根据第一节点支持的算法,将公钥及公钥标识以密文形式 发送给第一节点;
64)控制器搜集网络中进行验证的节点算法列表,选用节点都支持的算法对报文头生成签名信息(数字签名)。
该实现方式中,密钥更新流程与上述分发流程类似,控制器将新的公钥和公钥标识发送给第一节点,收到第一节点的响应后,采用新的私钥生成签名信息(数字签名)。
此外,上述实施例中控制器与节点使用的算法也可以固定,也即不需要进行选择。
具体来说,本公开实施例需要在控制器基于私钥对报文头签名,在节点上基于公钥解密验证,这样就需要在实现控制器和设备之间的密钥分发。为提升保密性,提高抗攻击能力,还需要能够安全的定期更新密钥。以下提供两种可行的实施方式。
方法一:如图7所示,在控制器和节点间采用证书实现认证和密钥分发。在节点上预置CA证书,验证从控制器端获取的公钥证书,并获取控制器的公钥。
节点和控制器之间的控制面一般已有成熟的保护机制,可能用证书认证,也可能用账号、密码认证,认证后对控制面数据进行加密传输和完整性保护。在控制器和节点间建立安全连接之后:
1)需要进行验证的关键节点,向控制器发送证书请求,以请求证书及算法;
2)控制器将公钥证书、SRv6校验采用的哈希算法和非对称加密算法发送给节点(证书中的密钥类型与控制器发送的非对称加密算法一致);
3)节点基于预置的根证书验证公钥证书,并检查自身是否支持控制器发送的哈希算法和非对称加密算法;
4)证书和算法验证成功后,节点向控制器发送证书验证成功响应;
5)若证书和算法验证失败,节点向控制器发送失败消息,上报具体失败原因。
证书更新流程与上述流程类似,控制器将新的证书发送给节点,收到节点的响应后,采用新的私钥生成数字签名。
在控制器和节点间采用证书实现认证和密钥分发,能够在控制器和节点已有的安全连接基础上,基于公信的CA,再次对控制器进行认证,防止仿冒控制中心被仿冒。
方法二:如图8所示,依赖控制器和节点间控制面的安全连接,直接进行公钥分发和替换。
节点和控制器之间的控制面一般已有成熟的保护机制,可能用证书认证,也可能用账号、密码认证,认证后对控制面数据进行加密传输和完整性保护。在控制器和节点间建立安全连接之后:
1)需要进行验证的关键节点,向控制器发送公钥请求,以请求公钥及算法;
2)控制器将哈希算法、非对称加密算法,非对称加密算法的公钥及公钥标识以密文形式发送给节点;
3)节点检查自身是否支持控制器发送的哈希算法和非对称加密算法;
4)算法验证成功(即自身支持算法)后,节点向控制器发送证书验证成功响应;
5)若算法验证失败(即自身不支持算法),节点向控制器发送失败消息,上报具体失败原因。
公钥更新流程与上述流程类似,控制器将新的公钥和公钥标识发送给节点,收到节点的响应后,采用新的私钥生成数字签名。
请参照图9,本公开实施例提供了一种签名信息的生成方法,应用于SRv6网络中的控制器,该控制器可以是SRv6控制器或者软件定义网络 (Software Defined Network,SDN)控制器,该方法包括:
步骤71,控制器采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息。
本实施方式中,第一哈希算法和第一非对称加密算法是段列表中需要对所述SRv6报文进行签名校验的设备(可以包括网络转发设备和主机等)都支持的哈希算法和非对称加密算法。通常,控制器根据网络拓扑和业务需求进行算路,得到段列表(转发路径),即SRv6网络中的分段列表。根据段列表,生成第一报文对应的第一SRv6报文的报文头。然后,采用第一哈希算法、第一非对称加密算法和第一私钥,对第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息。
步骤72,所述控制器将所述段列表和第一签名信息发送给源节点。
本实施方式中,控制器将所述段列表和第一签名信息发送给源节点,从而源节点可以根据所述段列表和第一签名信息,在第一报文的基础上,封装生成携带有所述段列表和所述第一签名信息的第一SRv6报文。
通过以上步骤,本公开实施例实现了采用了非对称密钥生成SRv6报文头的签名信息,避免了采用共享密钥进行认证容易发生密钥泄露进而影响网络安全的问题。
在本公开的一些可选实施例中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
在一些可选实施例中,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
在本公开的一些可选实施例中,所述控制器与所述第一节点通过所述第一节点建立的安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
在一些可选实施例中,对应于以上提供的第一种密钥分发/更新方式,所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥证书;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法。
在另一些可选实施例中,对应于以上提供的第二种密钥分发/更新方式,所述控制器与多个节点建立安全连接,并通过所述安全连接,所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥及公钥标识;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法,并向所述多个节点发送用于指示目标哈希算法、目标非对称加密算法和公钥证书的回复消息。
请参照图10,本公开实施例提供了一种报文发送方法,应用于发送第 一SRv6报文的源节点,包括:
步骤81,源节点接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的。
步骤82,所述源节点生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
通过本实施方式,可以将控制器基于非对称密钥生成的签名信息携带在SRv6报文中进行发送,避免了采用共享密钥进行认证容易发生密钥泄露进而影响网络安全的问题。
在一些可选实施例中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
在一些可选实施例中,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
以上从多个设备侧介绍了本公开实施例的相关方法。可以看出,本公开实施例在SRv6控制器上采用证书私钥对SRH及IP头进行哈希签名,在SRv6源节点封装SRv6头和控制器生成的数字签名,在关键网络转发节点(即需要进行签名校验的转发节点)上采用公钥对签名进行验证,这样, 即使网络设备存在漏洞被攻陷也不会泄露签名私钥,攻击者无法利用SRH对网络进行各种源路由攻击,从而提高了网络的安全性能。
下面通过一个具体的转发示例对以上方法进行说明。
请参照图11,以基于证书的密钥分发为例进行说明。图9所示的SRv6网络,包括节点1~6以及主机1~2(Host 1~Host 2),SRv6信任域内包括有节点2~5。
步骤A:预置证书,在SRv6控制器上预置私钥和控制器证书,在关键网络设备(需要对SRv6报文的签名信息进行签名校验的节点)预置CA根证书。
步骤B:控制器和网络设备在控制面建立安全连接后,进行公钥证书分发和签名算法选择。
步骤C:SRv6控制器采用私钥和上一步选择出的哈希算法和非对称加密算法,对根据段列表生成的报文头进行签名,将段列表及签名信息发送给源节点。源节点可能是需要跨域互通的节点1,也可能是信任域内主机(Host)1。
步骤D:源节点封装并转发带有签名信息的SRv6报文。
步骤E:关键网络节点,如SRv6信任域边界节点2对外接口(接口11)、SRv6信任域内主机在节点3的接入接口(接口12)、提供服务的主机(Host)2(接口14)等,开启签名校验,首先根据报文头计算得到第一哈希值,再采用公钥解密报文中的签名信息得到解密结果,比对两个哈希值是否一致。如果校验失败丢弃报文;校验成功,则转发处理报文。
步骤F:SRv6控制器根据安全需求,定期更新证书。
在采用了对应关系表进行查表转发的情况下,本公开实施例可以对数据报文的首包做签名校验,并将基于报文头计算得到的哈希值和报文头中的签名信息记录到对应关系表,后续包直接查找对应关系表,对签名信息 做比对即可。具体的,如图12所示,包括:
步骤a:在开启签名校验的接口(非对称校验的接口),收到SRv6报文时,计算报文头的哈希(Hash)值,并查找是否命中本地的对应关系表(本地哈希表)。
步骤b:未命中本地对应关系表(本地哈希表),采用控制器公钥对签名进行解密,并比对解密后的哈希值(解密结果)与计算出的哈希值是否一致,如果不一致丢弃报文;如果一致将哈希值和签名信息记录到本地对应关系表(本地哈希表),并转发处理报文。
步骤c:步骤a中命中本地对应关系表(本地哈希表)时,比对本地对应关系表(本地哈希表)中的签名信息和报文头中携带的签名信息是否一致,如果一致则转发处理报文,如果不一致则丢弃报文。
综上,本公开实施例的以上方法,在SRv6信任域防护基础上,提出了一种新的报文头认证和校验方法。本公开实施例新定义了一种SRv6 Auth TLV,用于采用非对称密钥对报文头进行认证和完整性校验。在控制器上采用私钥对SRv6报文头进行签名,在网络设备关键节点采用公钥对签名进行验证,实现防止报文源的仿冒和报文头的篡改,避免了一台设备被攻陷,整个网络的共享密钥被泄露。另外,本公开实施例还提供了两种密钥分发/更新,算法选择机制的实现方案,实现简单,操作安全,易于在网络中应用。另外,本公开实施例还提供了一种SRv6报文高效校验转发机制,首包解密校验,后续包查表转发,提高了转发效率。本公开实施例可以应用于标准的SRv6协议,另外还能够应用于G-SRv6等扩展协议。
以上介绍了本公开实施例的各种方法。下面将进一步提供实施上述方法的装置。
本公开实施例提供了图13所示的一种第一节点,包括:
接收模块111,配置为接收第一SRv6报文,所述第一SRv6报文携带 有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
转发模块112,配置为利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
可选的,所述转发模块112,配置为在所述第一签名信息的签名校验通过的情况下,转发所述第一SRv6报文;在所述第一签名信息的签名校验失败的情况下,丢弃所述第一SRv6报文。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息。
可选的,所述第一节点还包括:解析模块,配置为解析所述第一SRv6报文的签名认证TLV字段,确定签名所采用的第一哈希算法、第一非对称加密算法以及解密第一签名信息的第一公钥。
可选的,所述转发模块,配置为所述第一节点利用所述第一哈希算法,计算得到所述第一SRv6报文的目标字段对应的第一哈希值;利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果;根 据所述第一哈希值和解密结果是否一致,判断所述第一签名信息的签名校验是否通过。
可选的,所述转发模块,配置为在利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密之前,根据所述第一哈希值,查找本地保存的哈希值与签名信息的对应关系表,判断是否存在所述第一哈希值对应的第二签名信息;在存在所述第一哈希值对应的第二签名信息的情况下,则根据所述第二签名信息与所述第一签名信息是否一致,判断所述第一签名信息的签名校验是否通过;在不存在所述第一哈希值对应的第二签名信息的情况下,则执行所述利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果的步骤。
可选的,所述第一节点还包括:维护模块,配置为在所述第一哈希值与解密结果一致的情况下,将所述第一哈希值与所述第一签名信息的对应关系,添加至所述对应关系表中。
可选的,所述第一节点还包括:密钥获得模块,配置为建立与控制器之间的安全连接;所述第一节点与所述控制器通过所述安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
可选的,密钥获得模块,配置为建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥证书请求消息;所述第一节点接收所述控制器发送的公钥证书并进行验证,在验证通过后,保存所述公钥证书并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法和目标非对称加密算法的回复消息;
或者,建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥请求消息;所述第一节点接收所述控制器发送的公钥及公钥标识,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示 信息;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法和目标非对称加密算法的回复消息;
其中,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
需要说明的是,该实施例中的装置是与上述图3所示的方法对应的设备,上述各实施例中的实现方式均适用于该设备的实施例中,也能达到相同的技术效果。在此需要说明的是,本公开实施例提供的上述节点,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
请参考图14,本公开实施例提供了第一节点的另一结构示意图,包括:处理器1201、收发机1202、存储器1203和总线接口,其中:
第一节点还包括:存储在存储器上1203并可在处理器1201上运行的程序,所述程序被处理器1201执行时实现如下步骤:接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
可选的,所述处理器1201执行所述程序时还实现以下步骤:在所述第一签名信息的签名校验通过的情况下,转发所述第一SRv6报文;在所述第一签名信息的签名校验失败的情况下,丢弃所述第一SRv6报文。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信 息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息。
可选的,所述处理器1201执行所述程序时还实现以下步骤:在对所述第一签名信息进行签名校验之前,解析所述第一SRv6报文的签名认证TLV字段,确定签名所采用的第一哈希算法、第一非对称加密算法以及解密第一签名信息的第一公钥。
可选的,所述处理器1201执行所述程序时还实现以下步骤:利用所述第一哈希算法,计算得到所述第一SRv6报文的目标字段对应的第一哈希值;利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果;根据所述第一哈希值和解密结果是否一致,判断所述第一签名信息的签名校验是否通过。
可选的,所述处理器1201执行所述程序时还实现以下步骤:在利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密之前,根据所述第一哈希值,查找本地保存的哈希值与签名信息的对应关系表,判断是否存在所述第一哈希值对应的第二签名信息;在存在所述第一哈希值对应的第二签名信息的情况下,则根据所述第二签名信息与所述第一签名信息是否一致,判断所述第一签名信息的签名校验是否通过;在不存在所述第一哈希值对应的第二签名信息的情况下,则执行所述利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果的步骤。
可选的,所述处理器1201执行所述程序时还实现以下步骤:在所述第 一哈希值与解密结果一致的情况下,将所述第一哈希值与所述第一签名信息的对应关系,添加至所述对应关系表中。
可选的,所述处理器1201执行所述程序时还实现以下步骤:建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥证书请求消息;所述第一节点接收所述控制器发送的公钥证书并进行验证,在验证通过后,保存所述公钥证书并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法和目标非对称加密算法的回复消息;或者,
建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥请求消息;所述第一节点接收所述控制器发送的公钥及公钥标识,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法和目标非对称加密算法的回复消息;
其中,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
可理解的,本公开实施例中,所述计算机程序被处理器1201执行时可实现上述图3所示的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
在图14中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1201代表的一个或多个处理器和存储器1203代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1202可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元。
处理器1201负责管理总线架构和通常的处理,存储器1203可以存储处理器1201在执行操作时所使用的数据。
需要说明的是,该实施例中的节点是与上述图3所示的方法对应的设备,上述各实施例中的实现方式均适用于该节点的实施例中,也能达到相同的技术效果。该节点中,收发机1202与存储器1203,以及收发机1202与处理器1201均可以通过总线接口通讯连接,处理器1201的功能也可以由收发机1202实现,收发机1202的功能也可以由处理器1201实现。在此需要说明的是,本公开实施例提供的上述节点,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
在本公开的一些实施例中,还提供了一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现以下步骤:接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
该程序被处理器执行时能实现上述应用于第一节点的报文发送方法中的所有实现方式,且能达到相同的技术效果,为避免重复,此处不再赘述。
本公开实施例提供了图15所示的一种控制器,包括:
签名模块131,配置为采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
发送模块132,配置为将所述段列表和第一签名信息发送给源节点。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV 的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
可选的,所述控制器还包括:
分发模块,配置为与所述第一节点通过所述第一节点建立的安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
可选的,所述分发模块,配置为与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息;向所述多个节点发送公钥证书,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法,并向所述多个节点发送用于指示目标哈希算法、目标非对称加密算法和公钥证书的回复消息;或者,与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥请求消息;向所述多个节点发送公钥及公钥标识,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法,并向所述多个节点发送用于指示目标哈希算法、目标非对称加密算法和公钥证书的回复消息。
需要说明的是,该实施例中的控制器是与上述图9所示的方法对应的设备,上述各实施例中的实现方式均适用于该设备的实施例中,也能达到相同的技术效果。在此需要说明的是,本公开实施例提供的上述设备,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
请参考图16,本公开实施例提供了控制器的另一结构示意图,包括:处理器1401、收发机1402、存储器1403和总线接口,其中:控制器还包括:存储在存储器上1403并可在处理器1401上运行的程序,所述程序被处理器1401执行时实现如下步骤:采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
可选的,所述处理器1401执行所述程序时还实现以下步骤:与所述第 一节点通过所述第一节点建立的安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
可选的,所述处理器1401执行所述程序时还实现以下步骤:与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息;向所述多个节点发送公钥证书,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法,并向所述多个节点发送用于指示目标哈希算法、目标非对称加密算法和公钥证书的回复消息;或者,与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥请求消息;向所述多个节点发送公钥及公钥标识,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法,并向所述多个节点发送用于指示目标哈希算法、目标非对称加密算法和公钥证书的回复消息。
可理解的,本公开实施例中,所述计算机程序被处理器1401执行时可实现上述图9所示的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
在图16中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1401代表的一个或多个处理器和存储器1403代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1402可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元。
处理器1401负责管理总线架构和通常的处理,存储器1403可以存储处理器1401在执行操作时所使用的数据。
需要说明的是,该实施例中的控制器是与上述图9所示的方法对应的设备,上述各实施例中的实现方式均适用于该控制器的实施例中,也能达到相同的技术效果。该控制器中,收发机1402与存储器1403,以及收发机1402与处理器1401均可以通过总线接口通讯连接,处理器1401的功能也可以由收发机1402实现,收发机1402的功能也可以由处理器1401实现。在此需要说明的是,本公开实施例提供的上述控制器,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
在本公开的一些实施例中,还提供了一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现以下步骤:采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
该程序被处理器执行时能实现上述应用于图9所示的控制器的方法中的所有实现方式,且能达到相同的技术效果,为避免重复,此处不再赘述。
本公开实施例还提供了图17所示的一种源节点,包括:
接收模块151,配置为接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
转发模块152,配置为生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字 段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的上一个入口、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
需要说明的是,该实施例中的源节点是与上述图10所示的方法对应的设备,上述各实施例中的实现方式均适用于该源节点的实施例中,也能达到相同的技术效果。在此需要说明的是,本公开实施例提供的上述源节点,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
请参考图18,本公开实施例提供了源节点的另一结构示意图,包括:处理器1601、收发机1602、存储器1603和总线接口,其中:源节点还包括:存储在存储器上1603并可在处理器1601上运行的程序,所述程序被处理器1601执行时实现如下步骤:接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
可选的,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字 段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
可选的,所述目标字段包括以下字段中的至少一种:
IPv6源地址;
路由扩展头的IPv6地址栈中的上一个入口、标志位和段列表;
签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
可理解的,本公开实施例中,所述计算机程序被处理器1601执行时可实现上述图10所示的方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
在图18中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1601代表的一个或多个处理器和存储器1603代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1602可以是多个元件,即包括发送机和接收机,提供用于在传输介质上与各种其他装置通信的单元。
处理器1601负责管理总线架构和通常的处理,存储器1603可以存储处理器1601在执行操作时所使用的数据。
需要说明的是,该实施例中的源节点是与上述图10所示的方法对应的设备,上述各实施例中的实现方式均适用于该源节点的实施例中,也能达到相同的技术效果。源节点中,收发机1602与存储器1603,以及收发机 1602与处理器1601均可以通过总线接口通讯连接,处理器1601的功能也可以由收发机1602实现,收发机1602的功能也可以由处理器1601实现。在此需要说明的是,本公开实施例提供的上述源节点,能够实现上述方法实施例所实现的所有方法步骤,且能够达到相同的技术效果,在此不再对本实施例中与方法实施例相同的部分及有益效果进行具体赘述。
在本公开的一些实施例中,还提供了一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现以下步骤:接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
该程序被处理器执行时能实现上述应用于源节点的报文发送方法中的所有实现方式,且能达到相同的技术效果,为避免重复,此处不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另 外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本公开实施例方案的目的。
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以权利要求的保护范围为准。

Claims (28)

  1. 一种报文发送方法,包括:
    第一节点接收第一互联网协议第6版IPv6分段路由SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
    所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
  2. 如权利要求1所述的方法,其中,所述根据校验结果确定是否转发所述第一SRv6报文,包括:
    在所述第一签名信息的签名校验通过的情况下,转发所述第一SRv6报文;
    在所述第一签名信息的签名校验失败的情况下,丢弃所述第一SRv6报文。
  3. 如权利要求1所述的方法,其中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
  4. 如权利要求3所述的方法,其中,所述目标字段包括以下字段中的至少一种:
    IPv6源地址;
    路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
    签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算 法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息。
  5. 如权利要求3所述的方法,其中,在对所述第一签名信息进行签名校验之前,所述方法还包括:
    所述第一节点解析所述第一SRv6报文的签名认证TLV字段,确定签名所采用的第一哈希算法、第一非对称加密算法以及解密第一签名信息的第一公钥。
  6. 如权利要求1至5任一项所述的方法,其中,所述第一节点利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,包括:
    所述第一节点利用所述第一哈希算法,计算得到所述第一SRv6报文的目标字段对应的第一哈希值;
    利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得解密结果;
    根据所述第一哈希值和解密结果是否一致,判断所述第一签名信息的签名校验是否通过。
  7. 如权利要求6所述的方法,其中,在利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密之前,所述方法还包括:
    根据所述第一哈希值,查找本地保存的哈希值与签名信息的对应关系表,判断是否存在所述第一哈希值对应的第二签名信息;
    在存在所述第一哈希值对应的第二签名信息的情况下,则根据所述第二签名信息与所述第一签名信息是否一致,判断所述第一签名信息的签名校验是否通过;
    在不存在所述第一哈希值对应的第二签名信息的情况下,则执行所述利用所述第一私钥对应的第一公钥,对所述第一签名信息进行解密,获得 解密结果的步骤。
  8. 如权利要求7所述的方法,其中,还包括:
    在所述第一哈希值与解密结果一致的情况下,将所述第一哈希值与所述第一签名信息的对应关系,添加至所述对应关系表中。
  9. 根据权利要求1所述的方法,其中,还包括:所述第一节点建立与控制器之间的安全连接;
    所述第一节点与所述控制器通过所述安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
  10. 如权利要求9所述的方法,其中,还包括:
    所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥证书请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥证书并进行验证,在验证通过后,保存所述公钥证书;所述第一节点接收控制器通过所述安全连接发送的用于指示目标哈希算法、和目标非对称加密算法和公钥证书的回复消息,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法;
    或者,所述第一节点建立与控制器之间的安全连接,并通过所述安全连接,向所述控制器发送公钥请求消息,并向控制器发送本节点支持的哈希算法和非对称加密算法的指示信息;所述第一节点接收所述控制器发送的公钥及公钥标识;
    其中,所述目标哈希算法和目标非对称加密算法是多个节点均支持的算法。
  11. 一种签名信息的生成方法,包括:
    控制器采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签 名信息;
    所述控制器将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
  12. 如权利要求11所述的方法,其中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
  13. 如权利要求12所述的方法,其中,所述目标字段包括以下字段中的至少一种:
    IPv6源地址;
    路由扩展头的IPv6地址栈中的Last Entry字段、标志位和段列表;
    签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示信息。
  14. 如权利要求11所述的方法,其中,还包括:
    所述控制器与所述第一节点通过所述第一节点建立的安全连接,完成公钥证书分发以及所述第一非对称加密算法的选择操作。
  15. 如权利要求14所述的方法,其中,还包括:
    所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥证书请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥证书;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称 加密算法;
    或者,所述控制器与多个节点建立安全连接,并通过所述安全连接,接收所述多个节点发送的公钥请求消息,并接收所述多个节点发送的本节点支持的哈希算法和非对称加密算法的指示信息;所述控制器向所述多个节点发送公钥及公钥标识;所述控制器根据所述多个节点各自支持的哈希算法和非对称加密算法,选择出所述多个节点均支持的目标哈希算法和目标非对称加密算法。
  16. 一种报文发送方法,包括:
    源节点接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
    所述源节点生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
  17. 如权利要求16所述的方法,其中,所述第一SRv6报文的路由扩展头中携带有签名认证TLV字段,所述签名认证TLV字段包括有以下信息中的至少一种:签名认证TLV的类型字段、签名认证TLV的长度字段、D字段、保留字段、签名所采用的第一哈希算法的指示信息、签名所采用的第一非对称加密算法的指示信息、解密第一签名信息的第一公钥的指示信息、所述第一签名信息。
  18. 如权利要求17所述的方法,其中,所述目标字段包括以下字段中的至少一种:
    IPv6源地址;
    路由扩展头的IPv6地址栈中的上一个入口、标志位和段列表;
    签名认证TLV字段中的D字段、保留字段、签名所采用的第一哈希算法、签名所采用的第一非对称加密算法、解密第一签名信息的公钥的指示 信息。
  19. 一种第一节点,包括:
    接收模块,配置为接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
    转发模块,配置为利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
  20. 一种第一节点,包括收发机和处理器,其中,
    所述收发机,用于接收第一SRv6报文,所述第一SRv6报文携带有采用第一哈希算法、第一非对称加密算法和第一私钥,对报文头中的目标字段进行签名得到的第一签名信息;
    所述处理器,用于利用所述第一哈希算法、所述第一私钥对应的第一公钥,对所述第一签名信息进行签名校验,并根据校验结果确定是否转发所述第一SRv6报文。
  21. 一种第一节点,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求1至10任一项所述的方法的步骤。
  22. 一种控制器,包括:
    签名模块,配置为采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
    发送模块,配置为将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
  23. 一种控制器,包括收发机和处理器,其中,
    所述处理器,用于采用第一哈希算法、第一非对称加密算法和第一私钥,对根据段列表生成的第一SRv6报文的报文头中的目标字段进行签名,得到第一签名信息;
    所述收发机,用于将所述段列表和第一签名信息发送给所述第一SRv6报文的源节点。
  24. 一种控制器,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求11至15任一项所述的方法的步骤。
  25. 一种源节点,包括:
    接收模块,配置为接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
    转发模块,配置为生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
  26. 一种源节点,包括收发机和处理器,其中,
    所述收发机,用于接收控制器发送的段列表和第一签名信息,所述第一签名信息是采用第一哈希算法、第一非对称加密算法和第一私钥,对根据所述段列表生成的第一SRv6报文的报文头中的目标字段进行签名得到的;
    所述处理器,用于生成并发送携带有所述段列表和所述第一签名信息的第一SRv6报文。
  27. 一种源节点,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如权利要求16至18任一项所述的方法的步骤。
  28. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至10任一项所述的方法的步骤;或者,
    所述计算机程序被处理器执行时实现如权利要求11至16任一项所述的方法的步骤;或者,
    所述计算机程序被处理器执行时实现如权利要求16至18任一项所述的方法的步骤。
PCT/CN2022/075388 2021-02-22 2022-02-07 报文发送方法、签名信息的生成方法及设备 WO2022174739A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110200003.XA CN114978519A (zh) 2021-02-22 2021-02-22 报文发送方法、签名信息的生成方法及设备
CN202110200003.X 2021-02-22

Publications (1)

Publication Number Publication Date
WO2022174739A1 true WO2022174739A1 (zh) 2022-08-25

Family

ID=82932107

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075388 WO2022174739A1 (zh) 2021-02-22 2022-02-07 报文发送方法、签名信息的生成方法及设备

Country Status (2)

Country Link
CN (1) CN114978519A (zh)
WO (1) WO2022174739A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405210B (zh) * 2023-05-29 2023-08-15 中国科学院大学 网络报文标签混淆方法、装置和电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640631A (zh) * 2008-07-28 2010-02-03 成都市华为赛门铁克科技有限公司 一种数据包处理的方法和装置
CN107547559A (zh) * 2017-09-20 2018-01-05 新华三信息安全技术有限公司 一种报文处理方法及装置
US20200092091A1 (en) * 2018-09-19 2020-03-19 Cisco Technology, Inc. Assured transport of data over a network
CN113810173A (zh) * 2020-06-12 2021-12-17 华为技术有限公司 一种校验应用信息的方法、报文处理方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469173A (zh) * 2010-11-15 2012-05-23 中国人民解放军总参谋部第六十一研究所 基于组合公钥算法的IPv6网络层可信传输的方法和系统
CN105763390A (zh) * 2014-12-16 2016-07-13 中兴通讯股份有限公司 一种网络异常流量的检测和控制方法、装置和系统
DE102015225373A1 (de) * 2015-12-16 2017-06-22 Bundesdruckerei Gmbh Signaturgenerierung durch ein Sicherheitstoken
CN108055285B (zh) * 2018-01-09 2020-12-04 杭州迪普科技股份有限公司 一种基于ospf路由协议的入侵防护方法和装置
CN111600829A (zh) * 2019-02-21 2020-08-28 杭州萤石软件有限公司 用于物联网设备间的安全通信方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640631A (zh) * 2008-07-28 2010-02-03 成都市华为赛门铁克科技有限公司 一种数据包处理的方法和装置
CN107547559A (zh) * 2017-09-20 2018-01-05 新华三信息安全技术有限公司 一种报文处理方法及装置
US20200092091A1 (en) * 2018-09-19 2020-03-19 Cisco Technology, Inc. Assured transport of data over a network
CN113810173A (zh) * 2020-06-12 2021-12-17 华为技术有限公司 一种校验应用信息的方法、报文处理方法及装置

Also Published As

Publication number Publication date
CN114978519A (zh) 2022-08-30

Similar Documents

Publication Publication Date Title
US11212294B2 (en) Data packet security with expiring time-based hash message authentication codes (HMACs)
US11533297B2 (en) Secure communication channel with token renewal mechanism
US8098823B2 (en) Multi-key cryptographically generated address
US8886934B2 (en) Authorizing physical access-links for secure network connections
US8843751B2 (en) IP address delegation
US20040210754A1 (en) Shared security transform device, system and methods
US20080065883A1 (en) Authentication for devices located in cable networks
Cam-Winget et al. The flexible authentication via secure tunneling extensible authentication protocol method (EAP-FAST)
US10911581B2 (en) Packet parsing method and device
EP2329621B1 (en) Key distribution to a set of routers
CN113411190B (zh) 密钥部署、数据通信、密钥交换、安全加固方法及系统
US10277576B1 (en) Diameter end-to-end security with a multiway handshake
JP5144685B2 (ja) 移動ネットワークにおけるシグナリング委任
JP2023517082A (ja) SRv6 HMAC検証についてのリプレイ攻撃を防止するための方法およびデバイス
Hu et al. Gatekeeper: A gateway-based broadcast authentication protocol for the in-vehicle Ethernet
WO2022174739A1 (zh) 报文发送方法、签名信息的生成方法及设备
US20100242112A1 (en) System and method for protecting network resources from denial of service attacks
US20230283588A1 (en) Packet processing method and apparatus
US8364949B1 (en) Authentication for TCP-based routing and management protocols
CN108282337A (zh) 一种基于可信密码卡的路由协议加固方法
WO2010003326A1 (zh) 保护代理邻居发现的方法、系统和相关装置
CN113225298A (zh) 一种报文验证方法及装置
KR100917392B1 (ko) IPv6 네트워크에서 인접 노드의 탐색 메시지를송수신하는 방법
US11343089B2 (en) Cryptography system and method
US20230239138A1 (en) Enhanced secure cryptographic communication system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22755512

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17/01/2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22755512

Country of ref document: EP

Kind code of ref document: A1