WO2010012171A1 - 一种数据包处理的方法和装置 - Google Patents

一种数据包处理的方法和装置 Download PDF

Info

Publication number
WO2010012171A1
WO2010012171A1 PCT/CN2009/071733 CN2009071733W WO2010012171A1 WO 2010012171 A1 WO2010012171 A1 WO 2010012171A1 CN 2009071733 W CN2009071733 W CN 2009071733W WO 2010012171 A1 WO2010012171 A1 WO 2010012171A1
Authority
WO
WIPO (PCT)
Prior art keywords
cga
packet
sender
verification
header
Prior art date
Application number
PCT/CN2009/071733
Other languages
English (en)
French (fr)
Inventor
刘利锋
张东
Original Assignee
成都市华为赛门铁克科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都市华为赛门铁克科技有限公司 filed Critical 成都市华为赛门铁克科技有限公司
Priority to EP09802364.1A priority Critical patent/EP2309686B1/en
Publication of WO2010012171A1 publication Critical patent/WO2010012171A1/zh
Priority to US13/012,223 priority patent/US20110119534A1/en

Links

Classifications

    • 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/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/164Implementing security features at a particular protocol layer at the network layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/659Internet protocol version 6 [IPv6] addresses

Definitions

  • the present invention relates to security techniques in the field of computer networks, and more particularly to a method and apparatus for packet processing. Background technique
  • the CGA (Cryptographically Generated Addresses) protocol defined in RFC3972 is an encrypted generation address protocol.
  • An encrypted generated address is an IPv6 address with an address length of 128 bits.
  • the first 64 bits are the subnet prefix and the last 64 bits are the interface identifier.
  • the interface identifier in the CGA is generated by the public key and some additional parameters by computing a one-way hash function. By recalculating the hash value of the parameter and comparing it with the interface identifier, the association between the address generated by the public key and the parameter and the public key can be verified.
  • the purpose of verifying the source address is achieved by signing the transmitted message with the private key corresponding to the public key and the recipient's verification process for the signature.
  • the inventors have found that the prior art has at least the following disadvantages: Although the CGA has the function of source address verification, the application of the CGA is mostly applied to one or several application protocols, and lacks general purpose. Sex, the scope of use is very limited. Summary of the invention
  • Embodiments of the present invention provide a method and apparatus for data packet processing, which are capable of extending the use range of an encrypted generation address CGA protocol.
  • a data packet processing method including: receiving an IP packet from a sender that carries an encrypted generation address CGA related information;
  • the payload of the IP packet is transmitted to the upper layer.
  • an apparatus for processing a data packet includes: a receiving unit, configured to receive an IP packet from a sender that carries an encrypted generated address CGA related information;
  • An acquiring unit configured to obtain, by the network layer, the CGA related information from the IP packet, where the CGA related information includes a CGA parameter and a signature information;
  • a verification unit configured to verify, according to the CGA parameter and the signature information, a source address of the IP packet
  • the transmission unit is configured to transmit the load of the ⁇ 3 ⁇ 4 text to the upper layer when the result of the full certificate is passed.
  • the receiver by adding the CGA related information such as the CGA parameter and the signature information of the sender to the IP packet, the receiver can use the received information to verify the source address of the IP packet at the network layer, so that The unreliable network layer has security guarantees; at the same time, due to the security mechanism implemented at the network layer, it has strong versatility and wide application range.
  • FIG. 1 is a schematic flowchart of an embodiment of a data packet processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a format of a CGA extension header according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a format of a CGA request option according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a format of a CGA parameter option according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a format of a CGA signature option according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart diagram of an embodiment of a data packet processing method according to the present invention
  • FIG. 8 is a schematic flowchart of an embodiment of an authentication step according to an embodiment of the present invention
  • FIG. 8 is an application scenario of an embodiment of the present invention
  • FIG. 9 is a schematic structural diagram of an embodiment of a data packet processing apparatus according to the present invention.
  • FIG. 10 is a schematic structural diagram of a request unit according to an embodiment of the present invention.
  • FIG. 11 is another schematic structural diagram of a request unit according to an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of a verification unit according to an embodiment of the present invention. detailed description
  • an IP (Internet Protocol) message such as an IPv6 (Internet Protocol version 6, Internet Protocol version 6) extension header, a CGA (Cryptographically Generated Addresses) extension header
  • the CGA Extension headers can include CGA Request (CGA Request), CGA Params (CGA Parameter), CGA Sig (CGA Signature).
  • the CGA extension header is used to carry encryption-generated address-related information.
  • the receiver of the data packet verifies the sender's address based on the encrypted generation address related information.
  • the present invention is not limited to IPv6 "3 ⁇ 4".
  • the present invention can be implemented as long as the IP packet has an extension header.
  • IPv6 the optional network layer information is encoded in a separate header and placed between the IPv6 header and the upper protocol header in the packet.
  • An IPv6 header can carry zero, one or more extension headers, each of which is identified by the "next header" field in the previous header.
  • CGA extension headers can be added to the IPv6 extension header. For example, the order in which the IPv6 extension headers are added after the CGA extension header is added is as follows:
  • IPv6 header 0 Hop-by-Hop Options header
  • the newly added CGA extension header can use the unassigned protocol number, such as 149 mentioned above, and of course other unused protocol numbers can be used.
  • the method when the sender sends an IPv6 packet carrying a CGA extension header, the method includes the following steps:
  • the CGA extension header may include: a sender public key and a sender digital signature; the sender generates an IPv6 source address by calculating a one-way hash function according to the public key and some related parameters, and performs digital signature by using the sender's private key. , and fill the relevant parameters and digital signatures to the corresponding positions of the CGA extension header.
  • the CGA extension header is located between the IPv6 header and the upper protocol header in the IPv6 packet.
  • S103 Send an IPv6 packet carrying a CGA extension header to the receiver, where the IPv6 packet is used by the receiver to implement source address verification of the sender of the IPv6 packet.
  • the format of the CGA extension header is as shown in FIG. 2, and the CGA extension header includes:
  • the Next Header field an 8-bit selector, identifies the next header type of the CGA extension header.
  • the Extended Head Length (Hdr Ext Len) field is an 8-bit unsigned integer. Identify the CGA expansion The length of the head, the first 8 bytes are not included in the calculation of the length, in units of 8 bytes. The length of this field is 0, which means a special meaning, that is, initialize the CGA.
  • the communicating party wants to use CGA to protect communication, it can choose to issue a CGA extension of length 0; when the communicating party receives an extended header of length 0, it sends a CGA request to the other party.
  • the Reserved field which is 16 bits long, is intended for future expansion.
  • the reserved field field is set to 0.
  • the Options field which is variable in length and contains one or more data types.
  • Options can choose three types of data, namely CGA request, CGA parameter, CGA signature.
  • the CGA request is used to request the other party to provide CGA parameters; the CGA parameter is used to transmit CGA parameters; the CGA signature is the signature of the payload portion of the packet using the private key of the CGA node. If the CGA extension header contains the CGA parameter option, it also includes the CGA signature option. Otherwise, the receiver sends an incorrect ICMP (Internet Control Message Protocol) message to the source address to notify the unrecognized option type. .
  • ICMP Internet Control Message Protocol
  • the sender can also add a CGA extension header to the packet; the way the CGA extension header is handled (authenticated or ignored) is determined by the receiver.
  • the sender host receives the data packets transmitted from the upper layer at the network layer, and encapsulates the CGA extension headers when encapsulating the IPv6 header. If the CGA request option is included in the header of the packet sent by the host, then if the source address of the receiver is to be verified, the packet sent back by the receiver should carry the CGA parameter and the CGA signature option to provide the sender host with the CGA parameter and the CGA signature option.
  • the sender host can also actively add a CGA extension header to the sent packet, including the CGA parameters and
  • the CGA signature option provides the receiver with the relevant data content for verifying the sender's address, where the Sequence Number field in the CGA parameter option is set to zero.
  • the format of the CGA request option proposed by the embodiment of the present invention is as shown in FIG. 3, and the CGA request option includes:
  • a Type field an 8-bit unsigned integer, in this embodiment, when the type word When the value of the segment is 193, it indicates that the packet is a CGA request. In other embodiments, other values may also be used to indicate that the packet is a CGA request.
  • the Reserved field which is 24 bits long, is intended for future expansion.
  • the reserved field field is set to 0.
  • the Sequence Number field is a 32-bit random number that includes information to prevent replay attacks.
  • the host can initiate a CGA request to the receiver according to the upper layer protocol, and request the receiver to send CGA parameters and CGA signature information to perform source address verification on the receiver.
  • the format of the CGA parameter option proposed by the embodiment of the present invention is shown in FIG. 4, and the CGA parameter options include:
  • the Type field is an 8-bit unsigned integer. In this embodiment, when the value of the type field is 194, it indicates that the data packet is a CGA parameter. In other embodiments, other values may also be used to indicate that the packet is a CGA parameter.
  • the Length field is an 8-bit unsigned integer, in 8-byte units, indicating the length of the entire CGA parameter, which is a type field, a length field, a padding length field, a reserved field field, a sequence number field, and a CGA parameter field. And the sum of the lengths of the fields such as the padding field.
  • the Pad Length field is an 8-bit unsigned integer representing the length of the padding field in bytes.
  • the Reserved field is an 8-bit field for future expansion. This reserved field field must be set to 0.
  • the Sequence Number field which is a 32-bit integer, contains information to prevent replay attacks. If the CGA parameter is used to respond to a CGA request, the value of the sequence number field is incremented by 1 for the value of the sequence number in the CGA request; otherwise, the sequence number field is set to 0.
  • the Parameters field has a variable length and includes CGA parameter information.
  • Padding field variable length field, used to make the packet length an integer multiple of 8 bytes.
  • the content of this padding field is 0.
  • the format of the CGA signature option proposed by the embodiment of the present invention is as shown in FIG. 5, and the CGA signature option includes:
  • the Type field is an 8-bit unsigned integer. In this embodiment, if the value of the type field is 195, it indicates that the data packet is a CGA signature. In other embodiments, other values may also be used to indicate that the packet is a CGA signature.
  • the Length field is an 8-bit unsigned integer indicating the length of the entire CGA signature in 8-byte units. It is a type field, a length field, a padding length field, a reserved field field, a CGA signature field, and a padding field. The sum of the field lengths.
  • the Pad Length field is an 8-bit unsigned integer representing the length of the padding field in bytes.
  • the Reserved field is 8 bits long for future expansion.
  • the reserved field field is set to 0.
  • the Signature field which is a variable length field, includes the signature of the packet content with the sender's private key.
  • the Padding field which is a variable length field, is used to make the packet length an integer multiple of 8 bytes.
  • the content of this padding field is 0.
  • the receiver After receiving the CGA request from the sender, the receiver can return the data packet carrying the CGA parameter and the CGA signature option to the sender, and provide the sender host with the data content required for verification.
  • the CGA parameter option is The value of the serial number field is added to the value of the serial number in the CGA request.
  • the sender can also actively add a CGA extension header to the sent packet, including the CGA parameter and the CGA signature option, to provide the receiver with the relevant address for verifying the address. Data content, in this mode, the Sequence Number field in the CGA parameter option is set to 0.
  • the CGA parameter field carried in the CGA parameter option corresponds to the source address in the IPv6 header.
  • the sender generates an IPv6 source address by calculating a one-way hash function based on the public key and some additional parameters, and generates other parameters as required by the CGA protocol.
  • the private key used by the signature in the CGA signature option is carried in the CGA parameter in the same extension header.
  • the public key of the band corresponds.
  • the host gets the following and connects the following in order:
  • the payload portion of the IP packet (the transport layer and the above).
  • the resulting data is then signed with the private key and the signature is placed in the Signature field of the CGA signature option.
  • S601 The receiver receives the IPv6 packet carrying the CGA extension header from the sender, and the network layer of the receiver receives the IPv6 packet transmitted by the lower layer.
  • the receiver obtains the CGA extension header from the IPv6 packet, where the extension header includes a CGA parameter and signature information of the sender.
  • S603 The receiver verifies the source address of the sender according to the information carried by the CGA extension header.
  • the IPv6 text is verified according to the information in the CGA parameter option carried in the CGA extension header and the information in the CGA signature option.
  • the receiver transmits the payload of the IPv6 packet to the upper layer, and the upper layer performs corresponding processing on the packet.
  • the network layer may further confirm that the source address of the IPv6 packet needs to be verified; and the network layer may determine whether the verification is required according to the related configuration information.
  • the configuration information is generally from an upper layer protocol, and the upper layer protocol may be based on user input and host default configuration. Or the security of the upper layer protocol requires that the configuration information be generated, and the configuration information is notified to the network layer. If the recipient confirms that verification is required based on the relevant configuration information, an implementation of the verification step is as follows:
  • S701 The receiver verifies the value of the serial number in the CGA parameter option
  • the receiver If the received IPv6 message is a response to the CGA request, the receiver first decrements the Sequence Number in the CGA parameter option by one and compares it with the Sequence Number in the CGA request that it caches. If they are consistent, proceed to the next step S702; otherwise, discard the IPv6 packet and send an ICMP error message.
  • the receiver verifies the source address included in the IPv6 packet header. If the verification succeeds, proceed to the next step S703; otherwise, discard the IPv6 packet and send an ICMP error packet.
  • S703 The receiver decrypts the content of the signature field in the CGA signature by using the public key in the CGA parameter, and compares the obtained content with the hash value of the partial content in the IPv6 message. If the content is the same, the authentication is passed; otherwise, the IPv6 packet is discarded and an ICMP error packet is sent.
  • the method may further include:
  • the receiver generates and sends an IPv6 packet carrying a CGA extension header to the sender, where the CGA extension header includes a CGA request option, and requests the sender to send CGA related information.
  • the sender replies with an IPv6 packet carrying the CGA extension header.
  • the CGA extension header includes the CGA parameter and the CGA signature option.
  • the sequence number of the CGA parameter option is the value of the Sequence Number in the CGA request option.
  • the receiving party generates and sends an IPv6 packet carrying a CGA extension header.
  • the receiving party generates a CGA extension header, where the CGA extension header includes a CGA request option, and the receiver adds the CGA extension header to the IPv6 packet.
  • the receiver sends an IPv6 packet carrying the CGA extension header to the receiver.
  • the sender uses the existing "Location Options Header" to carry CGA related information instead of creating The new CGA extension header implements the relevant functions brought by CGA.
  • the existing "purpose option header” format includes:
  • the Next Header field an 8-bit selector, identifies the next header type for the destination option header.
  • the Extended Head Length (Hdr Ext Len) field is an 8-bit unsigned integer. Identifies the length of the destination option header. The length is not included in the first 8 bytes, in 8-byte units.
  • the Options field which is variable in length and contains one or more data types.
  • the CGA related information is carried in the "purpose option header", and the CGA related information corresponds to three types of data of the option options field in the CGA extension header, which are a CGA request, a CGA parameter, and a CGA signature.
  • the three types of data can be directly added to the option Options field of the destination option header, so that it is not necessary to use a new CGA extension header.
  • the "destination option header” can appear once or twice, but at most twice.
  • the embodiment of the present invention is not limited by the number of occurrences of the "purpose option header”, and may be carried by any one of the "purpose option headers”, or may be carried by two "purpose option headers”.
  • the processing of the CGA related information by the sender and the receiver of this embodiment is substantially the same as that of the previous embodiment.
  • the difference is mainly that the sender of the embodiment adds the destination option header carrying the CGA related information to the data packet, and the receiver extracts the CGA related information from the destination option header for verification, and the previous embodiment is The sender uses the new CGA extension header, and the receiver extracts the content information from the new CGA extension header for verification.
  • the CGA-related information such as the CGA parameter and the signature information of the sender
  • the receiver can use the received information to implement the IPv6 packet at the network layer.
  • the source address is verified to provide a source address verification method for the network layer, and the role of the CGA protocol source address verification is fully utilized, so that the unreliable network layer has Security guarantee;
  • the security mechanism is not limited to one or several upper-layer application protocols, and has a wide range of applications and strong versatility.
  • the invention is not limited to IPv6 messages.
  • the IP packet or the IPv6-compatible IP packet in the protocol that is higher than the IPv6 version can implement the present invention as long as the packet has an extension header.
  • the implementation process is similar to the method in the foregoing embodiment.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • Figure 8 shows an application scenario of an embodiment of the present invention.
  • the sender adds the CGA parameters and signatures to the CGA extension header at the network layer, and encapsulates them into IPv6 packets, and then IPv6.
  • the packet is sent out; the receiver extracts the CGA parameter and signature of the sender at the network layer and performs verification. If the verification succeeds, the payload of the IPv6 packet is transmitted to the transport layer.
  • the sender can also add the CGA parameters and the signature directly to the existing destination option header at the network layer, and encapsulate the packet into the IPv6 packet, and then send the IPv6 packet.
  • the receiver extracts the network layer.
  • the sender's CGA parameters and signatures are verified. If the verification is successful, the payload of the IPv6 file is transmitted to the transport layer.
  • an embodiment of a packet processing apparatus of the present invention includes: a receiving unit 11 configured to receive an IPv6 packet carrying CGA related information from a sender; and an obtaining unit 12, configured to be in a network layer Obtaining, by the IPv6 packet, the CGA related information, where the CGA related information includes a CGA parameter and a signature information of the sender;
  • the verification unit 13 is configured to verify, according to the CGA parameter and the signature information, the source address of the IPv6 packet.
  • the transmitting unit 14 is configured to: when the verification result is passed, transmit the payload of the IP packet to the upper layer.
  • the apparatus for processing the data packet may further include: The error processing unit 15 is configured to discard the IPv6 packet when the verification result is not passed, and send an error message to the sender.
  • the apparatus for processing the data packet may further include: the requesting unit 10, sending an IPv6 file carrying the CGA request, requesting the sender to send CGA related information, and the receiving unit 11 receiving the CGA carrying IP packet of related information.
  • the requesting unit 10 may include:
  • An extended header generation module 101 configured to generate a CGA extension header, where the CGA extension header includes a CGA request option;
  • the adding module 102 is configured to add a CGA extension header to the IPv6 packet to generate an IPv6 packet carrying the CGA extension header.
  • the sending module 103 is configured to send, to the sender, an IPv6 packet carrying the CGA extension header, and request the sender to add CGA related information to the CGA extension header.
  • the requesting unit 10 may include: a specifying module 108, configured to specify a destination option header in an IP packet, where the specified destination option header includes a CGA request option;
  • the second sending module 109 is configured to send, to the sender, an IP packet carrying the destination option header, and request the sender to add CGA related information to the destination option header.
  • the apparatus for processing the data packet may further include:
  • the verification confirmation unit 16 is configured to confirm that the source address of the IPv6 packet needs to be verified according to the relevant configuration information.
  • the configuration information is generally from an upper layer protocol, and the upper layer protocol may generate the configuration information according to the input of the user, the default configuration of the host, or the security requirement of the upper layer protocol, and notify the network layer of the configuration information.
  • an embodiment of the verification unit 13 in the embodiment of the present invention includes: a serial number verification module 131, configured to verify the value of the serial number in the CGA parameter option, and verify Transmitting the IPv6 packet by the backward source address verification module 132; otherwise, outputting the verification result that the verification fails;
  • the source address verification module 132 is configured to verify the source address included in the IPv6 packet header according to the parameter in the CGA parameter option, and transmit the IPv6 packet to the signature verification module 133 after the verification is passed; otherwise, output verification Verification result that does not pass;
  • the signature verification module 133 is configured to decrypt the content of the signature field in the CGA signature by using the public key in the CGA parameter option, and compare the obtained content with the hash value of the partial content in the IPv6 packet. If the content is consistent, the output is output. Verify the passed verification result; otherwise, the verification result that the verification fails.
  • the CGA related information such as the CGA parameter and the signature information of the sender
  • the receiver can use the received information to verify the source address of the IPv6 packet at the network layer.
  • the network layer provides a method for source address verification, which fully utilizes the role of source address verification of the CGA protocol, so that the unreliable network layer has security guarantee; meanwhile, because security verification is performed at the network layer, the security mechanism is not limited to a certain one.
  • One or several upper application protocols with a wide range of applications and versatility.
  • the device embodiment of the present invention is not limited to IPv6 messages.
  • the IP packet or the IPv6-compatible IP packet in the protocol that is higher than the IPv6 version can implement the present invention as long as the IP packet has an extension header, and the implementation manner is similar to the device in the foregoing embodiment.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or any other form of storage medium.

