WO2021248999A1 - 一种校验应用信息的方法、报文处理方法及装置 - Google Patents

一种校验应用信息的方法、报文处理方法及装置 Download PDF

Info

Publication number
WO2021248999A1
WO2021248999A1 PCT/CN2021/085800 CN2021085800W WO2021248999A1 WO 2021248999 A1 WO2021248999 A1 WO 2021248999A1 CN 2021085800 W CN2021085800 W CN 2021085800W WO 2021248999 A1 WO2021248999 A1 WO 2021248999A1
Authority
WO
WIPO (PCT)
Prior art keywords
verification
information
message
verification information
application information
Prior art date
Application number
PCT/CN2021/085800
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
Priority claimed from CN202010669854.4A external-priority patent/CN113810290A/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21821848.5A priority Critical patent/EP4156622A4/en
Publication of WO2021248999A1 publication Critical patent/WO2021248999A1/zh
Priority to US18/064,758 priority patent/US20230113138A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • 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/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
    • H04L9/3242Cryptographic 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 involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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/3263Cryptographic 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 involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L2012/4629LAN interconnection over a backbone network, e.g. Internet, Frame Relay using multilayer switching, e.g. layer 3 switching

Definitions

  • This application relates to the field of communications, and in particular to a method for verifying application information, a method and device for processing messages.
  • the application information can be carried in the service message, so that after the service message enters the network, the network The network equipment can determine the application requirements according to the application information, so as to allocate the corresponding network resources for the application.
  • API6 Application-aware Internet Protocol Version 6 Networking
  • the embodiments of the present application provide a method for verifying application information, a message processing method, and a device, which can avoid the problem of improper use of network resources due to improper use of application information.
  • an embodiment of the present application provides a method for verifying application information, and the method may be executed by a first communication device. After receiving the first message including the application information, the first communication device may verify the integrity of the application information in the first message.
  • the first message includes application information and first verification information, and the first verification information is used to verify the integrity of the application information. Therefore, after receiving the first message, the first communication device can verify the integrity of the application information based on the first verification information. It can be seen that by using the solution of the embodiment of the present application, the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first communication device verifies the integrity of the application information based on the first verification information.
  • the first communication device may, according to the target field in the first message, Acquire second verification information, where the target field includes the application information.
  • the first communication device After obtaining the second verification information, the first communication device performs matching verification on the second verification information and the first verification information.
  • performing a matching check on the second verification information and the first verification information may be, for example, comparing the first verification information and the second verification information. If the two are the same, the matching verification is passed; If they are the same, the matching check fails. In this way, the integrity verification of the application information can be achieved.
  • the first communication device verifies the integrity of the application information based on the first verification information.
  • the first communication device may, for example, be based on the first verification method and the first verification method.
  • the verification information verifies the integrity of the application information.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information included in the first message may be the first HMAC verification information.
  • the first HMAC check information may be obtained by performing HMAC calculation on the target field in the first message.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can verify the first verification information. HMAC calculation is performed on the target field in the message to obtain the second HMAC check information; then, the first HMAC check information and the second HMAC check information are matched and verified to realize the integrity verification of the application information.
  • the first verification method is digital signature verification.
  • the first verification method is digital signature authentication
  • the first verification information is to use the first private key and the first hash to calculate the target field in the first message.
  • the digital signature obtained by signing.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the first public key pair
  • the digital signature is decrypted to obtain a first plaintext; a second hash calculation is performed on the target field to obtain a second plaintext, and the first hash calculation and the second hash calculation use the same hash Algorithm; and then, the first communication device performs matching verification on the first plaintext and the second plaintext.
  • the first message further includes a digital certificate
  • the digital certificate includes the first public key.
  • the digital certificate may be the digital certificate of the sending device of the first message, and the digital certificate may be considered as the identity certificate of the sending device of the first message.
  • the legality of the first public key can be guaranteed.
  • the digital certificate further includes a decryption algorithm for decrypting the digital signature, and/or the hash algorithm.
  • the decryption algorithm for decrypting the digital signature is carried in the digital signature, the legality of the decryption algorithm can be guaranteed; when the hash algorithm is carried in the digital signature, the legality of the hash algorithm can be guaranteed.
  • the method further includes: verifying the legality of the digital certificate. It is understandable that the verification of the digital certificate and the legitimacy can verify the legitimacy of the sending device of the first message. Correspondingly, if the digital certificate also carries other information, for example, the aforementioned first public key, or, for example, the decryption algorithm for decrypting the digital signature, and/or the hash algorithm can also verify the digital The legality of other information carried in the certificate.
  • the first message includes a digital certificate
  • the application information and the first verification information are carried in the digital certificate.
  • the first communication device verifies the integrity of the application information based on the first verification information. In a specific implementation, the first communication device verifies the integrity of the application information.
  • a communication device can verify the legality of the digital certificate.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • IPSEC-based integrity verification includes AH-based integrity verification and ESP-based integrity verification.
  • AH-based integrity verification may also be referred to as AH verification.
  • AH-based integrity verification Sexual verification can also be referred to as ESP verification.
  • the first verification information is the first AH verification information, where the first AH verification information may be the first report using the AH verification algorithm.
  • the target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the AH verification algorithm to verify the integrity of the application information.
  • the target field in the first message is calculated to obtain the second AH verification information; and the first AH verification information and the second AH verification information are matched and verified.
  • the first verification information is first ESP verification information
  • the first ESP verification information may be the first report using an ESP verification algorithm.
  • the target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the ESP verification algorithm to verify the integrity of the application information.
  • the target field in the first message is calculated to obtain second ESP verification information; and the first ESP verification information and the second ESP verification information are matched and verified.
  • the first communication device is a network device.
  • the network device checks the integrity of the application information to determine whether the application information has been stolen, thereby ensuring that the network resources corresponding to the application information are not stolen.
  • the first communication device includes: access to ACC equipment, or, customer premises CPE equipment, or, home gateway RG, or, data center server access to leaf equipment, or, data center egress gateway DC GW, or autonomous system border router ASBR, or base station, or user plane function UPF device, or broadband network gateway BNG, or operator edge PE device.
  • the first communication device after the first communication device verifies the integrity of the application information, if the application information passes the verification, it means that the application information in the first message is legal, so the first communication device can forward the first communication device.
  • the first communication device may determine the corresponding network resource according to the application information, and use the determined network resource to forward the first packet.
  • the first communication device verifies the integrity of the application information, if the application information fails the verification, it means that the application information in the first message is illegal, so the first communication device can discard it. The first message. In this way, the network resources corresponding to the application information are prevented from being misappropriated.
  • an embodiment of the present application provides a method for processing a message, and the method may be executed by a second communication device.
  • the second communication device may generate a first message, where in addition to the application information, the first message also includes first verification information for verifying the integrity of the application information.
  • the first message can be sent to the first communication device, so that the first communication device can perform integrity verification on the application information based on the first verification information. In this way, after receiving the first message, the first communication device can verify the integrity of the application information based on the first verification information.
  • the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first verification information is obtained according to a target field in the first message, and the target field includes the application information.
  • the second communication device may obtain the target field, and then obtain the first verification information according to the target field. Further, the second communication device encapsulates the first verification information into the first message to obtain the application information and The first message of the first verification information.
  • the first verification information is obtained by calculating a target field in the first message using a first verification method, and the target field includes the application information.
  • the second communication device may obtain the target field, and then use the first verification method to calculate the target field in the first message to obtain the first verification information. Further, the second communication device verifies the first verification information. The information is encapsulated in the first message, thereby obtaining the first message including the application information and the first verification information.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by using a first private key to sign the target field.
  • the first verification information is an encrypted digest in a digital certificate
  • the digital certificate further includes the application information.
  • the first verification information is control management Sent by the device to the second communication device.
  • the second communication device may send the application information to the control and management device, and the control and management device calculates the application information to obtain the first verification information. Further, the control and management device converts the calculated first verification information Sent to the second communication device.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification information is verification information of the first authentication header AH.
  • the first AH authentication information may be obtained by the second communication device using the AH check algorithm to calculate the target field in the first message.
  • the first verification information is the first encapsulated security load ESP verification information.
  • the first ESP authentication information may be obtained by the second communication device using the ESP check algorithm to calculate the target field in the first message.
  • the second communication device is a server or user equipment.
  • the user equipment includes: an IoT device or a terminal device.
  • the application information and the first verification information may be carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the application information is carried in an IPv6 extension header.
  • the application information is carried in the destination address.
  • the application information is carried in the source address.
  • the first verification information is carried in an IPv6 extension header.
  • the first verification information is carried in the destination address.
  • the first verification information is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the application information is carried in a label value field.
  • the application information is carried in the extended type length value TLV field.
  • the first verification information is carried in a label value field.
  • the first verification information is carried in an extended TLV field.
  • the first message when the first message is an SRv6 message, the first message is an Internet Protocol version 6 routing SRv6 message.
  • the application information is carried in the segment routing header SRH.
  • the first verification information is carried in the SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the application information is carried in an option field.
  • the first verification information is carried in the option field.
  • the first message is a general routing encapsulation GRE message.
  • the application information is carried in the key field.
  • the first verification information is carried in the key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the application information is carried in a virtual network identifier field.
  • the application information is carried in a reserved field.
  • the first verification information is carried in a virtual network identifier field.
  • the first verification information is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the application information is carried in the flow identification field.
  • the application information is carried in a virtual network identification field.
  • the application information is carried in a reserved field.
  • the first message when the first message is an NVGRE message, it is characterized in that the first verification information is carried in a flow identification field.
  • the first verification information is carried in a virtual network identification field.
  • the first verification information is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the application information is carried in a reserved field.
  • the application information is carried in a variable length option field.
  • the first verification information is carried in a reserved field.
  • the first verification information is carried in a variable length option field.
  • an embodiment of the present application provides a method for verifying application information, and the method may be executed by a first communication device.
  • the first communication device may obtain a first message, where the first message includes a digital certificate, and the digital certificate includes application information and first verification information used to verify the integrity of the application information. Because the digital certificate includes application information and first verification information. If the digital certificate is legal, it means that the first verification information is legal, and correspondingly, the application information has passed the integrity verification. Therefore, after the first communication device receives the first message, the digital certificate can be verified for legality. To achieve the purpose of verifying the integrity of the application information.
  • the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first message further includes second verification information
  • the second verification information is used to verify the integrity of the application information
  • the method further includes: using the second The verification information verifies the integrity of the application information. It can be seen that the first message includes multiple verification information used to verify the integrity of the application information, so that multiple verifications of the application information can be implemented, and network resources corresponding to the application information can be better prevented from being misappropriated.
  • the first verification information is an encrypted digest in the digital certificate.
  • the specific implementation manner in which the first communication device uses the second verification information to verify the integrity of the application information is compared with the first communication device described in the first aspect above using the first verification information.
  • the method of applying information for integrity verification is similar.
  • the first communication device may obtain third verification information according to the target field in the first message, where the target field includes the application information; 2. The verification information is matched and verified.
  • using the second verification information to verify the integrity of the application information includes: verifying the integrity of the application information based on a digital signature algorithm and the second verification information.
  • the second verification information is a digital signature obtained by signing a target field in the first message using a first private key and a first hash calculation
  • the digital signature algorithm is based on
  • the verification of the integrity of the application information with the second verification information includes: decrypting the digital signature with a first public key to obtain a first plaintext; performing a second hash calculation on the target field, A second plaintext is obtained, and the first hash calculation and the second hash calculation adopt the same hash algorithm; and the first plaintext and the second plaintext are matched and verified.
  • the first public key is carried in the digital certificate.
  • digital certificates can be used to achieve double verification of application information. One is to verify the digital certificate to verify the integrity of the application information included in the digital certificate, and the other is to use the public key carried in the digital certificate to verify the integrity of the application information using a digital signature algorithm.
  • the decryption algorithm for decrypting the digital signature is carried in the digital certificate, and/or, the hash algorithm is carried in the digital certificate.
  • an embodiment of the present application provides a message processing method, which is executed by a second communication device, and the method includes: the second communication device obtains a first message, the first message includes a digital certificate, and the digital The certificate includes application information and first verification information, and the first verification information is used to verify the integrity of the application information. After obtaining the first message, the second communication device sends the first message to the first communication device. Because the digital certificate includes application information and first verification information. If the digital certificate is legal, it means that the first verification information is legal, and correspondingly, the application information has passed the integrity verification. Therefore, after the first communication device receives the first message, the digital certificate can be verified for legality. To achieve the purpose of verifying the integrity of the application information.
  • the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first verification information is an encrypted digest in the digital certificate.
  • the first message further includes second verification information, and the second verification information is used to perform integrity verification on the application information.
  • the second verification information is obtained according to a target field in the first message, and the target field includes the application information.
  • the second verification information is obtained by calculating a target field in the first message using a first verification method, and the target field includes the application information.
  • the first verification method is digital signature verification.
  • the second verification information is a digital signature obtained by signing the target field with a first private key.
  • the first public key corresponding to the first private key is carried in the digital certificate, and the first public key is used to verify the second verification information.
  • the decryption algorithm for decrypting the digital signature is carried in the digital certificate, and/or the hash algorithm for verifying the second verification information is carried in the digital certificate.
  • the digital certificate is carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the digital certificate is carried in an IPv6 extension header.
  • the digital certificate is carried in the destination address.
  • the digital certificate is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the digital certificate is carried in a label value field.
  • the digital certificate is carried in the extended type length value TLV field.
  • the first message is an Internet Protocol version 6 routing SRv6 message.
  • the digital certificate is carried in the segment routing header SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the digital certificate is carried in an option field.
  • the first message is a general routing encapsulation GRE message.
  • the digital certificate is carried in the key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the digital certificate is carried in the virtual network identifier field.
  • the digital certificate is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the digital certificate is carried in the flow identification field.
  • the digital certificate is carried in a virtual network identification field.
  • the digital certificate is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the digital certificate is carried in a reserved field.
  • the digital certificate is carried in a variable length option field.
  • the embodiments of the present application provide a method for processing application information.
  • the method can be executed by a control management device.
  • the control management device can obtain application information, and obtain first verification information based on the application information. Used to verify the integrity of application information.
  • the second communication device After receiving the first verification information, the second communication device may perform a corresponding operation according to the first verification information, for example, generate a first message including the application information and the first verification information, and send the first message to the first verification information.
  • a communication device so that the first communication device can verify the integrity of the application information.
  • the control and management device can obtain the first verification information for verifying the integrity of the application information, and send the first verification information to the network device that forwards the message carrying the application information. , So that the network device that forwards the message carrying the application information can verify the integrity of the application information. It can be seen that, by using the solution of the embodiment of the present application, the network device that forwards the message carrying the application information can verify the integrity of the application information based on the first verification information, thereby avoiding improper use of the application information, and correspondingly avoiding The improper use of application information leads to the improper use of network resources.
  • the obtaining the first verification information according to the application information includes: calculating the application information based on a first verification method to obtain the first verification information.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information when the first verification method is HMAC verification, the first verification information includes first HMAC verification information.
  • the first HMAC check information may be obtained by the control and management device using the HMAC algorithm to calculate the application information.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the application information using a first private key and a first hash calculation.
  • the obtaining the first verification information according to the application information includes: obtaining a digital certificate according to the application information, the digital certificate including the first verification information.
  • the first verification information is an encrypted digest in the digital certificate.
  • the control and management device when the first verification information is carried in the digital certificate, the control and management device sends the first verification information to the second communication device.
  • the digital certificate Sent to the second communication device.
  • the method further includes: obtaining second verification information according to the application information, the second verification information being used to verify the integrity of the application information; and combining the second verification information Sent to the second communication device.
  • the control and management device can generate multiple verification information used to verify the integrity of the application information, thereby realizing multiple verification of the application information, and more effectively avoiding the misappropriation of network resources corresponding to the application information.
  • the obtaining the second verification information according to the application information includes: calculating the application information based on a second verification method to obtain the second verification information.
  • the second verification method is HMAC verification.
  • the second verification information includes second HMAC verification information.
  • the second verification method is digital signature verification.
  • the second verification information is a digital signature obtained by signing the application information using a second private key and a second hash calculation.
  • the first verification method and the second verification method are different verification methods.
  • the first verification method is HMAC verification
  • the second verification method is digital signature verification
  • the first verification method is digital signature verification
  • the second verification method is HMAC verification.
  • an embodiment of the present application provides a method for verifying application information, and the method may be executed by a first communication device.
  • the first communication device may obtain application information and at least one piece of verification information, where the at least one piece of verification information is used to perform integrity verification on the application information.
  • the first communication device may perform integrity verification on the application information based on the at least one verification information. It can be seen that by using the solution of the embodiment of the present application, the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first communication device when it obtains the application information and the at least one piece of verification information in a specific implementation, for example, it may receive a first message from another device, and the first message includes the application information and the At least one verification message.
  • the first message may carry one or more verification information used to verify the integrity of the application information.
  • the first message may include the first verification information.
  • the first communication device verifies the integrity of the application information based on the first verification information.
  • the target field is used to obtain third verification information, where the first target field includes the application information.
  • the first communication device After obtaining the third verification information, the first communication device performs matching verification on the third verification information and the first verification information.
  • performing matching verification on the third verification information and the first verification information may be comparing the third verification information and the first verification information, if the two are the same, the matching verification is passed, and if the two are not If they are the same, the matching check fails. In this way, the integrity verification of the application information can be achieved.
  • the first communication device verifies the integrity of the application information based on the first verification information.
  • the first communication device may, for example, be based on the first verification method and the first verification method.
  • the verification information verifies the integrity of the application information.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information included in the first message may be the first HMAC verification information.
  • the first HMAC check information may be obtained by performing HMAC calculation on the first target field in the first packet.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can verify the first verification information. Perform HMAC calculation on the first target field in the message to obtain the second HMAC check information; then perform matching verification on the first HMAC check information and the second HMAC check information to achieve the integrity of the application information verify.
  • the first verification method is digital signature verification.
  • the first verification method is digital signature authentication
  • the first verification information is the first private key and the first hash calculation to the first message in the first message.
  • the digital signature obtained by signing the target field.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the first public key pair
  • the digital signature is decrypted to obtain a first plaintext
  • a second hash calculation is performed on the first target field to obtain a second plaintext.
  • the first hash calculation and the second hash calculation use the same Hash algorithm; then, the first communication device performs matching verification on the first plaintext and the second plaintext.
  • the first message further includes a digital certificate
  • the digital certificate includes the first public key.
  • the digital certificate may be the digital certificate of the sending device of the first message, and the digital certificate may be considered as the identity certificate of the sending device of the first message.
  • the legality of the first public key can be guaranteed.
  • the digital certificate further includes a decryption algorithm for decrypting the digital signature, and/or the hash algorithm.
  • the decryption algorithm for decrypting the digital signature is carried in the digital signature, the legality of the decryption algorithm can be guaranteed; when the hash algorithm is carried in the digital signature, the legality of the hash algorithm can be guaranteed.
  • the method further includes: verifying the legality of the digital certificate. It is understandable that the verification of the digital certificate and the legitimacy can verify the legitimacy of the sending device of the first message. Correspondingly, if the digital certificate also carries other information, for example, the aforementioned first public key, or, for example, the decryption algorithm for decrypting the digital signature, and/or the hash algorithm can also verify the digital The legality of other information carried in the certificate.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • IPSEC-based integrity verification includes AH check and ESP check.
  • the first verification information is the first AH verification information, where the first AH verification information may be the first report using the AH verification algorithm.
  • the first target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the AH verification algorithm to verify the integrity of the application information.
  • the first target field in the first message is calculated to obtain the second AH verification information; and the first AH verification information and the second AH verification information are matched and verified.
  • the first verification information is first ESP verification information
  • the first ESP verification information may be the first report using an ESP verification algorithm.
  • the first target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the first verification method and the first verification information.
  • the first communication device can use the ESP verification algorithm to verify the integrity of the application information. Performing calculation on the first target field in the first message to obtain second ESP verification information; and performing matching verification on the first ESP verification information and the second ESP verification information.
  • the first message includes a digital certificate
  • the application information and the at least one piece of verification information are carried in the digital certificate.
  • the first communication device may verify the legality of the digital certificate, so as to realize the integrity verification of the application information.
  • the verification information carried in the first message may include second verification information in addition to the first verification information.
  • the first communication device in addition to verifying the application information based on the first verification information, can also verify the application information based on the second verification information, so as to implement multiple verifications of the application information.
  • the first communication device verifies the integrity of the application information based on the second verification information.
  • the target field is used to obtain fourth verification information, where the second target field includes the application information. After obtaining the fourth verification information, the first communication device performs matching verification on the second verification information and the fourth verification information.
  • the first communication device verifies the integrity of the application information based on the second verification information.
  • the first communication device may, for example, be based on the second verification method and the second verification method.
  • the verification information verifies the integrity of the application information.
  • the second verification method is a key-related hash operation message authentication code HMAC verification.
  • the second verification information included in the first message may be third HMAC verification information.
  • the third HMAC check information may be obtained by performing HMAC calculation on the second target field in the first packet.
  • the first communication device verifies the integrity of the application information based on the second verification method and the second verification information.
  • the first communication device can verify the first Perform HMAC calculation on the second target field in the message to obtain fourth HMAC check information; then perform matching verification on the third HMAC check information and the fourth HMAC check information to achieve the integrity of the application information verify.
  • the second verification method is digital signature verification.
  • the second verification method is digital signature verification
  • the second verification information is the second private key and the third hash calculation for the second verification in the first message.
  • the digital signature obtained by signing the target field.
  • the first communication device verifies the integrity of the application information based on the first verification method and the second verification information.
  • the first communication device can use the second public key pair
  • the digital signature is decrypted to obtain a third plaintext; a fourth hash calculation is performed on the target field to obtain a fourth plaintext, and the third hash calculation and the fourth hash calculation use the same hash Algorithm; and then, the first communication device performs matching verification on the third plaintext and the fourth plaintext.
  • the second public key can also be carried in the digital certificate to ensure the legitimacy of the second public key.
  • the digital certificate can be carried in the first message.
  • the decryption algorithm for decrypting the second verification information, and/or the hash algorithm used in the third hash calculation and the fourth hash calculation may also be carried in the digital certificate.
  • the second verification method is integrity verification based on Internet Protocol Security IPSEC.
  • IPSEC-based integrity verification includes AH check and ESP check.
  • the second verification information is the third AH verification information, where the third AH verification information may be the first report using the AH verification algorithm.
  • the second target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the second verification method and the second verification information.
  • the first communication device can use the AH verification algorithm to verify the integrity of the application information.
  • the second target field in the first message is calculated to obtain fourth AH verification information; and the third AH verification information and the fourth AH verification information are matched and verified.
  • the second verification information is third ESP verification information
  • the third ESP verification information may be the first report using an ESP verification algorithm.
  • the second target field in the text is calculated.
  • the first communication device verifies the integrity of the application information based on the second verification method and the second verification information.
  • the first communication device can use the ESP verification algorithm to verify the integrity of the application information.
  • the second target field in the first message is calculated to obtain fourth ESP verification information; and the third ESP verification information and the fourth ESP verification information are matched and verified.
  • the first communication device is a network device.
  • the network device checks the integrity of the application information to determine whether the application information has been stolen, thereby ensuring that the network resources corresponding to the application information are not stolen.
  • the first communication device includes: access to ACC equipment, or, customer premises CPE equipment, or, home gateway RG, or, data center server access to leaf equipment, or, data center egress gateway DC GW, or autonomous system border router ASBR, or broadband network gateway BNG, or operator edge PE equipment.
  • the first communication device after the first communication device verifies the integrity of the application information, if the application information passes the verification, it means that the application information in the first message is legal, so the first communication device can forward the first communication device.
  • the first communication device may determine the corresponding network resource according to the application information, and use the determined network resource to forward the first packet.
  • the first communication device verifies the integrity of the application information, if the application information fails the verification, it means that the application information in the first message is illegal, so the first communication device can discard it. The first message. This prevents the network resources corresponding to the application information from being misappropriated.
  • the embodiments of the present application provide a method for processing application information, which may be executed by a second communication device, and the second communication device may obtain application information and at least one piece of verification information, and the at least one piece of verification information is used for Perform integrity verification on the application information.
  • the second communication device may send the application information and the at least one verification information to the first communication device, so that the first communication device can complete the application information based on the at least one verification information. To verify.
  • the first communication device can verify the integrity of the application information, thereby avoiding improper use of the application information, and correspondingly avoiding the improper use of network resources due to the improper use of the application information The problem.
  • the first communication device may obtain a first message including application information and at least one piece of verification information, and send the first message to the first communication device to combine the application information with at least one piece of verification information.
  • a verification message is sent to the first communication device.
  • the first communication device may use the application information and at least one piece of verification information to encapsulate the service message to obtain the first message.
  • the first message may carry one or more verification information used to verify the integrity of the application information.
  • the first message may include the first verification information.
  • the first verification information is obtained according to a first target field in the first message, and the first target field includes the application information.
  • the second communication device may obtain the first target field, and then obtain the first verification information according to the first target field. Further, the second communication device encapsulates the first verification information into the first message to obtain A first message including application information and first verification information.
  • the first verification information is obtained by calculating a first target field in the first message using a first verification method, and the first target field includes the application information .
  • the second communication device may obtain the first target field, and then use the first verification method to calculate the first target field in the first message to obtain the first verification information. Further, the second communication device The first verification information is encapsulated into the first message, so as to obtain the first message including the application information and the first verification information.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the first target field with a first private key.
  • the first verification information is an encrypted digest in a digital certificate
  • the digital certificate further includes the application information.
  • the first verification information is control management Sent by the device to the second communication device.
  • the second communication device may send the application information to the control and management device, and the control and management device calculates the application information to obtain the first verification information. Further, the control and management device converts the calculated first verification information Sent to the second communication device.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification information is verification information of the first authentication header AH.
  • the first AH authentication information may be obtained by the second communication device using the AH check algorithm to calculate the first target field in the first message.
  • the first verification information is the first encapsulated security load ESP verification information.
  • the first ESP authentication information may be obtained by the second communication device using an ESP check algorithm to calculate the first target field in the first message.
  • the verification information carried in the first message may include second verification information in addition to the first verification information.
  • the first communication device may not only verify the application information based on the first verification information, but also verify the application information based on the second verification information, so as to achieve Multiple verification of application information.
  • the second verification information is obtained according to a second target field in the first message, and the second target field includes the application information.
  • the second communication device may obtain the second target field, and then obtain the second verification information according to the second target field. Further, the second communication device encapsulates the second verification information into the first message to obtain A first message including application information and second verification information.
  • the second verification information is obtained by calculating a second target field in the first message using a second verification method, and the second target field includes the application information .
  • the second communication device may obtain the second target field, and then use the second verification method to calculate the second target field in the first message to obtain the second verification information. Further, the second communication device The second verification information is encapsulated into the first message, thereby obtaining the first message including the application information and the second verification information.
  • the second verification method is a key-related hash operation message authentication code HMAC verification.
  • the second verification information includes third HMAC verification information.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the second target field with a second private key.
  • the second verification information is an encrypted digest in a digital certificate
  • the digital certificate further includes the application information.
  • the second verification information is control management Sent by the device to the second communication device.
  • the second communication device may send the application information to the control and management device, and the control and management device calculates the application information to obtain the second verification information. Further, the control and management device converts the calculated second verification information Sent to the second communication device.
  • the second verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the second verification information is verification information of the third authentication header AH.
  • the third AH authentication information may be obtained by the second communication device using the AH check algorithm to calculate the second target field in the first message.
  • the second verification information is third encapsulated security load ESP verification information.
  • the third ESP authentication information may be obtained by the second communication device using the ESP check algorithm to calculate the second target field in the first message.
  • the first verification method and the second verification method are different verification algorithms.
  • the second verification method may be one of digital signature verification, AH verification and ESP verification; for another example, the first verification method is digital signature verification, Then the second verification method may be one of HMAC verification, AH verification and ESP verification; for another example, if the first verification method is AH verification, the second verification method may be HMAC verification, One of digital signature verification and ESP verification; for example, if the first verification method is ESP verification, the second verification method can be one of HMAC verification, digital signature verification and AH verification .
  • the application information and the at least one verification information are carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the application information is carried in an IPv6 extension header.
  • the application information is carried in the destination address.
  • the application information is carried in the source address.
  • the at least one piece of verification information is carried in an IPv6 extension header.
  • the at least one piece of verification information is carried in the destination address.
  • the at least one piece of verification information is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the application information is carried in a label value field.
  • the application information is carried in the extended type length value TLV field.
  • the at least one piece of verification information is carried in a label value field.
  • the at least one piece of verification information is carried in an extended TLV field.
  • the first message is an Internet Protocol version 6 routing SRv6 message.
  • the application information is carried in the segment routing header SRH.
  • the at least one piece of verification information is carried in the SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the application information is carried in an option field.
  • the at least one piece of verification information is carried in the option field.
  • the first message is a general routing encapsulation GRE message.
  • the application information is carried in the key field.
  • the at least one piece of verification information is carried in the key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the application information is carried in a virtual network identifier field.
  • the application information is carried in a reserved field.
  • the at least one piece of verification information is carried in a virtual network identifier field.
  • the at least one piece of verification information is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the application information is carried in the flow identification field.
  • the application information is carried in a virtual network identification field.
  • the application information is carried in a reserved field.
  • the at least one piece of verification information is carried in a flow identification field.
  • the at least one piece of verification information is carried in a virtual network identification field.
  • the at least one piece of verification information is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the application information is carried in a reserved field.
  • the application information is carried in a variable length option field.
  • the at least one piece of verification information is carried in a reserved field.
  • the at least one piece of verification information is carried in a variable length option field.
  • an embodiment of the present application provides a first communication device, including: a communication interface; and a processor connected to the communication interface; according to the communication interface and the processor, the first communication device It is used to execute the method according to any one of the foregoing first aspect and the first aspect; or, the first communication device is used to execute the method according to any one of the foregoing third aspect and the third aspect; or, the The first communication device is configured to execute the method described in any one of the foregoing sixth aspect and the sixth aspect.
  • an embodiment of the present application provides a second communication device, including: a communication interface; and a processor connected to the communication interface; according to the communication interface and the processor, the second communication device It is used to execute the method according to any one of the foregoing second aspect and the second aspect; or, the second communication device is used to execute the method according to any one of the foregoing fourth aspect and the fourth aspect; or, the The second communication device is configured to execute the method according to any one of the seventh aspect and the seventh aspect.
  • an embodiment of the present application provides a control management device, including: a communication interface; and a processor connected to the communication interface; according to the communication interface and the processor, the control management device is configured to Perform the aforementioned fifth aspect and the method described in any one of the fifth aspect.
  • an embodiment of the present application provides a first communication device.
  • the first communication device includes a memory and a processor; the memory is used to store program codes; and the processor is used to run the The instructions in the program code cause the first communication device to execute any one of the foregoing first aspect and the method of the first aspect; or, cause the first communication device to execute any one of the foregoing third aspect and the third aspect The method described in item 1; or, the first communication device is caused to execute the method described in any one of the foregoing sixth aspect and the sixth aspect.
  • an embodiment of the present application provides a second communication device.
  • the second communication device includes a memory and a processor; the memory is used to store program code; and the processor is used to run the The instructions in the program code cause the second communication device to execute any one of the foregoing second aspect and the method described in the second aspect; or, cause the second communication device to execute any one of the foregoing fourth aspect and the fourth aspect The method described in item 1; or, the second communication device is caused to execute the method described in any one of the foregoing seventh aspect and the seventh aspect.
  • an embodiment of the present application provides a control management device, the control management device includes a memory and a processor; the memory is used to store program code; the processor is used to run the program code The instructions in the control management device enable the control and management device to execute the method described in any one of the foregoing fifth aspect and the fifth aspect.
  • embodiments of the present application provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer, causes the computer to execute the first aspect and the first aspect above.
  • the method described in any one of the aspects, or the computer is caused to execute the method described in the second aspect and the second aspect, or the computer is caused to execute any one of the third aspect and the third aspect.
  • the method described in item 1, or the computer is caused to execute the method described in any one of the above fourth aspect and the fourth aspect, or the computer is caused to execute the method described in any one of the above fifth aspect and the fifth aspect
  • the method, or the computer is caused to execute the method according to any one of the above sixth aspect and the sixth aspect, or the computer is caused to execute the method according to any one of the above seventh aspect and the seventh aspect.
  • an embodiment of the present application provides a communication system, which is characterized by including the first communication device described in the eighth aspect or the eleventh method above and the ninth or twelfth aspect described above.
  • the second communication device is characterized by including the first communication device described in the eighth aspect or the eleventh method above and the ninth or twelfth aspect described above.
  • an embodiment of the present application provides a communication system, which is characterized by including the second communication device described in the ninth aspect or the twelfth aspect, and the tenth aspect or the thirteenth aspect described above.
  • the described control and management equipment is included in the communication system.
  • FIG. 1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the application
  • Figure 2 is a schematic diagram of another exemplary network scenario provided by an embodiment of the application.
  • Figure 3 is a signaling interaction diagram of a method for verifying application information provided by an embodiment of the application
  • FIG. 4a is a structural diagram of a message 1 provided by an embodiment of the application.
  • FIG. 4b is a structural diagram of a message 1 provided by an embodiment of the application.
  • FIG. 4c is a structural diagram of a message 1 provided by an embodiment of the application.
  • FIG. 4d is a structural diagram of a message 1 provided by an embodiment of this application.
  • Figure 5 is a signaling interaction diagram of a method for verifying application information provided by an embodiment of the application
  • FIG. 6 is a schematic flowchart of a method for verifying application information provided by an embodiment of this application.
  • FIG. 7 is a schematic flowchart of a message processing method provided by an embodiment of the application.
  • FIG. 8 is a schematic flowchart of a method for verifying application information provided by an embodiment of this application.
  • FIG. 9 is a schematic flowchart of a message processing method provided by an embodiment of this application.
  • FIG. 10 is a schematic flowchart of a method for processing application information according to an embodiment of this application.
  • FIG. 11 is a schematic flowchart of a method for verifying application information provided by an embodiment of this application.
  • FIG. 12 is a schematic flowchart of a message processing method provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • FIG. 15 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • the embodiment of the present application provides a method for verifying application information, which can avoid the problem of improper use of network resources due to improper use of application information.
  • the application (APP) mentioned in this application can also be referred to as an application (application program) or application software (application software), which is software that provides functions required for a service, including the completion of one or more items.
  • a computer program for a specific job usually requires interaction with the user.
  • Each application can belong to multiple services and can run on one or more servers or on user devices.
  • the application program may be, for example, an APP related to games, videos, emails, instant messaging, traffic information, weather forecasts, etc.
  • the application is usually installed on the terminal device.
  • FIG. 1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the application.
  • the user equipment 101 with an application can send a service message A to the server 102 of the APP through the network 100, and the service message A may include the APP's Application information.
  • the network 100 includes at least a device 103 and a device 104.
  • the device 103 that receives the service message A can allocate corresponding network resources to the service message A according to the application information carried in the service message A, so as to facilitate the use of the network resources
  • the service message A is forwarded to the server 102.
  • the service message A is forwarded to the server 102 using a high-bandwidth link.
  • the server 102 may also send a service message B to the user equipment 101 through the network 100.
  • the service message B may also carry application information of the APP.
  • the device 104 that receives the service message B may allocate network resources for the service message B according to the application information carried in the service message B, so as to use the network resources to forward the service message B to the user equipment 101.
  • the device 103 and the device 104 mentioned here may be edge devices of the network 100.
  • the application scenario shown in Figure 1 can be used in network scenarios such as government-enterprise private lines, home bandwidth, and mobile networks.
  • the user device 101 may be an Internet of Things (IoT) device or a terminal device.
  • the terminal device mentioned here may be a mobile phone, a personal computer (PC), such as a tablet (personal computer, Tablet PC), a notebook computer, an ultra-mobile personal computer, a personal digital assistant, etc.
  • PC personal computer
  • Tablet PC a notebook computer
  • ultra-mobile personal computer a personal digital assistant
  • the embodiment of this application does not Make specific restrictions.
  • the device 103 can be a customer premise equipment (CPE) or an access (ACC) device of an access network; the device 104 can be a data center exit Gateway (Data Center Gateway, DC GW), or data center server access device leaf, or autonomous system boundary router (ASBR).
  • CPE customer premise equipment
  • ACC access
  • ASBR autonomous system boundary router
  • the device 103 may be a residential gateway (RG) or an ACC device of an access network; the device 104 may be a DC GW, or a data center server access device leaf, Or ASBR.
  • RG residential gateway
  • ASBR data center server access device leaf
  • the device 103 may be a mobile network base station, or a user plane function (UPF) device of the core network, or an ACC device of the access network; the device 104 may be a DC GW, or data center server access device leaf, or ASBR.
  • UPF user plane function
  • the network 100 may include an access network, an aggregation network, and a data center network.
  • FIG. 2 is a schematic diagram of another exemplary network scenario provided by an embodiment of the application.
  • the network scenario shown in Figure 2 can be applied to home bandwidth or government-enterprise dedicated lines.
  • the network scenario corresponding to the mobile network will not be described in detail here.
  • the user equipment 101 with the APP installed can generate a service message A including application information, and pass through the equipment 105, the access device ACC 106 of the access network, and the aggregation of the convergence network in turn.
  • AGG The device 107, ASBR 108, DC GW 109, data center server access device spine 110, and data center server access device leaf 111 arrive at the application server 102.
  • the device 105 may be an RG
  • the device 105 may be a CPE.
  • the network device 103 can provide the service message A with corresponding service quality according to the application information carried in the service message A
  • the network device 104 can provide the service message B according to the application information carried in the service message B. Provide corresponding service quality. Therefore, if the application information is used improperly, for example, it is stolen, it may cause improper use of network resources.
  • Example 1 The paid APP in the device 101 uses application information AAAA, and the application information AAAA corresponds to network resources with high bandwidth and low latency.
  • the free APP in the device 101 embezzled the application information AAAA, thereby embezzling high-bandwidth and low-latency network resources.
  • Example 2 The APP in the device 101 logs in to the paid user account 1, and is authorized to use the application information AAAA. Other devices installed the cracked version of the APP and logged in to the free user account B. The cracked version of the APP embezzled the application information AAAA, thereby embezzling the network resources of the paying user account 1.
  • Example 3 The paid APP in the device 101 uses the application information AAAA, and the free APP in other devices embezzled the application information AAAA, thereby embezzling the network resources of the paid APP.
  • Example 4 The APP in the device 101 logs in to the paid user account and is authorized to use the application information AAAA. The same APP in other devices has logged in to the free user account and is authorized to use the application information BBBB. The free user account tampered with the application information BBBB to AAAA in order to steal the network resources of the paid user account.
  • the embodiments of the present application provide a method for verifying application information, which can avoid improper use of network resources due to improper use of application information.
  • the method of verifying application information is introduced in conjunction with the drawings.
  • object + serial number such as hash algorithm n, public key n, private key n, etc.
  • object is not used to limit a specific order or sequence.
  • object its content is not directly related to its serial number.
  • Objects with different serial numbers may have the same or different content, which is not specifically limited in the embodiment of the present application.
  • hash algorithm 1 and hash algorithm 2 may be the same algorithm or different algorithms.
  • the communication devices mentioned in the embodiments of this application can be network equipment such as switches and routers, or part of the components on the network equipment, for example, a single board on the network equipment, a line card, or A functional module on a network device.
  • the communication device may also be a user equipment or a server, or a part of the component on the user equipment or the server.
  • the embodiments of this application do not make specific limitations.
  • FIG. 3 is a signaling interaction diagram of a method for verifying application information provided by an embodiment of the application.
  • the method 100 for verifying application information shown in FIG. 3 may be executed by the communication device 1 and the communication device 2.
  • the communication device 1 when the communication device 1 is applied to the user equipment 101, the communication device 2 is applied to the device 103, and the communication device 3 is applied to the server 102; when the communication device 1 is applied to the server 102, the communication device 2 is applied to the device 104, and the communication device 3Applies to users and devices 101.
  • the method 100 can be implemented by, for example, the following S101-S105a or S101-S105b.
  • the communication device 1 generates a message 1, and the message 1 includes application information 1 and verification information 1.
  • application information refers to application information corresponding to the APP installed on the communication device 1.
  • the application information may include one or more of service-level agreement (SLA) levels, application identification, user identification, flow identification (English: flow ID), and reserved parameters .
  • SLA service-level agreement
  • the application identifier is used to identify the application, and the user identifier is used to identify a user who uses the application.
  • the user identifier may be, for example, the identifier of an account logging in to the application; the flow identifier is used to identify a business message corresponding to the application.
  • the verification information 1 is used to verify the integrity of the application information 1.
  • Performing integrity verification on the application information 1 includes verifying whether the application information 1 is lost, erroneously coded, tampered with, or forged.
  • the communication device 1 can obtain the application information 1, and obtain the verification information 1 according to the application information 1. After the communication device 1 obtains the application information 1 and the verification information 1, it can encapsulate the service message of the APP 1, and add the application information 1 and the verification information 1 to the service message, thereby obtaining the message 1.
  • the verification information 1 may be obtained by the communication device 1 according to the fields in the message 1.
  • the verification information 1 may be obtained by the communication device 1 using the verification algorithm 1 to calculate the fields in the message 1.
  • the fields in the aforementioned message 1 include application information 1.
  • the verification algorithm 1 may be a hashed-based message authentication code (HMAC) verification related to a key.
  • HMAC hashed-based message authentication code
  • the communication device 1 can append the key 1 to the field 1 as the input of the hash algorithm 1, thereby obtaining the verification information 1.
  • appending key 1 to field 1 can be appending key 1 to the end of field 1, or adding key 1 to the head of field 1, or inserting key 1 in the middle of field 1. ,etc.
  • field 1 may only include application information 1.
  • field 1 may also include other fields in message 1.
  • the communication device 1 obtains the parameter 1 and the parameter 2, and the number of bits (English: bit) of the parameter 1 and the parameter 2 are the same, for example, the parameter 1 and the parameter 2 are both It is 64bits.
  • the communication device 1 supplements the head or tail of the key 2 with a value, such as 0, so that the number of bits of the key 2 after the supplemented value is the same as the parameter 1.
  • the communication device 1 calculates the key 2 and the parameter 1 after supplementing the value, for example, performs an exclusive OR calculation to obtain the key 2'. Then, the communication device 1 appends the key 2'to the field 1 as the input of the hash algorithm 2 to obtain HMAC1.
  • the communication device 1 calculates the key 2 and the parameter 2 after supplementing the value, for example, performs an exclusive OR calculation to obtain the key 2", and then the communication device 1 adds the key 2" to the HMAC 1 as the hash algorithm 2 Enter it to get HMAC 2, and HMAC 2 is verification information 1.
  • HMAC 1 is verification information 1.
  • the verification information 1 may also be calculated by the control and management device according to the application information 1.
  • the communication device 1 sends the application information 1 to the control and management device, and the control and management device uses the HMAC algorithm to calculate the application information 1 to obtain the verification information 1, and sends the verification information 1 to the communication device 1. In this way, the communication device 1 The verification information 1 is obtained.
  • the verification algorithm 1 may be digital signature verification.
  • the communication device 1 can use the hash algorithm 3 to perform a hash operation on the field 2 in the message 1 to obtain the hash digest 1. Then, the communication device 1 encrypts the hash digest 1 by using the private key 1 and the encryption algorithm 1 to obtain the digital signature 1, thereby obtaining the verification information 1.
  • the verification information 1 mentioned here is the digital signature 1.
  • field 2 may only include application information 1. In another example, in addition to the application information 1, the field 2 may also include other fields in the message 1.
  • the verification information 1 may also be calculated by the control and management device according to the application information 1.
  • the communication device 1 sends the application information 1 to the control and management device, and the control and management device uses the digital signature algorithm to calculate the application information 1 to obtain the verification information 1, and sends the verification information 1 to the communication device 1. In this way, the communication Device 1 has obtained verification information 1.
  • the message 1 may also include the digital certificate 1 of the communication device 1.
  • the digital certificate 1 includes a public key 1, and the public key 1 and the aforementioned private key 1 are a pair of asymmetric keys.
  • the public key 1 can be used to decrypt the digital signature 1.
  • the digital certificate 1 in addition to the public key 1, the digital certificate 1 also includes a hash algorithm 3 and a decryption algorithm 1.
  • the decryption algorithm 1 mentioned here corresponds to the aforementioned encryption algorithm 1, and is used for digital signatures. 1 Decrypt.
  • the digital certificate 1 of the communication device 1 may be sent to the communication device 1 by a certificate authority (CA) device.
  • the CA device mentioned here may be a control management device, or for example, a CA server.
  • the process by which the communication device 1 obtains the digital certificate 1 will now be briefly described.
  • the communication device 1 sends its own identity information and other information to the CA device, where the communication device 1's own identity information and other information constitute an untrusted digital certificate.
  • the CA device uses hash algorithm 4 to hash the untrusted digital certificate to obtain hash digest 2.
  • the CA device uses its own private key 2 to encrypt hash digest 2 to obtain encrypted digest 1.
  • the CA organization sends the identity information of the CA organization, the encrypted digest 1 and the untrusted digital certificate to the communication device 1.
  • the identity information of the CA organization, the encrypted digest 1 and the untrusted digital certificate constitute the communication device. 1, trusted digital certificate 1.
  • the other information sent by the aforementioned communication device 1 to the CA device may include one or more of the aforementioned public key 1, decryption algorithm 1, and hash algorithm 3.
  • the aforementioned identity information of the communication device 1 may include, for example, the device identification of the communication device 1, and for example, may include the aforementioned application information 1, which is not specifically limited in the embodiment of the present application.
  • the identity information of the communication device 1 when the identity information of the communication device 1 includes the application information 1, the application information 1 in the message 1 may be carried in the digital certificate 1, for example.
  • the verification algorithm 1 may be integrity verification based on Internet protocol security (IPSec).
  • IPSec Internet protocol security
  • the integrity verification based on IPSec may include the integrity verification based on the authentication header (AH) and the integrity verification based on the encapsulating security payload (ESP).
  • the encapsulation format of the message 1 may include two forms: a tunnel encapsulation format and a transmission encapsulation format.
  • the message 1 shown in Figure 4a the message encapsulation format adopted is the transmission mode, and the integrity verification algorithm adopted is AH
  • the message 1 shown in Figure 4b the message encapsulation format adopted is the tunnel mode
  • the integrity verification algorithm used is AH
  • the message 1 shown in Figure 4c the message encapsulation format adopted is the transmission mode
  • the integrity verification algorithm adopted is ESP
  • the message 1 shown in Figure 4d uses The packet encapsulation format is tunnel mode, and the integrity verification algorithm adopted is ESP.
  • communication device 1 can use AH verification algorithm 1 to calculate field 3 in message 1 so as to AH verification information 1 is obtained, that is, verification information 1 is obtained.
  • field 3 includes IP header, IP extension header, AH, Transmission Control Protocol (TCP) header, and data (English: data).
  • the application information 1 may be carried in an IP extension header, and the IP extension header mentioned here may be, for example, an IPv6 extension header.
  • the AH verification algorithm 1 mentioned here may be, for example, the HMAC message-digest algorithm MD5, or the HMAC secure hash algorithm (secure hash algorithm) SHA1.
  • the communication device 1 can use the AH verification algorithm 2 to calculate the field 4 in the message 1 so as to Obtain AH verification information 2, that is, obtain verification information 1.
  • field 4 includes the new IP header, AH, IP header, IP extension header, TCP header and data.
  • the application information 1 may be carried in an IP extension header, and the IP extension header mentioned here may be, for example, an IPv6 extension header.
  • the AH check algorithm 2 mentioned here can be, for example, HMAC MD5 or HMAC SHA1.
  • the message 1 can adopt the tunnel encapsulation mode.
  • the communication device 1 can use the ESP check algorithm 1 to calculate the field 5 in the message 1 so as to ESP verification information 1 is obtained, that is, verification information 1 is obtained.
  • field 5 includes ESP header, IP header, IP extension header, TCP header, data, and ESP tail (English: tail).
  • the application information 1 may be carried in an IP extension header, and the IP extension header mentioned here may be, for example, an IPv6 extension header.
  • the ESP verification algorithm 1 mentioned here may be, for example, HMAC MD5 or HMAC SHA1.
  • the message 1 mentioned here may be an Internet Protocol Version 6 (Internet Protocol Version 6, IPv6) message.
  • the aforementioned application information 1 may be carried in the extension header of the IPv6 message.
  • the extension header of an IPv6 message can be a hop-by-hop option (English: hop-by-hop option) extension header, and the extension header of an IPv6 message can also be a destination option (English: destination option) extension header.
  • the extension header may also be a routing (English: routing) extension header.
  • the application information 1 may also be carried in the source address field or the destination address field of the message 1. Considering that for an IPv6 message, its source address and destination address include 128 bits, and the 128 bits may include three fields of locator, function, and arguments.
  • the locator field is used to carry the network segment address and the subnet address; the function and arguments fields are both used to carry the behavior corresponding to the locator.
  • the application information 1 may be carried in the function field or the arguments field of the source address field. In some embodiments, the application information 1 may be carried in the function field or the arguments field of the destination address field.
  • the verification information 1 may be carried in the extension header of the IPv6 message. In other embodiments, the verification information 1 may be carried in the source address field or the destination address field of the IPv6 packet. It should be noted that, in the embodiment of the present application, the application information 1 and the verification information 1 may be carried in the same field of the IPv6 message, or may be carried in different fields, which is not specifically limited in the embodiment of the present application. For example, application information 1 and verification information 1 are both carried in the source address field, where application information 1 is carried in the function field of the source address, and verification information 1 is carried in the arguments field of the source address. For another example, the application information 1 is carried in the source address field, and the verification information 1 is carried in the destination address field.
  • the message 1 may be a multi-protocol label switching (Multi-Protocol Label Switching, MPLS) message.
  • MPLS Multi-Protocol Label Switching
  • the application information 1 may be carried in the header of the MPLS message, for example.
  • the application information 1 may be carried in the label stack in the message header, for example, in a certain label value field.
  • the application information 1 may be carried in an extended type length value (type length value, TLV) field of the MPLS packet.
  • the verification information 1 can also be carried in the header of the MPLS message.
  • the verification information 1 may be carried in the label stack in the message header, for example, in a certain label value field.
  • the verification information 1 may be carried in the extended TLV field of the MPLS packet.
  • the message 1 may be an Internet Protocol version 6 routing (Segment Routing Internet Protocol Version 6, SRv6) message.
  • the application information 1 may be carried in the header of the SRv6 message, for example.
  • the application information 1 may be carried in the segment routing header (segment routing header, SRH) of the SRv6 message.
  • the application information 1 may be carried in the source address field of the SRH; in other embodiments, the application information 1 may be carried in the destination address field of the SRH.
  • the application information 1 may also be carried in a segment identifier list (segment identifier list, SID list).
  • authentication information 1 can also be carried in the header of the SRv6 message.
  • the verification information 1 may be carried in the SRH of the SRv6 message.
  • the verification information 1 may be carried in the source address field of the SRH; in other embodiments, the verification information 1 may be carried in the destination address field of the SRH. In still other embodiments, the verification information 1 may also be carried in the SID list.
  • the message 1 may be an Internet Protocol Version 4 (IPv4) message.
  • IPv4 Internet Protocol Version 4
  • the application information 1 may be carried in an option (English: option) field of the IPv4 message, for example. Similar to application information 1, verification information 1 can also be carried in the option field of an IPv4 packet.
  • the message 1 may be a generic routing encapsulation (generic routing encapsulation, GRE) message.
  • GRE generic routing encapsulation
  • the application information 1 can be carried in the header of the GRE message.
  • the application information 1 may be carried in the keyword (English: key) field in the message header.
  • verification information 1 can also be carried in the key field of the GRE message.
  • the message 1 may be a virtual extensive local area network (VXLAN) message.
  • VXLAN virtual extensive local area network
  • the application information 1 can be carried in the header of the VXLAN message.
  • the application information 1 may be carried in a reserved field in the message header.
  • the application information 1 may be carried in a virtual network identifier (virtual network identifier, VNI) field in the message header.
  • VNI virtual network identifier
  • the VNI field can be divided into multiple parts, one part is used to carry the VNI, and the other part is used to carry the application information 1.
  • authentication information 1 can be carried in the header of the VXLAN message.
  • the verification information 1 may be carried in a reserved field in the message header.
  • the verification information 1 may be carried in the VNI field in the message header.
  • the VNI field can be divided into multiple parts, one part is used to carry the VNI, and the other part is used to carry the verification information 1.
  • the message 1 may be a network virtual generic routing encapsulation (NVGRE) message.
  • NVGRE network virtual generic routing encapsulation
  • application information 1 can be carried in the header of the NVGRE message.
  • the application information 1 may be carried in a reserved field in the message header.
  • the application information 1 may be carried in the VNI field in the message header.
  • the VNI field can be divided into multiple parts, one part is used to carry the VNI, and the other part is used to carry the application information 1.
  • the application information 1 may be carried in the flow ID field in the message header.
  • the flow ID field can be divided into multiple parts, one part is used to carry the flow ID, and the other part is used to carry the application information 1.
  • authentication information 1 can be carried in the header of the NVGRE message.
  • the verification information 1 may be carried in a reserved field in the message header.
  • the verification information 1 may be carried in the VNI field in the message header.
  • the VNI field can be divided into multiple parts, one part is used to carry the VNI, and the other part is used to carry the verification information 1.
  • the verification information 1 may be carried in the flow ID field in the message header.
  • the flow ID field can be divided into multiple parts, one part is used to carry the flow ID, and the other part is used to carry the verification information 1.
  • the message 1 may be a generic network virtualization encapsulation (Geneve) message.
  • Geneve generic network virtualization encapsulation
  • application information 1 can be carried in the header of the Geneve message.
  • the application information 1 may be carried in a reserved field in the message header.
  • the application information 1 may be carried in the variable length options (English: variable length options) field in the message header.
  • authentication information 1 can be carried in the header of the Geneve message.
  • the verification information 1 may be carried in a reserved field in the message header.
  • the verification information 1 may be carried in the variable length option field in the message header.
  • the communication device 2 performs integrity verification on the application information 1 based on the verification information 1.
  • the communication device 2 After the communication device 2 receives the message 1, since the message 1 carries the application information 1, the communication device 2 should determine the corresponding network resource for the message 1 according to the application information 1. In the embodiment of the present application, in order to avoid improper use of application information 1, after the communication device 2 receives the message 1, it can perform integrity verification based on the verification information 1 corresponding to the application information 1, so as to avoid improper use of network resources.
  • the communication device 2 may calculate the fields in the message 1, for example, to obtain the verification information 2, and perform matching verification on the verification information 1 and the verification information 2.
  • the verification information 1 and verification information 2 are matched and verified, that is, verification information 1 and verification information 2 are compared. If verification information 1 and verification information 2 are the same, the matching verification is successful. If the verification information 2 is different, the matching verification fails.
  • the communication device 2 calculates the fields in the message 1, for example, the verification algorithm 1 may be used to calculate the fields in the message 1. Wherein, the fields in the message 1 include application information 1.
  • the verification algorithm 1 can be HMAC verification.
  • the communication device 2 can attach the key 1 to the field 1 as the input of the hash algorithm 1, that is, obtain the verification information 2. Then, the verification information 1 and the verification information 2 are matched and checked.
  • the key 1 may be negotiated in advance by the communication device 2 and the communication device 1.
  • the hash algorithm 1 may also be negotiated by the communication device 2 and the communication device 1 in advance.
  • field 1 please refer to the relevant description part in S101, which will not be described in detail here.
  • the key 1 and the hash algorithm 1 may be pre-negotiated by the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and the communication device 2 have been negotiated in advance , And other APPs on the communication device 1 cannot obtain the key 1 and hash algorithm 1, and APPs installed on other devices cannot obtain the key 1 and hash algorithm 1. Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the key 1 and the hash algorithm 1, it cannot generate the verification information 1.
  • the message a generated by the app that stolen the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message a, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • the communication device 2 obtains the parameter 1 and the parameter 2.
  • the communication device 2 adopts the numerical supplement method agreed with the communication device 1, and supplements the value at the head or tail of the key 2, for example, supplements 0, so that the number of bits of the key 2 after supplementing the value is the same as the parameter 1.
  • the communication device 2 uses the calculation method agreed upon with the communication device 1 to calculate the key 2 and the parameter 1 after supplementing the value, for example, perform an exclusive OR calculation to obtain the key 2'. Then, the communication device 2 appends the key 2'to the field 1 as the input of the hash algorithm 2 to obtain the HMAC 1'.
  • the communication device 2 uses the calculation method agreed with the communication device 1 to calculate the key 2 and the parameter 2 after the supplementary value, for example, performs an exclusive OR calculation to obtain the key 2", and then the communication device 2 adds the key 2" As the input of hash algorithm 2 on HMAC 1', HMAC 2'is obtained, that is, authentication information 2 is obtained. After the verification information 2 is calculated, the communication device 2 can perform matching verification on the verification information 1 and the verification information 2.
  • the parameter 1, the parameter 2, the key 2 and the hash algorithm 2 may all be negotiated by the communication device 1 and the communication device 2 in advance.
  • the parameter 1, parameter 2, key 2 and hash algorithm 2 may be pre-negotiated between the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and Communication device 2 negotiated, but other APPs on communication device 1 cannot obtain the parameter 1, parameter 2, key 2 and hash algorithm 2, and the APP installed on other devices cannot obtain parameter 1, parameter 2, secret. Key 2 and hash algorithm 2. Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the parameter 1, the parameter 2, the key 2 and the hash algorithm 2, it cannot generate the verification information 1.
  • the message b generated by the app that misappropriated the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message b, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • the verification algorithm 1 can be digital signature verification.
  • the communication device 2 can, for example, use the hash algorithm 3 to perform a hash operation on the field 2 in the message 1 to obtain the hash digest 1'.
  • the communication device 2 uses the public key 1 and the decryption algorithm 1 to decrypt the digital signature 1 to obtain the hash digest 1". Then, the communication device 2 performs matching verification on the hash digest 1'and the hash digest 1".
  • the aforementioned public key 1 may be negotiated in advance by the communication device 2 and the communication device 1, and the aforementioned decryption algorithm 1 and the hash algorithm 3 may be negotiated in advance by the communication device 2 and the communication device 1.
  • the aforementioned public key 1 may be carried in the message 1.
  • the message 1 includes the digital certificate 1, and the digital certificate 1 carries the public key 1.
  • the aforementioned decryption algorithm 1 and hash algorithm 3 may be carried in the message 1, for example, in the digital certificate 1.
  • the public key 1, the decryption algorithm 1, and the hash algorithm 3 may be negotiated in advance by the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and the communication device 2 After negotiation, other apps on the communication device 1 cannot obtain the public key 1, decryption algorithm 1, and hash algorithm 3, and apps installed on other devices cannot obtain the public key 1, decryption algorithm 1, and hash algorithm 3. . Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the public key 1, the decryption algorithm 1, and the hash algorithm 3, it cannot generate the verification information 1.
  • the message c generated by the APP that misappropriated the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message c, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • the communication device 2 can also verify the legality of the digital certificate. Once the digital certificate 1 is verified, it means that the message 1 comes from a trusted sender. Moreover, if the public key 1 is carried in the digital certificate 1, if the digital certificate 1 is verified, the legality of the public key 1 is also guaranteed. Similarly, if the decryption algorithm 1 and the hash algorithm 3 are carried in the digital certificate 1, if the digital certificate 1 passes the verification, the legality of the decryption algorithm 1 and the hash algorithm 3 is also guaranteed.
  • the digital certificate 1 includes the identity information of the communication device 1.
  • the identity information of the communication device 1 includes the application information 1
  • the application information 1 in the message 1 can be carried in the digital certificate 1.
  • the digital certificate 1 passes the verification, the legality of the application information 1 in the digital certificate 1 is also guaranteed, thereby realizing multiple verifications of the application information 1.
  • the S104 can directly respond to the digital certificate 1 in the specific implementation.
  • legality verification as long as the digital certificate 1 is legal, it means that the verification information 1 and the application information 1 are legal.
  • the hash algorithm 4 can be used to hash the untrusted digital certificate mentioned in S101 to obtain the hash digest 2', and the public key 2 of the CA organization can be used to pair the number.
  • the encrypted digest 1 in the certificate is decrypted to obtain the hash digest 2", and then the matching check is performed on the hash digest 2'and the hash digest 2".
  • the digital certificate 1 is determined to be legal, otherwise, confirm Digital certificate 1 is invalid.
  • the CA certification authority can be further authenticated.
  • the specific implementation of the identity certification of the CA certification authority reference can be made to the traditional authentication method, which will not be described in detail here.
  • the verification algorithm 1 can be integrity verification based on IPSec.
  • an implementation of S104 is: the communication device 2 uses the AH verification algorithm 1 to calculate the field 3 in the message 1. Get AH verification information 3, that is, get verification information 2. Then, the communication device 2 performs matching verification on the verification information 1 and the verification information 2. The so-called matching verification on the verification information 1 and the verification information 2 is to perform the matching verification on the AH verification information 1 and the AH verification information 3 mentioned in S101.
  • the AH check algorithm 1 mentioned here may be pre-appointed by the communication device 1 and the communication device 2.
  • the field 3 please refer to the description of the field 3 in S101, which will not be described in detail here.
  • the AH check algorithm 1 may be pre-negotiated between the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and the communication device 2 pre-negotiated, and the communication device Other apps on 1 cannot obtain the AH verification algorithm 1, and apps installed on other devices cannot obtain the AH verification algorithm 1. Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the AH verification algorithm 1, it cannot generate the verification information 1.
  • the message d generated by the app that misappropriated the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message d, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • the communication device 2 uses the AH verification algorithm 2 to calculate the field 4 in the message 1. Get AH verification information 4, that is, get verification information 2. Then, the communication device 2 performs matching verification on the verification information 1 and the verification information 2. The so-called matching verification on the verification information 1 and the verification information 2 is to perform the matching verification on the AH verification information 2 and the AH verification information 4 mentioned in S101.
  • the AH check algorithm 2 mentioned here may be pre-appointed by the communication device 1 and the communication device 2.
  • the field 4 please refer to the description part of the field 4 in S101, which will not be described in detail here.
  • the AH check algorithm 2 may be pre-negotiated between the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and the communication device 2 pre-negotiated, and the communication device Other apps on 1 cannot obtain the AH verification algorithm 2, and apps installed on other devices cannot obtain the AH verification algorithm 2. Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the AH verification algorithm 2, it cannot generate the verification information 1.
  • the message e generated by the APP that embezzled the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message e, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • an implementation of S104 is: the communication device 2 can use the ESP verification algorithm 1 to calculate the field 5 in the message 1 to obtain the ESP verification information 2, namely: Get verification information 2. Then, the communication device 2 performs matching verification on the verification information 1 and the verification information 2.
  • the so-called matching verification of the verification information 1 and the verification information 2 means the matching verification of the ESP verification information 1 and the ESP verification information 2 mentioned in S101.
  • the ESP verification algorithm 1 mentioned here may be pre-appointed by the communication device 1 and the communication device 2.
  • field 5 please refer to the description of field 5 in S101, which will not be described in detail here.
  • the ESP check algorithm 1 may be pre-negotiated between the communication device 1 and the communication device 2, or in other words, the APP 1 on the communication device 1 and the communication device 2 pre-negotiated, and the communication device Other apps on 1 cannot obtain the ESP verification algorithm 1, and APPs installed on other devices cannot obtain the ESP verification algorithm 1. Therefore, even if another APP on the communication device 1 or an APP on another device embezzles the application information 1, since it cannot obtain the ESP verification algorithm 1, it cannot generate the verification information 1.
  • the message f generated by the APP that embezzled the application information 1 does not include the verification information 1. Therefore, when the communication device 2 receives the message f, the integrity verification of the application information 1 is not passed, so that the application information 1 can be avoided. Misappropriation leads to the misappropriation of network resources.
  • S105a The communication device 2 sends the message 1 to the communication device 3 when the application information 1 passes the verification.
  • S105b The communication device 2 discards the message 1 when the application information 1 fails the verification.
  • the communication device 2 may determine the network resource corresponding to the message 1 according to the application information 1, and further use the determined network resource to forward the message 1 to the server 102.
  • the application information 1 fails the verification, it means that the application information in the message 1 may be obtained through illegal means, so the communication device 2 can discard the message 1 to avoid The network resource corresponding to application information 1 is illegally used.
  • the verification information used to verify the integrity of the application information 1 in the message 1 may include one or more.
  • the communication device 2 may not only perform the integrity verification on the application information 1 based on the verification information 1, but also perform the integrity verification on the application information 1 based on other verification information.
  • the message 1 in addition to the verification information 1, the message 1 may also include the verification information 3.
  • the verification information 3 may be obtained by the communication device 1 through calculation of the fields in the message 1.
  • the verification information 3 may be obtained by calculating the fields in the message 1 using the verification algorithm 2.
  • Check algorithm 2 and check algorithm 1 are different check algorithms. But similar to verification algorithm 1, verification algorithm 2 can also be one of HMAC algorithm, digital signature algorithm, and integrity verification based on IPSec. Regarding the verification algorithm 2, please refer to the description of the verification algorithm 1 above, which will not be described in detail here. Regarding the specific implementation of the communication device 1 using the verification algorithm 2 to obtain the verification information 3, reference may be made to the above description of the verification information 1 obtained by the communication device 1 according to the verification algorithm 1, which will not be described in detail here. Correspondingly, for the specific implementation of the communication device 2 using the verification information 3 to verify the integrity of the application information 1, reference may be made to the specific description of S104 above, and the description will not be repeated here.
  • FIG. 5 is a signaling interaction diagram of a method for verifying application information according to an embodiment of the application.
  • the method 200 for verifying application information shown in FIG. 5 can be executed by the communication device 1 and the communication device 2 shown in FIG. 1.
  • the communication device 1, the communication device 2, and the communication device 3 in the method 200 refer to the method 100
  • the description of the communication device 1, the communication device 2 and the communication device 3 in the description part will not be repeated here.
  • the method 200 may be implemented through the following S201-S203, for example.
  • the communication device 1 obtains a message 1, and the message 1 includes a digital certificate 1, and the digital certificate 1 includes application information 1 and verification information 1.
  • the communication device 1 may first send the application information 1 to the control and management device, and then obtain the digital certificate 1 including the application information 1 and the verification information 1 from the control and management device.
  • the control and management device may use hash algorithm 1 to hash the application information 1 to obtain hash digest 1, and then, the control and management device uses its own private key 1 to encrypt hash digest 1 to obtain Verification information 1.
  • Verification information 1 is the encrypted digest of hash digest 1.
  • the digital certificate 1 mentioned here, in addition to the application information 1 and the verification information 1, can also include the identity information of the control and management device and the public key 1 corresponding to the private key 1.
  • the identity information of the control and management device here Not limited.
  • the communication device 1 After the communication device 1 obtains the digital certificate 1 from the control and management device, it can generate a message 1 including the digital certificate 1.
  • the message 1 mentioned here may be an IPv6 message.
  • the aforementioned digital certificate 1 may be carried in the extension header of the IPv6 message. In other embodiments, the digital certificate 1 may be carried in the source address field or the destination address field of the IPv6 message.
  • the message 1 may be an MPLS message.
  • the digital certificate 1 may be carried in the header of the MPLS message, for example.
  • the digital certificate 1 may be carried in the label stack in the message header, for example, in a certain label value field.
  • the digital certificate 1 may be carried in the extended TLV field of the MPLS packet.
  • message 1 may be an SRv6 message.
  • the digital certificate 1 may be carried in the header of the SRv6 message, for example.
  • the digital certificate 1 may be carried in the SRH of the SRv6 message.
  • the digital certificate 1 may be carried in the source address field of the SRH; in other embodiments, the digital certificate 1 may be carried in the destination address field of the SRH. In still other embodiments, the digital certificate 1 may also be carried in the SID list.
  • the message 1 may be an IPv4 message.
  • the digital certificate 1 may be carried in the option field of the IPv4 message, for example.
  • the message 1 may be a GRE message.
  • the digital certificate 1 can be carried in the header of the GRE message.
  • the digital certificate 1 may be carried in the key field in the message header.
  • message 1 may be a VXLAN message.
  • the digital certificate 1 can be carried in the header of the VXLAN message.
  • the digital certificate 1 may be carried in a reserved field in the message header.
  • the digital certificate 1 may be carried in the VNI field in the message header.
  • the message 1 may be an NVGRE message.
  • the digital certificate 1 can be carried in the header of the NVGRE message.
  • the digital certificate 1 may be carried in a reserved field in the message header.
  • the digital certificate 1 may be carried in the VNI field in the message header.
  • the digital certificate 1 may be carried in the flow ID field in the message header.
  • message 1 may be a Geneve message.
  • the digital certificate 1 can be carried in the header of the Geneve message.
  • the digital certificate 1 may be carried in a reserved field in the message header.
  • the digital certificate 1 may be carried in the variable-length option field in the message header.
  • S204 The communication device 2 performs legality verification on the digital certificate 1.
  • the communication device 2 After receiving the message 1, the communication device 2 can verify the legality of the digital certificate 1. Because the digital certificate 1 includes application information 1 and verification information 1. Therefore, if the digital certificate 1 is legal, it means that the legality of the verification information 1 and the application information 1 has been verified. Regarding the specific implementation of the verification of the digital certificate 1 by the communication device 2, reference may be made to the previous description of the verification of the legality of the digital certificate 1 by the communication device 2, which will not be described in detail here.
  • S205a The communication device 2 forwards the message 1 to the communication device 3 when the digital certificate 1 is verified.
  • S205b The communication device 2 discards the message 1 when the digital certificate 1 fails the verification.
  • the communication device 2 may determine the network resource corresponding to the message 1 according to the application information 1, and further use the determined network resource to forward the message 1 to the communication device 3.
  • the digital certificate 1 fails the verification, it means that the application information 1 in the message 1 may be obtained through illegal means, so the communication device 2 can discard the message 1 , Thereby avoiding the illegal misappropriation of the network resources corresponding to the application information 1.
  • the message 1 may also include verification information 2 for verifying the integrity of the application information 1.
  • verification information 2 it is similar to the verification information 1 in the foregoing method 100, so it will not be described in detail here.
  • the communication device 2 can also use the verification information 2 to verify the integrity of the application information 1.
  • the specific implementation of the communication device 2 using the verification information 2 to verify the application information reference may be made to the specific implementation part of S104 above, which will not be described in detail here.
  • the verification information 1 can be obtained by calculating the fields in the message 1 using a digital signature algorithm. Therefore, in an implementation manner, the verification information 2 in the method 200 It can be calculated by using a digital signature algorithm to calculate the fields in the message 1.
  • the fields in the message 1 include application information 1.
  • the communication device 1 can use the private key 2 and the hash algorithm 2 to digitally sign the fields in the message 1, and determine the obtained digital signature 1 as the verification information 2.
  • the communication device 1 can use the hash algorithm 2 to hash the application information 1 in the message 1 to obtain the hash digest 1, and use the private key 2 and the encryption algorithm 1 to encrypt the hash digest 1 , Get the digital signature 1.
  • the communication device 2 can use the decryption algorithm 1 and the public key 2 corresponding to the private key 2 to decrypt the verification information 2 to obtain the hash digest 1'.
  • the communication device 2 may also use the hash algorithm 2 to perform a hash calculation on the application information 1 in the message 1 to obtain a hash digest 1", and perform matching verification on the hash digest 1'and the hash digest 1".
  • the decryption algorithm 1 is the inverse operation of the encryption algorithm 1, and is used to decrypt the data encrypted by the encryption algorithm 1.
  • the verification information 2 can be obtained by calculating the fields in the message 1 using a digital signature algorithm
  • the public key 2 mentioned above can be carried in the S201.
  • Digital certificate 1 The aforementioned decryption algorithm 1 and hash algorithm 2 can also be carried in the digital certificate 1 mentioned in S201.
  • the embodiment of the present application also provides a method 300 for verifying application information.
  • FIG. 6, is a schematic flowchart of a method for verifying application information provided by an embodiment of the present application.
  • the method 300 shown in FIG. 6 may be executed by a first communication device, and the first communication device may be, for example, the communication device 1 mentioned in the above embodiment.
  • the method 300 shown in FIG. 6 can be applied to the method 100 mentioned in the above embodiment to execute the steps performed by the communication device 1 in the above method 100.
  • the method 300 may include the following S301-S302, for example.
  • S301 Receive a first message, where the first message includes application information and first verification information, where the first verification information is used to verify the integrity of the application information.
  • S302 Verify the integrity of the application information based on the first verification information.
  • the first message in method 300 may correspond to message 1 in method 100; the application information in method 300 may correspond to application information 1 in method 100; the first verification information in method 300 may correspond to message 1 in method 100 ’S verification information 1.
  • verifying the integrity of the application information based on the first verification information includes:
  • the target field in method 300 may correspond to field 1, field 2, field 3, field 4, or field 5 in method 100.
  • the second verification information in the method 300 may correspond to the verification information 2 in the method 100.
  • verifying the integrity of the application information based on the first verification information includes:
  • the integrity of the application information is verified based on the first verification method and the first verification information.
  • the first verification method in the method 300 may correspond to the verification algorithm 1 in the method 100.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information
  • the verification of the integrity of the application information based on the first verification method and the first verification information includes:
  • the target field in method 300 corresponds to field 1 in method 100.
  • the first HMAC check information in the method 300 can correspond to the verification information 1 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the second HMAC verification information can correspond to the verification information 2 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the first HMAC check information in the method 300 may correspond to the HMAC 2 in the method 100, and correspondingly, the second HMAC check information may correspond to the HMAC 2'in the method 100.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the target field in the first message using a first private key and a first hash calculation, and the first verification information is based on the first verification.
  • the verification method and the first verification information, verifying the integrity of the application information include:
  • the target field corresponds to field 2 in method 100; the first private key corresponds to private key 1 in method 100; the first hash calculation corresponds to hash algorithm 3 in method 100;
  • the signature corresponds to the digital signature 1 in the method 100; the first public key corresponds to the public key 1 in the method 100; the first plaintext corresponds to the hash digest 1 in the method 100"; the second hash calculation corresponds to the hash algorithm in the method 100 3;
  • the second plaintext can correspond to the hash digest 1'in the method 100.
  • the first message further includes a digital certificate
  • the digital certificate includes the first public key
  • the digital certificate in method 300 corresponds to digital certificate 1 in method 100
  • the first public key corresponds to public key 1 in method 100.
  • the digital certificate further includes a decryption algorithm for decrypting the digital signature, and/or the hash algorithm.
  • the decryption algorithm mentioned here can correspond to the decryption algorithm 1 in the method 100; the hash algorithm mentioned here can correspond to the hash algorithm 3 in the method 100.
  • the method further includes:
  • the first message includes a digital certificate
  • the application information and the first verification information are carried in the digital certificate.
  • the verifying the integrity of the application information based on the first verification information includes:
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification method may be AH verification or ESP verification.
  • the first verification information is verification information of a first authentication header AH
  • the verification of the integrity of the application information based on the first verification method and the first verification information includes :
  • the first verification information is the first AH verification information
  • the second verification information is the second AH verification information.
  • the first AH verification information may correspond to AH verification information 1 or AH verification information 2 in method 100
  • the second AH verification information may correspond to AH verification information 3 or AH verification information 4 in method 100.
  • the first AH verification information when the first message is encapsulated in the transmission mode, the first AH verification information corresponds to AH verification information 1 in method 100, and the second verification information corresponds to AH verification information 3 in method 100, and the target field can correspond to the method Field 3 in 100; when the first message is encapsulated in tunnel mode, the first AH verification information corresponds to AH verification information 2 in method 100, and the second verification information corresponds to AH verification information 4 in method 100.
  • the target field can correspond to Field 4 in method 100.
  • the first verification information is first encapsulated security payload ESP verification information
  • the integrity of the application information is verified based on the first verification method and the first verification information, include:
  • the first verification information is the first ESP verification information
  • the second verification information is the second ESP verification information.
  • the first ESP verification information may correspond to ESP verification information 1 in method 100
  • the second ESP verification information may correspond to ESP verification information 2 in method 100
  • the target field may correspond to field 5 in method 100.
  • the first communication device is a network device.
  • the first communication device includes:
  • the method further includes:
  • the first message is forwarded.
  • the method further includes:
  • the first message is discarded.
  • FIG. 7 is a schematic flowchart of a message processing method provided by an embodiment of the present application.
  • the method 700 shown in FIG. 7 may be executed by a second communication device, and the second communication device may be, for example, the communication device 2 mentioned in the above embodiment.
  • the method 400 shown in FIG. 7 can be applied to the method 100 mentioned in the above embodiment to execute the steps executed by the communication device 2 in the above method 100.
  • the method 400 may include the following S401-S402, for example.
  • S401 Generate a first message, where the first message includes application information and first verification information, and the first verification information is used to verify the integrity of the application information.
  • S402 Send the first message to the first communication device.
  • the first message in method 400 may correspond to message 1 in method 100; the application information in method 400 may correspond to application information 1 in method 100; the first verification information in method 400 may correspond to message 1 in method 100 ’S verification information 1.
  • the first verification information is obtained according to a target field in the first message, and the target field includes the application information.
  • the target field may correspond to field 1, field 2, field 3, field 4, or field 5 in method 100.
  • the first verification information is obtained by calculating a target field in the first message using a first verification method, and the target field includes the application information.
  • the first verification method in the method 400 may correspond to the verification algorithm 1 in the method 100.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information.
  • the target field in method 300 corresponds to field 1 in method 100.
  • the first HMAC check information in the method 400 may correspond to the verification information 1 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the first HMAC check information in method 400 may correspond to HMAC2 in method 100.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by using a first private key to sign the target field.
  • the target field corresponds to field 2 in method 100
  • the first private key corresponds to private key 1 in method 100
  • the digital signature corresponds to digital signature 1 in method 100.
  • the first verification information is an encrypted digest in a digital certificate
  • the digital certificate further includes the application information.
  • the digital certificate mentioned here can correspond to the digital certificate 1 in the method 100, and correspondingly, the encrypted digest in the digital certificate can correspond to the encrypted digest 1 in the method 100.
  • the first verification information is sent by the control management device to the second communication device.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification method may be AH verification or ESP verification.
  • the first verification information is verification information of the first authentication header AH.
  • the first AH verification information may correspond to the AH verification information 1 or the AH verification information 2 in the method 100.
  • the first AH verification information corresponds to AH verification information 1 in method 100; when the first message is encapsulated in tunnel mode, the first AH verification information corresponds to AH verification information in method 100 2.
  • the first verification information is the first encapsulated security load ESP verification information.
  • the first ESP verification information may correspond to the ESP verification information 1 in the method 100.
  • the second communication device is a server or user equipment.
  • the user equipment includes:
  • IoT devices or terminal devices IoT devices or terminal devices.
  • the application information and the first verification information are carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the application information is carried in an IPv6 extension header.
  • the application information is carried in the destination address.
  • the application information is carried in the source address.
  • the first verification information is carried in an IPv6 extension header.
  • the first verification information is carried in the destination address.
  • the first verification information is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the application information is carried in a tag value field.
  • the application information is carried in the extended type length value TLV field.
  • the first verification information is carried in a tag value field.
  • the first verification information is carried in an extended TLV field.
  • the first message is an Internet Protocol version 6 routing SRv6 message.
  • the application information is carried in the segment routing header SRH.
  • the first verification information is carried in the SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the application information is carried in an option field.
  • the first verification information is carried in an option field.
  • the first message is a general routing encapsulation GRE message.
  • the application information is carried in a key field.
  • the first verification information is carried in a key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the application information is carried in a virtual network identifier field.
  • the application information is carried in a reserved field.
  • the first verification information is carried in a virtual network identifier field.
  • the first verification information is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the application information is carried in a flow identification field.
  • the application information is carried in a virtual network identification field.
  • the application information is carried in a reserved field.
  • the first verification information is carried in a flow identification field.
  • the first verification information is carried in a virtual network identification field.
  • the first verification information is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the application information is carried in a reserved field.
  • the application information is carried in a variable length option field.
  • the first verification information is carried in a reserved field.
  • the first verification information is carried in a variable length option field.
  • An embodiment of the present application also provides a method 500 for verifying application information.
  • FIG. 8 is a schematic flowchart of a method for verifying application information provided by an embodiment of the present application.
  • the method 500 shown in FIG. 8 may be executed by a first communication device, and the first communication device may be, for example, the communication device 1 mentioned in the above embodiment.
  • the method 500 shown in FIG. 8 can be applied to the method 200 mentioned in the above embodiment to execute the steps executed by the communication device 1 in the above method 200.
  • the method 500 may include the following S501-S502, for example.
  • S501 Acquire a first message, the first message including a digital certificate, the digital certificate including application information and first verification information, and the first verification information is used to verify the integrity of the application information .
  • S502 Perform legality verification on the digital certificate.
  • the first message further includes second verification information
  • the second verification information is used to verify the integrity of the application information
  • the method further includes:
  • the integrity verification of the application information is performed by using the second verification information.
  • the second verification information in the method 500 may correspond to the verification information 2 in the method 200.
  • using the second verification information to verify the integrity of the application information includes:
  • using the second verification information to verify the integrity of the application information includes:
  • the integrity of the application information is verified based on the digital signature algorithm and the second verification information.
  • the second verification information is a digital signature obtained by signing a target field in the first message using a first private key and a first hash calculation, and the digital signature algorithm is based on And the second verification information to verify the integrity of the application information includes:
  • the first public key is carried in the digital certificate.
  • the decryption algorithm for decrypting the digital signature is carried in the digital certificate, and/or, the hash algorithm is carried in the digital certificate.
  • An embodiment of the present application also provides a message processing method 600, which can be seen in FIG. 9, which is a schematic flowchart of a message processing method provided by an embodiment of the present application.
  • the method 600 shown in FIG. 9 may be executed by a second communication device, and the second communication device may be, for example, the communication device 2 mentioned in the above embodiment.
  • the method 600 shown in FIG. 9 can be applied to the method 200 mentioned in the above embodiment to execute the steps performed by the communication device 2 in the above method 200.
  • the method 600 may include the following S601-S602, for example.
  • S601 Acquire a first message, the first message including a digital certificate, the digital certificate including application information and first verification information, and the first verification information is used to verify the integrity of the application information .
  • S602 Send the first message to the first communication device.
  • the first message can correspond to message 1 in method 200;
  • the digital certificate can correspond to digital certificate 1 in method 200;
  • the application information can correspond to application information 1 in method 200;
  • the first verification information can correspond to the method Verification information 1 in 100.
  • the first message further includes second verification information, and the second verification information is used to perform integrity verification on the application information.
  • the second verification information in the method 600 may correspond to the verification information 2 in the method 200.
  • the second verification information is obtained according to a target field in the first message, and the target field includes the application information.
  • the second verification information is obtained by calculating a target field in the first message using a first verification method, and the target field includes the application information.
  • the first verification method is digital signature verification.
  • the second verification information is a digital signature obtained by signing the target field with a first private key.
  • the first private key mentioned here can correspond to private key 2 in method 200
  • the digital signature mentioned here can correspond to digital signature 1 in method 200.
  • the first public key corresponding to the first private key is carried in the digital certificate, and the first public key is used to verify the second verification information.
  • the first public key mentioned here can correspond to public key 2 in method 200.
  • the decryption algorithm for decrypting the digital signature is carried in the digital certificate, and/or the hash algorithm for verifying the second verification information is carried in the digital certificate.
  • the decryption algorithm mentioned here may correspond to the decryption algorithm 1 in the method 200; the hash algorithm for verifying the second verification information may correspond to the hash algorithm 2 in the method 200.
  • the digital certificate is carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the digital certificate is carried in an IPv6 extension header.
  • the digital certificate is carried in the destination address.
  • the digital certificate is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the digital certificate is carried in a tag value field.
  • the digital certificate is carried in the extended type length value TLV field.
  • the first message is an Internet Protocol version 6 routing SRv6 message.
  • the digital certificate is carried in the segment routing header SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the digital certificate is carried in an option field.
  • the first message is a general routing encapsulation GRE message.
  • the digital certificate is carried in a key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the digital certificate is carried in a virtual network identifier field.
  • the digital certificate is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the digital certificate is carried in a flow identification field.
  • the digital certificate is carried in a virtual network identification field.
  • the digital certificate is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the digital certificate is carried in a reserved field.
  • the digital certificate is carried in a variable length option field.
  • the first verification information is an encrypted digest in the digital certificate.
  • An embodiment of the present application also provides a method 700 for processing application information, which can be seen in FIG. 10, which is a schematic flowchart of a method for processing application information provided by an embodiment of the application.
  • the method 700 shown in FIG. 10 may be executed by a control and management device.
  • the method 700 shown in FIG. 9 may be applied to the method 100 or 200 mentioned in the above embodiment to execute the steps executed by the control management device in the method 100 or 200.
  • the method 700 may include the following S701-S703, for example.
  • S702 Obtain first verification information according to the application information, where the first verification information is used to verify the integrity of the application information.
  • S703 Send the first verification information to the second communication device.
  • the application information may correspond to the application information 1 in the method 100 or the method 200;
  • the first verification information may correspond to the verification information 1 in the method 100 or the method 200;
  • the second communication device may correspond to the method 100 or the method 200 ⁇ 2 ⁇ Communication device 2.
  • the obtaining first verification information according to the application information includes:
  • the application information is calculated based on the first verification method to obtain the first verification information.
  • the first verification method mentioned here may correspond to verification algorithm 1 in method 100.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information.
  • the first HMAC verification information can correspond to the verification information 1 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the first HMAC check information may correspond to HMAC 2 in method 100.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the application information using a first private key and a first hash calculation.
  • the first private key corresponds to the private key 1 in the method 100; the first hash calculation corresponds to the hash algorithm 3 in the method 100; and the digital signature corresponds to the digital signature 1 in the method 100.
  • the obtaining first verification information according to the application information includes:
  • a digital certificate is obtained according to the application information, and the digital certificate includes the first verification information.
  • the digital certificate mentioned here may correspond to digital certificate 1 in method 100, for example.
  • sending the first verification information to the second communication device includes:
  • the method further includes:
  • the second verification information is sent to the second communication device.
  • the second verification information mentioned here may correspond to verification information 3 in method 100, for example.
  • the obtaining second verification information according to the application information includes:
  • the application information is calculated based on the second verification method to obtain the second verification information.
  • the second verification method is HMAC verification.
  • the second verification information includes second HMAC verification information.
  • the second verification method is digital signature verification.
  • the second verification information is a digital signature obtained by signing the application information using a second private key and a second hash calculation.
  • the first verification method and the second verification method are different verification methods.
  • An embodiment of the present application also provides a method 800 for verifying application information.
  • FIG. 11 is a schematic flowchart of a method for verifying application information provided by an embodiment of the present application.
  • the method 800 shown in FIG. 11 may be executed by a first communication device, and the first communication device may be, for example, the communication device 1 mentioned in the above embodiment.
  • the method 800 shown in FIG. 11 can be applied to the method 100 mentioned in the above embodiment to execute the steps executed by the communication device 1 in the above method 100.
  • the method 800 may include, for example, the following S801-S802.
  • S801 Obtain application information and at least one piece of verification information, where the at least one piece of verification information is used to verify the integrity of the application information.
  • S802 Perform integrity verification on the application information according to the at least one verification information.
  • At least one piece of verification information may correspond to verification information 1 in method 100, or may correspond to verification information 1 and verification information 3 in method 100.
  • the obtaining application information and at least one piece of verification information includes:
  • a first message is received, the first message including the application information and the at least one piece of verification information.
  • the first message may correspond to message 1 in method 100.
  • the at least one piece of verification information includes first verification information.
  • the first verification information may correspond to verification information 1 in the method 100.
  • the performing integrity verification on the application information according to the at least one verification information includes:
  • the first target field in method 800 may correspond to field 1, field 2, field 3, field 4, or field 5 in method 100.
  • the third verification information in the method 800 may correspond to the verification information 2 in the method 100.
  • the performing integrity verification on the application information according to the at least one verification information includes:
  • the integrity of the application information is verified.
  • the first verification method in the method 800 may correspond to the verification algorithm 1 in the method 100.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information
  • the verification of the integrity of the application information based on the first verification method and the first verification information includes:
  • the first HMAC check information in the method 800 can correspond to the verification information 1 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the second HMAC verification information can correspond to the verification information 2 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the first HMAC check information in method 800 may correspond to HMAC 2 in method 100, and correspondingly, the second HMAC check information may correspond to HMAC 2'in method 100.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the first target field using a first private key and a first hash calculation
  • the first verification method is based on the first verification method and the The first verification information, verifying the integrity of the application information, includes:
  • the first verification method is a digital signature: the first target field corresponds to field 2 in method 100; the first private key corresponds to private key 1 in method 100; the first hash calculation corresponds to hash algorithm 3 in method 100 ; The digital signature corresponds to the digital signature 1 in the method 100; the first public key corresponds to the public key 1 in the method 100; the first plaintext corresponds to the hash digest 1 in the method 100"; the second hash calculation corresponds to the hash in the method 100 Greek algorithm 3; the second plaintext can correspond to hash digest 1'in method 100.
  • the first message includes a digital certificate
  • the first public key is carried in the digital certificate
  • the digital certificate in method 800 corresponds to digital certificate 1 in method 100, and the first public key corresponds to public key 1 in method 100.
  • the digital certificate further includes a decryption algorithm for decrypting the digital signature, and/or the hash algorithm.
  • the decryption algorithm mentioned here can correspond to the decryption algorithm 1 in the method 100; the hash algorithm mentioned here can correspond to the hash algorithm 3 in the method 100.
  • the method further includes:
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification method may be AH verification or ESP verification.
  • the first verification information is verification information of a first authentication header AH
  • the verification of the integrity of the application information based on the first verification method and the first verification information includes :
  • the first verification information is the first AH verification information
  • the second verification information is the second AH verification information.
  • the first AH verification information may correspond to AH verification information 1 or AH verification information 2 in method 100
  • the second AH verification information may correspond to AH verification information 3 or AH verification information 4 in method 100.
  • the first AH verification information when the first message is encapsulated in the transmission mode, the first AH verification information corresponds to AH verification information 1 in method 100, and the second verification information corresponds to AH verification information 3 in method 100.
  • the first target field may be Corresponds to field 3 in method 100; when the first message is encapsulated in tunnel mode, the first AH verification information corresponds to AH verification information 2 in method 100, and the second verification information corresponds to AH verification information 4 in method 100.
  • the target field may correspond to field 4 in method 100.
  • the first verification information is first encapsulated security payload ESP verification information
  • the integrity of the application information is verified based on the first verification method and the first verification information, include:
  • the first verification information is the first ESP verification information
  • the second verification information is the second ESP verification information.
  • the first ESP verification information may correspond to ESP verification information 1 in method 100
  • the second ESP verification information may correspond to ESP verification information 2 in method 100
  • the first target field may correspond to field 5 in method 100.
  • the first message includes a digital certificate
  • the application information and the at least one verification information are carried in the digital certificate
  • the first verification method is based on the first verification information
  • Verifying the integrity of the application information includes:
  • the at least one piece of verification information further includes second verification information.
  • the second verification information mentioned here may correspond to verification information 3 in method 100.
  • the performing integrity verification on the application information according to the at least one verification information includes:
  • the performing integrity verification on the application information according to the at least one verification information includes:
  • the integrity of the application information is verified.
  • the first verification method and the second verification method are different verification algorithms.
  • the first communication device is a network device.
  • the first communication device includes:
  • Access ACC equipment or customer premises CPE equipment, or home gateway RG, or data center server access leaf equipment, or data center egress gateway DC GW, or autonomous system border router ASBR, or broadband network gateway BNG Or, operator edge PE equipment.
  • the method further includes:
  • the first message is forwarded.
  • the method further includes:
  • the first message is discarded.
  • An embodiment of the present application also provides a message processing method 900, which can be seen in FIG. 12, which is a schematic flowchart of a message processing method provided by an embodiment of the present application.
  • the method 900 shown in FIG. 12 may be executed by a second communication device, and the second communication device may be, for example, the communication device 2 mentioned in the above embodiment.
  • the method 900 shown in FIG. 12 can be applied to the method 100 mentioned in the above embodiment to execute the steps executed by the communication device 2 in the above method 100.
  • the method 900 may include the following S901-S902, for example.
  • S901 Obtain application information and at least one piece of verification information, where the at least one piece of verification information is used to verify the integrity of the application information.
  • S902 Send the application information and the at least one piece of verification information to the first communication device.
  • At least one piece of verification information may correspond to the verification information 1 in the method 100, or may correspond to the verification information 1 and the verification information 3 in the method 100.
  • the obtaining application information and at least one piece of verification information includes:
  • the first message including the application information and the at least one piece of verification information
  • the sending the application information and the at least one piece of verification information to the first communication device includes:
  • the first message may correspond to message 1 in method 100
  • the first communication device may correspond to communication device 1 in method 100.
  • the at least one piece of verification information includes first verification information.
  • the first verification information may correspond to verification information 1 in the method 100.
  • the first verification information is obtained according to a first target field in the first message, and the first target field includes the application information.
  • the first target field may correspond to field 1, field 2, field 3, field 4, or field 5 in method 100.
  • the first verification information is obtained by calculating a first target field in the first message using a first verification method, and the first target field includes the application information .
  • the first verification method in method 900 may correspond to verification algorithm 1 in method 100.
  • the first verification method is a key-related hash operation message authentication code HMAC verification.
  • the first verification information includes first HMAC verification information.
  • the target field in method 300 corresponds to field 1 in method 100.
  • the first HMAC check information in the method 900 can correspond to the verification information 1 obtained by adding the key 1 to the field 1 as the input of the hash algorithm 1 in the method 100.
  • the first HMAC check information in method 900 may correspond to HMAC2 in method 100.
  • the first verification method is digital signature verification.
  • the first verification information is a digital signature obtained by signing the first target field with a first private key.
  • the first verification method is a digital signature: the first target field corresponds to field 2 in method 100; the first private key corresponds to private key 1 in method 100, and the digital signature corresponds to digital signature 1 in method 100.
  • the first verification information is an encrypted digest in a digital certificate
  • the digital certificate further includes the application information.
  • the digital certificate mentioned here can correspond to the digital certificate 1 in the method 100, and correspondingly, the encrypted digest in the digital certificate can correspond to the encrypted digest 1 in the method 100.
  • the first verification information is sent by the control management device to the second communication device.
  • the first verification method is integrity verification based on Internet Protocol Security IPSEC.
  • the first verification method may be AH verification or ESP verification.
  • the first verification information is verification information of the first authentication header AH.
  • the first AH verification information may correspond to the AH verification information 1 or the AH verification information 2 in the method 100.
  • the first AH verification information corresponds to AH verification information 1 in method 100; when the first message is encapsulated in tunnel mode, the first AH verification information corresponds to AH verification information in method 100 2.
  • the first verification information is the first encapsulated security load ESP verification information.
  • the first ESP verification information may correspond to the ESP verification information 1 in the method 100.
  • the at least one piece of verification information further includes second verification information.
  • the second verification information may correspond to verification information 3 in the method 100.
  • the second verification information is obtained according to a second target field in the first message, and the second target field includes the application information.
  • the second verification information is obtained by calculating a second target field in the first message using a second verification method, and the second target field includes the application information .
  • the first verification method and the second verification method are different verification algorithms.
  • the application information and the at least one piece of verification information are carried in a header of the first message.
  • the first message is an Internet Protocol version 6 IPv6 message.
  • the application information is carried in an IPv6 extension header.
  • the application information is carried in the destination address.
  • the application information is carried in the source address.
  • the at least one piece of verification information is carried in an IPv6 extension header.
  • the at least one piece of verification information is carried in the destination address.
  • the at least one piece of verification information is carried in the source address.
  • the first message is a multi-protocol label switching MPLS message.
  • the application information is carried in a tag value field.
  • the application information is carried in the extended type length value TLV field.
  • the at least one piece of verification information is carried in a tag value field.
  • the at least one piece of verification information is carried in an extended TLV field.
  • the first message is an Internet Protocol version 6 routing SRv6 message.
  • the application information is carried in the segment routing header SRH.
  • the at least one piece of verification information is carried in the SRH.
  • the first message is an Internet Protocol version 4 IPv4 message.
  • the application information is carried in an option field.
  • the at least one piece of verification information is carried in an option field.
  • the first message is a general routing encapsulation GRE message.
  • the application information is carried in a key field.
  • the at least one piece of verification information is carried in a key field.
  • the first message is a virtual extended local area network VXLAN message.
  • the application information is carried in a virtual network identifier field.
  • the application information is carried in a reserved field.
  • the at least one piece of verification information is carried in a virtual network identifier field.
  • the at least one piece of verification information is carried in a reserved field.
  • the first message is a network virtualization general routing encapsulation NVGRE message.
  • the application information is carried in a flow identification field.
  • the application information is carried in a virtual network identification field.
  • the application information is carried in a reserved field.
  • the at least one piece of verification information is carried in a flow identification field.
  • the at least one piece of verification information is carried in a virtual network identification field.
  • the at least one piece of verification information is carried in a reserved field.
  • the first message is a Geneve message for general network virtualization encapsulation.
  • the application information is carried in a reserved field.
  • the application information is carried in a variable length option field.
  • the at least one piece of verification information is carried in a reserved field.
  • the at least one piece of verification information is carried in a variable length option field.
  • FIG. 13 is a schematic structural diagram of a communication device provided by an embodiment of this application.
  • the communication device 1300 includes a transceiver unit 1301 and a processing unit 1302.
  • the communication device 1300 may be used to execute the method 100, the method 200, the method 300, the method 400, the method 500, the method 600, the method 700, the method 800, or the method 900 in the above embodiments.
  • the communication device 1300 can execute the method 100 in the above embodiment.
  • the communication device 1300 is equivalent to the communication device 1 in the method 100.
  • the transceiving unit 1301 is configured to perform the transceiving operations performed by the communication device 1 in the method 100.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the communication device 1 in the method 100.
  • the processing unit 1302 is used to generate the message 1, and the message 1 includes the application information 1 and the verification information 1; the transceiver unit 1301 is used to send the message 1 to the communication device 2.
  • the communication device 1300 can execute the method 100 in the above embodiment.
  • the communication device 1300 is equivalent to the communication device 2 in the method 100.
  • the receiving and sending unit 1301 is used to perform the receiving and sending operations performed by the communication device 2 in the method 100.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the communication device 2 in the method 100.
  • the transceiver unit 1301 is used to receive message 1, which includes application information 1 and verification information 1
  • the processing unit 1302 is used to process application information 1 in message 1 according to verification information 1 in message 1. Integrity is verified.
  • the communication device 1300 may execute the method 200 in the above embodiment.
  • the communication device 1300 is equivalent to the communication device 1 in the method 200.
  • the transceiving unit 1301 is configured to perform the transceiving operations performed by the communication device 1 in the method 200.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the communication device 1 in the method 200. For example: the processing unit 1302 is configured to generate a message 1, the message 1 includes a digital certificate 1, the digital certificate 1 includes application information 1 and verification information 1, and the verification information 1 is used to compare the application information 1 Perform integrity verification; the transceiver unit 1301 is used to send the message 1 to the communication device 2.
  • the communication device 1300 may execute the method 200 in the above embodiment.
  • the communication device 1300 is equivalent to the communication device 2 in the method 200.
  • the transceiving unit 1301 is configured to perform the transceiving operations performed by the communication device 2 in the method 200.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the communication device 2 in the method 200.
  • the transceiver unit 1301 is used to receive message 1, which includes a digital certificate 1, and the digital certificate 1 includes application information 1 and verification information 1, and the verification information 1 is used to perform verification on the application information 1. Integrity verification; the processing unit 1302 is used for the legality verification of the digital certificate 1.
  • the communication device 1300 can execute the method 300 in the above embodiment.
  • the communication device 1300 is equivalent to the first communication device in the method 300.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the first communication device in the method 300.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the first communication device in the method 300.
  • the transceiver unit 1301 is used to receive a first message, and the first message includes application information and first verification information; the processing unit 1302 is used to perform verification on the first message according to the first verification information in the first message. The integrity of the application information is verified.
  • the communication device 1300 may execute the method 400 in the above embodiment.
  • the communication device 1300 is equivalent to the second communication device in the method 400.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the second communication device in the method 400.
  • the processing unit 1302 is configured to perform operations other than the transceiving operation performed by the second communication device in the method 400. For example: the processing unit 1302 is configured to generate a first message, the first message including application information and first verification information, and the first verification information is used to verify the integrity of the application information; the transceiver unit 1301 is configured to send the first message to the first communication device.
  • the communication device 1300 can execute the method 500 in the above embodiment.
  • the communication device 1300 is equivalent to the first communication device in the method 500.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the first communication device in the method 500.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the first communication device in the method 500.
  • the transceiver unit 1301 is configured to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the application The information is verified for integrity; the processing unit 1302 is used for verifying the legality of the digital certificate.
  • the communication device 1300 can execute the method 600 in the above embodiment.
  • the communication device 1300 is equivalent to the second communication device in the method 600.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the second communication device in the method 600.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the second communication device in the method 600.
  • the processing unit 1302 is configured to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the application Information integrity verification; the transceiver unit 1301 is configured to send the first message to the first communication device.
  • the communication device 1300 can execute the method 700 in the above embodiment.
  • the communication device 1300 is equivalent to the control management device in the method 700.
  • the transceiving unit 1301 is configured to perform the transceiving operations performed by the control and management device in the method 700.
  • the processing unit 1302 is configured to perform operations other than the sending and receiving operations performed by the control and management device in the method 700.
  • the transceiving unit 1301 is used to obtain application information
  • the processing unit 1302 is used to obtain first verification information according to the application information
  • the first verification information is used to verify the integrity of the application information
  • the transceiving unit 1301 also Used to send the first verification information to the second communication device.
  • the communication device 1300 may execute the method 800 in the above embodiment.
  • the communication device 1300 is equivalent to the first communication device in the method 800.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the first communication device in the method 800.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the first communication device in the method 800.
  • the transceiver unit 1301 is used to obtain application information and at least one piece of verification information, and the at least one piece of verification information is used to verify the integrity of the application information; the processing unit 1302 is used to verify the integrity of the application information according to the at least one piece of verification information Apply information for integrity verification.
  • the communication device 1300 can execute the method 900 in the above embodiment.
  • the communication device 1300 is equivalent to the second communication device in the method 900.
  • the transceiving unit 1301 is configured to perform the transceiving operation performed by the second communication device in the method 900.
  • the processing unit 1302 is configured to perform operations other than the transceiving operations performed by the second communication device in the method 900. For example: the processing unit 1302 is used to obtain application information and at least one piece of verification information, and the at least one piece of verification information is used to verify the integrity of the application information; the transceiver unit 1301 is used to verify the application information and the at least one piece of verification information. The information is sent to the first communication device.
  • FIG. 14 is a schematic structural diagram of a communication device provided by an embodiment of the application.
  • the communication device 1400 includes a communication interface 1401 and a processor 1402 connected to the communication interface 1401.
  • the communication device 1300 may be used to execute the method 100, the method 200, the method 300, the method 400, the method 500, the method 600, the method 700, the method 800, or the method 900 in the above embodiments.
  • the communication device 1400 can execute the method 100 in the above embodiment.
  • the communication device 1400 is equivalent to the communication device 1 in the method 100.
  • the communication interface 1401 is used for the transceiving operations performed by the communication device 1 in the above method 100; the processor 1402 is used for other operations except the transceiving operations performed by the communication device 1 in the above method 100.
  • the processor 1402 is used to generate message 1, which includes application information 1 and verification information 1, and the verification information 1 is used to verify the integrity of the application information 1; the communication interface 1401 is used to transfer the message 1 Sent to the communication device 2.
  • the communication device 1400 can execute the method 100 in the above embodiment.
  • the communication device 1400 is equivalent to the communication device 2 in the method 100.
  • the communication interface 1401 is used for the transceiving operations performed by the communication device 2 in the above method 100; the processor 1402 is used for other operations except the transceiving operations performed by the communication device 2 in the above method 100.
  • the communication interface 1401 is used to receive the message 1, and the message 1 includes application information 1 and verification information 1.
  • the verification information 1 is used to verify the integrity of the application information 1; the processor 1402 is used to use the verification information 1. Perform integrity verification on application information 1.
  • the communication device 1400 can execute the method 200 in the above embodiment.
  • the communication device 1400 is equivalent to the communication device 1 in the method 200.
  • the communication interface 1401 is used for the transceiving operations performed by the communication device 1 in the above method 200; the processor 1402 is used for other operations except the transceiving operations performed by the communication device 1 in the above method 200.
  • the processor 1402 is used to generate a message 1, which includes a digital certificate 1, and the digital certificate 1 includes application information 1 and verification information 1, and the verification information 1 is used to complete the application information 1. Verification;
  • the communication interface 1401 is used to send the message 1 to the communication device 2.
  • the communication device 1400 can execute the method 200 in the above embodiment.
  • the communication device 1400 is equivalent to the communication device 2 in the method 200.
  • the communication interface 1401 is used for the transceiving operations performed by the communication device 2 in the above method 200; the processor 1402 is used for other operations except the transceiving operations performed by the communication device 2 in the above method 200.
  • the communication interface 1401 is used to receive the message 1, the message 1 includes the digital certificate 1, the digital certificate 1 includes the application information 1 and the verification information 1, and the verification information 1 is used to verify the integrity of the application information 1;
  • the processor 1402 is configured to verify the legality of the digital certificate 1.
  • the communication device 1400 can execute the method 300 in the above embodiment.
  • the communication device 1400 is equivalent to the first communication device in the method 300.
  • the communication interface 1401 is used for the transceiving operations performed by the first communication device in the above method 300; the processor 1402 is used for other operations except the transceiving operations performed by the first communication device in the above method 300.
  • the communication interface 1401 is configured to receive a first message, and the first message includes application information and first verification information; the processor 1402 is configured to perform verification on the first message according to the first verification information in the first message. The integrity of the application information is verified.
  • the communication device 1400 can execute the method 400 in the above embodiment.
  • the communication device 1400 is equivalent to the second communication device in the method 400.
  • the communication interface 1401 is used for the transceiving operations performed by the second communication device in the above method 400;
  • the processor 1402 is used for other operations except the transceiving operations performed by the second communication device in the above method 400.
  • the processor 1402 is configured to generate a first message, the first message includes application information and first verification information, the first verification information is used to verify the integrity of the application information;
  • communication interface 1401 is configured to send the first message to the first communication device.
  • the communication device 1400 can execute the method 500 in the above embodiment.
  • the communication device 1400 is equivalent to the first communication device in the method 500.
  • the communication interface 1401 is used for the transceiving operation performed by the first communication device in the above method 500; the processor 1402 is used for other operations except the transceiving operation performed by the first communication device in the above method 500.
  • the communication interface 1401 is used to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the application The information performs integrity verification; the processor 1402 is configured to perform legality verification on the digital certificate.
  • the communication device 1400 can execute the method 600 in the above embodiment.
  • the communication device 1400 is equivalent to the second communication device in the method 600.
  • the communication interface 1401 is used for the transceiving operations performed by the second communication device in the above method 600; the processor 1402 is used for other operations except the transceiving operations performed by the second communication device in the above method 600.
  • the processor 1402 is configured to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the application The integrity of the information is verified; the communication interface 1401 is used to send the first message to the first communication device.
  • the communication device 1400 can execute the method 700 in the above embodiment.
  • the communication device 1400 is equivalent to the control management device in the method 700.
  • the communication interface 1401 is used for the transceiving operations performed by the control and management device in the above method 700; the processor 1402 is used for other operations other than the transceiving operations performed by the control and management device in the above method 700.
  • the communication interface 1401 is used to obtain application information
  • the processor 1402 is used to obtain first verification information according to the application information
  • the first verification information is used to verify the integrity of the application information
  • the communication interface 1401 also Used to send the first verification information to the second communication device.
  • the communication device 1400 can execute the method 800 in the above embodiment.
  • the communication device 1400 is equivalent to the first communication device in the method 800.
  • the communication interface 1401 is used for the transceiving operations performed by the first communication device in the above method 800; the processor 1402 is used for other operations except the transceiving operations performed by the first communication device in the above method 800.
  • the communication interface 1401 is used to obtain application information and at least one piece of verification information; the processor 1402 is used to perform integrity verification on the application information according to the at least one piece of verification information.
  • the communication device 1400 can execute the method 900 in the above embodiment.
  • the communication device 1400 is equivalent to the second communication device in the method 900.
  • the communication interface 1401 is used for the transceiving operation performed by the second communication device in the above method 900;
  • the processor 1402 is used for other operations except the transceiving operation performed by the second communication device in the above method 900.
  • the processor 1402 is used to obtain application information and at least one piece of verification information, the at least one piece of verification information is used to verify the integrity of the application information;
  • the communication interface 1401 is used to verify the application information and the at least one piece of verification information. The information is sent to the first communication device.
  • FIG. 15 is a schematic structural diagram of a communication device provided by an embodiment of the application.
  • the communication apparatus 1500 may be used to execute the method 100, the method 200, the method 300, the method 400, the method 500, the method 600, the method 700, the method 800, or the method 900 in the above embodiments.
  • the communication device 1500 may include a processor 1510, a memory 1520 coupled to the processor 1510, and a transceiver 1530.
  • the processor 1510 may be a central processing unit (English: central processing unit, abbreviation: CPU), a network processor (English: network processor, abbreviation: NP), or a combination of CPU and NP.
  • the processor may also be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviation: ASIC), a programmable logic device (English: programmable logic device, abbreviation: PLD) or a combination thereof.
  • the above-mentioned PLD can be a complex programmable logic device (English: complex programmable logic device, abbreviation: CPLD), field programmable logic gate array (English: field-programmable gate array, abbreviation: FPGA), general array logic (English: generic array) logic, abbreviation: GAL) or any combination thereof.
  • the processor 1510 may refer to one processor, or may include multiple processors.
  • the memory 1520 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviation: RAM); the memory may also include a non-volatile memory (English: non-volatile memory) , Such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard disk drive, abbreviation: HDD) or solid state drive (English: solid-state drive) , Abbreviation: SSD); the storage 1520 may also include a combination of the above-mentioned types of storage.
  • the memory 1520 may refer to one memory, or may include multiple memories.
  • computer readable instructions are stored in the memory 1520, and the computer readable instructions include multiple software modules, such as a sending module 1521, a processing module 1522, and a receiving module 1523.
  • the processor 1510 executes each software module, it can perform corresponding operations according to the instructions of each software module.
  • an operation performed by a software module actually refers to an operation performed by the processor 1510 according to an instruction of the software module.
  • the communication device 1500 can execute the method 100 in the above embodiment.
  • the communication device 1500 is equivalent to the communication device 1 in the method 100.
  • the processing module 1522 is used to generate message 1.
  • the message 1 includes application information 1 and verification information 1.
  • the verification information 1 is used to verify the integrity of the application information 1; the sending module 1521 is used to send the message 1 ⁇ 2 ⁇ To the communication device 2.
  • the communication device 1500 can execute the method 100 in the above embodiment.
  • the communication device 1500 is equivalent to the communication device 2 in the method 100.
  • the receiving module 1523 is configured to receive the message 1, and the message 1 includes the application information 1 and the verification information 1.
  • the processing module 1522 is configured to verify the integrity of the application information 1 according to the verification information 1.
  • the sending module 1521 is configured to forward the message 1 when the application information 1 is verified.
  • the communication device 1500 can execute the method 200 in the above embodiment.
  • the communication device 1500 is equivalent to the communication device 1 in the method 200.
  • the processing module 1522 is used to generate message 1, which includes digital certificate 1, which includes application information 1 and verification information 1, and verification information 1 is used to verify the integrity of application information 1; sending module 1521 is used to send message 1 to communication device 2.
  • the communication device 1500 can execute the method 200 in the above embodiment.
  • the communication device 1500 is equivalent to the communication device 2 in the method 200.
  • the receiving module 1523 is configured to receive the message 1, the message 1 includes the digital certificate 1, and the digital certificate 1 includes the application information 1 and the verification information 1.
  • the processing module 1522 is used to verify the legality of the digital certificate 1.
  • the sending module 1521 is configured to forward the message 1 when the application information 1 is verified.
  • the communication device 1500 can execute the method 300 in the above embodiment.
  • the communication device 1500 is equivalent to the first communication device in the method 300.
  • the receiving module 1523 is configured to receive a first message, and the first message includes application information and first verification information.
  • the processing module 1522 is configured to verify the integrity of the application information in the first message according to the first verification information in the first message.
  • the sending module 1521 is configured to forward the first message when the application information is verified.
  • the communication device 1500 can execute the method 400 in the above embodiment.
  • the communication device 1500 is equivalent to the second communication device in the method 400.
  • the processing module 1522 is configured to generate a first message, the first message including application information and first verification information, and the first verification information is used to verify the integrity of the application information.
  • the sending module 1521 is configured to send the first message to the first communication device.
  • the communication device 1500 can execute the method 500 in the above embodiment.
  • the communication device 1500 is equivalent to the first communication device in the method 500.
  • the receiving module 1523 is configured to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the Apply information for integrity verification.
  • the processing module 1522 is configured to verify the legality of the digital certificate.
  • the sending module 1521 is configured to forward the first message when the application information is verified.
  • the communication device 1500 can execute the method 600 in the above embodiment.
  • the communication device 1500 is equivalent to the second communication device in the method 600.
  • the processing module 1522 is configured to obtain a first message, the first message includes a digital certificate, the digital certificate includes application information and first verification information, and the first verification information is used to verify the Apply information for integrity verification.
  • the sending module 1521 is configured to send the first message to the first communication device.
  • the communication device 1500 can execute the method 700 in the above embodiment.
  • the communication device 1500 is equivalent to the control management device in the method 700.
  • the receiving module 1523 is used to obtain application information
  • the processing module 1522 is used to obtain first verification information according to the application information
  • the first verification information is used to verify the integrity of the application information
  • the sending module 1521 Used to send the first verification information to the second communication device.
  • the communication device 1500 can execute the method 800 in the above embodiment.
  • the communication device 1500 is used to execute the method 800 in the above embodiment, the communication device 1500 is equivalent to the first communication device in the method 800.
  • the receiving module 1523 is configured to obtain application information and at least one piece of verification information, and the at least one piece of verification information is used to verify the integrity of the application information.
  • the processing module 1522 is configured to perform integrity verification on the application information according to the at least one verification information.
  • the communication device 1500 can execute the method 900 in the above embodiment.
  • the communication device 1500 is equivalent to the second communication device in the method 900.
  • the processing module 1522 is configured to obtain application information and at least one piece of verification information, and the at least one piece of verification information is used to verify the integrity of the application information.
  • the sending module 1521 is configured to send the application information and the at least one piece of verification information to the first communication device.
  • the processor 1510 executes the computer-readable instructions in the memory 1520, it can perform all operations that can be performed by the network device 1500 according to the instructions of the computer-readable instructions.
  • all operations that can be performed by the communication device 1 in the method 100 can be performed; for example, all operations that can be performed by the communication device 2 in the method 100 can be performed; for example, all operations that can be performed by the communication device 1 in the method 200 can be performed; for example, It can perform all operations that can be performed by the communication device 2 in the method 200; for example, it can perform all the operations that can be performed by the first communication device in the method 300; for another example, it can perform all the operations that can be performed by the second communication device in the method 400; and For example, all operations that can be performed by the first communication device in method 500 can be performed; for another example, all operations that can be performed by the second communication device in method 600 can be performed; and all operations that can be performed by the control management device in method 700 can be performed. Operation; For another example, all operations that can be performed by the
  • control management device may be, for example, a device running network management software, or may be a controller, and the embodiment of the present application does not specifically limit it.
  • the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which, when run on a computer, causes the computer to execute the execution in the above embodiments by the first communication device A step of.
  • the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer, causes the computer to execute the execution in the above embodiments by the second communication device A step of.
  • the embodiments of the present application also provide a computer-readable storage medium that stores instructions in the computer-readable storage medium, which when run on a computer, causes the computer to execute the control and management device in the above embodiments. step.
  • An embodiment of the present application also provides a communication system, including the first communication device and the second communication device mentioned in the above embodiments.
  • the embodiment of the present application also provides a communication system, including the second communication device and the control management device mentioned in the above embodiment.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of units is only a logical business division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • business units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software business unit.
  • the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .
  • the services described in the present invention can be implemented by hardware, software, firmware, or any combination thereof.
  • these services can be stored in a computer-readable medium or transmitted as one or more instructions or codes on the computer-readable medium.
  • the computer-readable medium includes a computer storage medium and a communication medium, where the communication medium includes any medium that facilitates the transfer of a computer program from one place to another.
  • the storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Power Engineering (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请实施例公开了一种校验应用信息的方法,该方法可以由第一通信装置执行。第一通信装置在接收到包括应用信息的第一报文之后,可以对第一报文中的应用信息的完整性进行验证。在本申请实施例中,第一报文中包括应用信息和第一验证信息,该第一验证信息用于对应用信息的完整性进行验证。因此,第一通信装置接收到第一报文之后,可以基于该第一验证信息对应用信息的完整性进行验证。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。

Description

一种校验应用信息的方法、报文处理方法及装置
本申请要求以下递交中国知识产权局的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
1、2020年06月12日提交中国专利局、申请号为202010538369.3、发明名称为“一种针对报文所携带的应用信息进行安全验证的方法,装置和系统”的中国专利申请;
2、2020年07月13日提交中国专利局、申请号为202010670997.7、发明名称为“一种校验应用信息的方法、报文处理方法及装置”的中国专利申请;
3、2020年07月13日提交中国专利局、申请号为202010669854.4、发明名称为“一种报文处理方法及装置”的中国专利申请。
技术领域
本申请涉及通信领域,尤其涉及一种校验应用信息的方法、报文处理方法及装置。
背景技术
在一些网络中,例如在感知应用的互联网协议第六版(Application-aware Internet Protocol Version 6 Networking,APN6)网络中,可以在业务报文中携带应用信息,使得业务报文进入网络之后,网络中的网络设备能够根据应用信息确定应用需求,从而为应用分配对应的网络资源。
目前,应用信息的不当使用会导致网络资源的不当使用。
发明内容
本申请实施例提供了一种校验应用信息的方法、报文处理方法及装置,可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
第一方面,本申请实施例提供了一种校验应用信息的方法,该方法可以由第一通信装置执行。第一通信装置在接收到包括应用信息的第一报文之后,可以对第一报文中的应用信息的完整性进行验证。在本申请实施例中,第一报文中包括应用信息和第一验证信息,该第一验证信息用于对应用信息的完整性进行验证。因此,第一通信装置接收到第一报文之后,可以基于该第一验证信息对应用信息的完整性进行验证。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,第一通信装置基于所述第一验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置可以根据所述第一报文中的目标字段,获取第二验证信息,其中,所述目标字段包括所述应用信息。获得第二验证信息之后,第一通信装置对第二验证信息和第一验证信息进行匹配校验。其中,对所述第二验证信息和所述第一验证信息进行匹配校验,例如可以是比较第一验证信息和第二验证信息,若二者相同,则匹配校验通过,若二者不相同,则匹配校验不通过。采用这种方式,可以实现对应用信息的完整性验证。
在一种实现方式中,第一通信装置基于所述第一验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置例如可以基于第一校验方法和所述第一验证信息对所述应用信息的完整性进行验证。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校 验。
在一种实现方式中,当第一校验方法为HMAC校验时,第一报文中包括的第一验证信息可以是第一HMAC校验信息。该第一HMAC校验信息可以是对第一报文中的目标字段进行HMAC计算得到的。对于在这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以对所述第一报文中的目标字段进行HMAC计算,获得第二HMAC校验信息;而后对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证,实现对应用信息的完整性验证。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,当所述第一校验方法为数字签名认证时,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以通过第一公钥对所述数字签名进行解密,得到第一明文;并对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;而后,第一通信装置对所述第一明文和所述第二明文,进行匹配验证。
在一种实现方式中,所述第一报文中还包括数字证书,所述数字证书中包括所述第一公钥。在本申请实施例中,数字证书可以是第一报文的发送设备的数字证书,该数字证书可以认为是第一报文的发送设备的身份证明。当第一公钥携带在数字证书中时,可以保证第一公钥的合法性。
在一种实现方式中,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。当对所述数字签名进行解密的解密算法携带在数字签名中时,可以保证该解密算法的合法性;当所述哈希算法携带在数字签名中时,可以保证该哈希算法的合法性。
在一种实现方式中,所述方法还包括:对所述数字证书的合法性进行验证。可以理解的是,对数字证书和合法性进行验证,可以验证第一报文的发送设备的合法性。相应的,若数字证书中还携带其它信息,例如,携带前述第一公钥,又如,携带对所述数字签名进行解密的解密算法,和/或,所述哈希算法,也可以验证数字证书中携带的其它信息的合法性。
在一种实现方式中,所述第一报文中包括数字证书,所述应用信息和所述第一验证信息携带在所述数字证书中。
在一种实现方式中,当应用信息和第一验证信息携带在数字证书中时,第一通信装置基于所述第一验证信息对所述应用信息的完整性进行验证,在具体实现时,第一通信装置可以对所述数字证书的合法性进行验证。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。其中,基于IPSEC的完整性验证,包括基于AH的完整性验证和基于ESP的完整性验证,在本申请实施例中,基于AH的完整性验证也可以被称为AH校验,基于AH的完整性验证也可以被称为ESP校验。
在一种实现方式中,当第一校验方法为AH校验时,所述第一验证信息为第一AH验 证信息,其中,第一AH验证信息可以是利用AH校验算法对第一报文中的目标字段进行计算得到的。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用AH校验算法对所述第一报文中的目标字段进行计算,得到第二AH验证信息;并对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
在一种实现方式中,当第一校验方法为ESP校验时,所述第一验证信息为第一ESP验证信息,其中,第一ESP验证信息可以是利用ESP校验算法对第一报文中的目标字段进行计算得到的。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用ESP校验算法对所述第一报文中的目标字段进行计算,得到第二ESP校验信息;并对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
在一种实现方式中,所述第一通信装置为网络设备。网络设备对应用信息进行完整性校验,可以确定应用信息是否被盗用,从而保证应用信息对应的网络资源不被盗用。
在一种实现方式中,所述第一通信装置包括:接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者,基站,或者,用户面功能UPF设备,或者,宽带网络网关BNG,或者,运营商边缘PE设备。
在一种实现方式中,第一通信装置对应用信息的完整性进行验证之后,若应用信息通过验证,则表示第一报文中的应用信息是合法的,故而第一通信装置可以转发该第一报文。作为一个示例,第一通信装置可以根据应用信息确定对应的网络资源,并利用所确定的网络资源转发第一报文。
在一种实现方式中,第一通信装置对应用信息的完整性进行验证之后,若应用信息未通过验证,则表示第一报文中的应用信息是不合法的,故而第一通信装置可以丢弃该第一报文。从而防止应用信息对应的网络资源被盗用。
第二方面,本申请实施例提供了一种报文处理的方法,该方法可以由第二通信装置执行。第二通信装置可以生成第一报文,该第一报文中除了包括应用信息之外,还包括对应用信息进行完整性验证的第一验证信息。第二通信装置生成第一报文之后,即可将该第一报文发送给第一通信装置,以便于第一通信装置基于第一验证信息对应用信息进行完整性验证。如此一来,第一通信装置接收到第一报文之后,可以基于该第一验证信息对应用信息的完整性进行验证。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,所述第一验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。作为一个示例,第二通信装置可以获取目标字段,而后根据该目标字段获得第一验证信息,进一步地,第二通信装置将第一验证信息封装至第一报文中,从而得到包括应用信息和第一验证信息的第一报文。
在一种实现方式中,所述第一验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。作为一个示例,第二通信装置 可以获取目标字段,而后利用第一校验方法对第一报文中的目标字段进行计算,从而得到第一验证信息,进一步地,第二通信装置将第一验证信息封装至第一报文中,从而得到包括应用信息和第一验证信息的第一报文。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥对所述目标字段进行签名所得到的数字签名。
在一种实现方式中,所述第一验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
在一种实现方式中,当第一验证方法为HMAC、或者第一验证方法为数字签名验证,或者,第一验证信息为数字证书中的加密摘要时,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。作为一种示例,第二通信装置可以将应用信息发送给控制管理设备,由控制管理设备对应用信息进行计算,从而得到第一验证信息,进一步地,控制管理设备将计算得到的第一验证信息发送给第二通信装置。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息。对于这种情况,第一AH认证信息可以是第二通信装置利用AH校验算法对第一报文中的目标字段进行计算得到的。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息。对于这种情况,第一ESP认证信息可以是第二通信装置利用ESP校验算法对第一报文中的目标字段进行计算得到的。
在一种实现方式中,所述第二通信装置为服务器或者用户设备。
在一种实现方式中,所述用户设备包括:物联网IoT设备或终端设备。
在以上第一方面和第二方面中:
所述应用信息和所述第一验证信息,可以携带在第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPv6报文。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在IPv6扩展头中。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在目的地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在源地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述第一验证信息携带在IPv6扩展头中。
在一种实现方式中,当第一报文为IPv6报文时,所述第一验证信息携带在目的地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述第一验证信息携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,当第一报文为MPLS报文时,所述应用信息携带在标签值字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述应用信息携带在扩展类型长度 值TLV字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述第一验证信息携带在标签值字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述第一验证信息携带在扩展TLV字段中。
在一种实现方式中,当第一报文为SRv6报文时,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,当第一报文为SRv6报文时,所述应用信息携带在分段路由头SRH中。
在一种实现方式中,当第一报文为SRv6报文时,所述第一验证信息携带在SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,当第一报文为IPv4报文时,所述应用信息携带在选项option字段中。
在一种实现方式中,当第一报文为IPv4报文时,所述第一验证信息携带在option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,当第一报文为GRE报文时,所述应用信息携带在关键字key字段中。
在一种实现方式中,当第一报文为GRE报文时,所述第一验证信息携带在key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,当第一报文为VXLAN报文时,所述应用信息携带在虚拟网络标识符字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述第一验证信息携带在虚拟网络标识符字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述第一验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在流标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在虚拟网络标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为NVGRE报文时,其特征在于,所述第一验证信息携带在流标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述第一验证信息携带在虚拟网络标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述第一验证信息携带在预留字 段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,当第一报文为Geneve报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述应用信息携带在可变长度选项字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述第一验证信息携带在预留字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述第一验证信息携带在可变长度选项字段中。
第三方面,本申请实施例提供了一种校验应用信息的方法,该方法可以由第一通信装置执行。第一通信装置可以获取第一报文,第一报文中包括数字证书,该数字证书中包括应用信息和用于对应用信息进行完整性验证的第一验证信息。由于数字证书中包括应用信息和第一验证信息。若该数字证书合法,则说明通过第一验证信息合法,相应的说明应用信息通过完整性验证,因此,第一通信装置接收到第一报文之后,可以对该数字证书进行合法性验证,从而达到对应用信息进行完整性验证的目的。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,所述第一报文中还包括第二验证信息,所述第二验证信息用于对所述应用信息进行完整性验证,所述方法还包括:利用所述第二验证信息对所述应用信息进行完整性验证。由此可见,第一报文中包括多个用于对应用信息进行完整性验证的验证信息,从而可以实现对应用信息的多重验证,更好地避免应用信息对应的网络资源被盗用。
在一种实现方式中,所述第一验证信息为所述数字证书中的加密摘要。
在一种实现方式中,第一通信装置利用所述第二验证信息对所述应用信息进行完整性验证的具体实现方式,与以上第一方面所述的第一通信装置利用第一验证信息对应用信息进行完整性验证的方法类似。作为一种示例:第一通信装置可以根据所述第一报文中的目标字段,获取第三验证信息,所述目标字段包括所述应用信息;并对所述第三验证信息和所述第二验证信息进行匹配校验。
在一种实现方式中,利用所述第二验证信息对所述应用信息进行完整性验证,包括:基于数字签名算法和所述第二验证信息对所述应用信息的完整性进行验证。
在一种实现方式中,所述第二验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名,所述基于数字签名算法和所述第二验证信息对所述应用信息的完整性进行验证,包括:通过第一公钥对所述数字签名进行解密,得到第一明文;对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;对所述第一明文和所述第二明文,进行匹配验证。
在一种实现方式中,所述第一公钥携带在所述数字证书中。采用这种方式,可以利用数字证书实现对应用信息的双重验证。其中一种是对数字证书进行验证,以验证数字证书中包括的应用信息的完整性,另一种是利用数字证书中携带的公钥,利用数字签名算法验证应用信息的完整性。
在一种实现方式中,对所述数字签名进行解密的解密算法携带在所述数字证书中,和/或,所述哈希算法带在所述数字证书中。
第四方面,本申请实施例提供了一种报文处理方法,由第二通信装置执行,所述方法包括:第二通信装置获取第一报文,第一报文中包括数字证书,该数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证。第二通信装置获得第一报文之后,将所述第一报文发送给第一通信装置。由于数字证书中包括应用信息和第一验证信息。若该数字证书合法,则说明通过第一验证信息合法,相应的说明应用信息通过完整性验证,因此,第一通信装置接收到第一报文之后,可以对该数字证书进行合法性验证,从而达到对应用信息进行完整性验证的目的。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,所述第一验证信息为所述数字证书中的加密摘要。
在一种实现方式中,所述第一报文中还包括第二验证信息,所述第二验证信息用于对所述应用信息进行完整性验证。
在一种实现方式中,所述第二验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。
在一种实现方式中,所述第二验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第二验证信息为采用第一私钥对所述目标字段进行签名所得到的数字签名。
在一种实现方式中,所述第一私钥对应的第一公钥携带在所述数字证书中,所述第一公钥用于对所述第二验证信息进行验证。
在一种实现方式中,对所述数字签名进行解密的解密算法携带在所述数字证书中,和/或,对所述第二验证信息进行验证的哈希算法带在所述数字证书中。
在以上第三方面和第四方面中:
在一种实现方式中,所述数字证书携带在第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPv6报文。
在一种实现方式中,当第一报文为IPv6报文时,所述数字证书携带在IPv6扩展头中。
在一种实现方式中,当第一报文为IPv6报文时,所述数字证书携带在目的地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述数字证书携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,当第一报文为MPLS报文时,所述数字证书携带在标签值字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述数字证书携带在扩展类型长度值TLV字段中。
在一种实现方式中,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,当第一报文为SRv6报文时,所述数字证书携带在分段路由头SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,当第一报文为IPv4报文时,所述数字证书携带在选项option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,当第一报文为GRE报文时,所述数字证书携带在关键字key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,当第一报文为VXLAN报文时,所述数字证书携带在虚拟网络标识符字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述数字证书携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,当第一报文为NVGRE报文时,所述数字证书携带在流标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述数字证书携带在虚拟网络标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述数字证书携带在预留字段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,当第一报文为Geneve报文时,所述数字证书携带在预留字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述数字证书携带在可变长度选项字段中。
第五方面,本申请实施例提供了一种应用信息的处理方法,该方法可以由控制管理设备执行,控制管理设备可以获取应用信息,并根据该应用信息获得第一验证信息,第一验证信息用于对应用信息的完整性进行验证。控制管理设备获得第一验证信息之后,可以将第一验证信息发送给第二通信装置。第二通信装置接收到第一验证信息之后,可以根据该第一验证信息执行相应的操作,例如生成包括应用信息和第一验证信息的第一报文,并将该第一报文发送给第一通信装置,以便于第一通信装置对应用信息进行完整性验证。由此可见,利用本申请实施例的方案,可以由控制管理设备获得对应用信息进行完整性验证的第一验证信息,并将第一验证信息发送给转发携带该应用信息的报文的网络设备,以便于转发携带该应用信息的报文的网络设备对应用信息进行完整性验证。由此可见,利用本申请实施例的方案,转发携带该应用信息的报文的网络设备可以基于第一验证信息对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,所述根据所述应用信息获得第一验证信息,包括:基于第一校验方法对所述应用信息进行计算,得到所述第一验证信息。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,当第一校验方法为HAMC校验时,所述第一验证信息包括第一HMAC校验信息。第一HMAC校验信息可以是控制管理设备利用HMAC算法对应用信息 进行计算得到的。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,当第一校验方法为数字签名验证,所述第一验证信息为采用第一私钥和第一哈希计算对所述应用信息进行签名所得到的数字签名。
在一种实现方式中,所述根据所述应用信息获得第一验证信息,包括:根据所述应用信息获得数字证书,所述数字证书包括所述第一验证信息。在一种实现方式中,第一验证信息为数字证书中的加密摘要。
在一种实现方式中,当第一验证信息携带在数字证书中时,控制管理设备将所述第一验证信息发送给第二通信装置,在具体实现时,例如可以为:将所述数字证书发送给所述第二通信装置。
在一种实现方式中,所述方法还包括:根据所述应用信息获得第二验证信息,所述第二验证信息用于对所述应用信息的完整性进行验证;将所述第二验证信息发送给第二通信装置。采用这种方式,控制管理设备可以生成多个用于对应用信息进行完整性验证的验证信息,从而实现对应用信息的多重验证,更加有效的避免应用信息对应的网络资源被盗用。
在一种实现方式中,所述根据所述应用信息获得第二验证信息,包括:基于第二校验方法对所述应用信息进行计算,得到所述第二验证信息。
在一种实现方式中,所述第二校验方法为HMAC校验。
在一种实现方式中,所述第二验证信息包括第二HMAC校验信息。
在一种实现方式中,所述第二校验方法为数字签名验证。
在一种实现方式中,所述第二验证信息为采用第二私钥和第二哈希计算对所述应用信息进行签名所得到的数字签名。
在一种实现方式中,所述第一校验方法和所述第二校验方法为不同的校验方法。例如,第一校验方法为HMAC校验,第二校验方法为数字签名验证;又如,第一校验方法为数字签名验证,第二校验方法为HAMC校验。
第六方面,本申请实施例提供了一种校验应用信息的方法,该方法可以由第一通信装置执行。第一通信装置可以获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。第一通信装置获取所述应用信息和至少一个验证信息之后,可以基于该至少一个验证信息对所述应用信息进行完整性验证。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,第一通信装置获取应用信息和至少一个验证信息在具体实现时,例如可以从其它设备处接收第一报文,该第一报文中包括所述应用信息和所述至少一个验证信息。
在一种实现方式中,第一报文中可以携带一个或者多个用于对应用信息进行完整性验证的验证信息,作为一个示例,第一报文中可以包括第一验证信息。
在一种实现方式中,第一通信装置基于所述第一验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置可以根据根据所述第一报文中的第一目标字段,获取第三验证信息,其中,所述第一目标字段包括所述应用信息。获得第三验证信息之后,第 一通信装置对第三验证信息和第一验证信息进行匹配校验。其中,对所述第三验证信息和所述第一验证信息进行匹配校验,例如可以是比较第三验证信息和第一验证信息,若二者相同,则匹配校验通过,若二者不相同,则匹配校验不通过。采用这种方式,可以实现对应用信息的完整性验证。
在一种实现方式中,第一通信装置基于所述第一验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置例如可以基于第一校验方法和所述第一验证信息对所述应用信息的完整性进行验证。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,当第一校验方法为HMAC校验时,第一报文中包括的第一验证信息可以是第一HMAC校验信息。该第一HMAC校验信息可以是对第一报文中的第一目标字段进行HMAC计算得到的。对于在这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以对所述第一报文中的第一目标字段进行HMAC计算,获得第二HMAC校验信息;而后对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证,实现对应用信息的完整性验证。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,当所述第一校验方法为数字签名认证时,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一报文中的第一目标字段进行签名所得到的数字签名。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以通过第一公钥对所述数字签名进行解密,得到第一明文;并对所述第一目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;而后,第一通信装置对所述第一明文和所述第二明文,进行匹配验证。
在一种实现方式中,所述第一报文中还包括数字证书,所述数字证书中包括所述第一公钥。在本申请实施例中,数字证书可以是第一报文的发送设备的数字证书,该数字证书可以认为是第一报文的发送设备的身份证明。当第一公钥携带在数字证书中时,可以保证第一公钥的合法性。
在一种实现方式中,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。当对所述数字签名进行解密的解密算法携带在数字签名中时,可以保证该解密算法的合法性;当所述哈希算法携带在数字签名中时,可以保证该哈希算法的合法性。
在一种实现方式中,所述方法还包括:对所述数字证书的合法性进行验证。可以理解的是,对数字证书和合法性进行验证,可以验证第一报文的发送设备的合法性。相应的,若数字证书中还携带其它信息,例如,携带前述第一公钥,又如,携带对所述数字签名进行解密的解密算法,和/或,所述哈希算法,也可以验证数字证书中携带的其它信息的合法性。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。 其中,基于IPSEC的完整性验证,包括AH校验和ESP校验。
在一种实现方式中,当第一校验方法为AH校验时,所述第一验证信息为第一AH验证信息,其中,第一AH验证信息可以是利用AH校验算法对第一报文中的第一目标字段进行计算得到的。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用AH校验算法对所述第一报文中的第一目标字段进行计算,得到第二AH验证信息;并对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
在一种实现方式中,当第一校验方法为ESP校验时,所述第一验证信息为第一ESP验证信息,其中,第一ESP验证信息可以是利用ESP校验算法对第一报文中的第一目标字段进行计算得到的。对于这种情况,第一通信装置基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用ESP校验算法对所述第一报文中的第一目标字段进行计算,得到第二ESP校验信息;并对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
在一种实现方式中,所述第一报文中包括数字证书,所述应用信息和所述至少一个验证信息携带在所述数字证书中。
在一种实现方式中,当应用信息和至少一个验证信息携带在数字证书中时,第一通信装置可以对所述数字证书的合法性进行验证,以实现对应用信息的完整性验证。
在一种实现方式中,第一报文中携带的验证信息,除了包括第一验证信息之外,还可以包括第二验证信息。相应的,第一通信装置除了可以基于第一验证信息对应用信息进行验证之外,还可以基于第二验证信息对应用信息进行验证,以实现对应用信息的多重验证。
在一种实现方式中,第一通信装置基于所述第二验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置可以根据根据所述第一报文中的第二目标字段,获取第四验证信息,其中,所述第二目标字段包括所述应用信息。获得第四验证信息之后,第一通信装置对第二验证信息和第四验证信息进行匹配校验。
在一种实现方式中,第一通信装置基于所述第二验证信息对所述应用信息的完整性进行验证在具体实现时,第一通信装置例如可以基于第二校验方法和所述第二验证信息对所述应用信息的完整性进行验证。
在一种实现方式中,所述第二校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,当第二校验方法为HMAC校验时,第一报文中包括的第二验证信息可以是第三HMAC校验信息。该第三HMAC校验信息可以是对第一报文中的第二目标字段进行HMAC计算得到的。对于在这种情况,第一通信装置基于第二校验方法和所述第二验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以对所述第一报文中的第二目标字段进行HMAC计算,获得第四HMAC校验信息;而后对所述第三HMAC校验信息和所述第四HMAC校验信息进行匹配验证,实现对应用信息的完整性验证。
在一种实现方式中,所述第二校验方法为数字签名验证。
在一种实现方式中,当所述第二校验方法为数字签名认证时,所述第二验证信息为采 用第二私钥和第三哈希计算对所述第一报文中的第二目标字段进行签名所得到的数字签名。对于这种情况,第一通信装置基于第而校验方法和所述第二验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以通过第二公钥对所述数字签名进行解密,得到第三明文;并对所述目标字段进行第四哈希计算,得到第四明文,所述第三哈希计算和所述第四哈希计算采用相同的哈希算法;而后,第一通信装置对所述第三明文和所述第四明文,进行匹配验证。
在一种实现方式中,与第一公钥类似,第二公钥也可以携带在数字证书中,以保证第二公钥的合法性。其中,该数字证书可以携带在第一报文中。
在一种实现方式中,对第二验证信息进行解密的解密算法,和/或,第三哈希计算和第四哈希计算采用的哈希算法,也可以携带在数字证书中。
在一种实现方式中,所述第二校验方法为基于互联网协议安全IPSEC的完整性验证。其中,基于IPSEC的完整性验证,包括AH校验和ESP校验。
在一种实现方式中,当第二校验方法为AH校验时,所述第二验证信息为第三AH验证信息,其中,第三AH验证信息可以是利用AH校验算法对第一报文中的第二目标字段进行计算得到的。对于这种情况,第一通信装置基于第二校验方法和所述第二验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用AH校验算法对所述第一报文中的第二目标字段进行计算,得到第四AH验证信息;并对所述第三AH验证信息和所述第四AH验证信息进行匹配验证。
在一种实现方式中,当第二校验方法为ESP校验时,所述第二验证信息为第三ESP验证信息,其中,第三ESP验证信息可以是利用ESP校验算法对第一报文中的第二目标字段进行计算得到的。对于这种情况,第一通信装置基于第二校验方法和所述第二验证信息,对所述应用信息的完整性进行验证,在具体实现时:第一通信装置可以利用ESP校验算法对所述第一报文中的第二目标字段进行计算,得到第四ESP校验信息;并对所述第三ESP验证信息和所述第四ESP验证信息进行匹配验证。
在一种实现方式中,所述第一通信装置为网络设备。网络设备对应用信息进行完整性校验,可以确定应用信息是否被盗用,从而保证应用信息对应的网络资源不被盗用。
在一种实现方式中,所述第一通信装置包括:接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者宽带网络网关BNG,或者,运营商边缘PE设备。
在一种实现方式中,第一通信装置对应用信息的完整性进行验证之后,若应用信息通过验证,则表示第一报文中的应用信息是合法的,故而第一通信装置可以转发该第一报文。作为一个示例,第一通信装置可以根据应用信息确定对应的网络资源,并利用所确定的网络资源转发第一报文。
在一种实现方式中,第一通信装置对应用信息的完整性进行验证之后,若应用信息未通过验证,则表示第一报文中的应用信息是不合法的,故而第一通信装置可以丢弃该第一报文。从而防止应用信息对应的网络资源被盗用。
第七方面,本申请实施例提供了一种应用信息的处理方法,该方法可以由第二通信装 置执行,第二通信装置可以获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。第二通信装置获取应用信息和所述至少一个验证信息之后,可以将该应用信息和至少一个验证信息发送给第一通信装置,以便于第一通信装置基于该至少一个验证信息对应用信息的完整性进行验证。由此可见,利用本申请实施例的方案,第一通信装置可以对应用信息的完整性进行验证,从而避免应用信息不当使用,相应的可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在一种实现方式中,第一通信装置可以获取包括应用信息和至少一个验证信息的第一报文,并通过将第一报文发送给第一通信装置的方式,将所述应用信息和至少一个验证信息发送给第一通信装置。在一个示例中,第一通信装置可以利用应用信息和至少一个验证信息对业务报文进行封装,从而得到第一报文。
在一种实现方式中,第一报文中可以携带一个或者多个用于对应用信息进行完整性验证的验证信息,作为一个示例,第一报文中可以包括第一验证信息。
在一种实现方式中,所述第一验证信息是根据所述第一报文中的第一目标字段获得的,所述第一目标字段包括所述应用信息。作为一个示例,第二通信装置可以获取第一目标字段,而后根据该第一目标字段获得第一验证信息,进一步地,第二通信装置将第一验证信息封装至第一报文中,从而得到包括应用信息和第一验证信息的第一报文。
在一种实现方式中,所述第一验证信息,是利用第一校验方法对所述第一报文中的第一目标字段进行计算得到的,所述第一目标字段包括所述应用信息。作为一个示例,第二通信装置可以获取第一目标字段,而后利用第一校验方法对第一报文中的第一目标字段进行计算,从而得到第一验证信息,进一步地,第二通信装置将第一验证信息封装至第一报文中,从而得到包括应用信息和第一验证信息的第一报文。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥对所述第一目标字段进行签名所得到的数字签名。
在一种实现方式中,所述第一验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
在一种实现方式中,当第一验证方法为HMAC、或者第一验证方法为数字签名验证,或者,第一验证信息为数字证书中的加密摘要时,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。作为一种示例,第二通信装置可以将应用信息发送给控制管理设备,由控制管理设备对应用信息进行计算,从而得到第一验证信息,进一步地,控制管理设备将计算得到的第一验证信息发送给第二通信装置。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息。对于这种情况,第一AH认证信息可以是第二通信装置利用AH校验算法对第一报文中的第一目标字段进行计算得到的。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息。对于这种情况,第一ESP认证信息可以是第二通信装置利用ESP校验算法对第一报文中的第一目标字段进行计算得到的。
在一种实现方式中,第一报文中携带的验证信息,除了包括第一验证信息之外,还可以包括第二验证信息。相应的,将第一报文发送给第一通信装置之后,第一通信装置除了可以基于第一验证信息对应用信息进行验证之外,还可以基于第二验证信息对应用信息进行验证,以实现对应用信息的多重验证。
在一种实现方式中,所述第二验证信息是根据所述第一报文中的第二目标字段获得的,所述第二目标字段包括所述应用信息。作为一个示例,第二通信装置可以获取第二目标字段,而后根据该第二目标字段获得第二验证信息,进一步地,第二通信装置将第二验证信息封装至第一报文中,从而得到包括应用信息和第二验证信息的第一报文。
在一种实现方式中,所述第二验证信息,是利用第二校验方法对所述第一报文中的第二目标字段进行计算得到的,所述第二目标字段包括所述应用信息。作为一个示例,第二通信装置可以获取第二目标字段,而后利用第二校验方法对第一报文中的第二目标字段进行计算,从而得到第二验证信息,进一步地,第二通信装置将第二验证信息封装至第一报文中,从而得到包括应用信息和第二验证信息的第一报文。
在一种实现方式中,所述第二校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第二验证信息包括第三HMAC校验信息。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第二私钥对所述第二目标字段进行签名所得到的数字签名。
在一种实现方式中,所述第二验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
在一种实现方式中,当第二验证方法为HMAC、或者第二验证方法为数字签名验证,或者,第二验证信息为数字证书中的加密摘要时,所述第二验证信息,是控制管理设备发送给所述第二通信装置的。作为一种示例,第二通信装置可以将应用信息发送给控制管理设备,由控制管理设备对应用信息进行计算,从而得到第二验证信息,进一步地,控制管理设备将计算得到的第二验证信息发送给第二通信装置。
在一种实现方式中,所述第二校验方法为基于互联网协议安全IPSEC的完整性验证。
在一种实现方式中,所述第二验证信息为第三认证头AH验证信息。对于这种情况,第三AH认证信息可以是第二通信装置利用AH校验算法对第一报文中的第二目标字段进行计算得到的。
在一种实现方式中,所述第二验证信息为第三封装安全负载ESP验证信息。对于这种情况,第三ESP认证信息可以是第二通信装置利用ESP校验算法对第一报文中的第二目标字段进行计算得到的。
在以上第七方面和第八方面中:
在一种实现方式中,所述第一校验方法和所述第二校验方法,为不同的校验算法。例 如,第一校验方法为HMAC校验,则第二校验方法可以为数字签名验证、AH校验和ESP校验中的其中一项;又如,第一校验方法为数字签名验证,则第二校验方法可以为HMAC校验、AH校验和ESP校验中的其中一项;又如,第一校验方法为AH校验,则第二校验方法可以为HMAC校验、数字签名验证和ESP校验中的其中一项;再如,第一校验方法为ESP校验,则第二校验方法可以为HMAC校验、数字签名验证和AH校验中的其中一项。
在一种实现方式中,所述应用信息和所述至少一个验证信息,携带在第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPv6报文。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在IPv6扩展头中。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在目的地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述应用信息携带在源地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述至少一个验证信息携带在IPv6扩展头中。
在一种实现方式中,当第一报文为IPv6报文时,所述至少一个验证信息携带在目的地址中。
在一种实现方式中,当第一报文为IPv6报文时,所述至少一个验证信息携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,当第一报文为MPLS报文时,所述应用信息携带在标签值字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述应用信息携带在扩展类型长度值TLV字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述至少一个验证信息携带在标签值字段中。
在一种实现方式中,当第一报文为MPLS报文时,所述至少一个验证信息携带在扩展TLV字段中。
在一种实现方式中,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,当第一报文为SRv6报文时,所述应用信息携带在分段路由头SRH中。
在一种实现方式中,当第一报文为SRv6报文时,所述至少一个验证信息携带在SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,当第一报文为IPv4报文时,所述应用信息携带在选项option字段中。
在一种实现方式中,当第一报文为IPv4报文时,所述至少一个验证信息携带在option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,当第一报文为GRE报文时,所述应用信息携带在关键字key字段中。
在一种实现方式中,当第一报文为GRE报文时,所述至少一个验证信息携带在key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,当第一报文为VXLAN报文时,所述应用信息携带在虚拟网络标识符字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述至少一个验证信息携带在虚拟网络标识符字段中。
在一种实现方式中,当第一报文为VXLAN报文时,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在流标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在虚拟网络标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述至少一个验证信息携带在流标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述至少一个验证信息携带在虚拟网络标识字段中。
在一种实现方式中,当第一报文为NVGRE报文时,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,当第一报文为Geneve报文时,所述应用信息携带在预留字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述应用信息携带在可变长度选项字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,当第一报文为Geneve报文时,所述至少一个验证信息携带在可变长度选项字段中。
第八方面,本申请实施例提供了一种第一通信装置,包括:通信接口;和与所述通信接口连接的处理器;根据所述通信接口和所述处理器,所述第一通信装置用于执行前述第一方面以及第一方面任意一项所述的方法;或者,所述第一通信装置用于执行前述第三方面以及第三方面任意一项所述的方法;或者,所述第一通信装置用于执行前述第六方面以及第六方面任意一项所述的方法。
第九方面,本申请实施例提供了一种第二通信装置,包括:通信接口;和与所述通信接口连接的处理器;根据所述通信接口和所述处理器,所述第二通信装置用于执行前述第二方面以及第二方面任意一项所述的方法;或者,所述第二通信装置用于执行前述第四方 面以及第四方面任意一项所述的方法;或者,所述第二通信装置用于执行前述第七方面以及第七方面任意一项所述的方法。
第十方面,本申请实施例提供了一种控制管理设备,包括:通信接口;和与所述通信接口连接的处理器;根据所述通信接口和所述处理器,所述控制管理设备用于执行前述第五方面以及第五方面任意一项所述的方法。
第十一方面,本申请实施例提供了一种第一通信装置,所述第一通信装置包括存储器和处理器;所述存储器,用于存储程序代码;所述处理器,用于运行所述程序代码中的指令,使得所述第一通信装置执行前述第一方面以及第一方面任意一项所述的方法;或者,使得所述第一通信装置执行前述第三方面以及第三方面任意一项所述的方法;或者,使得所述第一通信装置执行前述第六方面以及第六方面任意一项所述的方法。
第十二方面,本申请实施例提供了一种第二通信装置,所述第二通信装置包括存储器和处理器;所述存储器,用于存储程序代码;所述处理器,用于运行所述程序代码中的指令,使得所述第二通信装置执行前述第二方面以及第二方面任意一项所述的方法;或者,使得所述第二通信装置执行前述第四方面以及第四方面任意一项所述的方法;或者,使得所述第二通信装置执行前述第七方面以及第七方面任意一项所述的方法。
第十三方面,本申请实施例提供了一种控制管理设备,所述控制管理设备包括存储器和处理器;所述存储器,用于存储程序代码;所述处理器,用于运行所述程序代码中的指令,使得所述控制管理设备执行前述第五方面以及第五方面任意一项所述的方法。
第十四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上第一方面以及第一方面任意一项所述的方法,或者,使得所述计算机执行以上第二方面以及第二方面任意一项所述的方法,或者,使得所述计算机执行以上第三方面以及第三方面任意一项所述的方法,或者,使得所述计算机执行以上第四方面以及第四方面任意一项所述的方法,或者,使得所述计算机执行以上第五方面以及第五方面任意一项所述的方法,或者,使得所述计算机执行以上第六方面以及第六方面任意一项所述的方法,或者,使得所述计算机执行以上第七方面以及第七方面任意一项所述的方法。
第十五方面,本申请实施例提供了一种通信系统,其特征在于,包括以上第八方面或者第十一方法所述的第一通信装置以及以上第九方面或者第十二方面所述的第二通信装置。
第十六方面,本申请实施例提供了一种通信系统,其特征在于,包括以上第九方面或者第十二方面所述的第二通信装置,以及以上第十方面或者以上第十三方面所述的控制管理设备。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本申请实施例提供的一种示例性应用场景示意图;
图2为本申请实施例提供的又一个示例性网络场景示意图;
图3为本申请实施例提供的一种校验应用信息的方法的信令交互图;
图4a为本申请实施例提供的一种报文1的结构图;
图4b为本申请实施例提供的一种报文1的结构图;
图4c为本申请实施例提供的一种报文1的结构图;
图4d为本申请实施例提供的一种报文1的结构图;
图5为本申请实施例提供的一种校验应用信息的方法的信令交互图;
图6为本申请实施例提供的一种校验应用信息的方法的流程示意图;
图7为本申请实施例提供的一种报文处理方法的流程示意图;
图8为本申请实施例提供的一种校验应用信息的方法的流程示意图;
图9为本申请实施例提供的一种报文处理方法的流程示意图;
图10为本申请实施例提供的一种应用信息的处理方法的流程示意图;
图11为本申请实施例提供的一种校验应用信息的方法的流程示意图;
图12为本申请实施例提供的一种报文处理方法的流程示意图;
图13为本申请实施例提供的一种通信装置的结构示意图;
图14为本申请实施例提供的一种通信装置的结构示意图;
图15为本申请实施例提供的一种通信装置的结构示意图。
具体实施方式
本申请实施例提供了一种校验应用信息的方法,可以避免由于应用信息的不当使用而导致网络资源的不当使用的问题。
在本申请中所述的应用(application,APP),也可以称之为应用程序(application program),或者应用软件(application software),是为提供服务所需功能的软件,包括完成某项或多项特定工作的计算机程序,通常需要与用户进行交互。每个应用可以属于多项服务,可以运行在一个或多个服务器上或运行在用户设备上。在本申请实施例中,应用程序例如可以是关于游戏、视频、邮件、即时通讯、交通信息、天气预报等的APP。应用通常安装在终端设备上。为方便理解,首先对本申请实施例可能的应用场景进行介绍。
参见图1,该图为本申请实施例提供的一种示例性应用场景示意图。
在图1所示的应用场景中,安装有应用程序(application,APP)的用户设备101可以通过网络100向该APP的服务器102发送业务报文A,该业务报文A中可以包括该APP的应用信息。该网络100至少包括设备103和设备104,接收到业务报文A的设备103,可以根据业务报文A中携带的应用信息,为业务报文A分配对应的网络资源,以便于利用该网络资源将业务报文A转发给服务器102。例如,利用高带宽链路将该业务报文A转发给服务器102。当然,服务器102也可以通过网络100向用户设备101发送业务报文B,类似的,业务报文B中也可以携带该APP的应用信息。接收到业务报文B的设备104,可以根据业务报文B中携带的应用信息,为业务报文B分配网络资源,以便于利用该网络资源将业务报文B转发给用户设备101。此处提及的设备103和设备104,可以是网络100的边缘设备。
图1所示的应用场景,可以用于政企专线、家庭带宽以及移动网络等网络场景中。用 户设备101可以是物联网(Internet of Things,IoT)设备或者终端设备。此处提及的终端设备可以是手机、个人计算机(personal computer,PC),例如平板电脑(tablet personal computer,Tablet PC)、笔记本电脑、超级移动个人计算机、个人数字助理等,本申请实施例不做具体限定。
若图1所示的应用场景应用于政企专线,则设备103可以是用户驻地设备(customer premise equipment,CPE)或者接入网的接入(access,ACC)设备;设备104可以是数据中心出口网关(Data Center Gateway,DC GW)、或者数据中心服务器接入设备leaf、或者自治系统边界路由器(autonomous system boundary router,ASBR)。
若图1所示的应用场景应用于家庭带宽,则设备103可以是家庭网关(Residential Gateway,RG)或者接入网的ACC设备;设备104可以是DC GW、或者数据中心服务器接入设备leaf、或者ASBR。
若图1所示的应用场景应用于移动网络,则设备103可以移动网络基站、或者核心网的用户面功能(user plane function,UPF)设备,或者接入网的ACC设备;设备104可以是DC GW、或者数据中心服务器接入设备leaf、或者ASBR。
在一些实施例中,网络100可以包括接入网络、汇聚网络和数据中心网络。参见图2,该图为本申请实施例提供的又一个示例性网络场景示意图。图2所示的网络场景可以应用于家庭带宽或者政企专线,关于移动网络对应的网络场景,此处不做详细说明。
在图2所示的场景中,安装有APP的用户设备101可以生成包括应用信息的业务报文A,并依次通过设备105、接入网络的接入设备ACC 106、汇聚网的汇聚(aggregation,AGG)设备107、ASBR 108、DC GW 109、数据中心服务器接入设备spine 110、数据中心服务器接入设备leaf 111到达应用程序的服务器102。其中,对于家庭带宽的场景,设备105可以为RG,对于政企专线的网络场景,设备105可以为CPE。
通过以上描述可知,由于网络设备103可以根据业务报文A中携带的应用信息为业务报文A提供对应的服务质量,网络设备104可以根据业务报文B中携带的应用信息为业务报文B提供对应的服务质量,因此,若该应用信息使用不当,例如被盗用,则可能会使得网络资源不当使用。
举例说明1:设备101中的付费APP使用应用信息AAAA,应用信息AAAA对应高带宽、低时延的网络资源。设备101中的免费APP盗用了应用信息AAAA,从而盗用了高带宽、低时延的网络资源。
举例说明2:设备101中的APP登录了付费用户账号1,被授权使用应用信息AAAA。其它设备安装了该APP的破解版,登录了免费用户账号B。破解版APP盗用了应用信息AAAA,从而盗用了付费用户账户1的网络资源。
举例说明3:设备101中的付费APP使用应用信息AAAA,其它设备中的免费APP盗用了应用信息AAAA,从而盗用了付费APP的网络资源。
举例说明4:设备101中的APP登录了付费用户账号,被授权使用应用信息AAAA。其它设备中的相同APP登录了免费用户账号,被授权使用应用信息BBBB。免费用户账户为了盗用付费用户账户的网络资源,将应用信息BBBB篡改为AAAA。
因此,本申请实施例提供了一种校验应用信息的方法,可以避免由于应用信息的不当 使用而导致网络资源的不当使用。接下来,结合附图介绍该校验应用信息的方法。
需要说明的是,如无特别说明,在本申请实施例的以下描述中,诸如哈希算法n、公钥n、私钥n等“对象+序号”描述,是用于区别类似的对象,而不是用于限定特定的顺序或先后次序。而且,对于同一对象而言,其内容与序号没有直接关联,序号不同的对象之间,内容可以相同,也可以不同,本申请实施例不做具体限定。例如,哈希算法1和哈希算法2可以是相同的算法,也可以是不同的算法。
需要说明的是,本申请实施例中提及的通信装置,可以是交换机、路由器等网络设备,也可以是网络设备上的一部分组件,例如是网络设备上的单板,线卡,还可以是网络设备上的一个功能模块。通信装置还可以是用户设备或者服务器,或者是用户设备或者服务器上的一部分组件。本申请实施例不做具体限定。
参见图3,图3为本申请实施例提供的一种校验应用信息的方法的信令交互图。
图3所示的校验应用信息的方法100,可以由通信装置1和通信装置2执行。
作为示例,当通信装置1应用于用户设备101时,通信装置2应用于设备103,通信装置3应用于服务器102;当通信装置1应用于服务器102时,通信装置2应用于设备104,通信装置3应用于用户和设备101。该方法100例如可以通过如下S101-S105a或者S101-S105b实现。
S101:通信装置1生成报文1,报文1中包括应用信息1和验证信息1。
关于通信装置1,可以参考上文对于用户设备101或者服务器102的描述部分,此处不再详述。
在本申请中,应用信息指的是通信装置1上安装的APP对应的应用信息。在一种实现方式中,应用信息可以包括服务等级协议(service-level agreement,SLA)等级、应用标识、用户标识、流标识(英文:flow ID)和预留参数中的其中一项或者多项。其中,应用标识用于标识应用,用户标识用于标识使用应用的用户,用户标识例如可以是登录该应用的账户的标识;流标识用于标识该应用对应的业务报文。
在本申请实施例中,验证信息1用于对应用信息1进行完整性验证。对应用信息1进行完整性验证,包括验证所述应用信息1是否丢失、发生误码或者被篡改或者被伪造。
在本申请实施例中,通信装置1可以获得应用信息1,并根据应用信息1得到验证信息1。通信装置1获得应用信息1和验证信息1之后,可以对APP 1的业务报文进行封装,将将应用信息1和验证信息1添加到业务报文中,从而得到报文1。
在本申请实施例的一种实现方式中,验证信息1可以是通信装置1根据报文1中的字段得到的。作为一个示例,验证信息1可以是通信装置1利用验证算法1对报文1中的字段进行计算得到的。其中,前述报文1中的字段包括应用信息1。
在本申请实施例的一种实现方式中,验证算法1可以是密钥相关的哈希运算消息认证码(hashed-based message authentication code,HMAC)校验。
当验证算法1是HMAC校验时,在一种实现方式中,通信装置1可以将密钥1附加在字段1上作为哈希算法1的输入,从而得到验证信息1。其中,将密钥1附加在字段1上,可以是将密钥1附加在字段1的尾部,或者,将密钥1添加到字段1的头部,或者,将密钥1插入字段1的中间,等等。在一个示例中,字段1可以仅包括应用信息1。在又一个 示例中,字段1除了包括应用信息1之外,还可以包括报文1中的其它字段。
当验证算法1是HMAC校验时,在又一种实现方式中,通信装置1获得参数1和参数2,参数1和参数2的比特(英文:bit)数相同,例如参数1和参数2均为64bits。通信装置1在密钥2的头部或者尾部补充数值,例如补充0,使得补充数值后的密钥2的比特数与参数1相同。通信装置1对补充数值后的密钥2和参数1进行计算,例如进行异或计算,得到密钥2’。而后,通信装置1将密钥2’附加在字段1上作为哈希算法2的输入,得到HMAC1。通信装置1对补充数值后的密钥2和参数2进行计算,例如进行异或计算,得到密钥2”,而后,通信装置1将密钥2”附加在HMAC 1上作为哈希算法2的输入,得到HMAC 2,HMAC 2即为验证信息1。关于“将密钥2’附加在字段1上”以及“将密钥2”附加在HMAC1上”的描述,可以参考上文“将密钥1附加在字段1上”的描述部分,此处不再详述。
在本申请实施例的一种实现方式中,当前述字段1仅包括应用信息1时,验证信息1也可以是控制管理设备根据应用信息1计算得到的。例如,通信装置1将应用信息1发送给控制管理设备,控制管理设备利用HMAC算法对应用信息1进行计算,得到验证信息1,并将验证信息1发送给通信装置1,如此一来,通信装置1即获得了验证信息1。
在本申请实施例的一种实现方式中,验证算法1可以是数字签名验证。
当验证算法1是数字签名验证时,在一种实现方式中,通信装置1可以利用哈希算法3对报文1中的字段2进行哈希运算,得到哈希摘要1。而后,通信装置1利用私钥1和加密算法1对哈希摘要1进行加密,得到数字签名1,从而得到验证信息1。此处提及的验证信息1即为数字签名1。在一个示例中,字段2可以仅包括应用信息1。在又一个示例中,字段2除了包括应用信息1之外,还可以包括报文1中的其它字段。
在本申请实施例的一种实现方式中,当前述字段2仅包括应用信息1时,验证信息1也可以是控制管理设备根据应用信息1计算得到的。例如,通信装置1将应用信息1发送给控制管理设备,控制管理设备利用数字签名算法对应用信息1进行计算,得到验证信息1,并将验证信息1发送给通信装置1,如此一来,通信装置1即获得了验证信息1。
在本申请实施例的一种实现方式中,当验证算法1是数字签名验证时,报文1中除了包括应用信息1和验证信息1之外,还可以包括通信装置1的数字证书1,该数字证书1中包括公钥1,该公钥1与前述私钥1是一对非对称密钥。换言之,公钥1可以用于对数字签名1进行解密。在一些实施例中,该数字证书1中除了包括公钥1之外,还包括哈希算法3和解密算法1,此处提及的解密算法1与前述加密算法1对应,用于对数字签名1进行解密。
在本申请实施例中,通信装置1的数字证书1可以是证书授权(certificate authority,CA)设备发送给通信装置1的。此处提及的CA设备,例如可以是控制管理设备,又如可以是CA服务器。关于通信装置1获得数字证书1的过程,现简单说明。首先,通信装置1将自身的身份信息和其它信息发送给CA设备,其中,通信装置1自身的身份信息和其它信息构成不被信任的数字证书。CA设备利用哈希算法4对不被信任的数字证书进行哈希计算,得到哈希摘要2,而后,CA设备利用自身的私钥2对哈希摘要2进行加密,得到加密摘要1。而后,CA机构将CA机构的身份信息、加密摘要1和不被信任的数字证书发送给通信装置1,其中,CA机构的身份信息、加密摘要1和不被信任的数字证书即构成了通信 装置1的、被信任的数字证书1。
此处需要说明的是,前述通信装置1向CA设备发送的其它信息,可以包括前述公钥1、解密算法1和哈希算法3中的其中一项或者多项。前述通信装置1的身份信息,例如可以包括通信装置1的设备标识,又如可以包括前述应用信息1,本申请实施例不做具体限定。在本申请实施例中,当通信装置1的身份信息包括应用信息1时,报文1中的应用信息1例如可以携带在该数字证书1中。
在本申请实施例的一种实现方式中,验证算法1可以是基于互联网协议安全(Internet protocol security,IPSec)的完整性验证。
在本申请实施例中,基于IPSec的完整性验证,可以包括基于认证头(authentication header,AH)的完整性验证和基于封装安全负载(encapsulating security payload,ESP)的完整性验证。当验证算法1是基于IPSec的完整性验证时,报文1的封装格式可以包括隧道封装格式和传输封装格式两种形式。接下来,结合图4a至图4d进行理解。图4a至图4d分别示出了报文1的4种结构图。其中,图4a所示的报文1,其采用的报文封装格式为传输模式,采用的完整性验证算法为AH;图4b所示的报文1,其采用的报文封装格式为隧道模式,采用的完整性验证算法为AH;图4c所示的报文1,其采用的报文封装格式为传输模式,采用的完整性验证算法为ESP;图4d所示的报文1,其采用的报文封装格式为隧道模式,采用的完整性验证算法为ESP。
当验证算法1是基于AH的完整性验证、且报文1采用传输模式封装时,在一种实现方式中,通信装置1可以采用AH校验算法1对报文1中的字段3进行计算从而得到AH验证信息1,即:得到验证信息1。从图4a可以看出,字段3包括IP头、IP扩展头、AH、传输控制协议(Transmission Control Protocol,TCP)头部和数据(英文:data)。其中,应用信息1可以携带在IP扩展头中,此处提及的IP扩展头,例如可以为IPv6扩展头。此处提及的AH校验算法1,例如可以为HMAC信息摘要算法(message-digest algorithm)MD5,或者HMAC安全散列算法(secure hash algorithm)SHA1。
当验证算法1是基于AH的完整性验证、且报文1采用隧道模式封装时,在一种实现方式中,通信装置1可以采用AH校验算法2对报文1中的字段4进行计算从而得到AH验证信息2,即:得到验证信息1。从图4b可以看出,字段4包括新IP头、AH、IP头、IP扩展头、TCP头部和数据。其中,应用信息1可以携带在IP扩展头中,此处提及的IP扩展头,例如可以为IPv6扩展头。此处提及的AH校验算法2,例如可以为HMAC MD5,或者HMAC SHA1。
当验证算法1是基于ESP的完整性验证时,报文1可以采用隧道封装模式,在一种实现方式中,通信装置1可以采用ESP校验算法1对报文1中的字段5进行计算从而得到ESP验证信息1,即:得到验证信息1。从图4d可以看出,字段5包括ESP头部、IP头、IP扩展头、TCP头部、数据和ESP尾部(英文:tail)。其中,应用信息1可以携带在IP扩展头中,此处提及的IP扩展头,例如可以为IPv6扩展头。此处提及的ESP校验算法1,例如可以为HMAC MD5,或者HMAC SHA1。
在一种实现方式中,此处提及的报文1,可以是互联网协议第6版(Internet Protocol Version 6,IPv6)报文。
当报文1是IPv6报文时,在一些实施例中,前述应用信息1可以携带在IPv6报文的扩展头中。其中,IPv6报文的扩展头可以是逐跳选项(英文:hop-by-hop option)扩展头,IPv6报文的扩展头也可以是目的选项(英文:destination option)扩展头,IPv6报文的扩展头也还可以是路由(英文:routing)扩展头。在另一些实施例中,应用信息1也可以携带在报文1的源地址字段或者目的地址字段中。考虑到对于IPv6报文而言,其源地址和目的地址包括128比特,该128比特可以包括locator、function和arguments三个字段。其中,locator字段用于携带网段地址和子网地址;function和arguments字段均用于携带与locator对应的行为。在一些实施例中,可以将应用信息1携带在源地址字段的function字段或者arguments字段中。在一些实施例中,可以将应用信息1携带在目的地址字段的function字段或者arguments字段中。
与应用信息1类似,当报文1是IPv6报文时,在一些实施例中,验证信息1可以携带在IPv6报文的扩展头中。在另一些实施例中,验证信息1可以携带在IPv6报文的源地址字段或者目的地址字段中。需要说明的是,在本申请实施例中,应用信息1和验证信息1可以携带在IPv6报文的同一个字段中,也可以携带在不同的字段中,本申请实施例不作具体限定。例如,应用信息1和验证信息1均携带在源地址字段中,其中:应用信息1携带在源地址的function字段中,验证信息1携带在源地址的arguments字段中。又如,应用信息1携带在源地址字段中,验证信息1携带在目的地址字段中。
关于IPv6报文的结构以及各字段的含义,可以参考征求意见(request for comments,RFC)8200的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是多协议标签交换(Multi-Protocol Label Switching,MPLS)报文。
当报文1是MPLS报文时,应用信息1例如可以携带在该MPLS报文的报文头中。作为一种示例,应用信息1可以携带在报文头中的标签栈中,例如携带在某一个标签值字段中。作为又一种示例,应用信息1可以携带在该MPLS报文的扩展类型长度值(type length value,TLV)字段中。
当报文1是MPLS报文时,与应用信息1类似,验证信息1也可以携带在MPLS报文的报文头中。作为一种示例,验证信息1可以携带在报文头中的标签栈中,例如携带在某一个标签值字段中。作为又一种示例,验证信息1可以携带在该MPLS报文的扩展TLV字段中。
关于MPLS报文的结构以及各个字段的含义,可以参考draft-song-mpls-extension-header-02和RFC 3031的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是互联网协议第6版段路由(Segment Routing Internet Protocol Version 6,SRv6)报文。
当报文1是SRv6报文时,应用信息1例如可以携带在该SRv6报文的报文头中。作为一种示例,应用信息1可以携带在SRv6报文的分段路由头(segment routing header,SRH)中。在一些实施例中,应用信息1可以携带在SRH的源地址字段中;在另一些实施例中,应用信息1可以携带在SRH的目的地址字段中。在又一些实施例中,应用信息1还可以携带在段标识列表(segment identifier list,SID list)中。
与应用信息1类似,当报文1是SRv6报文时,验证信息1也可以携带在SRv6报文的报文头中。作为一个示例,验证信息1可以携带在SRv6报文的SRH中。在一些实施例中,验证信息1可以携带在SRH的源地址字段中;在另一些实施例中,验证信息1可以携带在SRH的目的地址字段中。在又一些实施例中,验证信息1还可以携带在SID list中。
关于SRv6报文的结构以及各个字段的含义,可以参考RFC 8200的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是互联网协议第4版(Internet Protocol Version 4,IPv4)报文。
当报文1是IPv4报文时,应用信息1例如可以携带在IPv4报文的选项(英文:option)字段中。与应用信息1类似,验证信息1也可以携带在IPv4报文的option字段中。
关于IPv4报文的结构以及各字段的含义,此处不做详述。
在一种实现方式中,报文1可以是通用路由封装(generic routing encapsulation,GRE)报文。
当报文1是GRE报文时,应用信息1可以携带在该GRE报文的报文头中。作为一种示例,应用信息1可以携带在报文头中的关键字(英文:key)字段中。与应用信息1类似,验证信息1也可以携带在GRE报文的key字段中。
关于GRE报文的结构以及各字段的含义,可以参考RFC 2890的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是虚拟扩展局域网(virtual extensible local area network,VXLAN)报文。
当报文1是VXLAN报文时,应用信息1可以携带在VXLAN报文的报文头中。作为一种示例,应用信息1可以携带在报文头中的预留字段中。作为又一种示例,应用信息1可以携带在报文头中的虚拟网络标识符(virtual network identifier,VNI)字段中。当应用信息1携带在VNI字段中时,可以将VNI字段划分成多个部分,一部分用于携带VNI,一部分用于携带应用信息1。
与应用信息1类似,当报文1是VXLAN报文时,验证信息1可以携带在VXLAN报文的报文头中。作为一种示例,验证信息1可以携带在报文头中的预留字段中。作为又一种示例,验证信息1可以携带在报文头中的VNI字段中。当验证信息1携带在VNI字段中时,可以将VNI字段划分成多个部分,一部分用于携带VNI,一部分用于携带验证信息1。
关于VXLAN报文的结构以及各字段的含义,可以参考RFC 7348的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是网络虚拟化通用路由封装(network virtual generic routing encapsulation,NVGRE)报文。
当报文1是NVGRE报文时,应用信息1可以携带在NVGRE报文的报文头中。作为一种示例,应用信息1可以携带在报文头中的预留字段中。作为又一种示例,应用信息1可以携带在报文头中的VNI字段中。当应用信息1携带在VNI字段中时,可以将VNI字段划分成多个部分,一部分用于携带VNI,一部分用于携带应用信息1。作为另一种示例,应用信息1可以携带在报文头中的flow ID字段中。当应用信息1携带在flow ID字段中时, 可以将flow ID字段划分成多个部分,一部分用于携带flow ID,一部分用于携带应用信息1。
与应用信息1类似,当报文1是VXLAN报文时,验证信息1可以携带在NVGRE报文的报文头中。作为一种示例,验证信息1可以携带在报文头中的预留字段中。作为又一种示例,验证信息1可以携带在报文头中的VNI字段中。当验证信息1携带在VNI字段中时,可以将VNI字段划分成多个部分,一部分用于携带VNI,一部分用于携带验证信息1。作为另一种示例,验证信息1可以携带在报文头中的flow ID字段中。当验证信息1携带在flow ID字段中时,可以将flow ID字段划分成多个部分,一部分用于携带flow ID,一部分用于携带验证信息1。
关于NVGRE报文的结构以及各字段的含义,可以参考RFC 7637的相关描述部分,此处不做详述。
在一种实现方式中,报文1可以是通用网络虚拟化封装(generic network virtualization encapsulation,Geneve)报文。
当报文1是Geneve报文时,应用信息1可以携带在Geneve报文的报文头中。作为一种示例,应用信息1可以携带在报文头中的预留字段中。作为又一种示例,应用信息1可以携带在报文头中的可变长度选项(英文:variable length options)字段中。
与应用信息1类似,当报文1是Geneve报文时,验证信息1可以携带在Geneve报文的报文头中。作为一种示例,验证信息1可以携带在报文头中的预留字段中。作为又一种示例,验证信息1可以携带在报文头中的可变长度选项字段中。
关于Geneve报文的结构以及各字段的含义,可以参考draft-ietf-nvo3-geneve-16的相关描述部分,此处不做详述。
S102:通信装置1将报文1发送给通信装置2。
S103:通信装置2接收报文1。
S104:通信装置2基于验证信息1对应用信息1进行完整性验证。
通信装置2接收到报文1之后,由于报文1中携带应用信息1,因此,通信装置2应当根据应用信息1为报文1确定对应的网络资源。在本申请实施例中,为了避免应用信息1不当使用,通信装置2接收到报文1之后,可以基于验证信息1对应应用信息1进行完整性验证,避免网络资源的不当使用。
在本申请实施例中,S104在具体实现时,通信装置2例如可以对报文1中的字段进行计算,得到验证信息2,并对验证信息1和验证信息2进行匹配校验。在一个示例中,对验证信息1和验证信息2进行匹配校验,即比对验证信息1和验证信息2,若验证信息1和验证信息2相同,则匹配校验成功,若验证信息1和验证信息2不同,则匹配校验失败。在本申请实施例的一种实现方式中,通信装置2对报文1中的字段进行计算,例如可以是利用验证算法1对报文1中的字段进行计算。其中,所述报文1中的字段包括应用信息1。
如前文,验证算法1可以是HMAC校验。
当验证算法1是HMAC校验时,S104的一种实现方式为:通信装置2可以将密钥1附加在字段1上作为哈希算法1的输入,即得到验证信息2。而后,对验证信息1和验证信息2进行匹配校验。其中,密钥1可以是通信装置2和通信装置1预先协商好的。哈希 算法1也可以是通信装置2和通信装置1预先协商好的。关于字段1,可以参考S101中的相关描述部分,此处不再详述。
在本申请实施例中,由于密钥1和哈希算法1是可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该密钥1和哈希算法1,其它设备上安装的APP也无法获得密钥1和哈希算法1。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无法获得密钥1和哈希算法1,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文a中不包括验证信息1,故而通信装置2接收到报文a时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
当验证算法1是HMAC校验时,S104的另一种实现方式为:通信装置2获得参数1和参数2。通信装置2采用与通信装置1约定的数值补充方式,在密钥2的头部或者尾部补充数值,例如补充0,使得补充数值后的密钥2的比特数与参数1相同。通信装置2采用与通信装置1约定好的计算方式,对补充数值后的密钥2和参数1进行计算,例如进行异或计算,得到密钥2’。而后,通信装置2将密钥2’附加在字段1上作为哈希算法2的输入,得到HMAC 1’。通信装置2采用与通信装置1约定的计算方式,对补充数值后的密钥2和参数2进行计算,例如进行异或计算,得到密钥2”,而后,通信装置2将密钥2”附加在HMAC 1’上作为哈希算法2的输入,得到HMAC 2’,即得到验证信息2。计算得到验证信息2之后,通信装置2可以对验证信息1和验证信息2进行匹配校验。其中,参数1、参数2、密钥2和哈希算法2均可以是通信装置1和通信装置2预先协商好的。
在本申请实施例中,由于参数1、参数2、密钥2和哈希算法2是可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该参数1、参数2、密钥2和哈希算法2,其它设备上安装的APP也无法获得参数1、参数2、密钥2和哈希算法2。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无法获得参数1、参数2、密钥2和哈希算法2,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文b中不包括验证信息1,故而通信装置2接收到报文b时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
如前文,验证算法1可以是数字签名验证。
当验证算法1是数字签名验证时,S104的一种实现方式为:通信装置2例如可以利用哈希算法3对报文1中的字段2进行哈希运算,得到哈希摘要1’。通信装置2采用公钥1和解密算法1对数字签名1进行解密,得到哈希摘要1”。而后,通信装置2对哈希摘要1’和哈希摘要1”进行匹配校验。
在一些实施例中,前述公钥1可以是通信装置2和通信装置1预先协商好的,前述解密算法1和哈希算法3可以是通信装置2和通信装置1预先协商好的。在又一些实施例中,前述公钥1可以携带在报文1中,例如,如前文,报文1中包括数字证书1,数字证书1中携带公钥1。另外,前述解密算法1和哈希算法3可以携带在报文1中,例如携带在数字证书1中。
在本申请实施例中,由于公钥1、解密算法1和哈希算法3可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该公钥1、解密算法1和哈希算法3,其它设备上安装的APP也无法获得公钥1、解密算法1和哈希算法3。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无法获得公钥1、解密算法1和哈希算法3,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文c中不包括验证信息1,故而通信装置2接收到报文c时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
在本申请实施例的一种实现方式中,报文1中包括通信装置1的数字证书1,则通信装置2还可以对该数字证书的合法性进行验证。一旦数字证书1通过验证,则表示报文1来自可信的发送方。而且,若公钥1携带在数字证书1中,若数字证书1通过验证,则公钥1的合法性也得到了保证。类似地,若解密算法1和哈希算法3携带在数字证书1中,若数字证书1通过验证,则解密算法1和哈希算法3的合法性也得到了保证。
而且,如前文,数字证书1包括通信装置1的身份信息,当通信装置1的身份信息包括应用信息1时,报文1中的应用信息1可以携带在该数字证书1中。对于这种情况,若数字证书1通过验证,则数字证书1中的应用信息1的合法性也得到了保证,从而实现了对应用信息1的多重验证。
在本申请实施例的又一种实现方式中,若报文1中包括数字证书1,并且,数字证书1包括应用信息1和验证信息1,则S104在具体实现时,可以直接对数字证书1进行合法性验证,只要数字证书1合法,则表示验证信息1和应用信息1合法。关于对数字证书进行合法性验证,例如可以利用哈希算法4对S101中提及的不被信任的数字证书进行哈希计算,得到哈希摘要2’,并利用CA机构的公钥2对数字证书中的加密摘要1进行解密,得到哈希摘要2”,而后,对哈希摘要2’和哈希摘要2”进行匹配校验,若二者相同,则确定数字证书1合法,否则,确定数字证书1不合法。当然,对数字证书1进行验证时,还可以进一步对CA认证机构进行身份认证,关于对CA认证机构进行身份认证的具体实现方式,可以参考传统的认证方式,此处不做详述。
如前文,验证算法1可以是基于IPSec的完整性验证。
当验证算法1是基于AH的完整性验证,且报文1采用传输模式封装时,S104的一种实现方式为:通信装置2采用AH校验算法1对报文1中的字段3进行计算,得到AH验证信息3,即得到验证信息2。而后,通信装置2对验证信息1和验证信息2进行匹配校验。所谓对验证信息1和验证信息2进行匹配校验,即为对S101中提及的AH校验信息1和AH校验信息3进行匹配校验。需要说明的是,此处提及的AH校验算法1可以是通信装置1和通信装置2预先约定好的。关于字段3,可以参考S101中对于字段3的描述部分,此处不做详述。
在本申请实施例中,由于AH校验算法1可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该AH校验算法1,其它设备上安装的APP也无法获得AH校验算法1。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无 法获得AH校验算法1,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文d中不包括验证信息1,故而通信装置2接收到报文d时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
当验证算法1是基于AH的完整性验证,且报文1采用隧道模式封装时,S104的一种实现方式为:通信装置2采用AH校验算法2对报文1中的字段4进行计算,得到AH验证信息4,即得到验证信息2。而后,通信装置2对验证信息1和验证信息2进行匹配校验。所谓对验证信息1和验证信息2进行匹配校验,即为对S101中提及的AH校验信息2和AH校验信息4进行匹配校验。需要说明的是,此处提及的AH校验算法2可以是通信装置1和通信装置2预先约定好的。关于字段4,可以参考S101中对于字段4的描述部分,此处不做详述。
在本申请实施例中,由于AH校验算法2可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该AH校验算法2,其它设备上安装的APP也无法获得AH校验算法2。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无法获得AH校验算法2,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文e中不包括验证信息1,故而通信装置2接收到报文e时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
当验证算法1是基于ESP的完整性验证时,S104的一种实现方式为:通信装置2可以采用ESP校验算法1对报文1中的字段5进行计算从而得到ESP验证信息2,即:得到验证信息2。而后,通信装置2对验证信息1和验证信息2进行匹配校验。所谓对验证信息1和验证信息2进行匹配校验,即为对S101中提及的ESP校验信息1和ESP校验信息2进行匹配校验。需要说明的是,此处提及的ESP校验算法1可以是通信装置1和通信装置2预先约定好的。关于字段5,可以参考S101中对于字段5的描述部分,此处不做详述。
在本申请实施例中,由于ESP校验算法1可以是通信装置1和通信装置2预先协商好的,或者说,是通信装置1上的APP 1预先和通信装置2协商好的,而通信装置1上的其它APP,无法获得该ESP校验算法1,其它设备上安装的APP也无法获得ESP校验算法1。因此,即使通信装置1上的其它APP或者其它设备上的APP盗用了应用信息1,由于其无法获得ESP校验算法1,因此,其无法生成验证信息1。相应的,盗用应用信息1的APP生成的报文f中不包括验证信息1,故而通信装置2接收到报文f时,对应用信息1的完整性验证不通过,从而可以避免由于应用信息1被盗用而导致网络资源被盗用。
S105a:通信装置2在应用信息1通过验证的情况下,将报文1发送给通信装置3。
S105b:通信装置2在应用信息1未通过验证的情况下,丢弃报文1。
在本申请实施例中,通信装置2对应用信息1进行完整性验证之后,若应用信息1通过验证,则说明报文1中的应用信息是合法的,故而通信装置2可以将报文1发送给服务器102。在一些实施例中,通信装置2可以根据应用信息1确定报文1对应的网络资源,并进一步利用所确定的网络资源将报文1转发给服务器102。
在本申请实施例的一种实现方式中,若应用信息1未通过验证,则说明报文1中的应用信息可能是通过非法手段获得的,故而通信装置2可以丢弃该报文1,从而避免应用信 息1对应的网络资源被非法盗用。
在本申请实施例的一种实现方式中,报文1中用于对应用信息1进行完整性验证的验证信息,可以包括一个或者多个。相应的,通信装置2除了可以基于验证信息1对应用信息1进行完整性验证之外,还可以基于其它验证信息对应用信息1进行完整性验证。换言之,在本申请实施例中,报文1中除了包括验证信息1之外,还可以包括验证信息3。其中,验证信息3可以是通信装置1对报文1中的字段进行计算得到的。作为一个示例,验证信息3可以是利用校验算法2对报文1中的字段进行计算得到的。
校验算法2与校验算法1是不同的校验算法。但是与校验算法1类似,校验算法2也可以是HMAC算法、数字签名算法、基于IPSec的完整性验证中的其中一种。关于校验算法2,可以参考上文对于校验算法1的描述部分,此处不做详述。关于通信装置1利用校验算法2得到验证信息3的具体实现,可以参考上文通信装置1根据校验算法1得到验证信息1的描述部分,此处不做详述。相应的,关于通信装置2利用校验信息3对应用信息1进行完整性验证的具体实现,可以参考上文对于S104的具体描述部分,此处不再重复描述。
参见图5,图5为本申请实施例提供的一种校验应用信息的方法的信令交互图。
图5所示的校验应用信息的方法200,可以由图1所示的通信装置1和通信装置2执行,关于方法200中的通信装置1、通信装置2和通信装置3,可以参考方法100中对通信装置1、通信装置2和通信装置3的描述部分,此处不再重复描述。该方法200例如可以通过如下S201-S203实现。
S201:通信装置1获取报文1,报文1中包括数字证书1,所述数字证书1中包括应用信息1和验证信息1。
在本申请实施例中,通信装置1首先可以向控制管理设备发送应用信息1,而后,从控制管理设备处获得包括应用信息1和验证信息1的数字证书1。在一个实施例中,控制管理设备可以利用哈希算法1对应用信息1进行哈希计算,得到哈希摘要1,而后,控制管理设备利用自身的私钥1对哈希摘要1进行加密,得到验证信息1,验证信息1即为哈希摘要1的加密摘要。此处提及的数字证书1,除了包括应用信息1和验证信息1之外,还可以包括控制管理设备的身份信息和私钥1对应的公钥1,关于控制管理设备的身份信息,此处不做限定。
通信装置1从控制管理设备处获得数字证书1之后,可以生成包括该数字证书1的报文1。
在本申请实施例中,在一种实现方式中,此处提及的报文1,可以是IPv6报文。
当报文1是IPv6报文时,在一些实施例中,前述数字证书1可以携带在IPv6报文的扩展头中。在另一些实施例中,数字证书1可以携带在IPv6报文的源地址字段或者目的地址字段中。
在一种实现方式中,报文1可以是MPLS报文。
当报文1是MPLS报文时,数字证书1例如可以携带在该MPLS报文的报文头中。作为一种示例,数字证书1可以携带在报文头中的标签栈中,例如携带在某一个标签值字段中。作为又一种示例,数字证书1可以携带在该MPLS报文的扩展TLV字段中。
在一种实现方式中,报文1可以是SRv6报文。
当报文1是SRv6报文时,数字证书1例如可以携带在该SRv6报文的报文头中。作为一种示例,数字证书1可以携带在SRv6报文的SRH中。在一些实施例中,数字证书1可以携带在SRH的源地址字段中;在另一些实施例中,数字证书1可以携带在SRH的目的地址字段中。在又一些实施例中,数字证书1还可以携带在SID list中。
在一种实现方式中,报文1可以是IPv4报文。
当报文1是IPv4报文时,数字证书1例如可以携带在IPv4报文的option字段中。
在一种实现方式中,报文1可以是GRE报文。
当报文1是GRE报文时,数字证书1可以携带在该GRE报文的报文头中。作为一种示例,数字证书1可以携带在报文头中的key字段中。
在一种实现方式中,报文1可以是VXLAN报文。
当报文1是VXLAN报文时,数字证书1可以携带在VXLAN报文的报文头中。作为一种示例,数字证书1可以携带在报文头中的预留字段中。作为又一种示例,数字证书1可以携带在报文头中的VNI字段中。
在一种实现方式中,报文1可以是NVGRE报文。
当报文1是NVGRE报文时,数字证书1可以携带在NVGRE报文的报文头中。作为一种示例,数字证书1可以携带在报文头中的预留字段中。作为又一种示例,数字证书1可以携带在报文头中的VNI字段中。作为另一种示例,数字证书1可以携带在报文头中的flow ID字段中。
在一种实现方式中,报文1可以是Geneve报文。
当报文1是Geneve报文时,数字证书1可以携带在Geneve报文的报文头中。作为一种示例,数字证书1可以携带在报文头中的预留字段中。作为又一种示例,数字证书1可以携带在报文头中的可变长度选项字段中。
S202:通信装置1将报文1发送给通信装置2。
S203:通信装置2接收报文1。
S204:通信装置2对所述数字证书1进行合法性验证。
通信装置2接收到报文1之后,可以对该数字证书1进行合法性验证。由于数字证书1中包括应用信息1和验证信息1。因此,若数字证书1合法,则表示验证信息1和应用信息1的合法性得到了验证。关于通信装置2对数字证书1进行验证的具体实现方式,可以参考前文通信装置2对数字证书1进行合法性验证的描述部分,此处不做详细说明。
S205a:通信装置2在所述数字证书1通过验证的情况下将报文1转发给通信装置3。
S205b:通信装置2在所述数字证书1未通过验证的情况下,丢弃报文1。
在本申请实施例中,通信装置2对数字证书2进行合法性验证之后,若所述数字证书1通过验证,则说明报文1中的应用信息1是合法的,故而通信装置2可以将报文1发送给通信装置3。在一些实施例中,通信装置2可以根据应用信息1确定报文1对应的网络资源,并进一步利用所确定的网络资源将报文1转发给通信装置3。
在本申请实施例的一种实现方式中,若所述数字证书1未通过验证,则说明报文1中的应用信息1可能是通过非法手段获得的,故而通信装置2可以丢弃该报文1,从而避免 应用信息1对应的网络资源被非法盗用。
在本申请实施例的一种实现方式中,报文1中除了包括验证信息1之外,还可以包括对应用信息1进行完整性验证的验证信息2。关于验证信息2,其与前文方法100中的验证信息1类似,故而此处不做详述。
相应的,通信装置2除了对数字证书1进行合法性验证之外,还可以利用验证信息2对应用信息1进行完整性验证。关于通信装置2利用验证信息2对应用信息1进行验证的具体实现,可以参考上文S104的具体实现部分,此处不再详述。
如方法100中对于验证信息1的描述部分可知,验证信息1可以是利用数字签名算法对报文1中的字段进行计算得到的,因此,在一种实现方式中,方法200中的验证信息2可以是利用数字签名算法对报文1中的字段进行计算得到的。其中,报文1中的字段包括应用信息1。对于这种情况,通信装置1可以利用私钥2和哈希算法2对报文1中的字段进行数字签名,并将所得到的数字签名1确定为验证信息2。在一个示例中:通信装置1可以利用哈希算法2对报文1中的应用信息1进行哈希计算,得到哈希摘要1,并利用私钥2和加密算法1对哈希摘要1进行加密,得到数字签名1。相应的,通信装置2可以利用解密算法1和私钥2对应的公钥2对验证信息2进行解密,得到哈希摘要1’。通信装置2还可以利用哈希算法2对报文1中的应用信息1进行哈希计算,得到哈希摘要1”,并对哈希摘要1’和哈希摘要1”进行匹配校验。其中,解密算法1是加密算法1的逆运算,用于对利用加密算法1加密之后的数据进行解密。
在本申请实施例的一种实现方式中,若验证信息2可以是利用数字签名算法对报文1中的字段进行计算得到的,则前文提及的公钥2可以携带在S201中提及的数字证书1中。前述解密算法1和哈希算法2也可以携带在S201中提及的数字证书1中。
本申请实施例还提供了一种校验应用信息的方法300,可参见图6,图6为本申请实施例提供的一种校验应用信息的方法的流程示意图。
图6所示的方法300,可以由第一通信装置执行,第一通信装置例如可以为以上实施例中提及的通信装置1。图6所示的方法300,可以应用于以上实施例提及的方法100,用于执行以上方法100中由通信装置1执行的步骤,该方法300例如可以包括如下S301-S302。
S301:接收第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证。
S302:基于所述第一验证信息对所述应用信息的完整性进行验证。
方法300中的第一报文,可以对应方法100中的报文1;方法300中的应用信息,可以对应方法100中的应用信息1;方法300中的第一验证信息,可以对应方法100中的验证信息1。
在一种实现方式中,基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
根据所述第一报文中的目标字段,获取第二验证信息,所述目标字段包括所述应用信息;
对所述第二验证信息和所述第一验证信息进行匹配校验。
方法300中的目标字段,可以对应方法100中的字段1、字段2、字段3、字段4或者字段5。方法300中的第二验证信息,可以对应方法100中的验证信息2。
在一种实现方式中,基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
基于第一校验方法和所述第一验证信息对所述应用信息的完整性进行验证。
方法300中的第一校验方法,可以对应方法100中的验证算法1。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
对所述第一报文中的目标字段进行HMAC计算,获得第二HMAC校验信息;
对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证。
当第一校验方法为HMAC校验时,方法300中的目标字段对应方法100中的字段1。
在一种实现方式中,方法300中的第一HMAC校验信息,可以对应方法100中利用将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息1。相应的,第二HMAC校验信息可以对应方法100中将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息2。
在一种实现方式中,方法300中的第一HMAC校验信息,可以对应方法100中的HMAC 2,相应的,第二HMAC校验信息,可以对应方法100中的HMAC 2’。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
通过第一公钥对所述数字签名进行解密,得到第一明文;
对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;
对所述第一明文和所述第二明文,进行匹配验证。
当第一校验方法为数字签名时:目标字段对应方法100中的字段2;第一私钥对应方法100中的私钥1;第一哈希计算对应方法100中的哈希算法3;数字签名对应方法100中的数字签名1;第一公钥对应方法100中的公钥1;第一明文对应方法100中的哈希摘要1”;第二哈希计算对应方法100中的哈希算法3;第二明文可以对应方法100中的哈希摘要1’。
在一种实现方式中,所述第一报文中还包括数字证书,所述数字证书中包括所述第一公钥。
方法300中的数字证书,对应方法100中的数字证书1,第一公钥对应方法100中的公钥1。
在一种实现方式中,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。
此处提及的解密算法,可以对应方法100中的解密算法1;此处提及的哈希算法,可以对应方法100中的哈希算法3。
在一种实现方式中,所述方法还包括:
对所述数字证书的合法性进行验证。
在一种实现方式中,所述第一报文中包括数字证书,所述应用信息和所述第一验证信息携带在所述数字证书中。
在一种实现方式中,所述基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
对所述数字证书的合法性进行验证。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
当第一校验方法为基于IPSEC的完整性验证时,第一校验方法可以为AH校验或者ESP校验。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
利用AH校验算法对所述第一报文中的目标字段进行计算,得到第二AH验证信息;
对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
当第一校验方法为AH校验时,第一验证信息为第一AH验证信息,第二验证信息为第二AH验证信息。第一AH验证信息,可以对应方法100中的AH验证信息1或者AH验证信息2,第二AH验证信息,可以对应方法100中的AH验证信息3或者AH验证信息4。
在一个示例中,当第一报文采用传输模式封装时,第一AH验证信息对应方法100中的AH验证信息1,第二验证信息对应方法100中的AH验证信息3,目标字段可以对应方法100中的字段3;当第一报文采用隧道模式封装时,第一AH验证信息对应方法100中的AH验证信息2,第二验证信息对应方法100中的AH验证信息4,目标字段可以对应方法100中的字段4。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
利用ESP校验算法对所述第一报文中的目标字段进行计算,得到第二ESP校验信息;
对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
当第一校验方法为ESP校验时,第一验证信息为第一ESP验证信息,第二验证信息为第二ESP验证信息。第一ESP验证信息,可以对应方法100中的ESP验证信息1,第二ESP验证信息,可以对应方法100中的ESP验证信息2,目标字段可以对应方法100中的字段5。
在一种实现方式中,所述第一通信装置为网络设备。
在一种实现方式中,所述第一通信装置包括:
接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者,基站,或者,用户面功能UPF设备,或者,宽带网络网关BNG,或者,运营商边缘PE设备。
在一种实现方式中,所述方法还包括:
在确定所述应用信息通过验证的情况下,转发所述第一报文。
在一种实现方式中,所述方法还包括:
在确定所述应用信息未通过验证的情况下,丢弃所述第一报文。
本申请实施例还提供了一种报文处理方法400,可参见图7,图7为本申请实施例提供的一种报文处理方法的流程示意图。
图7所示的方法700,可以由第二通信装置执行,第二通信装置例如可以为以上实施例中提及的通信装置2。图7所示的方法400,可以应用于以上实施例提及的方法100,用于执行以上方法100中由通信装置2执行的步骤,该方法400例如可以包括如下S401-S402。
S401:生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证。
S402:将所述第一报文发送给第一通信装置。
方法400中的第一报文,可以对应方法100中的报文1;方法400中的应用信息,可以对应方法100中的应用信息1;方法400中的第一验证信息,可以对应方法100中的验证信息1。
在一种实现方式中,所述第一验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。
在方法400中,目标字段可以对应方法100中的字段1、字段2、字段3、字段4或者字段5。
在一种实现方式中,所述第一验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。
方法400中的第一校验方法,可以对应方法100中的验证算法1。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息。
当第一校验方法为HMAC校验时,方法300中的目标字段对应方法100中的字段1。
在一种实现方式中,方法400中的第一HMAC校验信息,可以对应方法100中利用将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息1。
在一种实现方式中,方法400中的第一HMAC校验信息,可以对应方法100中的HMAC2。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥对所述目标字段进行签名所得到的数字签名。
当第一校验方法为数字签名时:目标字段对应方法100中的字段2;第一私钥对应方法100中的私钥1,数字签名对应方法100中的数字签名1。
在一种实现方式中,所述所述第一验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
此处提及的数字证书可以对应方法100中的数字证书1,相应的,数字证书中的加密摘要,可以对应方法100中的加密摘要1。
在一种实现方式中,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
当第一校验方法为基于IPSEC的完整性验证时,第一校验方法可以为AH校验或者ESP校验。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息。
第一AH验证信息,可以对应方法100中的AH验证信息1或者AH验证信息2。当第一报文采用传输模式封装时,第一AH验证信息对应方法100中的AH验证信息1;当第一报文采用隧道模式封装时,第一AH验证信息对应方法100中的AH验证信息2。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息。
第一ESP验证信息,可以对应方法100中的ESP验证信息1。
在一种实现方式中,所述第二通信装置为服务器或者用户设备。
在一种实现方式中,所述用户设备包括:
物联网IoT设备或终端设备。
在以上方法300和方法400中:
在一种实现方式中,所述应用信息和所述第一验证信息携带在所述第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPv6报文。
在一种实现方式中,所述应用信息携带在IPv6扩展头中。
在一种实现方式中,所述应用信息携带在目的地址中。
在一种实现方式中,所述应用信息携带在源地址中。
在一种实现方式中,所述第一验证信息携带在IPv6扩展头中。
在一种实现方式中,所述第一验证信息携带在目的地址中。
在一种实现方式中,所述第一验证信息携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,所述应用信息携带在标签值字段中。
在一种实现方式中,所述应用信息携带在扩展类型长度值TLV字段中。
在一种实现方式中,所述第一验证信息携带在标签值字段中。
在一种实现方式中,所述第一验证信息携带在扩展TLV字段中。
在一种实现方式中,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,所述应用信息携带在分段路由头SRH中。
在一种实现方式中,所述第一验证信息携带在SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,所述应用信息携带在选项option字段中。
在一种实现方式中,所述第一验证信息携带在option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,所述应用信息携带在关键字key字段中。
在一种实现方式中,所述第一验证信息携带在key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,所述应用信息携带在虚拟网络标识符字段中。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述第一验证信息携带在虚拟网络标识符字段中。
在一种实现方式中,所述第一验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,所述应用信息携带在流标识字段中。
在一种实现方式中,所述应用信息携带在虚拟网络标识字段中。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述第一验证信息携带在流标识字段中。
在一种实现方式中,所述第一验证信息携带在虚拟网络标识字段中。
在一种实现方式中,所述第一验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述应用信息携带在可变长度选项字段中。
在一种实现方式中,所述第一验证信息携带在预留字段中。
在一种实现方式中,所述第一验证信息携带在可变长度选项字段中。
关于方法300和方法400的具体实现,可以参考上文对于方法100的描述部分,此处不再重复描述。
本申请实施例还提供了一种校验应用信息的方法500,可参见图8,图8为本申请实施例提供的一种校验应用信息的方法的流程示意图。
图8所示的方法500,可以由第一通信装置执行,第一通信装置例如可以为以上实施例中提及的通信装置1。图8所示的方法500,可以应用于以上实施例提及的方法200,用于执行以上方法200中由通信装置1执行的步骤,该方法500例如可以包括如下S501-S502。
S501:获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证。
S502:对所述数字证书进行合法性验证。
在方法500中:第一报文可以对应方法200中的报文1;数字证书可以对应方法200中的数字证书1;应用信息可以对应方法200中的应用信息1;第一验证信息可以对应方法100中的验证信息1。
在一种实现方式中,所述第一报文中还包括第二验证信息,所述第二验证信息用于对所述应用信息进行完整性验证,所述方法还包括:
利用所述第二验证信息对所述应用信息进行完整性验证。
方法500中的第二验证信息,可以对应方法200中的验证信息2。
在一种实现方式中,利用所述第二验证信息对所述应用信息进行完整性验证,包括:
根据所述第一报文中的目标字段,获取第三验证信息,所述目标字段包括所述应用信息;
对所述第三验证信息和所述第二验证信息进行匹配校验。
关于利用第二验证信息对应用信息进行验证,可以参考方法300中利用第一验证信息对应用信息进行验证的相关描述,此处不再重复描述。
在一种实现方式中,利用所述第二验证信息对所述应用信息进行完整性验证,包括:
基于数字签名算法和所述第二验证信息对所述应用信息的完整性进行验证。
在一种实现方式中,所述第二验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名,所述基于数字签名算法和所述第二验证信息对所述应用信息的完整性进行验证,包括:
通过第一公钥对所述数字签名进行解密,得到第一明文;
对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;
对所述第一明文和所述第二明文,进行匹配验证。
在一种实现方式中,所述第一公钥携带在所述数字证书中。
在一种实现方式中,对所述数字签名进行解密的解密算法携带在所述数字证书中,和/或,所述哈希算法带在所述数字证书中。
本申请实施例还提供了一种报文处理方法600,可参见图9,图9为本申请实施例提供的一种报文处理方法的流程示意图。
图9所示的方法600,可以由第二通信装置执行,第二通信装置例如可以为以上实施例中提及的通信装置2。图9所示的方法600,可以应用于以上实施例提及的方法200,用于执行以上方法200中由通信装置2执行的步骤,该方法600例如可以包括如下S601-S602。
S601:获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证。
S602:将所述第一报文发送给第一通信装置。
在方法600中:第一报文可以对应方法200中的报文1;数字证书可以对应方法200中的数字证书1;应用信息可以对应方法200中的应用信息1;第一验证信息可以对应方法100中的验证信息1。
在一种实现方式中,所述第一报文中还包括第二验证信息,所述第二验证信息用于对所述应用信息进行完整性验证。
方法600中的第二验证信息,可以对应方法200中的验证信息2。
在一种实现方式中,所述第二验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。
在一种实现方式中,所述第二验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第二验证信息为采用第一私钥对所述目标字段进行签名所得到的数字签名。
此处提及的第一私钥,可以对应方法200中的私钥2,此处提及的数字签名,可以对应方法200中的数字签名1。
在一种实现方式中,所述第一私钥对应的第一公钥携带在所述数字证书中,所述第一公钥用于对所述第二验证信息进行验证。
此处提及的第一公钥,可以对应方法200中的公钥2。
在一种实现方式中,对所述数字签名进行解密的解密算法携带在所述数字证书中,和/ 或,对所述第二验证信息进行验证的哈希算法带在所述数字证书中。
此处提及的解密算法,可以对应方法200中的解密算法1;对第二验证信息进行验证的哈希算法,可以对应方法200中的哈希算法2。
在以上方法500和方法600中:
在一种实现方式中,所述数字证书携带在所述第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPV6报文。
在一种实现方式中,所述数字证书携带在IPv6扩展头中。
在一种实现方式中,所述数字证书携带在目的地址中。
在一种实现方式中,所述数字证书携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,所述数字证书携带在标签值字段中。
在一种实现方式中,所述数字证书携带在扩展类型长度值TLV字段中。
在一种实现方式中,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,所述数字证书携带在分段路由头SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,所述数字证书携带在选项option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,所述数字证书携带在关键字key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,所述数字证书携带在虚拟网络标识符字段中。
在一种实现方式中,所述数字证书携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,所述数字证书携带在流标识字段中。
在一种实现方式中,所述数字证书携带在虚拟网络标识字段中。
在一种实现方式中,所述数字证书携带在预留字段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,所述数字证书携带在预留字段中。
在一种实现方式中,所述数字证书携带在可变长度选项字段中。
在一种实现方式中,所述第一验证信息为所述数字证书中的加密摘要。
关于方法500和方法600的具体实现,可以参考上文对于方法200的描述部分,此处不再详述。
本申请实施例还提供了一种应用信息的处理方法700,可参见图10,图10为本申请实施例提供的一种应用信息的处理方法的流程示意图。
图10所示的方法700,可以由控制管理设备执行。图9所示的方法700,可以应用于以上实施例提及的方法100或者200,用于执行以上方法100或者200中由控制管理设备执行的步骤,该方法700例如可以包括如下S701-S703。
S701:获取应用信息。
S702:根据所述应用信息获得第一验证信息,所述第一验证信息用于对所述应用信息 的完整性进行验证。
S703:将所述第一验证信息发送给第二通信装置。
在方法700中:应用信息可以对应于方法100或者方法200中的应用信息1;第一验证信息可以对应方法100或者方法200中的验证信息1;第二通信装置可以对应方法100或者方法200中的通信装置2。
在一种实现方式中,所述根据所述应用信息获得第一验证信息,包括:
基于第一校验方法对所述应用信息进行计算,得到所述第一验证信息。
此处提及的第一校验方法,可以对应方法100中的验证算法1。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息。
作为一种示例,第一HMAC校验信息,可以对应方法100中利用将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息1。作为又一种示例,第一HMAC校验信息,可以对应方法100中的HMAC 2。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥和第一哈希计算对所述应用信息进行签名所得到的数字签名。
第一私钥对应方法100中的私钥1;第一哈希计算对应方法100中的哈希算法3;数字签名对应方法100中的数字签名1。
在一种实现方式中,所述根据所述应用信息获得第一验证信息,包括:
根据所述应用信息获得数字证书,所述数字证书包括所述第一验证信息。
此处提及的数字证书,例如可以对应方法100中的数字证书1。
在一种实现方式中,将所述第一验证信息发送给第二通信装置,包括:
将所述数字证书发送给所述第二通信装置。
在一种实现方式中,所述方法还包括:
根据所述应用信息获得第二验证信息,所述第二验证信息用于对所述应用信息的完整性进行验证;
将所述第二验证信息发送给第二通信装置。
此处提及的第二验证信息,例如可以对应方法100中的验证信息3。
在一种实现方式中,所述根据所述应用信息获得第二验证信息,包括:
基于第二校验方法对所述应用信息进行计算,得到所述第二验证信息。
在一种实现方式中,所述第二校验方法为HMAC校验。
在一种实现方式中,所述第二验证信息包括第二HMAC校验信息。
关于第二HMAC校验信息,可以参考上文对于第一HMAC校验信息的描述部分,此处不再详述。
在一种实现方式中,所述第二校验方法为数字签名验证。
在一种实现方式中,所述第二验证信息为采用第二私钥和第二哈希计算对所述应用信息进行签名所得到的数字签名。
在一种实现方式中,所述第一校验方法和所述第二校验方法为不同的校验方法。
关于方法700的具体实现,可以参考上文对于方法100以及方法200的描述部分,此处不再详述。
本申请实施例还提供了一种校验应用信息的方法800,可参见图11,图11为本申请实施例提供的一种校验应用信息的方法的流程示意图。
图11所示的方法800,可以由第一通信装置执行,第一通信装置例如可以为以上实施例中提及的通信装置1。图11所示的方法800,可以应用于以上实施例提及的方法100,用于执行以上方法100中由通信装置1执行的步骤,该方法800例如可以包括如下S801-S802。
S801:获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。
S802:根据所述至少一个验证信息,对所述应用信息进行完整性验证。
在方法800中:至少一个验证信息可以对应方法100中的验证信息1,或者,可以对应方法100中的验证信息1和验证信息3。
在一种实现方式中,所述获取应用信息和至少一个验证信息包括:
接收第一报文,所述第一报文包括所述应用信息和所述至少一个验证信息。
第一报文可以对应方法100中的报文1。
在一种实现方式中,所述至少一个验证信息包括第一验证信息。
第一验证信息可以对应方法100中的验证信息1。
在一种实现方式中,所述根据所述至少一个验证信息,对所述应用信息进行完整性验证,包括:
根据所述第一报文中的第一目标字段获取第三验证信息,所述第一目标字段包括所述应用信息;
对所述第三验证信息和所述第一验证信息进行匹配校验。
方法800中的第一目标字段,可以对应方法100中的字段1、字段2、字段3、字段4或者字段5。方法800中的第三验证信息,可以对应方法100中的验证信息2。
在一种实现方式中,所述根据所述至少一个验证信息,对所述应用信息进行完整性验证,包括:
基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证。
方法800中的第一校验方法,可以对应方法100中的验证算法1。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
对所述第一目标字段进行HMAC计算,获得第二HMAC校验信息;
对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证。
在一种实现方式中,方法800中的第一HMAC校验信息,可以对应方法100中利用将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息1。相应的,第二HMAC校验信息可以对应方法100中将密钥1附加在字段1上作为哈希算法1的输入得到的验证信 息2。
在一种实现方式中,方法800中的第一HMAC校验信息,可以对应方法100中的HMAC 2,相应的,第二HMAC校验信息,可以对应方法100中的HMAC 2’。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一目标字段进行签名所得到的数字签名,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
通过第一公钥对所述数字签名进行解密,得到第一明文;
对所述第一目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;
对所述第一明文和所述第二明文,进行匹配验证。
当第一校验方法为数字签名时:第一目标字段对应方法100中的字段2;第一私钥对应方法100中的私钥1;第一哈希计算对应方法100中的哈希算法3;数字签名对应方法100中的数字签名1;第一公钥对应方法100中的公钥1;第一明文对应方法100中的哈希摘要1”;第二哈希计算对应方法100中的哈希算法3;第二明文可以对应方法100中的哈希摘要1’。
在一种实现方式中,所述第一报文包括数字证书,所述第一公钥携带在数字证书中。
方法800中的数字证书,对应方法100中的数字证书1,第一公钥对应方法100中的公钥1。
在一种实现方式中,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。
此处提及的解密算法,可以对应方法100中的解密算法1;此处提及的哈希算法,可以对应方法100中的哈希算法3。
在一种实现方式中,所述方法还包括:
对所述数字证书的合法性进行验证。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
当第一校验方法为基于IPSEC的完整性验证时,第一校验方法可以为AH校验或者ESP校验。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
利用AH校验算法对所述第一目标字段进行计算,得到第二AH校验信息;
对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
当第一校验方法为AH校验时,第一验证信息为第一AH验证信息,第二验证信息为第二AH验证信息。第一AH验证信息,可以对应方法100中的AH验证信息1或者AH验证信息2,第二AH验证信息,可以对应方法100中的AH验证信息3或者AH验证信息4。
在一个示例中,当第一报文采用传输模式封装时,第一AH验证信息对应方法100中的AH验证信息1,第二验证信息对应方法100中的AH验证信息3,第一目标字段可以对 应方法100中的字段3;当第一报文采用隧道模式封装时,第一AH验证信息对应方法100中的AH验证信息2,第二验证信息对应方法100中的AH验证信息4,第一目标字段可以对应方法100中的字段4。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
利用ESP校验算法对所述第一目标字段进行计算,得到第二ESP校验信息;
对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
当第一校验方法为ESP校验时,第一验证信息为第一ESP验证信息,第二验证信息为第二ESP验证信息。第一ESP验证信息,可以对应方法100中的ESP验证信息1,第二ESP验证信息,可以对应方法100中的ESP验证信息2,第一目标字段可以对应方法100中的字段5。
在一种实现方式中,所述第一报文包括数字证书,所述应用信息和所述至少一个验证信息携带在数字证书中,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
对所述数字证书进行合法性验证。
在一种实现方式中,所述至少一个验证信息,还包括第二验证信息。
此处提及的第二验证信息,可以对应方法100中的验证信息3。
在一种实现方式中,所述根据所述至少一个验证信息,对所述应用信息进行完整性验证,包括:
根据所述第一报文中的第二目标字段获取第四验证信息,所述第二目标字段包括所述应用信息;
对所述第四验证信息和所述第二验证信息进行匹配校验。
在一种实现方式中,所述根据所述至少一个验证信息,对所述应用信息进行完整性验证,包括:
基于第二校验方法和所述第二验证信息,对所述应用信息的完整性进行验证。
在一种实现方式中,所述第一校验方法和所述第二校验方法,为不同的校验算法。
关于第二验证信息,可以参考对于第一验证信息的相关描述,此处不再详述。
在一种实现方式中,所述第一通信装置为网络设备。
在一种实现方式中,所述第一通信装置包括:
接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者宽带网络网关BNG,或者,运营商边缘PE设备。
在一种实现方式中,所述方法还包括:
在确定所述应用信息通过验证的情况下,转发所述第一报文。
在一种实现方式中,所述方法还包括:
在确定所述应用信息未通过验证的情况下,丢弃所述第一报文。
本申请实施例还提供了一种报文处理方法900,可参见图12,图12为本申请实施例提供的一种报文处理方法的流程示意图。
图12所示的方法900,可以由第二通信装置执行,第二通信装置例如可以为以上实施例中提及的通信装置2。图12所示的方法900,可以应用于以上实施例提及的方法100,用于执行以上方法100中由通信装置2执行的步骤,该方法900例如可以包括如下S901-S902。
S901:获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。
S902:将所述应用信息和所述至少一个验证信息,发送给第一通信装置。
在方法900中:至少一个验证信息可以对应方法100中的验证信息1,或者,可以对应方法100中的验证信息1和验证信息3。
在一种实现方式中,所述获取应用信息和至少一个验证信息,包括:
获取第一报文,所述第一报文包括所述应用信息和所述至少一个验证信息;
所述将所述应用信息和所述至少一个验证信息,发送给第一通信装置,包括:
将所述第一报文发送给所述第一通信装置。
第一报文可以对应方法100中的报文1,第一通信装置可以对应方法100中的通信装置1。
在一种实现方式中,所述至少一个验证信息包括第一验证信息。
第一验证信息可以对应方法100中的验证信息1。
在一种实现方式中,所述第一验证信息是根据所述第一报文中的第一目标字段获得的,所述第一目标字段包括所述应用信息。
在方法900中,第一目标字段可以对应方法100中的字段1、字段2、字段3、字段4或者字段5。
在一种实现方式中,所述第一验证信息,是利用第一校验方法对所述第一报文中的第一目标字段进行计算得到的,所述第一目标字段包括所述应用信息。
方法900中的第一校验方法,可以对应方法100中的验证算法1。
在一种实现方式中,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
在一种实现方式中,所述第一验证信息包括第一HMAC校验信息。
当第一校验方法为HMAC校验时,方法300中的目标字段对应方法100中的字段1。
在一种实现方式中,方法900中的第一HMAC校验信息,可以对应方法100中利用将密钥1附加在字段1上作为哈希算法1的输入得到的验证信息1。
在一种实现方式中,方法900中的第一HMAC校验信息,可以对应方法100中的HMAC2。
在一种实现方式中,所述第一校验方法为数字签名验证。
在一种实现方式中,所述第一验证信息为采用第一私钥对所述第一目标字段进行签名所得到的数字签名。
当第一校验方法为数字签名时:第一目标字段对应方法100中的字段2;第一私钥对应方法100中的私钥1,数字签名对应方法100中的数字签名1。
在一种实现方式中,所述第一验证信息为数字证书中的加密摘要,所述数字证书中还 包括所述应用信息。
此处提及的数字证书可以对应方法100中的数字证书1,相应的,数字证书中的加密摘要,可以对应方法100中的加密摘要1。
在一种实现方式中,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。
在一种实现方式中,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
当第一校验方法为基于IPSEC的完整性验证时,第一校验方法可以为AH校验或者ESP校验。
在一种实现方式中,所述第一验证信息为第一认证头AH验证信息。
第一AH验证信息,可以对应方法100中的AH验证信息1或者AH验证信息2。当第一报文采用传输模式封装时,第一AH验证信息对应方法100中的AH验证信息1;当第一报文采用隧道模式封装时,第一AH验证信息对应方法100中的AH验证信息2。
在一种实现方式中,所述第一验证信息为第一封装安全负载ESP验证信息。
第一ESP验证信息,可以对应方法100中的ESP验证信息1。
在一种实现方式中,所述至少一个验证信息,还包括第二验证信息。
第二验证信息可以对应方法100中的验证信息3。
在一种实现方式中,所述第二验证信息是根据所述第一报文中的第二目标字段获得的,所述第二目标字段包括所述应用信息。
关于第二目标字段,可以参考对于第一目标字段的描述部分,此处不再重复描述。
在一种实现方式中,所述第二验证信息,是利用第二校验方法对所述第一报文中的第二目标字段进行计算得到的,所述第二目标字段包括所述应用信息。
关于第二校验方法,可以参考对第一校验方法的描述部分,此处不再详述。
在一种实现方式中,所述第一校验方法和所述第二校验方法,为不同的校验算法。
在以上方法800和方法900中:
在一种实现方式中,所述应用信息和所述至少一个验证信息携带在所述第一报文的报文头中。
在一种实现方式中,所述第一报文为互联网协议第6版IPv6报文。
在一种实现方式中,所述应用信息携带在IPv6扩展头中。
在一种实现方式中,所述应用信息携带在目的地址中。
在一种实现方式中,所述应用信息携带在源地址中。
在一种实现方式中,所述至少一个验证信息携带在IPv6扩展头中。
在一种实现方式中,所述至少一个验证信息携带在目的地址中。
在一种实现方式中,所述至少一个验证信息携带在源地址中。
在一种实现方式中,所述第一报文为多协议标签交换MPLS报文。
在一种实现方式中,所述应用信息携带在标签值字段中。
在一种实现方式中,所述应用信息携带在扩展类型长度值TLV字段中。
在一种实现方式中,所述至少一个验证信息携带在标签值字段中。
在一种实现方式中,所述至少一个验证信息携带在扩展TLV字段中。
在一种实现方式中,所述第一报文为互联网协议第6版段路由SRv6报文。
在一种实现方式中,所述应用信息携带在分段路由头SRH中。
在一种实现方式中,所述至少一个验证信息携带在SRH中。
在一种实现方式中,所述第一报文为互联网协议第4版IPv4报文。
在一种实现方式中,所述应用信息携带在选项option字段中。
在一种实现方式中,所述至少一个验证信息携带在option字段中。
在一种实现方式中,所述第一报文为通用路由封装GRE报文。
在一种实现方式中,所述应用信息携带在关键字key字段中。
在一种实现方式中,所述至少一个验证信息携带在key字段中。
在一种实现方式中,所述第一报文为虚拟扩展局域网VXLAN报文。
在一种实现方式中,所述应用信息携带在虚拟网络标识符字段中。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述至少一个验证信息携带在虚拟网络标识符字段中。
在一种实现方式中,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
在一种实现方式中,所述应用信息携带在流标识字段中。
在一种实现方式中,所述应用信息携带在虚拟网络标识字段中。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述至少一个验证信息携带在流标识字段中。
在一种实现方式中,所述至少一个验证信息携带在虚拟网络标识字段中。
在一种实现方式中,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,所述第一报文为通用网络虚拟化封装Geneve报文。
在一种实现方式中,所述应用信息携带在预留字段中。
在一种实现方式中,所述应用信息携带在可变长度选项字段中。
在一种实现方式中,所述至少一个验证信息携带在预留字段中。
在一种实现方式中,所述至少一个验证信息携带在可变长度选项字段中。
关于方法800和方法900的具体实现,可以参考上文对于方法100的描述部分,此处不再重复描述。
此外,本申请实施例还提供了一种通信装置1300,参见图13所示。图13为本申请实施例提供的一种通信装置的结构示意图。该通信装置1300包括收发单元1301和处理单元1302。该通信装置1300可以用于执行以上实施例中的方法100、方法200、方法300、方法400、方法500、方法600、方法700、方法800或者方法900。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法100,当通信装置1300用于执行以上实施例中的方法100时,通信装置1300相当于方法100中的通信装置1。收发单元1301用于执行方法100中通信装置1执行的收发操作。处理单元1302用于执行方法100中通信装置1执行的除收发操作之外的操作。例如:处理单元1302用于生成报文1,报文1中包括应用信息1和验证信息1;收发单元1301用于将报文1发送给通信装置2。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法100,当通信装置1300用于执行以上实施例中的方法100时,通信装置1300相当于方法100中的通信装置2。收 发单元1301用于执行方法100中通信装置2执行的收发操作。处理单元1302用于执行方法100中通信装置2执行的除收发操作之外的操作。例如:收发单元1301用于接收报文1,报文1中包括应用信息1和验证信息1;处理单元1302用于根据报文1中的验证信息1,对报文1中的应用信息1的完整性进行验证。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法200,当通信装置1300用于执行以上实施例中的方法200时,通信装置1300相当于方法200中的通信装置1。收发单元1301用于执行方法200中通信装置1执行的收发操作。处理单元1302用于执行方法200中通信装置1执行的除收发操作之外的操作。例如:处理单元1302用于生成报文1,所述报文1中包括数字证书1,所述数字证书1中包括应用信息1和验证信息1,所述验证信息1用于对所述应用信息1进行完整性验证;收发单元1301用于将所述报文1发送给通信装置2。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法200,当通信装置1300用于执行以上实施例中的方法200时,通信装置1300相当于方法200中的通信装置2。收发单元1301用于执行方法200中通信装置2执行的收发操作。处理单元1302用于执行方法200中通信装置2执行的除收发操作之外的操作。例如:收发单元1301用于接收报文1,报文1中包括数字证书1,所述数字证书1中包括应用信息1和验证信息1,所述验证信息1用于对所述应用信息1进行完整性验证;处理单元1302用于所述数字证书1进行合法性验证。在一个示例中,所述通信装置1300可以执行以上实施例中的方法300,当通信装置1300用于执行以上实施例中的方法300时,通信装置1300相当于方法300中的第一通信装置。收发单元1301用于执行方法300中第一通信装置执行的收发操作。处理单元1302用于执行方法300中第一通信装置执行的除收发操作之外的操作。例如:收发单元1301用于接收第一报文,第一报文中包括应用信息和第一验证信息;处理单元1302用于根据第一报文中的第一验证信息,对第一报文中的应用信息的完整性进行验证。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法400,当通信装置1300用于执行以上实施例中的方法400时,通信装置1300相当于方法400中的第二通信装置。收发单元1301用于执行方法400中第二通信装置执行的收发操作。处理单元1302用于执行方法400中第二通信装置执行的除收发操作之外的操作。例如:处理单元1302用于生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;收发单元1301用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法500,当通信装置1300用于执行以上实施例中的方法500时,通信装置1300相当于方法500中的第一通信装置。收发单元1301用于执行方法500中第一通信装置执行的收发操作。处理单元1302用于执行方法500中第一通信装置执行的除收发操作之外的操作。例如:收发单元1301用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证;处理单元1302用于对所述数字证书进行合法性验证。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法600,当通信装置1300用于执行以上实施例中的方法600时,通信装置1300相当于方法600中的第二通信装置。 收发单元1301用于执行方法600中第二通信装置执行的收发操作。处理单元1302用于执行方法600中第二通信装置执行的除收发操作之外的操作。例如:处理单元1302用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证;收发单元1301用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法700,当通信装置1300用于执行以上实施例中的方法700时,通信装置1300相当于方法700中的控制管理设备。收发单元1301用于执行方法700中控制管理设备执行的收发操作。处理单元1302用于执行方法700中控制管理设备执行的除收发操作之外的操作。例如:收发单元1301用于获取应用信息,处理单元1302用于根据所述应用信息获得第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证,收发单元1301还用于将所述第一验证信息发送给第二通信装置。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法800,当通信装置1300用于执行以上实施例中的方法800时,通信装置1300相当于方法800中的第一通信装置。收发单元1301用于执行方法800中第一通信装置执行的收发操作。处理单元1302用于执行方法800中第一通信装置执行的除收发操作之外的操作。例如:收发单元1301用于获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证;处理单元1302用于根据所述至少一个验证信息,对所述应用信息进行完整性验证。
在一个示例中,所述通信装置1300可以执行以上实施例中的方法900,当通信装置1300用于执行以上实施例中的方法900时,通信装置1300相当于方法900中的第二通信装置。收发单元1301用于执行方法900中第二通信装置执行的收发操作。处理单元1302用于执行方法900中第二通信装置执行的除收发操作之外的操作。例如:处理单元1302用于获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证;收发单元1301用于将所述应用信息和所述至少一个验证信息,发送给第一通信装置。
此外,本申请实施例还提供了一种通信装置1400,参见图14所示,图14为本申请实施例提供的一种通信装置的结构示意图。该通信装置1400包括通信接口1401和与通信接口1401连接的处理器1402。该通信装置1300可以用于执行以上实施例中的方法100、方法200、方法300、方法400、方法500、方法600、方法700、方法800或者方法900。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法100,当通信装置1400用于执行以上实施例中的方法100时,通信装置1400相当于方法100中的通信装置1。其中,通信接口1401用于以上方法100中通信装置1执行的收发操作;处理器1402用于以上方法100中通信装置1执行的除收发操作之外的其它操作。例如:处理器1402用于生成报文1,报文1中包括应用信息1和验证信息1,验证信息1用于对所述应用信息1进行完整性验证;通信接口1401用于将报文1发送给通信装置2。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法100,当通信装置1400用于执行以上实施例中的方法100时,通信装置1400相当于方法100中的通信装置2。其中,通信接口1401用于以上方法100中通信装置2执行的收发操作;处理器1402用于以上方法100中通信装置2执行的除收发操作之外的其它操作。例如:通信接口1401用于接 收报文1,报文1中包括应用信息1和验证信息1,验证信息1用于对所述应用信息1进行完整性验证;处理器1402用于利用验证信息1对应用信息1进行完整性验证。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法200,当通信装置1400用于执行以上实施例中的方法200时,通信装置1400相当于方法200中的通信装置1。其中,通信接口1401用于以上方法200中通信装置1执行的收发操作;处理器1402用于以上方法200中通信装置1执行的除收发操作之外的其它操作。例如:处理器1402用于生成报文1,报文1中包括数字证书1,所述数字证书1中包括应用信息1和验证信息1,验证信息1用于对所述应用信息1进行完整性验证;通信接口1401用于将报文1发送给通信装置2。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法200,当通信装置1400用于执行以上实施例中的方法200时,通信装置1400相当于方法200中的通信装置2。其中,通信接口1401用于以上方法200中通信装置2执行的收发操作;处理器1402用于以上方法200中通信装置2执行的除收发操作之外的其它操作。例如:通信接口1401用于接收报文1,报文1中包括数字证书1,数字证书1中包括应用信息1和验证信息1,验证信息1用于对所述应用信息1进行完整性验证;处理器1402用于对数字证书1进行合法性验证。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法300,当通信装置1400用于执行以上实施例中的方法300时,通信装置1400相当于方法300中的第一通信装置。其中,通信接口1401用于以上方法300中第一通信装置执行的收发操作;处理器1402用于以上方法300中第一通信装置执行的除收发操作之外的其它操作。例如:通信接口1401用于接收第一报文,第一报文中包括应用信息和第一验证信息;处理器1402用于根据第一报文中的第一验证信息,对第一报文中的应用信息的完整性进行验证。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法400,当通信装置1400用于执行以上实施例中的方法400时,通信装置1400相当于方法400中的第二通信装置。其中,通信接口1401用于以上方法400中第二通信装置执行的收发操作;处理器1402用于以上方法400中第二通信装置执行的除收发操作之外的其它操作。例如:处理器1402用于生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;通信接口1401用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法500,当通信装置1400用于执行以上实施例中的方法500时,通信装置1400相当于方法500中的第一通信装置。其中,通信接口1401用于以上方法500中第一通信装置执行的收发操作;处理器1402用于以上方法500中第一通信装置执行的除收发操作之外的其它操作。例如:通信接口1401用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证;处理器1402用于对所述数字证书进行合法性验证。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法600,当通信装置1400用于执行以上实施例中的方法600时,通信装置1400相当于方法600中的第二通信装置。 其中,通信接口1401用于以上方法600中第二通信装置执行的收发操作;处理器1402用于以上方法600中第二通信装置执行的除收发操作之外的其它操作。例如:处理器1402用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证;通信接口1401用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法700,当通信装置1400用于执行以上实施例中的方法700时,通信装置1400相当于方法700中的控制管理设备。其中,通信接口1401用于以上方法700中控制管理设备执行的收发操作;处理器1402用于以上方法700中控制管理设备执行的除收发操作之外的其它操作。例如:通信接口1401用于获取应用信息,处理器1402用于根据所述应用信息获得第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证,通信接口1401还用于将所述第一验证信息发送给第二通信装置。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法800,当通信装置1400用于执行以上实施例中的方法800时,通信装置1400相当于方法800中的第一通信装置。其中,通信接口1401用于以上方法800中第一通信装置执行的收发操作;处理器1402用于以上方法800中第一通信装置执行的除收发操作之外的其它操作。例如:通信接口1401用于获取应用信息和至少一个验证信息;处理器1402用于根据所述至少一个验证信息,对所述应用信息进行完整性验证。
在一个示例中,所述通信装置1400可以执行以上实施例中的方法900,当通信装置1400用于执行以上实施例中的方法900时,通信装置1400相当于方法900中的第二通信装置。其中,通信接口1401用于以上方法900中第二通信装置执行的收发操作;处理器1402用于以上方法900中第二通信装置执行的除收发操作之外的其它操作。例如:处理器1402用于获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证;通信接口1401用于将所述应用信息和所述至少一个验证信息,发送给第一通信装置。
此外,本申请实施例还提供了一种通信装置1500,参见图15所示,图15为本申请实施例提供的一种通信装置的结构示意图。
该通信装置1500可以用于执行以上实施例中的方法100、方法200、300、方法400、方法500、方法600、方法700、方法800或者方法900。
如图15所示,通信装置1500可以包括处理器1510,与所述处理器1510耦合连接的存储器1520,收发器1530。处理器1510可以是中央处理器(英文:central processing unit,缩写:CPU),网络处理器(英文:network processor,缩写:NP)或者CPU和NP的组合。处理器还可以是专用集成电路(英文:application-specific integrated circuit,缩写:ASIC),可编程逻辑器件(英文:programmable logic device,缩写:PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(英文:complex programmable logic device,缩写:CPLD),现场可编程逻辑门阵列(英文:field-programmable gate array,缩写:FPGA),通用阵列逻辑(英文:generic array logic,缩写:GAL)或其任意组合。处理器1510可以是指一个处理器,也可以包括多个处理器。存储器1520可以包括易失性存储器(英文:volatile memory),例 如随机存取存储器(英文:random-access memory,缩写:RAM);存储器也可以包括非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD);存储器1520还可以包括上述种类的存储器的组合。存储器1520可以是指一个存储器,也可以包括多个存储器。在一个实施方式中,存储器1520中存储有计算机可读指令,所述计算机可读指令包括多个软件模块,例如发送模块1521,处理模块1522和接收模块1523。处理器1510执行各个软件模块后可以按照各个软件模块的指示进行相应的操作。在本实施例中,一个软件模块所执行的操作实际上是指处理器1510根据所述软件模块的指示而执行的操作。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法100,当通信装置1500用于执行以上实施例中的方法100时,通信装置1500相当于方法100中的通信装置1。此时,处理模块1522用于生成报文1,报文1中包括应用信息1和验证信息1,验证信息1用于对应用信息1进行完整性验证;发送模块1521用于将报文1发送给通信装置2。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法100,当通信装置1500用于执行以上实施例中的方法100时,通信装置1500相当于方法100中的通信装置2。此时,接收模块1523用于接收报文1,所述报文1中包括应用信息1和验证信息1。处理模块1522用于根据验证信息1对应用信息1进行完整性验证。在一个示例中,发送模块1521用于在应用信息1通过验证的情况下转发报文1。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法200,当通信装置1500用于执行以上实施例中的方法200时,通信装置1500相当于方法200中的通信装置1。此时,处理模块1522用于生成报文1,报文1中包括数字证书1,数字证书1包括应用信息1和验证信息1,验证信息1用于对应用信息1进行完整性验证;发送模块1521用于将报文1发送给通信装置2。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法200,当通信装置1500用于执行以上实施例中的方法200时,通信装置1500相当于方法200中的通信装置2。此时,接收模块1523用于接收报文1,所述报文1中包括数字证书1,数字证书1中包括应用信息1和验证信息1。处理模块1522用于对数字证书1进行合法性验证。在一个示例中,发送模块1521用于在应用信息1通过验证的情况下转发报文1。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法300,当通信装置1500用于执行以上实施例中的方法300时,通信装置1500相当于方法300中的第一通信装置。此时,接收模块1523用于接收第一报文,所述第一报文中包括应用信息和第一验证信息。处理模块1522用于根据第一报文中的第一验证信息,对第一报文中的应用信息的完整性进行验证。在一个示例中,发送模块1521用于在应用信息通过验证的情况下转发第一报文。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法400,当通信装置1500用于执行以上实施例中的方法400时,通信装置1500相当于方法400中的第二通信装置。此时,处理模块1522用于生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证。发送模块1521用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法500,当通信装置1500用于执行以上实施例中的方法500时,通信装置1500相当于方法500中的第一通信装置。此时,接收模块1523用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证。处理模块1522用于对所述数字证书进行合法性验证。在一个示例中,发送模块1521用于在应用信息通过验证的情况下转发第一报文。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法600,当通信装置1500用于执行以上实施例中的方法600时,通信装置1500相当于方法600中的第二通信装置。此时,处理模块1522用于获取第一报文,所述第一报文中包括数字证书,所述数字证书中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息进行完整性验证。发送模块1521用于将所述第一报文发送给第一通信装置。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法700,当通信装置1500用于执行以上实施例中的方法700时,通信装置1500相当于方法700中的控制管理设备。此时,接收模块1523用于获取应用信息,处理模块1522用于根据所述应用信息获得第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证,发送模块1521用于将所述第一验证信息发送给第二通信装置。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法800,当通信装置1500用于执行以上实施例中的方法800时,通信装置1500相当于方法800中的第一通信装置。此时,接收模块1523用于获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。处理模块1522用于根据所述至少一个验证信息,对所述应用信息进行完整性验证。
在一个示例中,所述通信装置1500可以执行以上实施例中的方法900,当通信装置1500用于执行以上实施例中的方法900时,通信装置1500相当于方法900中的第二通信装置。此时,处理模块1522用于获取应用信息和至少一个验证信息,所述至少一个验证信息用于对所述应用信息进行完整性验证。发送模块1521用于将所述应用信息和所述至少一个验证信息,发送给第一通信装置。
此外,处理器1510执行存储器1520中的计算机可读指令后,可以按照所述计算机可读指令的指示,执行网络装置1500可以执行的全部操作。例如,可以执行方法100中通信装置1可以执行的所有操作;例如,可以执行方法100中通信装置2可以执行的所有操作;例如,可以执行方法200中通信装置1可以执行的所有操作;例如,可以执行方法200中通信装置2可以执行的所有操作;例如,可以执行方法300中第一通信装置可以执行的所有操作;又如,可以执行方法400中第二通信装置可以执行的所有操作;又如,可以执行方法500中第一通信装置可以执行的所有操作;又如,可以执行方法600中第二通信装置可以执行的所有操作;又如,可以执行方法700中控制管理设备可以执行的所有操作;再如,可以执行方法800中第一通信装置可以执行的所有操作;再如,可以执行方法900中第二通信装置可以执行的所有操作。
在本申请实施例的以上描述中,控制管理设备例如可以为运行了网络管理软件的设备,又如可以为控制器,本申请实施例不做具体限定。本申请实施例还提供了一种计算机可读 存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上实施例中由第一通信装置执行的步骤。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上实施例中由第二通信装置执行的步骤。
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上实施例中由控制管理设备执行的步骤。
本申请实施例还提供了一种通信系统,包括以上实施例提及的第一通信装置和第二通信装置。
本申请实施例还提供了一种通信系统,包括以上实施例提及的第二通信装置和控制管理设备。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑业务划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各业务单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件业务单元的形式实现。
集成的单元如果以软件业务单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。 而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的业务可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些业务存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (147)

  1. 一种校验应用信息的方法,其特征在于,由第一通信装置执行,所述方法包括:
    接收第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;
    基于所述第一验证信息对所述应用信息的完整性进行验证。
  2. 根据权利要求1所述的方法,其特征在于,基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
    根据所述第一报文中的目标字段,获取第二验证信息,所述目标字段包括所述应用信息;
    对所述第二验证信息和所述第一验证信息进行匹配校验。
  3. 根据权利要求1或2所述的方法,其特征在于,基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
    基于第一校验方法和所述第一验证信息对所述应用信息的完整性进行验证。
  4. 根据权利要求3所述的方法,其特征在于,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
  5. 根据权利要求4所述的方法,其特征在于,所述第一验证信息包括第一HMAC校验信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    对所述第一报文中的目标字段进行HMAC计算,获得第二HMAC校验信息;
    对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证。
  6. 根据权利要求3所述的方法,其特征在于,所述第一校验方法为数字签名验证。
  7. 根据权利要求6所述的方法,其特征在于,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    通过第一公钥对所述数字签名进行解密,得到第一明文;
    对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;
    对所述第一明文和所述第二明文,进行匹配验证。
  8. 根据权利要求7所述的方法,其特征在于,所述第一报文中还包括数字证书,所述数字证书中包括所述第一公钥。
  9. 根据权利要求8所述的方法,其特征在于,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。
  10. 根据权利要求8或9所述的方法,其特征在于,所述方法还包括:
    对所述数字证书的合法性进行验证。
  11. 根据权利要求1所述的方法,其特征在于,所述第一报文中包括数字证书,所述应用信息和所述第一验证信息携带在所述数字证书中。
  12. 根据权利要求11所述的方法,其特征在于,所述基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
    对所述数字证书的合法性进行验证。
  13. 根据权利要求3所述的方法,其特征在于,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
  14. 根据权利要求13所述的方法,其特征在于,所述第一验证信息为第一认证头AH验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    利用AH校验算法对所述第一报文中的目标字段进行计算,得到第二AH验证信息;
    对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
  15. 根据权利要求13所述的方法,其特征在于,所述第一验证信息为第一封装安全负载ESP验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    利用ESP校验算法对所述第一报文中的目标字段进行计算,得到第二ESP校验信息;
    对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
  16. 根据权利要求1-15任意一项所述的方法,其特征在于,所述第一通信装置为网络设备。
  17. 根据权利要求1-16任意一项所述的方法,其特征在于,所述第一通信装置包括:
    接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者,基站,或者,用户面功能UPF设备,或者,宽带网络网关BNG,或者,运营商边缘PE设备。
  18. 根据权利要求1-17任意一项所述的方法,其特征在于,所述方法还包括:
    在确定所述应用信息通过验证的情况下,转发所述第一报文。
  19. 根据权利要求1-17任意一项所述的方法,其特征在于,所述方法还包括:
    在确定所述应用信息未通过验证的情况下,丢弃所述第一报文。
  20. 一种报文处理方法,其特征在于,由第二通信装置执行,所述方法包括:
    生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;
    将所述第一报文发送给第一通信装置。
  21. 根据权利要求20所述的方法,其特征在于,所述第一验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。
  22. 根据权利要求20或21所述的方法,其特征在于,所述第一验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。
  23. 根据权利要求22所述的方法,其特征在于,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
  24. 根据权利要求23所述的方法,其特征在于,所述第一验证信息包括第一HMAC校验信息。
  25. 根据权利要求22所述的方法,其特征在于,所述第一校验方法为数字签名验证。
  26. 根据权利要求25所述的方法,其特征在于,所述第一验证信息为采用第一私钥和 第一哈希计算对所述目标字段进行签名所得到的数字签名。
  27. 根据权利要求20所述的方法,其特征在于,所述第一验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
  28. 根据权利要求23-27任意一项所述的方法,其特征在于,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。
  29. 根据权利要求22所述的方法,其特征在于,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
  30. 根据权利要求29所述的方法,其特征在于,所述第一验证信息为第一认证头AH验证信息。
  31. 根据权利要求29所述的方法,其特征在于,所述第一验证信息为第一封装安全负载ESP验证信息。
  32. 根据权利要求20-31任意一项所述的方法,其特征在于,所述第二通信装置为服务器或者用户设备。
  33. 根据权利要求1-32任意一项所述的方法,其特征在于,所述应用信息和所述第一验证信息,携带在所述第一报文的报文头中。
  34. 根据权利要求1-33任一项所述的方法,其特征在于,所述第一报文为互联网协议第6版IPv6报文。
  35. 根据权利要求34所述的方法,其特征在于,所述应用信息携带在IPv6扩展头中。
  36. 根据权利要求33或34所述的方法,其特征在于,所述应用信息携带在目的地址中。
  37. 根据权利要求33或34所述的方法,其特征在于,所述应用信息携带在源地址中。
  38. 根据权利要求34-37任意一项所述的方法,其特征在于,所述第一验证信息携带在IPv6扩展头中。
  39. 根据权利要求34-37任意一项所述的方法,其特征在于,所述第一验证信息携带在目的地址中。
  40. 根据权利要求34-37任意一项所述的方法,其特征在于,所述第一验证信息携带在源地址中。
  41. 根据权利要求1-33任一项所述的方法,其特征在于,所述第一报文为多协议标签交换MPLS报文。
  42. 根据权利要求41所述的方法,其特征在于,所述应用信息携带在标签值字段中。
  43. 根据权利要求41所述的方法,其特征在于,所述应用信息携带在扩展类型长度值TLV字段中。
  44. 根据权利要求41-43任意一项所述的方法,其特征在于,所述第一验证信息携带在标签值字段中。
  45. 根据权利要求41-43任意一项所述的方法,其特征在于,所述第一验证信息携带在扩展TLV字段中。
  46. 根据权利要求1-34任一项所述的方法,其特征在于,所述第一报文为互联网协议第6版段路由SRv6报文。
  47. 根据权利要求46所述的方法,其特征在于,所述应用信息携带在分段路由头SRH 中。
  48. 根据权利要求46或47所述的方法,其特征在于,所述第一验证信息携带在SRH中。
  49. 根据权利要求1-33任意一项所述的方法,其特征在于,所述第一报文为互联网协议第4版IPv4报文。
  50. 根据权利要求49所述的方法,其特征在于,所述应用信息携带在选项option字段中。
  51. 根据权利要求49或50所述的方法,其特征在于,所述第一验证信息携带在option字段中。
  52. 根据权利要求1-33任意一项所述的方法,其特性在于,所述第一报文为通用路由封装GRE报文。
  53. 根据权利要求52所述的方法,其特征在于,所述应用信息携带在关键字key字段中。
  54. 根据权利要求52或53所述的方法,其特征在于,所述第一验证信息携带在key字段中。
  55. 根据权利要求1-33任意一项所述的方法,其特性在于,所述第一报文为虚拟扩展局域网VXLAN报文。
  56. 根据权利要求55所述的方法,其特征在于,所述应用信息携带在虚拟网络标识符字段中。
  57. 根据权利要求55所述的方法,其特征在于,所述应用信息携带在预留字段中。
  58. 根据权利要求55-57任意一项所述的方法,其特征在于,所述第一验证信息携带在虚拟网络标识符字段中。
  59. 根据权利要求55-57任意一项所述的方法,其特征在于,所述第一验证信息携带在预留字段中。
  60. 根据权利要求1-33任意一项所述的方法,其特性在于,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
  61. 根据权利要求60所述的方法,其特征在于,所述应用信息携带在流标识字段中。
  62. 根据权利要求60所述的方法,其特征在于,所述应用信息携带在虚拟网络标识字段中。
  63. 根据权利要求60所述的方法,其特征在于,所述应用信息携带在预留字段中。
  64. 根据权利要求60-63任意一项所述的方法,其特征在于,所述第一验证信息携带在流标识字段中。
  65. 根据权利要求60-63任意一项所述的方法,其特征在于,所述第一验证信息携带在虚拟网络标识字段中。
  66. 根据权利要求60-63任意一项所述的方法,其特征在于,所述第一验证信息携带在预留字段中。
  67. 根据权利要求1-33任意一项所述的方法,其特征在于,所述第一报文为通用网络虚拟化封装Geneve报文。
  68. 根据权利要求67所述的方法,其特征在于,所述应用信息携带在预留字段中。
  69. 根据权利要求67所述的方法,其特征在于,所述应用信息携带在可变长度选项字 段中。
  70. 根据权利要求67-69任意一项所述的方法,其特征在于,所述第一验证信息携带在预留字段中。
  71. 根据权利要求67-69任意一项所述的方法,其特征在于,所述第一验证信息携带在可变长度选项字段中。
  72. 一种第一通信装置,其特征在于,所述第一通信装置包括存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于运行所述程序代码中的指令,使得所述第一通信装置执行以上权利要求1-19任意一项所述的方法。
  73. 一种第二通信装置,其特征在于,所述第二通信装置包括存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于运行所述程序代码中的指令,使得所述第二通信装置执行以上权利要求20-71任意一项所述的方法。
  74. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得所述计算机执行以上权利要求1-19任意一项所述的方法,或者,使得所述计算机执行以上权利要求20-71任意一项所述的方法。
  75. 一种通信系统,其特征在于,包括权利要求73所述的第一通信装置以及权利要求74所述的第二通信装置。
  76. 一种校验应用信息的装置,其特征在于,应用于第一通信装置,所述装置包括:
    接收单元,用于接收第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;
    处理单元,用于基于所述第一验证信息对所述应用信息的完整性进行验证。
  77. 根据权利要求76所述的装置,其特征在于,所述处理单元,用于:
    根据所述第一报文中的目标字段,获取第二验证信息,所述目标字段包括所述应用信息;
    对所述第二验证信息和所述第一验证信息进行匹配校验。
  78. 根据权利要求76或77所述的装置,其特征在于,所述处理单元,用于:
    基于第一校验方法和所述第一验证信息对所述应用信息的完整性进行验证。
  79. 根据权利要求78所述的装置,其特征在于,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
  80. 根据权利要求79所述的装置,其特征在于,所述第一验证信息包括第一HMAC校验信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    对所述第一报文中的目标字段进行HMAC计算,获得第二HMAC校验信息;
    对所述第一HMAC校验信息和所述第二HMAC校验信息进行匹配验证。
  81. 根据权利要求78所述的装置,其特征在于,所述第一校验方法为数字签名验证。
  82. 根据权利要求81所述的装置,其特征在于,所述第一验证信息为采用第一私钥和第一哈希计算对所述第一报文中的目标字段进行签名所得到的数字签名,所述基于第一校 验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    通过第一公钥对所述数字签名进行解密,得到第一明文;
    对所述目标字段进行第二哈希计算,得到第二明文,所述第一哈希计算和所述第二哈希计算采用相同的哈希算法;
    对所述第一明文和所述第二明文,进行匹配验证。
  83. 根据权利要求82所述的装置,其特征在于,所述第一报文中还包括数字证书,所述数字证书中包括所述第一公钥。
  84. 根据权利要求83所述的装置,其特征在于,所述数字证书中还包括对所述数字签名进行解密的解密算法,和/或,所述哈希算法。
  85. 根据权利要求83或84所述的装置,其特征在于,所述装置还包括:
    对所述数字证书的合法性进行验证。
  86. 根据权利要求76所述的装置,其特征在于,所述第一报文中包括数字证书,所述应用信息和所述第一验证信息携带在所述数字证书中。
  87. 根据权利要求86所述的装置,其特征在于,所述基于所述第一验证信息对所述应用信息的完整性进行验证,包括:
    对所述数字证书的合法性进行验证。
  88. 根据权利要求78所述的装置,其特征在于,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
  89. 根据权利要求88所述的装置,其特征在于,所述第一验证信息为第一认证头AH验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    利用AH校验算法对所述第一报文中的目标字段进行计算,得到第二AH验证信息;
    对所述第一AH验证信息和所述第二AH验证信息进行匹配验证。
  90. 根据权利要求88所述的装置,其特征在于,所述第一验证信息为第一封装安全负载ESP验证信息,所述基于第一校验方法和所述第一验证信息,对所述应用信息的完整性进行验证,包括:
    利用ESP校验算法对所述第一报文中的目标字段进行计算,得到第二ESP校验信息;
    对所述第一ESP验证信息和所述第二ESP验证信息进行匹配验证。
  91. 根据权利要求76-90任意一项所述的装置,其特征在于,所述第一通信装置为网络设备。
  92. 根据权利要求76-91任意一项所述的装置,其特征在于,所述第一通信装置包括:
    接入ACC设备,或者,用户驻地CPE设备,或者,家庭网关RG,或者,数据中心服务器接入leaf设备,或者,数据中心出口网关DC GW,或者,自治系统边界路由器ASBR,或者,基站,或者,用户面功能UPF设备,或者,宽带网络网关BNG,或者,运营商边缘PE设备。
  93. 根据权利要求76-92任意一项所述的装置,其特征在于,所述装置还包括:
    发送单元,用于在确定所述应用信息通过验证的情况下,转发所述第一报文。
  94. 根据权利要求76-92任意一项所述的装置,其特征在于,
    所述处理单元,还用于在确定所述应用信息未通过验证的情况下,丢弃所述第一报文。
  95. 一种报文处理装置,其特征在于,应用于第二通信装置,所述装置包括:
    处理单元,用于生成第一报文,所述第一报文中包括应用信息和第一验证信息,所述第一验证信息用于对所述应用信息的完整性进行验证;
    发送单元,用于将所述第一报文发送给第一通信装置。
  96. 根据权利要求95所述的装置,其特征在于,所述第一验证信息是根据所述第一报文中的目标字段获得的,所述目标字段包括所述应用信息。
  97. 根据权利要求95或96所述的装置,其特征在于,所述第一验证信息,是利用第一校验方法对所述第一报文中的目标字段进行计算得到的,所述目标字段包括所述应用信息。
  98. 根据权利要求97所述的装置,其特征在于,所述第一校验方法为密钥相关的哈希运算消息认证码HMAC校验。
  99. 根据权利要求98所述的装置,其特征在于,所述第一验证信息包括第一HMAC校验信息。
  100. 根据权利要求97所述的装置,其特征在于,所述第一校验方法为数字签名验证。
  101. 根据权利要求100所述的装置,其特征在于,所述第一验证信息为采用第一私钥和第一哈希计算对所述目标字段进行签名所得到的数字签名。
  102. 根据权利要求95所述的装置,其特征在于,所述第一验证信息为数字证书中的加密摘要,所述数字证书中还包括所述应用信息。
  103. 根据权利要求98-102任意一项所述的装置,其特征在于,所述第一验证信息,是控制管理设备发送给所述第二通信装置的。
  104. 根据权利要求97所述的装置,其特征在于,所述第一校验方法为基于互联网协议安全IPSEC的完整性验证。
  105. 根据权利要求104所述的装置,其特征在于,所述第一验证信息为第一认证头AH验证信息。
  106. 根据权利要求104所述的装置,其特征在于,所述第一验证信息为第一封装安全负载ESP验证信息。
  107. 根据权利要求95-106任意一项所述的装置,其特征在于,所述第二通信装置为服务器或者用户设备。
  108. 根据权利要求76-107任意一项所述的装置,其特征在于,所述应用信息和所述第一验证信息,携带在所述第一报文的报文头中。
  109. 根据权利要求76-108任一项所述的装置,其特征在于,所述第一报文为互联网协议第6版IPv6报文。
  110. 根据权利要求109所述的装置,其特征在于,所述应用信息携带在IPv6扩展头中。
  111. 根据权利要求108或109所述的装置,其特征在于,所述应用信息携带在目的地址中。
  112. 根据权利要求108或109所述的装置,其特征在于,所述应用信息携带在源地址中。
  113. 根据权利要求109-112任意一项所述的装置,其特征在于,所述第一验证信息携带在IPv6扩展头中。
  114. 根据权利要求109-112任意一项所述的装置,其特征在于,所述第一验证信息携带在目的地址中。
  115. 根据权利要求109-112任意一项所述的装置,其特征在于,所述第一验证信息携带在源地址中。
  116. 根据权利要求76-108任一项所述的装置,其特征在于,所述第一报文为多协议标签交换MPLS报文。
  117. 根据权利要求116所述的装置,其特征在于,所述应用信息携带在标签值字段中。
  118. 根据权利要求116所述的装置,其特征在于,所述应用信息携带在扩展类型长度值TLV字段中。
  119. 根据权利要求116-118任意一项所述的装置,其特征在于,所述第一验证信息携带在标签值字段中。
  120. 根据权利要求116-118任意一项所述的装置,其特征在于,所述第一验证信息携带在扩展TLV字段中。
  121. 根据权利要求76-109任一项所述的装置,其特征在于,所述第一报文为互联网协议第6版段路由SRv6报文。
  122. 根据权利要求121所述的装置,其特征在于,所述应用信息携带在分段路由头SRH中。
  123. 根据权利要求121或122所述的装置,其特征在于,所述第一验证信息携带在SRH中。
  124. 根据权利要求76-108任意一项所述的装置,其特征在于,所述第一报文为互联网协议第4版IPv4报文。
  125. 根据权利要求124所述的装置,其特征在于,所述应用信息携带在选项option字段中。
  126. 根据权利要求124或125所述的装置,其特征在于,所述第一验证信息携带在option字段中。
  127. 根据权利要求76-108任意一项所述的装置,其特性在于,所述第一报文为通用路由封装GRE报文。
  128. 根据权利要求127所述的装置,其特征在于,所述应用信息携带在关键字key字段中。
  129. 根据权利要求127或128所述的装置,其特征在于,所述第一验证信息携带在key字段中。
  130. 根据权利要求76-108任意一项所述的装置,其特性在于,所述第一报文为虚拟扩展局域网VXLAN报文。
  131. 根据权利要求130所述的装置,其特征在于,所述应用信息携带在虚拟网络标识符字段中。
  132. 根据权利要求130所述的装置,其特征在于,所述应用信息携带在预留字段中。
  133. 根据权利要求130-132任意一项所述的装置,其特征在于,所述第一验证信息携带在虚拟网络标识符字段中。
  134. 根据权利要求130-132任意一项所述的装置,其特征在于,所述第一验证信息携带在预留字段中。
  135. 根据权利要求76-108任意一项所述的装置,其特性在于,所述第一报文为网络虚拟化通用路由封装NVGRE报文。
  136. 根据权利要求135所述的装置,其特征在于,所述应用信息携带在流标识字段中。
  137. 根据权利要求135所述的装置,其特征在于,所述应用信息携带在虚拟网络标识字段中。
  138. 根据权利要求135所述的装置,其特征在于,所述应用信息携带在预留字段中。
  139. 根据权利要求135-138任意一项所述的装置,其特征在于,所述第一验证信息携带在流标识字段中。
  140. 根据权利要求135-138任意一项所述的装置,其特征在于,所述第一验证信息携带在虚拟网络标识字段中。
  141. 根据权利要求135-138任意一项所述的装置,其特征在于,所述第一验证信息携带在预留字段中。
  142. 根据权利要求76-108任意一项所述的装置,其特征在于,所述第一报文为通用网络虚拟化封装Geneve报文。
  143. 根据权利要求142所述的装置,其特征在于,所述应用信息携带在预留字段中。
  144. 根据权利要求142所述的装置,其特征在于,所述应用信息携带在可变长度选项字段中。
  145. 根据权利要求142-144任意一项所述的装置,其特征在于,所述第一验证信息携带在预留字段中。
  146. 根据权利要求142-144任意一项所述的装置,其特征在于,所述第一验证信息携带在可变长度选项字段中。
  147. 一种包含指令或计算机程序的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得计算机执行权利要求1-71任意一项所述的方法。
PCT/CN2021/085800 2020-06-12 2021-04-07 一种校验应用信息的方法、报文处理方法及装置 WO2021248999A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21821848.5A EP4156622A4 (en) 2020-06-12 2021-04-07 METHOD FOR VERIFYING APPLICATION INFORMATION, INFORMATION PROCESSING METHOD AND APPARATUS
US18/064,758 US20230113138A1 (en) 2020-06-12 2022-12-12 Application Information Verification Method, Packet Processing Method, And Apparatuses Thereof

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
CN202010538369 2020-06-12
CN202010538369.3 2020-06-12
CN202010670997.7 2020-07-13
CN202010669854.4A CN113810290A (zh) 2020-06-12 2020-07-13 一种报文处理方法及装置
CN202010670997.7A CN113810353A (zh) 2020-06-12 2020-07-13 一种校验应用信息的方法、报文处理方法及装置
CN202010669854.4 2020-07-13

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/064,758 Continuation US20230113138A1 (en) 2020-06-12 2022-12-12 Application Information Verification Method, Packet Processing Method, And Apparatuses Thereof

Publications (1)

Publication Number Publication Date
WO2021248999A1 true WO2021248999A1 (zh) 2021-12-16

Family

ID=78845164

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085800 WO2021248999A1 (zh) 2020-06-12 2021-04-07 一种校验应用信息的方法、报文处理方法及装置

Country Status (3)

Country Link
US (1) US20230113138A1 (zh)
EP (1) EP4156622A4 (zh)
WO (1) WO2021248999A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314292A (zh) * 2022-08-08 2022-11-08 钛信(上海)信息科技有限公司 一种报文安全传输方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428204A (zh) * 2013-07-29 2013-12-04 杭州华三通信技术有限公司 一种可抵御计时攻击的数据安全实现方法及设备
CN104217327A (zh) * 2014-09-25 2014-12-17 山东中孚信息产业股份有限公司 一种金融ic卡互联网终端及其交易方法
CN105338434A (zh) * 2015-10-19 2016-02-17 上海斐讯数据通信技术有限公司 一种以太网无源光网络应用程序推送方法、终端及系统
US20180288068A1 (en) * 2017-03-31 2018-10-04 Hyland Software, Inc. Methods and apparatuses for improved network communication using a message integrity secure token

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428204A (zh) * 2013-07-29 2013-12-04 杭州华三通信技术有限公司 一种可抵御计时攻击的数据安全实现方法及设备
CN104217327A (zh) * 2014-09-25 2014-12-17 山东中孚信息产业股份有限公司 一种金融ic卡互联网终端及其交易方法
CN105338434A (zh) * 2015-10-19 2016-02-17 上海斐讯数据通信技术有限公司 一种以太网无源光网络应用程序推送方法、终端及系统
US20180288068A1 (en) * 2017-03-31 2018-10-04 Hyland Software, Inc. Methods and apparatuses for improved network communication using a message integrity secure token

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4156622A4

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115314292A (zh) * 2022-08-08 2022-11-08 钛信(上海)信息科技有限公司 一种报文安全传输方法及装置
CN115314292B (zh) * 2022-08-08 2023-03-07 钛信(上海)信息科技有限公司 一种报文安全传输方法及装置

Also Published As

Publication number Publication date
EP4156622A4 (en) 2023-11-29
US20230113138A1 (en) 2023-04-13
EP4156622A1 (en) 2023-03-29

Similar Documents

Publication Publication Date Title
US11212294B2 (en) Data packet security with expiring time-based hash message authentication codes (HMACs)
US9398026B1 (en) Method for authenticated communications incorporating intermediary appliances
US9838870B2 (en) Apparatus and method for authenticating network devices
US8379638B2 (en) Security encapsulation of ethernet frames
US8788805B2 (en) Application-level service access to encrypted data streams
JP2023116573A (ja) クライアント-クラウドまたはリモートサーバーの安全なデータまたはファイル・オブジェクト暗号化ゲートウェイ
US9608963B2 (en) Scalable intermediate network device leveraging SSL session ticket extension
US8886934B2 (en) Authorizing physical access-links for secure network connections
US8418242B2 (en) Method, system, and device for negotiating SA on IPv6 network
US20170201382A1 (en) Secure Endpoint Devices
US20110113236A1 (en) Methods, systems, and computer readable media for offloading internet protocol security (ipsec) processing using an ipsec proxy mechanism
JP2004295891A (ja) パケットペイロードを認証する方法
US20080162922A1 (en) Fragmenting security encapsulated ethernet frames
Igoe et al. X. 509v3 certificates for secure shell authentication
CN108809907B (zh) 一种证书请求消息发送方法、接收方法和装置
CN113904809B (zh) 一种通信方法、装置、电子设备及存储介质
WO2017185978A1 (zh) 一种报文解析方法及设备
CN113810173B (zh) 一种校验应用信息的方法、报文处理方法及装置
US20230113138A1 (en) Application Information Verification Method, Packet Processing Method, And Apparatuses Thereof
CN110943996B (zh) 一种业务加解密的管理方法、装置及系统
WO2023036348A1 (zh) 一种加密通信方法、装置、设备及介质
Mahmmod et al. IPsec cryptography for data packets security within vpn tunneling networks communications
CN210839642U (zh) 一种物联网终端数据安全接收、发送的装置
CN113810353A (zh) 一种校验应用信息的方法、报文处理方法及装置
CN114567450A (zh) 一种协议报文处理方法及装置

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: 21821848

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021821848

Country of ref document: EP

Effective date: 20221221

NENP Non-entry into the national phase

Ref country code: DE