Landscapes

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

Description

一种数据包处理的方法和装置 本申请要求了 2008年 7月 28 日提交的、 申请号为 200810142580.2、 发 明名称为"一种数据包处理的方法和装置"的中国申请的优先权,其全部内容通 过引用结合在本申请中。 技术领域
本发明涉及计算机网络领域的安全技术, 尤其涉及一种数据包处理的方 法和装置。 背景技术
RFC3972定义的 CGA ( Cryptographically Generated Addresses , 加密生成 地址)协议是加密生成地址协议。 一个加密生成地址是一个 IPv6地址, 地址 长度为 128位, 前 64位为子网前缀, 后 64位为接口标识符。 CGA中的接口 标识符由公钥和一些附加参数通过计算单向哈希函数生成。 通过对参数重新 计算哈希值并与接口标识符比较, 可以验证这一由公钥及参数生成的地址与 公钥的关联性。 并通过用对应于该公钥的私钥对发送的消息进行签名, 以及 接收者对签名的验证过程, 来达到验证源地址的目的。
发明人在实现本发明的过程中, 发现现有技术至少存在以下缺点: 尽管 CGA具有源地址验证的功能, 但对 CGA的应用大都是应用于某一种或几种 应用协议提出的, 缺乏通用性, 使用范围非常有限。 发明内容
本发明的实施例提供一种数据包处理的方法和装置, 能够扩展加密生成 地址 CGA协议的使用范围。
根据本发明的一个实施例, 提供一种数据包处理的方法, 包括: 接收来自发送方的携带加密生成地址 CGA相关信息的 IP报文;
在网络层, 从所述 IP报文中获得所述 CGA相关信息, 所述 CGA相关信息 中包括 CGA参数、 签名信息;
根据所述 CGA参数、 签名信息, 对 IP报文的源地址进行验证;
验证通过, 向上层传输所述 IP报文的载荷。
根据本发明的另一实施例, 提供一种数据包处理的装置, 包括: 接收单元, 用于接收来自发送方的携带加密生成地址 CGA相关信息的 IP 报文;
获取单元, 用于在网络层, 从所述 IP报文中获得所述 CGA相关信息, 所 述 CGA相关信息中包括 CGA参数、 签名信息;
验证单元, 用于根据所述 CGA参数、 签名信息, 对 IP报文的源地址进行 验证;
传输单元, 用于当 3全证结果为通过时, 向上层传输所述 ΙΡ·¾文的载荷。 根据本发明实施例, 通过将发送方的 CGA参数、 签名信息等 CGA相关信 息加入到 IP报文中,接收方可以利用接收到的信息在网络层实现对 IP报文的源 地址进行验证, 使得本不可靠的网络层, 有了安全性保障; 同时由于在网络 层实现安全机制, 具有较强通用性及广泛的使用范围。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明提供的数据包处理方法的一个实施例的流程示意图; 图 2为本发明一个实施例提供的 CGA扩展头的格式示意图;
图 3为本发明一个实施例提供的 CGA请求选项的格式示意图;
图 4为本发明一个实施例提供的 CGA参数选项的格式示意图;
图 5为本发明一个实施例提供的 CGA签名选项的格式示意图;
图 6为本发明提供的数据包处理方法的一个实施例的流程示意图; 图 Ί为本发明实施例提供的验证步骤的一个实施例的流程示意图; 图 8为本发明一个实施例的应用场景;
图 9为本发明提供的数据包处理装置的一个实施例的结构示意图; 图 10为本发明实施例提供的请求单元的一种结构示意图;
图 11为本发明实施例提供的请求单元的另一种结构示意图;
图 12为本发明实施例提供的验证单元的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有作 出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例在 IP( Internet Protocol,因特网协议)报文,例如 IPv6( Internet Protocol version 6, 因特网协议版本 6 )扩展头中增力口 CGA ( Cryptographically Generated Addresses, 加密生成地址 )扩展头, 该 CGA扩展头可以包括 CGA Request ( CGA请求)、 CGA Params ( CGA参数)、 CGA Sig ( CGA签名)。 CGA 扩展头用于携带加密生成地址相关信息。 数据包的接收方根据加密生成地址 相关信息对发送方的地址进行验证。 下面以 IPv6报文做为实施例进行阐述, 显然对于其他类型的 IP报文,只要具备扩展协议头的字段或者兼容 IPv6报文, 则都可以应用本发明, 本发明并不限制于 IPv6 "¾文。 例如, 在后续高于 IPv6 版本的协议下的 IP报文或者兼容 IPv6的 IP报文,只要该 IP报文具备扩展头, 都可以实施本发明。
在 IPv6里, 可选的网络层信息在一个独立的头部编码,放在包中 IPv6头 与上层协议头之间。 一个 IPv6 头可以携带零个, 一个或者更多的扩展头, 每 个扩展头由前一个头中的"下一个头"字段标识。 可以在 IPv6扩展头中增加 CGA扩展头。 例如, 增加了 CGA扩展头后的 IPv6扩展头排列顺序如下:
IPv6 header 0 Hop-by-Hop Options header
60 Destination Options header
43 Routing header
44 Fragment header
149 CGA header
51 Authentication header
50 Encapsulating Security Payload header
60 Destination Options header
其中, 前面的数字是十办议号, 由 IANA ( Internet Assigned Numbers
Authority, 互联网地址指派机构)分配得来, 新增加的 CGA扩展头可以使用 暂未分配的协议号, 例如上文中提及的 149, 当然还可以使用其他未使用的协 议号。
如图 1 所示, 本发明提供的数据包处理方法的一个实施例中, 当发送方 发送一个携带 CGA扩展头的 IPv6报文时, 包括如下步骤:
S101 : 生成一个 CGA扩展头;
所述 CGA扩展头中可以包括: 发送方公钥以及发送方数字签名; 发送方 根据公钥和一些相关参数通过计算单向哈希函数生成一个 IPv6源地址, 利用 发送方的私钥进行数字签名, 并将相关参数、 数字签名填充到 CGA扩展头的 相应位置。
S102: 将 CGA扩展头加入到 IPv6报文中, 生成一个携带所述 CGA扩展 头的 IPv64艮文;
CGA扩展头位于 IPv6报文中 IPv6头与上层协议头之间。
S103: 向接收方发送携带 CGA扩展头的 IPv6报文, 所述 IPv6报文用于 接收方实现 IPv6报文发送方的源地址验证。
本发明的一个实施例中, CGA扩展头的格式如图 2所示, 所述 CGA扩 展头包括:
下一头(Next Header )字段, 为 8比特的选择符, 标识该 CGA扩展头的 下一个头类型。
扩展头长度(Hdr Ext Len )字段, 为 8比特无符号整数。 标识该 CGA扩 展头的长度,计算长度时不包括前 8字节,以 8字节为单位。该字段长度为 0, 表示一种特殊含义, 即初始化 CGA。 当通信一方想要使用 CGA保护通信时, 可以选择发出长度为 0的 CGA扩展; 当通信一方收到长度为 0的扩展头时, 则向对方发出 CGA请求。
预留域(Reserved ) 字段, 长度为 16比特, 以备将来扩展使用。 该预留 域字段设为 0。
选项( Options )字段, 该部分长度可变, 包含了一个或者多个数据类型。
Options 可以选择三种类型数据, 分别是 CGA请求、 CGA参数、 CGA 签名。 CGA请求用于请求对方提供 CGA参数; CGA参数用于传输 CGA参 数; CGA签名是使用 CGA节点的私钥对数据包负载部分的签名。 CGA扩展 头如果包含 CGA参数选项, 则同时包含 CGA签名选项, 否则接收方向发送 方发送一个错误的 ICMP ( Internet Control Message Protocol, 因特网控制才艮文 协议)消息至源地址, 通知不可识别的选项类型。 在没有收到 CGA请求的时 候, 发送方也可以在数据包中添加 CGA扩展头; 对 CGA扩展头的处理方式 (认证或者忽略) 由接收方决定。
发送方主机在网络层收到上层传下来的数据包, 在封装 IPv6头时就可以 将 CGA扩展头同时封装进去。 如果主机发送的数据包的包头中包含了 CGA 请求选项时, 那么就是想验证接收方的源地址, 则接收方发回的数据包中就 应该携带 CGA参数和 CGA签名选项, 向发送方主机提供验证所需要的数据 内容, 其中 CGA参数选项中的 Sequence Number字段为 CGA请求选项中的 序列号的值加 1;发送方主机也可以主动在发出的数据包中加入 CGA扩展头, 包含 CGA参数和 CGA签名选项, 为接收方提供验证发送方地址的相关数据 内容, 其中 CGA参数选项中的 Sequence Number字段置 0。
本发明实施例提出的 CGA请求选项的格式如图 3所示, 该 CGA请求选 项包括:
类型 (Type )字段, 为 8 比特无符号整数, 在本实施例中, 当该类型字 段的数值为 193时, 表明该数据包为 CGA请求。 在其它实施例中, 也可用其 它数值表明该数据包为 CGA请求。
预留域(Reserved ) 字段, 长度为 24比特, 以备将来扩展使用。 该预留 域字段设为 0。
序列号( Sequence Number )字段, 为 32比特随机数, 包括防止重放攻击 的信息。
主机可以根据上层协议, 主动向接受方发起 CGA请求, 要求接受方发送 CGA参数和 CGA签名信息, 对接受方进行源地址验证。
本发明实施例提出的 CGA参数选项的格式如图 4所示, 该 CGA参数选 项包括:
类型 (Type )字段, 为 8 比特无符号整数。 在本实施例中, 当该类型字 段的数值为 194时, 表明该数据包为 CGA参数。 在其它实施例中, 也可用其 它值表明该数据包为 CGA参数。
长度(Length )字段, 为 8比特无符号整数, 以 8字节为单位, 表明整个 CGA参数的长度, 为类型字段、 长度字段、 填充长度字段、 预留域字段、 序 列号字段、 CGA参数字段以及填充字段等各字段长度的总和。
填充长度(Pad Length )字段, 为 8比特无符号整数, 表示填充字段的长 度, 单位为字节。
预留域(Reserved )字段, 长度为 8比特字段, 以备将来扩展使用。 该预 留域字段必须设为 0。
序列号( Sequence Number )字段, 为 32比特整数, 包括防止重放攻击的 信息。如果该 CGA参数用于响应 CGA请求,该序列号字段的值为 CGA请求 中的序列号的值加 1 ; 否则, 将该序列号字段置为 0。
参数( Parameters ) 字段, 长度可变, 包括 CGA参数信息。
填充(Padding ) 字段, 可变长度域, 用于使数据包长度为 8字节的整数 倍。 该填充字段的内容为 0。 本发明实施例提出的 CGA签名选项的格式如图 5所示, 该 CGA签名选 项包括:
类型 (Type )字段, 为 8 比特无符号整数。 在本实施例中, 若类型字段 的数值为 195时, 表明该数据包为 CGA签名。 在其它实施例中, 也可用其它 数值表明该数据包为 CGA签名。
长度(Length ) 字段, 为 8比特无符号整数, 以 8字节为单位表明整个 CGA签名的长度, 为类型字段、长度字段、填充长度字段、预留域字段、 CGA 签名字段和填充字段等各字段长度的总和。
填充长度(Pad Length )字段, 为 8比特无符号整数, 表示填充字段的长 度, 单位为字节。
预留域(Reserved )字段, 长度为 8比特, 以备将来扩展使用。 该预留域 字段设为 0。
签名 (Signature )字段, 为可变长度字段, 包括用发送者私钥对数据包内 容的签名。
填充(Padding ) 字段, 为可变长度字段, 用于使数据包长度为 8字节的 整数倍。 该填充字段的内容为 0。
接收方可以在收到发送方的 CGA请求后, 向发送方返回携带 CGA参数 和 CGA签名选项的数据包,提供给发送方主机验证所需要的数据内容,在这 种方式下, CGA参数选项中序列号字段的值为 CGA请求中的序列号的值加 1 ; 发送方也可以主动在发出的数据包中加入 CGA扩展头, 包含 CGA参数 和 CGA签名选项, 为接收方提供验证自己地址的相关数据内容,在这种方式 下, CGA参数选项中的 Sequence Number字段置 0。
CGA参数选项中携带的 CGA参数字段与 IPv6报文头中的源地址对应。 发送方根据公钥和一些附加参数通过计算单向哈希函数生成一个 IPv6 源地 址, 并按照 CGA协议的要求生成其他参数。
CGA签名选项中的签名使用的私钥与同一个扩展头中的 CGA参数中携 带的公钥对应。
发送方生成 CGA签名选项的步骤如下:
主机获取下列内容, 并按顺序将下列内容连接起来:
从 IP数据包的报头信息中获得 128位源地址;
从 IP数据包的报头信息中获得 128位目的地址;
除了 CGA签名选项的 CGA扩展头部分;
IP数据包的负载部分(传输层以及以上部分)。
然后对得到的数据使用私钥进行签名, 并将签名放入 CGA签名选项的 Signature字段中。
如图 6所示, 本发明提供的一个实施例中, 当接收方收到一个携带 CGA 扩展头的 IPv6报文, 处理流程如下:
S601 : 接收方接收来自发送方的携带 CGA扩展头的 IPv6报文; 接收方的网络层接收下层传输来的 IPv6报文。
S602: 在网络层, 接收方从所述 IPv6报文中获得所述 CGA扩展头, 所 述扩展头中包括发送方的 CGA参数、 签名信息;
S603: 接收方根据所述 CGA扩展头携带的信息, 对发送方的源地址进行 验证;
根据 CGA扩展头中携带的 CGA参数选项中的信息和 CGA签名选项中 的信息, 对 IPv6 文进行验证。
S604: 如果验证通过, 接收方则向上层传输所述 IPv6报文的载荷, 由上 层对报文进行相应处理;
S605: 如果验证不通过, 接收方则丟弃所述 IPv6报文, 并向发送方发送 ICMP错误报文。
在步骤 S603之前还可以包括: 网络层确认需要对 IPv6报文的源地址进 行验证; 网络层可以根据相关的配置信息确定是否需要进行验证。 所述配置 信息一般是来自上层协议, 上层协议可以根据用户的输入、 主机默认的配置 或者上层协议的安全性要求生成所述配置信息, 并将配置信息通知给网络层。 如果接收方根据相关的配置信息确认需要验证, 验证步骤的一个实施例如下:
S701: 接收方验证 CGA参数选项中序列号的值;
如果收到的 IPv6 文为对 CGA请求的响应, 接收方首先将 CGA参数 选项中的 Sequence Number减 1 , 与自己緩存的 CGA请求中的 Sequence Number比较。 如果一致, 则进行下一步 S702; 否则, 丟弃该 IPv6报文, 发 送 ICMP错误艮文。
S702: 根据 CGA参数选项中的参数信息, 接收方对 IPv6报文头中包含 的源地址进行验证。 如果验证通过, 则进行下一步 S703; 否则, 丟弃该 IPv6 报文, 发送 ICMP错误报文。
S703: 接收方使用 CGA参数中的公钥对 CGA签名中的签名字段的内容 解密, 将得到的内容和 IPv6报文中部分内容串接的哈希值比较。 如果内容一 致, 则验证通过; 否则, 丟弃该 IPv6报文, 发送 ICMP错误报文。
在步骤 S601之前还可以包括:
接收方生成并向发送方发送一个携带 CGA扩展头的 IPv6报文,所述 CGA 扩展头中包含 CGA请求选项, 请求所述发送方发送 CGA相关信息;
发送方回复携带 CGA扩展头的 IPv6报文, CGA扩展头中包括 CGA参 数和 CGA签名选项, 其中 CGA参数选项的 Sequence Number为 CGA请求 选项中 Sequence Number的数值力口 1。
接收方生成并发送一个携带 CGA扩展头的 IPv6报文的步骤包括: 接收方生成一个 CGA扩展头, 所述 CGA扩展头中包括 CGA请求选项; 接收方将 CGA扩展头加入到 IPv6报文中,生成一个携带所述 CGA扩展 头的 IPv64艮文;
接收方向发送方发送携带 CGA扩展头的 IPv6报文。 本发明提供的数据包处理方法的另一个实施例中, 由发送方使用现有的 "目的选项头"( Destination Options Header)来携带 CGA相关信息, 代替创建 的新的 CGA扩展头, 实现 CGA所带来的相关功能。
当前面的头部中"下一个头"字段中的值为 60时, 表示下一个头为"目的 选项头"。 现有的"目的选项头"格式中包括:
下一头 (Next Header ) 字段, 为 8比特的选择符, 标识该目的选项头的 下一个头类型。
扩展头长度(Hdr Ext Len )字段, 为 8比特无符号整数。 标识该目的选 项头的长度, 计算长度时不包括前 8字节, 以 8字节为单位。
选项(Options )字段, 该部分长度可变, 包含了一个或者多个数据类型。 本发明实施例中, 在"目的选项头',中携带有 CGA相关信息, 该 CGA相 关信息对应上述 CGA扩展头中选项 Options 字段的三种类型数据, 分别是 CGA请求、 CGA参数、 CGA签名。 在本发明实施例中可以直接将该三种类 型数据添加到目的选项头的选项 Options字段中,从而就可以不需要使用新的 CGA扩展头。
需要说明的是, 在现有的 IPv6扩展头中, "目的选项头 "可以出现一次或 两次, 但最多两次。 本发明实施例不受"目的选项头"出现次数的限制, 可以由 任意一个"目的选项头"来携带 CGA相关信息, 也可以由两个 "目的选项头 "分 别来携带 CGA相关信息。
本实施例的发送方与接收方对 CGA相关信息的处理与上一个实施例大致 相同。 不同之处主要在于, 本实施例的发送方是将携带有 CGA相关信息的目 的选项头添加到数据包中,接收方是从目的选项头中提取 CGA相关信息进行 验证, 而上一个实施例是发送方使用新的 CGA扩展头, 接收方从新的 CGA 扩展头提取内容信息进行验证。
本发明提供的上述数据包处理方法实施例中,通过将发送方的 CGA参数、 签名信息等 CGA相关信息加入到 IPv6报文中, 接收方可以利用接收到的信 息在网络层实现对 IPv6报文的源地址进行验证, 为网络层提供源地址验证的 方法, 充分发挥 CGA协议源地址验证的作用, 使得本不可靠的网络层, 有了 安全性保障; 同时, 由于在网络层进行安全验证, 该安全机制不限于某一种 或几种上层应用协议, 具有应用范围广泛、 通用性强的特性。
显然, 本发明并不限制于 IPv6报文。 例如, 在后续高于 IPv6版本的协议 下的 IP报文或者兼容 IPv6的 IP报文, 只要该报文具备扩展头, 都可以实施 本发明, 其实施的流程与上述实施例方法类似。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流 程, 是可以通过计算机程序来指令相关的硬件来完成, 所述的程序可存储于 一计算机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施 例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体( Read-Only Memory, ROM )或随机存^ ^己忆体 ( Random Access Memory, RAM )等。
图 8 所示为本发明一个实施例的应用场景, 对于相互通信的两个主机, 发送方在网络层将 CGA参数和签名添加到 CGA扩展头中,并封装到 IPv6报 文中, 再将 IPv6报文发送出去; 接收方在网络层提取发送方的 CGA参数和 签名并进行验证, 如果验证成功, 则向传输层传输 IPv6报文的载荷。
可以理解的是,发送方也可以在网络层将 CGA参数和签名直接添加到现 有的目的选项头中, 并封装到 IPv6报文中, 再将 IPv6报文发送出去; 接收方 在网络层提取发送方的 CGA参数和签名并进行验证, 如果验证成功, 则向传 输层传输 IPv6 文的载荷。
如图 9所示, 本发明一种数据包处理的装置的一个实施例包括: 接收单元 11 , 用于接收来自发送方的携带 CGA相关信息的 IPv6报文; 获取单元 12, 用于在网络层, 从所述 IPv6报文中获得所述 CGA相关信 息, 所述 CGA相关信息中包括发送方的 CGA参数、 签名信息;
验证单元 13 , 用于根据所述 CGA参数、 签名信息, 对 IPv6报文的源地 址进行验证;
传输单元 14, 用于当验证结果为通过时, 向上层传输 IP报文的载荷。 根据本发明的一个实施例, 所述数据包处理的装置还可以包括: 错误处理单元 15, 用于当验证结果为不通过时, 丟弃所述 IPv6报文, 并 向发送方发送错误报文。
根据本发明的一个实施例, 所述数据包处理的装置还可以包括: 请求单元 10,发送一个携带 CGA请求的 IPv6 文,请求发送方发送 CGA 相关信息, 用于所述接收单元 11接收携带 CGA相关信息的 IP报文。
如图 10所示, 在一个实施例中, 所述请求单元 10可以包括:
扩展头生成模块 101 , 用于生成一个 CGA扩展头, 所述 CGA扩展头中 包括 CGA请求选项;
添加模块 102, 用于将 CGA扩展头加入到 IPv6报文中, 生成一个携带所 述 CGA扩展头的 IPv6报文;
发送模块 103 , 用于向发送方发送携带所述 CGA扩展头的 IPv6报文,请 求所述发送方将 CGA相关信息添加到所述 CGA扩展头中。
如图 11所示, 在另一个实施例中, 所述请求单元 10可以包括: 指定模块 108, 用于指定 IP报文中的目的选项头, 所述指定的目的选项 头中包括 CGA请求选项;
第二发送模块 109, 用于向所述发送方发送携带所述目的选项头的 IP报 文, 请求所述发送方将 CGA相关信息添加到所述目的选项头中。
仍参见图 9所示, 根据本发明的一个实施例, 所述数据包处理的装置还 可以包括:
验证确认单元 16, 用于根据相关的配置信息, 确认需要对 IPv6报文的源 地址进行验证。
所述配置信息一般是来自上层协议, 上层协议可以根据用户的输入、 主 机默认的配置或者上层协议的安全性要求生成所述配置信息, 并将配置信息 通知给网络层。
如图 12所示, 本发明实施例中验证单元 13的一个实施例包括: 序列号验证模块 131 , 用于验证 CGA参数选项中序列号的值, 并在验证 通过后向源地址验证模块 132传输所述 IPv6报文; 否则, 输出验证不通过的 验证结果;
源地址验证模块 132, 用于根据 CGA参数选项中的参数, 对 IPv6报文头 中包含的源地址进行验证,并在验证通过后向签名验证模块 133传输所述 IPv6 报文; 否则, 输出验证不通过的验证结果;
签名验证模块 133 , 用于使用 CGA参数选项中的公钥对 CGA签名中的 签名字段的内容解密, 将得到的内容和 IPv6报文中部分内容串接的哈希值比 较, 如果内容一致, 输出验证通过的验证结果; 否则, 输出验证不通过的验 证结果。
本发明实施例中, 通过将发送方的 CGA参数、 签名信息等 CGA相关信 息加入到 IPv6报文中,接收方可以利用接收到的信息在网络层实现对 IPv6报 文的源地址进行验证, 为网络层提供源地址验证的方法, 充分发挥 CGA协议 源地址验证的作用, 使得本不可靠的网络层, 有了安全性保障; 同时, 由于 在网络层进行安全验证, 该安全机制不限于某一种或几种上层应用协议, 具 有应用范围广泛、 通用性强的特性。
显然, 本发明装置实施例并不限制于 IPv6报文。 例如, 在后续高于 IPv6 版本的协议下的 IP报文或者兼容 IPv6的 IP报文,只要该 IP报文具备扩展头, 都可以实施本发明, 其实施的方式与上述实施例的装置类似。
专业人员还可以意识到, 结合本文中所公开的实施例描述的各示例的单 元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实现, 为了 清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一般性地描 述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来执行, 取决 于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个特定的应 用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明 的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、 处理 器执行的软件模块, 或者二者的结合来实施。 软件模块可以置于随机存储器
( RAM ),内存、只读存储器(ROM )、电可编程 ROM、电可擦除可编程 ROM、 寄存器、 硬盘、 可移动磁盘、 CD-ROM、 或任意其它形式的存储介质中。
以上所述仅为本发明的几个实施例, 本领域的技术人员依据申请文件公

Claims

权 利 要 求 书
1、 一种数据包处理的方法, 其特征在于, 包括:
接收来自发送方的携带加密生成地址 CGA相关信息的 IP报文;
在网络层, 从所述 IP报文中获得所述 CGA相关信息, 所述 CGA相关信息 中包括发送方的 CGA参数、 签名信息;
根据所述 CGA参数、 签名信息, 对 IP报文的源地址进行验证;
验证通过, 向上层传输所述 IP报文的载荷。
2、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括:
当验证不通过, 则丟弃所述 IP报文, 并向所述发送方发送错误报文。
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述根据所述 CGA参数、 签名信息, 对 IP报文的源地址进行验证的步骤包括:
验证 CGA参数选项中序列号的值;
如果验证通过则根据 CGA参数选项中的参数, 对 IP报文头中包含的源地 址进行验证;
如果验证通过则使用 CGA参数选项中的公钥对 CGA签名中的签名字段的 内容解密, 将得到的内容和 IP报文中部分内容串接的哈希值比较, 如果内容一 致, 则输出验证通过的验证结果。
4、 如权利要求 1或 2所述的方法, 其特征在于, 在所述接收来自发送方的 携带 CGA相关信息的 IP报文的步骤之前, 还包括:
向所述发送方发送一个携带 CGA请求的 IP报文,请求所述发送方发送 CGA 相关信息。
5、 如权利要求 4所述的方法, 其特征在于, 所述向所述发送方发送一个携 带 CGA请求的 IP报文, 请求所述发送方发送 CGA相关信息的步骤包括:
生成一个 CGA扩展头, 所述 CGA扩展头中包括 CGA请求选项;
将 CGA扩展头加入到 IP报文中, 生成一个携带所述 CGA扩展头的 IP报 文;
向发送方发送携带 CGA扩展头的 IP报文,请求所述发送方将 CGA相关信 息添加到所述 CGA扩展头中。
6、 如权利要求 4所述的方法, 其特征在于, 所述向所述发送方发送一个携 带 CGA请求的 IP报文, 请求所述发送方发送 CGA相关信息的步骤包括:
指定 IP报文中的目的选项头, 所述指定的目的选项头中包括 CGA请求选 项;
向所述发送方发送携带所述目的选项头的 IP报文,请求所述发送方将 CGA 相关信息添加到所述目的选项头中。
7、 如权利要求 1所述的方法, 其特征在于, 在根据所述 CGA参数、 签名 信息, 对所述 IP报文的源地址进行验证的步骤之前, 包括:
网络层根据相关配置信息, 确认需要对 IP报文的源地址进行验证。
8、 如权利要求 1、 2或 7任一项所述的方法, 其特征在于, 所述 IP报文为 IPv6才艮文。
9、 一种数据包处理的装置, 其特征在于, 包括:
接收单元, 用于接收来自发送方的携带加密生成地址 CGA相关信息的 IP 报文;
获取单元, 用于在网络层, 从所述 IP报文中获得所述 CGA相关信息, 所 述 CGA相关信息中包括发送方的 CGA参数、 签名信息;
验证单元, 用于根据所述 CGA参数、 签名信息, 对 IP报文的源地址进行 验证;
传输单元, 用于当验证结果为通过时, 向上层传输所述 IP报文的载荷。
10、 如权利要求 9所述的装置, 其特征在于, 还包括:
错误处理单元, 用于当验证结果为不通过时, 丟弃所述 IP报文, 并向发送 方发送错误报文。
11、 如权利要求 9或 10所述的装置, 其特征在于, 所述验证单元包括: 序列号验证模块, 用于验证 CGA参数选项中序列号的值, 并在验证通过后 向源地址验证模块传输所述 IP报文;
源地址验证模块, 用于根据 CGA参数选项中的参数, 对 IP报文头中包含 的源地址进行验证, 并在验证通过后向签名验证模块传输所述 IP报文;
签名验证模块, 用于使用 CGA参数选项中的公钥对 CGA签名中的签名字 段的内容解密, 将得到的内容和 IP报文中部分内容串接的哈希值比较, 如果内 容一致, 则输出验证通过的验证结果。
12、 如权利要求 9或 10所述的装置, 其特征在于, 还包括:
请求单元, 用于向所述发送方发送一个携带 CGA请求的 IP报文, 请求所 述发送方发送 CGA相关信息。
13、 如权利要求 12所述的装置, 其特征在于, 所述请求单元包括: 扩展头生成模块,用于生成一个 CGA扩展头,所述 CGA扩展头中包括 CGA 请求选项;
添加模块, 用于将 CGA扩展头加入到 IP报文中, 生成一个携带所述 CGA 扩展头的 IP报文;
发送模块, 用于向发送方发送携带所述 CGA扩展头的 IP报文, 请求所述 发送方将 CGA相关信息添加到所述 CGA扩展头中。
14、 如权利要求 12所述的装置, 其特征在于, 所述请求单元包括: 指定模块, 用于指定 IP报文中的目的选项头, 所述指定的目的选项头中包 括 CGA请求选项;
第二发送模块, 用于向所述发送方发送携带所述目的选项头的 IP报文, 请 求所述发送方将 CGA相关信息添加到所述目的选项头中。
15、 如权利要求 9或 10所述的装置, 其特征在于, 还包括:
验证确认单元, 用于根据相关配置信息, 确认需要对 IPv6报文的源地址进 行验证, 启动所述验证单元对所述 IP报文的源地址的验证。
PCT/CN2009/071733 2008-07-28 2009-05-11 一种数据包处理的方法和装置 WO2010012171A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP09802364.1A EP2309686B1 (en) 2008-07-28 2009-05-11 Data packet processing method and apparatus thereof
US13/012,223 US20110119534A1 (en) 2008-07-28 2011-01-24 Method and apparatus for processing packets

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2008101425802A CN101640631B (zh) 2008-07-28 2008-07-28 一种数据包处理的方法和装置
CN200810142580.2 2008-07-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/012,223 Continuation US20110119534A1 (en) 2008-07-28 2011-01-24 Method and apparatus for processing packets

Publications (1)

Publication Number Publication Date
WO2010012171A1 true WO2010012171A1 (zh) 2010-02-04

Family

ID=41609937

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/071733 WO2010012171A1 (zh) 2008-07-28 2009-05-11 一种数据包处理的方法和装置

Country Status (4)

Country Link
US (1) US20110119534A1 (zh)
EP (1) EP2309686B1 (zh)
CN (1) CN101640631B (zh)
WO (1) WO2010012171A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137096A (zh) * 2011-01-13 2011-07-27 华为技术有限公司 数据传输的方法和设备
KR101234784B1 (ko) * 2011-05-30 2013-02-20 삼성에스디에스 주식회사 아이디 기반 암호화 방법 및 그 장치
JP5716712B2 (ja) * 2012-07-24 2015-05-13 横河電機株式会社 パケット転送装置及び方法
CN103002071B (zh) * 2012-12-25 2016-05-04 福建星网锐捷网络有限公司 地址解析处理方法和装置
US10447665B2 (en) * 2017-03-31 2019-10-15 Konica Minolta Laboratory U.S.A., Inc. IPv6 link local secure network with biometric security to secure IOT devices
CN110166502B (zh) 2018-02-11 2021-06-01 中国移动通信有限公司研究院 数据获取方法、服务提供端、服务使用端及网络功能实体
US10904152B2 (en) * 2018-12-17 2021-01-26 Cisco Technology, Inc. Hardware-friendly mechanisms for in-band OAM processing
CN110401646B (zh) * 2019-07-15 2020-05-05 中国人民解放军战略支援部队信息工程大学 IPv6安全邻居发现过渡环境中CGA参数探测方法及装置
CN110380842B (zh) * 2019-08-08 2022-09-13 北方工业大学 适用于智慧网联汽车的can总线报文签名方法、装置和系统
CN114499904A (zh) * 2020-11-11 2022-05-13 华为技术有限公司 一种报文处理方法及装置
CN114978519A (zh) * 2021-02-22 2022-08-30 中国移动通信有限公司研究院 报文发送方法、签名信息的生成方法及设备
CN113904766B (zh) * 2021-09-08 2024-04-30 北京世纪互联宽带数据中心有限公司 一种加密通信方法、装置、设备及介质
WO2023036348A1 (zh) * 2021-09-08 2023-03-16 北京世纪互联宽带数据中心有限公司 一种加密通信方法、装置、设备及介质
CN113905012A (zh) * 2021-09-08 2022-01-07 北京世纪互联宽带数据中心有限公司 一种通信方法、装置、设备及介质
CN113904807B (zh) * 2021-09-08 2023-11-21 北京世纪互联宽带数据中心有限公司 一种源地址认证的方法、装置、电子设备及存储介质
CN113904809B (zh) * 2021-09-08 2024-03-22 北京世纪互联宽带数据中心有限公司 一种通信方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010683A1 (en) * 2002-07-12 2004-01-15 Microsoft Corporation Method and system for authenticating messages
US20060077908A1 (en) * 2004-10-07 2006-04-13 Park So H Method for generating and authenticating address automatically in IPv6-based internet and data structure thereof
CN1980231A (zh) * 2005-12-02 2007-06-13 华为技术有限公司 一种在移动IPv6中更新防火墙的方法
WO2008073349A2 (en) * 2006-12-11 2008-06-19 Cisco Technology, Inc. Secured ipv6 traffic preemption

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100699470B1 (ko) * 2000-09-27 2007-03-26 삼성전자주식회사 멀티레이어 패킷 처리 장치
JP2003204326A (ja) * 2002-01-09 2003-07-18 Nec Corp 通信システムと暗号処理機能付きlan制御装置、及び通信制御プログラム
ATE392769T1 (de) * 2005-08-25 2008-05-15 Alcatel Lucent Sicheres kommunikationsverfahren- und gerät zur verarbeitung von send-datenpaketen
JP2008165307A (ja) * 2006-12-27 2008-07-17 Murata Mach Ltd 電子メール通信装置
US7949876B2 (en) * 2006-12-28 2011-05-24 Telefonaktiebolaget L M Ericsson (Publ) Method and nodes for optimized and secure communication between routers and hosts
US8266427B2 (en) * 2007-06-08 2012-09-11 Cisco Technology, Inc. Secure mobile IPv6 registration

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010683A1 (en) * 2002-07-12 2004-01-15 Microsoft Corporation Method and system for authenticating messages
US20060077908A1 (en) * 2004-10-07 2006-04-13 Park So H Method for generating and authenticating address automatically in IPv6-based internet and data structure thereof
CN1980231A (zh) * 2005-12-02 2007-06-13 华为技术有限公司 一种在移动IPv6中更新防火墙的方法
WO2008073349A2 (en) * 2006-12-11 2008-06-19 Cisco Technology, Inc. Secured ipv6 traffic preemption

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
EP2309686B1 (en) 2014-06-18
EP2309686A1 (en) 2011-04-13
US20110119534A1 (en) 2011-05-19
EP2309686A4 (en) 2011-12-14
CN101640631A (zh) 2010-02-03
CN101640631B (zh) 2011-11-16

Similar Documents

Publication Publication Date Title
WO2010012171A1 (zh) 一种数据包处理的方法和装置
USRE49053E1 (en) System and method for an adaptive TCP SYN cookie with time validation
US8098823B2 (en) Multi-key cryptographically generated address
US8418242B2 (en) Method, system, and device for negotiating SA on IPv6 network
JP3343064B2 (ja) フレームを捕獲、カプセル化及び暗号化するための擬似ネットワークアダプタ
US7436833B2 (en) Communication system, router, method of communication, method of routing, and computer program product
JP5291725B2 (ja) Ipアドレス委任
EP2329621B1 (en) Key distribution to a set of routers
CN108650227A (zh) 基于数据报安全传输协议的握手方法及系统
Igoe et al. X. 509v3 certificates for Secure Shell authentication
JP2004295891A (ja) パケットペイロードを認証する方法
EP1625689A1 (en) Method and system for encryption and storage of information
WO2009143721A1 (zh) 处理动态主机配置协议消息的方法、装置及系统
WO2017185978A1 (zh) 一种报文解析方法及设备
JP4367546B2 (ja) メール中継装置
CN113904809B (zh) 一种通信方法、装置、电子设备及存储介质
Weis The use of rsa/sha-1 signatures within encapsulating security payload (esp) and authentication header (ah)
CN115580498B (zh) 融合网络中的跨网通信方法及融合网络系统
WO2010124549A1 (zh) 获取公钥的方法、装置和系统
JP4280536B2 (ja) 公開鍵生成装置、方法、及び、公開鍵証明書発行方法
JP3796507B2 (ja) 送信器、受信器、送信方法および伝送方法
Igoe et al. RFC 6187: X. 509v3 Certificates for Secure Shell Authentication
Weis RFC 4359: The Use of RSA/SHA-1 Signatures within Encapsulating Security Payload (ESP) and Authentication Header (AH)

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2009802364

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE