WO2014100967A1 - 一种ipsec协商的方法、装置、设备和系统 - Google Patents

一种ipsec协商的方法、装置、设备和系统 Download PDF

Info

Publication number
WO2014100967A1
WO2014100967A1 PCT/CN2012/087399 CN2012087399W WO2014100967A1 WO 2014100967 A1 WO2014100967 A1 WO 2014100967A1 CN 2012087399 W CN2012087399 W CN 2012087399W WO 2014100967 A1 WO2014100967 A1 WO 2014100967A1
Authority
WO
WIPO (PCT)
Prior art keywords
receiver
stage
initiator
phase
ike
Prior art date
Application number
PCT/CN2012/087399
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 PCT/CN2012/087399 priority Critical patent/WO2014100967A1/zh
Priority to CN201280003089.6A priority patent/CN103392323B/zh
Publication of WO2014100967A1 publication Critical patent/WO2014100967A1/zh

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/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/061Network architectures or network communication protocols for network security for supporting key management in a packet data network for key exchange, e.g. in peer-to-peer networks
    • 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

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, an apparatus, a device, and a system for IPSEC negotiation.
  • IPSEC Internet Protocol Security
  • the initiator and receiver need to perform IKE (Internet Key Exchange) negotiation before sending data to ensure that the initiator and receiver use consistent encryption and authentication algorithms to ensure the correct data.
  • the IKE negotiation consists of two processes. The first phase is to establish a SA (Security Association) that provides protection for the second phase, and the second phase is to establish an SA that protects data.
  • SA Security Association
  • the specific negotiation process is as follows: After receiving the negotiation information sent by the initiator, the receiver sends the information that the negotiation is unsuccessful to the initiator if the result of the negotiation is that the negotiation information does not meet the requirements. After receiving the information that the negotiation is unsuccessful, the initiator changes the negotiation information, and then sends the changed negotiation information to the receiver. After receiving the changed negotiation information, the receiver determines whether the negotiation is successful.
  • Embodiments of the present invention provide a method, apparatus, device, and system for IPSEC negotiation, which solve the technical problem that the IPSEC negotiation process takes a long time and is inefficient.
  • a method for IPSEC negotiation including:
  • the receiver first stage configuration parameter generates an IKE first stage configuration modification parameter;
  • the receiver first stage configuration parameter and the IKE first stage configuration modification parameter include: a receiver IKE version, a receiver negotiation mode, and a receiving Party authentication method, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group;
  • the second-stage configuration parameter of the receiver and the second-stage configuration modification parameter of the IKE include: a receiver authentication algorithm, a receiver encryption algorithm, and a receiving Full successor secret of the party key, recipient security protocol, and receiver encapsulation mode;
  • the receiving, the first phase configuration parameter further includes: a first phase SA timeout time of the receiver;
  • the IKE first-stage configuration modification parameter further includes: a first-stage SA negotiation timeout period; wherein, the first-stage SA negotiation timeout time is an initiator-first phase SA timeout time and the receiver number configured by the initiator The minimum value of the one-stage SA timeout period.
  • the receiving The second phase configuration parameter further includes: a second phase SA timeout period of the receiver;
  • the second phase configuration modification parameter of the I KE further includes: a second phase SA negotiation timeout period; wherein the second phase SA negotiation timeout time is an initiator second phase SA timeout time configured by the initiator and the receiver The minimum value of the second stage SA timeout.
  • the receiver authentication algorithm in the first stage configuration parameter of the receiver is a sum of all the authentication algorithms stored by the receiver or any one of the Kind;
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the receiver second stage configuration parameter is a sum of all the authentication algorithms stored by the receiver or any one of the Kind;
  • the receiver encryption algorithm in the second phase configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the sending the first-stage configuration parameter of the receiver to the initiator includes:
  • the sending the second phase configuration parameter of the receiver to the initiator includes:
  • the seventh possible implementation in the first aspect In the current mode, after receiving the first stage configuration modification parameter of the I KE, the method further includes: sending, to the initiator, first stage parameter confirmation information, so that the initiator establishes a first phase SA with the receiver.
  • the method After receiving the second phase configuration modification parameter of the I KE, the method further includes:
  • the second phase parameter confirmation information is sent to the initiator, so that the initiator establishes a second phase SA with the receiver.
  • a method for I PSEC negotiation including:
  • the receiver first phase configuration parameter and the I KE first phase configuration modification parameter include: a receiver I KE version, receiving a party negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group;
  • the receiver second phase configuration parameter and the I KE second phase configuration modification parameter include: a receiver authentication algorithm, a receiver Encryption algorithm, full successor secret of the recipient key, recipient security protocol, and receiver encapsulation mode;
  • the initiator The first stage configuration parameters further include: an initiator first phase SA timeout period;
  • the IKE phase 1 configuration modification parameter further includes: a first phase SA negotiation timeout period; wherein the first phase SA negotiation timeout time is the initiator first phase SA timeout time and the receiver configuration receiving The minimum value of the first-stage SA timeout period.
  • the second phase configuration parameter of the initiator further includes: an initiator second phase SA timeout period;
  • the IKE phase 2 configuration modification parameter further includes: a second phase SA negotiation timeout period; wherein the second phase SA negotiation timeout time is the initiator second phase SA timeout time and the receiver configuration receiving The minimum value of the second phase SA timeout period.
  • the receiver authentication algorithm in the IKE first-stage configuration modification parameter is a sum or a combination of all the authentication algorithms stored by the receiver kind;
  • the receiver encryption algorithm in the first stage configuration modification parameter of the IKE is a sum of any encryption algorithms stored by the receiver or any one of them.
  • the receiver authentication algorithm in the IKE second-stage configuration modification parameter is a sum or a combination of all the authentication algorithms stored by the receiver kind;
  • the receiver encryption algorithm in the IKE second stage configuration modification parameter is a sum of any encryption algorithm stored by the receiver or any one of them.
  • Transmitting the IKE first-stage configuration modification parameter to the receiver in the IKE informa t i on from the initiator to the receiver.
  • an apparatus for IPSEC negotiation including:
  • a first stage receiving unit configured to receive an Internet Key Exchange IKE first stage configuration parameter sent by the initiator
  • a first stage determining unit configured to determine whether the first phase configuration parameter sent by the initiator is consistent with a first phase configuration parameter of the receiver
  • a first stage sending unit configured to: when the first stage determining unit determines that the IKE first stage configuration parameter sent by the initiator is inconsistent with the first stage configuration parameter of the receiver, configure the first stage of the receiving end Sending parameters to the initiator, so that the initiator generates an IKE first phase configuration modification parameter according to the receiver first phase configuration parameter; the receiver first phase configuration parameter and the IKE first phase configuration modification
  • the parameters include: a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group;
  • the first stage receiving unit is further configured to receive the IKE first stage configuration modification parameter
  • a first phase security association establishing unit configured to establish a first phase security association SA with the initiator
  • a second stage receiving unit configured to receive an IKE second stage configuration parameter sent by the initiator
  • a second stage determining unit configured to determine whether the IKE second stage configuration parameter sent by the initiator is consistent with the second stage configuration parameter of the receiver
  • a second stage sending unit configured to: when the second stage determining unit determines that the IKE second stage configuration parameter sent by the initiator is inconsistent with the second stage configuration parameter of the receiver, The second-stage configuration parameter is sent to the initiator, so that the initiator generates an IKE second-stage configuration modification parameter according to the receiver second-stage configuration parameter; the receiver second-stage configuration parameter and the IKE second-stage configuration
  • the modified parameters include: the receiver recognizes Certificate algorithm, receiver encryption algorithm, complete successor secret of receiver key, receiver security protocol, and receiver encapsulation mode;
  • the second stage receiving unit is further configured to receive the I KE second stage configuration modification parameter
  • the second phase security association establishing unit is configured to establish a second phase SA with the initiator.
  • the first stage configuration parameter of the receiver further includes: a first phase SA timeout period of the receiver;
  • the first phase configuration negotiation modification parameter of the I KE further includes: a first phase SA negotiation timeout period; wherein the first phase SA negotiation timeout time is an initiator first phase SA timeout time configured by the initiator and the receiver The minimum value of the first phase SA timeout period.
  • the receiving second phase configuration parameter further includes: a second phase SA timeout period of the receiver;
  • the second phase configuration modification parameter of the I KE further includes: a second phase SA negotiation timeout period; wherein the second phase SA negotiation timeout time is an initiator second phase SA timeout time configured by the initiator and the receiver The minimum value of the second stage SA timeout.
  • the receiver authentication algorithm in the first stage configuration parameter of the receiver is a sum of all the authentication algorithms stored by the receiver or any one of the Kind;
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the second phase configuration parameter of the receiver is a sum of all the authentication algorithms stored by the receiver or any one of the Kind;
  • the receiver encryption algorithm in the second phase configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the first stage sending unit is specifically configured to: Carrying the receiver first phase configuration parameter on the receiver to the initiator
  • the IKE informa t i on is sent to the originator.
  • the second stage sending unit is specifically configured to:
  • the first stage sending unit is further configured to:
  • the first phase parameter confirmation information is sent to the initiator, so that the initiator establishes a first phase SA with the receiver.
  • the second stage sending unit is further configured to:
  • the second phase parameter confirmation information is sent to the initiator, so that the initiator establishes a second phase SA with the receiver.
  • an apparatus for IPSEC negotiation including:
  • a first stage sending unit configured to send an Internet Key Exchange IKE first stage configuration parameter to the receiver
  • a first stage receiving unit configured to receive a first phase configuration parameter of the receiver sent by the receiver
  • a first stage parameter generating unit configured to generate an IKE first phase configuration modification parameter according to the first phase configuration parameter of the receiver;
  • the first phase configuration parameter of the receiver and the first phase configuration modification parameter of the IKE include: a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group;
  • the first stage sending unit is further configured to send to the receiver The IKE first stage configuration modification parameter;
  • a first stage security association establishing unit configured to establish a first-phase security association SA with the receiver when receiving the first-stage parameter confirmation information of the receiver;
  • a second stage sending unit configured to send an I KE second phase configuration parameter to the receiver
  • a second stage receiving unit configured to receive a second phase configuration parameter of the receiver sent by the receiver
  • a second stage parameter generating unit configured to generate an I KE second stage configuration modification parameter according to the receiver second stage configuration parameter; the receiver second stage configuration parameter and the I KE second stage configuration modification parameter
  • the method includes: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode;
  • the second stage sending unit is further configured to send the I KE second stage configuration modification parameter to the receiver.
  • the second phase security association establishing unit is configured to establish a second phase SA with the initiator when receiving the second phase parameter confirmation information of the receiver.
  • the initiator first phase configuration parameter further includes: an initiator first phase SA timeout time;
  • the I KE first phase configuration modification parameter further includes: a first phase SA negotiation timeout period; wherein the first phase SA negotiation timeout time is the initiator first phase SA timeout time and the receiver configuration The minimum value of the receiver's first-stage SA timeout period.
  • the second phase configuration parameter of the initiator further includes: an initiator second phase SA timeout time;
  • the second stage SA configuration modification parameter further includes: a second stage SA negotiation timeout period; wherein the second stage SA negotiation timeout time is the initiator second stage SA timeout time and the receiver configuration The minimum value of the receiver's second-stage SA timeout period.
  • the receiver authentication algorithm in the I KE first stage configuration modification parameter is a sum or any of all the authentication algorithms stored by the receiver One;
  • the receiver encryption algorithm in the first stage configuration modification parameter of the I KE is a sum or a combination of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the IKE second-stage configuration modification parameter is a sum or a combination of all the authentication algorithms stored by the receiver Kind;
  • the receiver encryption algorithm in the IKE second stage configuration modification parameter is a sum of any encryption algorithm stored by the receiver or any one of them.
  • the first stage sending unit is specifically configured to:
  • Transmitting the IKE first-stage configuration modification parameter to the receiver in the IKE informa t i on from the initiator to the receiver.
  • the first stage sending unit is specifically configured to:
  • Transmitting the IKE second-stage configuration modification parameter to the receiver in the IKE informa t i on from the initiator to the receiver.
  • a receiving device for IPSEC negotiation including:
  • a communication interface configured to receive an Internet key exchange sent by the initiator, the first stage configuration parameter of the IKE;
  • a processor configured to: when the IKE first-stage configuration parameter sent by the initiator is inconsistent with the first-stage configuration parameter of the receiver, send the first-stage configuration parameter of the receiver to the initiator, so that The initiator generates the IKE first phase configuration modification parameter according to the receiver first phase configuration parameter;
  • the receiver first phase configuration parameter and the IKE first phase configuration modification parameter include: the receiver IKE version, and the receiving a party negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group;
  • the communication interface is further configured to receive the first stage configuration modification parameter of the IKE; the processor is further configured to establish a first stage security association SA with the initiator;
  • the communication interface is further configured to receive an IKE second phase configuration parameter sent by the initiator.
  • the communication interface is further configured to: when the processor detects the sending by the initiator
  • the receiver second phase configuration parameter is sent to the initiator, so that the initiator follows the receiver second phase configuration parameter.
  • Generating an I KE second phase configuration modification parameter; the receiver second phase configuration parameter and the I KE second phase configuration modification parameter include: a receiver authentication algorithm, a receiver encryption algorithm, and a complete successor of the receiver key Confidentiality, receiver security protocol and receiver encapsulation mode;
  • the communication interface is further configured to receive the second phase configuration modification parameter of the I KE; the processor is further configured to establish a second phase SA with the initiator;
  • a memory configured to store the receiver first phase configuration parameter, the I KE first phase configuration modification parameter, the receiver second phase configuration parameter, the I KE second phase configuration modification parameter, and processor execution The code required for operation;
  • bus for connecting the processor, the communication interface, and the memory, and providing a physical channel for data transmission for the processor, the communication interface, and the memory.
  • the first stage configuration parameter of the receiver stored in the memory further includes: a first phase SA timeout time of the receiver;
  • the first phase configuration negotiation modification parameter of the I KE further includes: a first phase SA negotiation timeout period; wherein the first phase SA negotiation timeout time is an initiator first phase SA timeout time configured by the initiator and the receiver The minimum value of the first phase SA timeout period.
  • the second stage configuration parameter of the receiver stored in the memory further includes: a second phase SA timeout period of the receiver;
  • the second phase configuration modification parameter of the I KE further includes: a second phase SA negotiation timeout period; wherein the second phase SA negotiation timeout time is an initiator second phase SA timeout time configured by the initiator and the receiver The minimum value of the second stage SA timeout.
  • the receiver authentication algorithm in the first stage configuration parameter of the receiver stored in the memory is the receiving The sum of all authentication algorithms stored by the party or any one of them;
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the receiver second stage configuration parameter stored in the memory is all the authentication algorithms stored by the receiver Sum or any of them; and / or
  • the receiver encryption algorithm in the second phase configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the communication interface is specifically configured to:
  • the IKE informa t i on is sent to the originator.
  • the communication interface is specifically configured to:
  • the communication interface is further configured to: after receiving the IKE first phase configuration modification parameter, send the first phase parameter confirmation information to the initiator, so that the initiator establishes a first phase SA with the receiver.
  • the communication interface is further configured to: after receiving the IKE second phase configuration modification parameter, send the second phase parameter confirmation information to the initiator, so that the initiator establishes a second phase SA with the receiver.
  • an initiator device for I PSEC negotiation including:
  • a communication interface configured to send an Internet Key Exchange I KE first stage configuration parameter to the receiver
  • the communication interface is further configured to receive a first phase configuration parameter of the receiver sent by the receiver;
  • a processor configured to generate an I KE first phase configuration modification parameter according to the receiver first phase configuration parameter;
  • the receiver first phase configuration parameter and the I KE first phase configuration modification parameter include: a receiver I KE version, receiver negotiation mode, receiver authentication mode, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group;
  • the communication interface is further configured to send, to the receiver, the first stage configuration modification parameter of the I KE;
  • the processor is further configured to: when receiving the first phase parameter confirmation information of the receiver, establish a first phase security association SA with the receiver;
  • the communication interface is further configured to send an I KE second phase configuration parameter to the receiver; the communication interface is further configured to receive a second phase configuration parameter of the receiver sent by the receiver;
  • the processor is further configured to generate an I KE second phase configuration modification parameter according to the receiver second phase configuration parameter; the receiver second phase configuration parameter and the I KE second phase configuration modification parameter are included : receiver authentication algorithm, receiver encryption algorithm, full successor secret of receiver key, receiver security protocol, and receiver encapsulation mode;
  • the communication interface is further configured to send the I KE second stage configuration modification parameter to the receiver;
  • the processor is further configured to establish a second phase SA with the initiator when the communication interface receives the second phase parameter confirmation information of the receiver.
  • a memory configured to store the receiver first phase configuration parameter, the I KE first phase configuration modification parameter, the receiver second phase configuration parameter, and the I KE second phase configuration modification parameter and processor execution The code required for operation;
  • the initiator first phase configuration parameter that is stored in the memory further includes: an initiator first phase SA timeout time;
  • the I KE first phase configuration modification parameter further includes: a first phase SA negotiation timeout period; wherein the first phase SA negotiation timeout time is the initiator first phase SA timeout time and the receiver configuration The minimum value of the receiver's first-stage SA timeout period.
  • the second stage configuration parameter of the initiator stored in the memory further includes: an initiator second phase SA timeout time;
  • the second stage SA configuration modification parameter further includes: a second stage SA negotiation timeout period; wherein the second stage SA negotiation timeout time is the initiator second stage SA timeout time and the receiver configuration The minimum value of the receiver's second-stage SA timeout period.
  • the receiver authentication algorithm in the I KE first stage configuration modification parameter stored in the memory is all the authentications stored by the receiver The sum of the algorithms or any one of them; and/or
  • the receiver encryption algorithm in the I KE first stage configuration modification parameter stored in the memory is a sum or a combination of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the I KE second stage configuration modification parameter stored in the memory is all the authentications stored by the receiver The sum of the algorithms or any one of them; and/or
  • the receiver encryption algorithm in the second stage configuration modification parameter of the I KE is a sum of any encryption algorithm stored by the receiver or any one of them.
  • the communication interface is specifically configured to:
  • the communication interface is specifically configured to:
  • the seventh aspect provides a system for IPSEC negotiation, comprising: the receiver device according to any one of the fifth aspect, and the initiator device according to any one of the sixth aspect .
  • the embodiment provides a method, an apparatus, a device, and a system for IPSEC negotiation.
  • the first stage configuration parameter of the Internet key exchange IKE sent by the initiator is received, and the first stage of the IKE sent by the initiator is received.
  • the configuration parameter is inconsistent with the first-stage configuration parameter of the receiver, the first-stage configuration parameter of the receiver is sent to the initiator; then the first-stage configuration modification parameter is received and the first-party is established with the initiator.
  • the second stage receiving the IKE second-stage configuration parameter sent by the initiator; when the IKE second-stage configuration parameter sent by the initiator is inconsistent with the second-stage configuration parameter of the receiver, The receiver second phase configuration parameter is sent to the initiator, and then the IKE second phase configuration modification parameter is received and a second phase SA is established with the initiator.
  • Figure la is a schematic diagram of encrypted transmission of data
  • FIG. 1b is a flowchart of a method for IPSEC negotiation in the embodiment 1 of the present invention, involving a receiver; 2 is a flowchart of an IPSEC negotiation method involving an initiator according to Embodiment 1 of the present invention;
  • FIG. 3 is a flow chart of a method for IPSEC negotiation in a second embodiment of the present invention, involving a receiver;
  • FIG. 4 is a flow chart of an IPSEC negotiation method involving an initiator according to Embodiment 2 of the present invention
  • FIG. 5 is a block diagram of an apparatus for IPSEC negotiation involving a receiver according to Embodiment 3 of the present invention
  • FIG. 6 is a block diagram of an apparatus for IPSEC negotiation involving an initiator according to Embodiment 3 of the present invention
  • FIG. 7 is a fourth embodiment of the present invention.
  • FIG. 8 is a schematic diagram of an initiator device in Embodiment 4 of the present invention.
  • FIG. 9 is a schematic diagram of a system for IPSEC negotiation in Embodiment 4 of the present invention.
  • the transmitted data is usually encrypted to prevent the data from being viewed and tampered with.
  • data is sent from the terminal 101a (which may be a computer), after the device 103a supporting IPSEC (Internet Protocol Security), passes through the unknown network 104a (for example, an unknown Internet), and then enters support.
  • IPSEC's device 105a and eventually reaches the destination terminal 107a (which may be a computer). Since the data passes through the unknown network 104a, the data arriving at the terminal 107a cannot be guaranteed to be secure. Therefore, the data needs to be encrypted to ensure that the data is not viewed or falsified when passing through the unknown network 104a.
  • the device 103a can be understood as the initiator described in the embodiment of the present invention, and the device 105a can be understood as an embodiment of the present invention.
  • the receiver described in If the data needs to be sent from the terminal 107a to the terminal 101a, the 105a can be understood as the initiator described in the embodiment of the present invention, and the device 103a can be understood as the receiver described in the embodiment of the present invention.
  • a plurality of terminals 101a form an internal network 102a
  • a plurality of terminals 107a constitute an internal network 106a. Because the data in the internal network does not pass through any unknown network, there is no need to encrypt the data in the internal network transmission. Therefore, in this case, the encryption target of the device 103a and the device 105a is data transmitted between the internal network 102a and the internal network 106a.
  • An embodiment of the present invention provides a method for IPSEC (Interne t Pro to Cosecution) negotiation.
  • the receiver involved in IPSEC negotiation includes the following steps:
  • the IKE first-stage configuration parameters sent by the initiator in the originating direction include: the initiator IKE version, the initiator negotiation mode, the initiator authentication mode, the initiator authentication algorithm, the initiator encryption algorithm, and the initiator key exchange algorithm group.
  • the receiver first phase configuration parameter and the IKE first phase configuration modification parameter include: a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver secret. Key exchange algorithm group.
  • the initiator IKE version is the same as the receiver IKE version, that is, the same IKE version is used;
  • the initiator negotiation mode is the same as the receiver negotiation mode, that is, both the initiator and the receiver use the main mode negotiation or the barb mode negotiation;
  • the initiator authentication method is the same as the receiver authentication method, that is, the same authentication method is used: digital signature authentication method or ⁇ and public key encryption method or ⁇ and improved public key encryption method or ⁇ and pre-shared public key encryption method ;
  • the initiator authentication algorithm is consistent with the receiver authentication algorithm, that is, the same algorithm is used for authentication, for example, MD5 (Message Digest Algorithm 5, message digest algorithm version 5) or SHA1 (Secure Hash Algor i thm, Hash algorithm) or one or more other algorithms and combinations thereof;
  • MD5 Message Digest Algorithm 5, message digest algorithm version 5
  • SHA1 Secure Hash Algor i thm, Hash algorithm
  • the initiator encryption algorithm is consistent with the receiver encryption algorithm, that is, the same algorithm is used for encryption, and the 3DES (Triple Data Encryption Algorithm) or other one or more algorithms and combinations thereof are used. ;
  • the initiator key exchange algorithm group is consistent with the receiver key exchange algorithm group, that is, the same key exchange algorithm group is used, for example, DH (Diffie-Hellman).
  • the IKE first-stage configuration parameter sent by the initiator is inconsistent with the parameter in the first-stage configuration parameter of the receiver, that is, the IKE first-stage configuration sent by the initiator in step 102 is configured.
  • the parameters are inconsistent with the receiver's first stage configuration parameters.
  • the receiver sets the first-stage configuration parameter of the receiver (the IKE version, the negotiation mode, the authentication mode, and the authentication algorithm used by the receiver).
  • the encryption algorithm and the key exchange algorithm group are sent to the initiator, which in this embodiment is referred to as a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and Receiver key exchange algorithm group.
  • the IKE first-stage configuration modification parameter is generated by the initiator according to the first-stage configuration parameter of the receiver sent by the receiver, where the first-stage configuration modification parameters include: a receiver IKE version, and a receiver negotiation mode. , receiver authentication method, receiver authentication algorithm, The receiver encryption algorithm and the receiver key exchange algorithm group, that is, the initiator completely uses the configuration parameters used by the receiver, and initiates negotiation to the receiver again.
  • the IKE first-stage configuration modification parameter sent by the initiator is the same as the configuration parameter used by the receiver. Therefore, when the receiver receives the IKE first-stage configuration modification parameter, the IKE first-stage configuration modification parameter and the receiver are found through detection.
  • the first-stage configuration parameters are consistent, and the receiving direction sends the first-stage parameter confirmation information to indicate that the receiver accepts the first-stage IPSEC negotiation initiated by the initiator, and agrees to establish the first-stage SA.
  • the receiver and the initiator After the initiator receives the first-stage parameter confirmation information, the receiver and the initiator generate their own keys through the key exchange algorithm group and exchange keys with each other, and then use the exchanged key to verify each other's identity and exchange process. . If the verification is successful, the first stage SA is established.
  • the IKE phase 2 configuration parameters sent by the originating receiver include: initiator authentication algorithm, initiator encryption algorithm, full successor secret of the initiator key, initiator security protocol, and originator encapsulation mode.
  • the receiver second phase configuration parameter and the IKE second phase configuration modification parameter include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode. .
  • All the parameters in the IKE Phase 2 configuration parameters sent by the initiator must be identical with all the parameters in the receiver's second-stage configuration parameters to ensure the successful IPSEC negotiation in the second phase. Specifically:
  • the receiver authentication algorithm is consistent with the receiver authentication algorithm, that is, the same algorithm is used for authentication, for example, MD5 (Message Digest Algorithm 5, message digest algorithm 5) Version) either uses SHA1 (Secure Hash Algorith), or one or more other algorithms and combinations thereof.
  • MD5 Message Digest Algorithm 5, message digest algorithm 5) Version
  • SHA1 Secure Hash Algorith
  • the applicable object of the authentication algorithm is ESP (Encapsulated Security Payload) authentication or ⁇ and AH (Authent ica t ion Header) authentication;
  • the receiver encryption algorithm and the receiver encryption algorithm are encrypted by the same algorithm, and the 3DES (Triple Data Encryption Algorithm) or one or more other algorithms and combinations thereof are used.
  • 3DES Triple Data Encryption Algorithm
  • the complete successor secrecy of the recipient key and the complete subsequent secrecy of the recipient key that is, the same key secrecy method, that is, both the initiator and the receiver use PFS (perfect forward secrecy) or Very Use one or more other forms of confidentiality;
  • the receiver security protocol and the receiver security protocol that is, the initiator and the receiver use the same cipher algorithm and protocol logic;
  • the receiver encapsulation mode and the receiver encapsulation mode that is, the initiator and the receiver use the same message encapsulation format.
  • the IKE second-stage configuration parameter sent by the initiator is inconsistent with the parameters in the second-stage configuration parameter of the receiver, that is, the IKE second-stage configuration parameter sent by the initiator in step 106 is The second phase configuration parameters of the receiver are inconsistent.
  • the receiver When the IKE second-stage configuration parameter sent by the initiator is inconsistent with the receiver's second-stage configuration parameter, the receiver will receive the second-stage configuration parameter of the receiver (the authentication algorithm used by the receiver, the encryption algorithm, and the complete successor of the key)
  • the secret, security protocol, and encapsulation mode are sent to the initiator, which in this embodiment is referred to as the receiver authentication algorithm, the receiver encryption algorithm, the complete successor secret of the recipient key, the receiver security protocol, and the receiver package. mode.
  • the IKE second-stage configuration modification parameter is generated by the initiator according to the receiver second-stage configuration parameter sent by the receiver, where the second-stage configuration modification parameter includes: a receiver authentication algorithm, and a receiver encryption algorithm.
  • the complete successor secret of the receiver key, the receiver security protocol, and the receiver encapsulation mode, that is, the initiator completely uses the configuration parameters used by the receiver, and initiates negotiation to the receiver again. 1 08.
  • the I KE second-stage configuration modification parameter sent by the initiator is completely the configuration parameter used by the receiver, when the receiver receives the I KE second-stage configuration modification parameter, the I KE second-stage configuration modification parameter is detected through detection.
  • the second phase configuration parameter of the receiver is consistent, and the receiving direction sends the second phase parameter confirmation information to indicate that the receiver accepts the second phase I PSEC negotiation initiated by the initiator, and agrees to establish the second phase SA.
  • the initiator After receiving the second-stage parameter confirmation information, the initiator establishes a second-stage SA with the receiver by using the fast mode, that is, the initiator and the receiver generate and exchange the second-stage key, and use the key to identify each other. After verification, after the verification is successful, the second stage SA is established.
  • steps 105 to 108 that is, the establishment of the second phase SA is based on the first phase SA, that is, the first phase SA transmits between the receiver and the initiator during the establishment of the second phase SA.
  • the data is encrypted (using the encryption algorithm in the first-stage SA, authentication algorithm, key, etc. to encrypt and authenticate the data).
  • the initiator involved in I PSEC negotiation includes the following steps:
  • the first stage configuration parameters of the I KE sent by the originating party include: initiator I KE version, initiator negotiation mode, initiator authentication mode, initiator authentication algorithm, initiator encryption algorithm, and initiator key exchange algorithm group.
  • the first phase configuration parameters of the receiver include: receiver I KE version, receiver negotiation mode, receiver authentication mode, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group.
  • the receiver After receiving the I KE first-stage configuration parameter, the receiver finds that the first-stage configuration parameter of the I KE is inconsistent with the configuration parameter used by the receiver, that is, the first-stage configuration parameter of the receiver, and then sends the receiver to the initiator.
  • One-stage configuration parameters In particular, as long as one of the parameters of the I KE Phase I configuration parameter does not match the parameter of the receiver's first phase configuration parameter, the receiver's first phase configuration parameter needs to be sent to the initiator.
  • the receiver first phase configuration parameter and the IKE first phase configuration modification parameter include: a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver secret. Key exchange algorithm group.
  • the IKE first-stage configuration modification parameter generated by the initiator is the first-stage configuration parameter of the receiver received by the initiator from the receiver, that is, the configuration parameter in the first phase of the IKE is the same as the first-stage configuration parameter of the receiver.
  • IKE version the same negotiation mode, the same authentication method, the same authentication algorithm, the same encryption algorithm, and the same key exchange algorithm group.
  • the parameters in the first stage configuration modification parameters of the IKE are: the receiver IKE version, the receiver negotiation mode, the receiver authentication mode, the receiver authentication algorithm, the receiver encryption algorithm, and the receiver key exchange algorithm group.
  • the purpose of fully adopting the configuration parameters used by the receiver is to enable the receiver to establish the first phase SA as soon as possible after receiving the IKE phase 1 configuration modification parameters and confirming.
  • the IKE first-stage configuration modification parameter sent by the initiator is completely the configuration parameter used by the receiver, when the receiver receives the IKE first-stage configuration modification parameter, the IKE first-stage configuration modification parameter and the receiver are found through detection.
  • the first-stage configuration parameters are consistent, and the receiving direction sends the first-stage parameter confirmation information to indicate that the receiver accepts the first-stage IPSEC negotiation initiated by the initiator, and agrees to establish the first-stage SA.
  • the receiver and the initiator After the initiator receives the first-stage parameter confirmation information, the receiver and the initiator generate their own keys through the key exchange algorithm group and exchange keys with each other, and then use the exchanged key to verify each other's identity and exchange process. . If the verification is successful, the first stage SA is established.
  • the second phase configuration parameters of IKE include: initiator authentication algorithm, initiator encryption algorithm, and Full follow-up secrecy of the originating key, initiator security protocol, and initiator encapsulation mode.
  • the second phase configuration parameters of the receiver include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the receiver After receiving the I KE second-stage configuration parameter, the receiver finds that the I KE second-stage configuration parameter is inconsistent with the configuration parameter used by the receiver, that is, the receiver second-stage configuration parameter, and sends the receiver to the initiator. Two-stage configuration parameters. In particular, as long as one of the parameters of the I KE second-stage configuration parameter does not match the parameter of the second-stage configuration parameter of the receiver, the first-stage configuration parameter of the receiver needs to be sent to the initiator.
  • the initiator and the receiver directly establish the second-stage SA.
  • the I KE second-stage configuration modification parameters include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the I KE second-stage configuration modification parameter generated by the initiator is the second-stage configuration parameter of the receiver received by the initiator from the receiver, that is, the second-stage configuration parameter of the receiver and the receiver in the second-stage configuration modification parameter of the I KE.
  • the parameters in the second phase configuration modification parameters of the I KE are: Receiver I KE version, Receiver negotiation mode, Receiver authentication mode, Receiver authentication algorithm, Receiver encryption algorithm, and Receiver key exchange. Algorithm group. The purpose of fully adopting the configuration parameters used by the receiver is to enable the receiver to establish the second phase SA as soon as possible after receiving the I KE Phase 2 configuration modification parameters and confirming.
  • the I KE second-stage configuration modification parameters include: a receiver I KE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group. 21 0.
  • receive the second phase parameter confirmation information of the receiver establish a second phase SA with the initiator.
  • the I KE second-stage configuration modification parameter sent by the initiator is completely the configuration parameter used by the receiver, when the receiver receives the I KE second-stage configuration modification parameter, the I KE second-stage configuration modification parameter is detected through detection.
  • the second phase configuration parameter of the receiver is consistent, and the receiving direction sends the second phase parameter confirmation information to indicate that the receiver accepts the second phase I PSEC negotiation initiated by the initiator, and agrees to establish the second phase SA.
  • the initiator After receiving the second-stage parameter confirmation information, the initiator establishes a second-stage SA with the receiver by using the fast mode, that is, the initiator and the receiver generate and exchange the second-stage key, and then use the key to perform the identity of the second phase. After verification, after the verification is successful, the second stage SA is established.
  • steps 206 to 21 0 that is, the establishment of the second phase SA is based on the first phase SA, that is, the first phase SA transmits between the receiver and the initiator in the process of establishing the second phase SA.
  • the data is encrypted (using the encryption algorithm, authentication algorithm, key, etc. in the first stage SA to encrypt and authenticate the data).
  • the embodiment provides a method for I PSEC negotiation.
  • the first key configuration parameter of the Internet Key Exchange I KE sent by the initiator is received, and the first phase configuration parameter of the I KE sent by the initiator is Sending the first phase configuration parameter of the receiver to the initiator when the first phase configuration parameters of the receiver are inconsistent; then receiving the first phase configuration modification parameter of the I KE and establishing the first phase SA with the initiator a second phase, receiving an I KE second phase configuration parameter sent by the initiator; when the I KE second phase configuration parameter sent by the initiator is inconsistent with the receiver second phase configuration parameter, The receiver second phase configuration parameter is sent to the initiator, and then receives the I KE second phase configuration modification parameter and establishes a second phase SA with the initiator.
  • the negotiation parameters are not required, the correct parameters can be directly sent to the peer end, which reduces the time consumed by the negotiation process and improves the negotiation efficiency.
  • One embodiment of the present invention provides a method of I PSEC negotiation.
  • the receiver involved in IPSEC negotiation includes the following steps: 301: Receive an Internet Key Exchange IKE first phase configuration parameter sent by the initiator.
  • the IKE first-stage configuration parameters sent by the initiator in the originating direction include: an initiator IKE version, an initiator negotiation mode, an initiator authentication mode, an initiator authentication algorithm, an initiator encryption algorithm, and an initiator key exchange algorithm group.
  • the receiver first phase configuration parameter and the IKE first phase configuration modification parameter include: a receiver IKE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver secret. Key exchange algorithm group.
  • the receiver authentication algorithm in the first stage configuration parameter of the receiver is the sum or any one of all the authentication algorithms stored by the receiver; and/or
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiving direction sends the configuration parameters used by the receiver to the receiver, that is, the first-stage configuration parameters of the receiver. It is hoped that the initiator generates a set of the same parameters, that is, the IKE first-stage configuration modification parameters, according to the first-stage configuration parameters of the receiver, to speed up the IPSEC.
  • the receiver does not know whether there is an authentication algorithm or an encryption algorithm used by the receiver in the initiator. Therefore, when the receiver sends the receiver's first-stage configuration parameters to the initiator, all or part of the algorithms that the receiver can use (authentication) The algorithm or encryption algorithm is sent to the initiator.
  • the initiator After the initiator receives the first-stage configuration parameters of the receiver that carries the receiver algorithm set, one or several algorithms are selected from the algorithm set (all or part of the algorithms that the receiver can use) to generate the first-stage configuration modification parameters. This improves the accuracy of IPSEC negotiations and increases the speed of negotiation.
  • the first stage configuration parameter of the receiver further includes: the first phase SA timeout period of the receiver; Similarly, the initiator also configures the first phase SA timeout time for the initiator. The purpose of configuring the SA timeout period is to improve the encryption performance. After the initiator and the receiver have established a secure and reliable first-stage SA, set a duration for the first-stage SA. Only during the first phase of the lifetime. The SA is available, otherwise the first stage SA cannot be used even if all the parameters specified in the first stage SA match.
  • the initiator configures the modification parameters in the first phase of the I KE to determine the first-phase SA negotiation timeout period.
  • the first phase S A negotiation timeout period is the minimum of the initiator first phase S A timeout period and the receiver first phase SA timeout time configured by the initiator.
  • step 303 the first phase configuration parameter of the receiver sent by the receiver is carried in the receiver to the initiator's I KE i nf orma t i on.
  • All parameters except the initiator first-stage SA timeout period of the I KE first-phase configuration parameters sent by the initiator must be the same as all parameters of the receiver's first-stage configuration parameters except the receiver's second-stage SA timeout time. It is completely consistent to ensure the success of the first phase I PSEC negotiation.
  • the receiving direction initiator sends the error type data.
  • the initiator In order to facilitate the maintenance of the system when the I PSEC negotiation is in error, it is convenient for the initiator to generate the appropriate I KE first stage configuration modification parameters according to the error type data selection.
  • first stage parameter confirmation information to the initiator, so that the initiator establishes a first phase SA with the receiver.
  • the receiver and the initiator Before establishing the first phase SA, the receiver and the initiator must confirm that they use the same configuration parameters for each other. After detecting, the receiver finds that the first stage configuration modification parameter is consistent with the receiver first stage configuration parameter, and then sends the first stage parameter confirmation information to the initiator.
  • the receiver and the initiator After the initiator receives the first-stage parameter confirmation information, the receiver and the initiator generate their respective keys through the key exchange algorithm group and exchange keys with each other, and then use the exchanged key to verify each other's identity and exchange process. . If the verification is successful, the first stage SA is established.
  • the I KE second-stage configuration parameters sent by the originating party to the receiver include: an initiator authentication algorithm, an initiator encryption algorithm, a full successor secret of the initiator key, an initiator security protocol, and an originating encapsulation mode.
  • the receiver second phase configuration parameter and the I KE second phase configuration modification parameter include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver package. mode.
  • the receiving direction sends the configuration parameter used by the receiver to the receiver's second-stage configuration parameter. It is hoped that the initiator will generate the same set of parameters, ie, the I KE second-stage configuration modification parameter, according to the receiver's second-stage configuration parameters. I PSEC negotiation speed in the second phase. However, the receiver does not know whether there is an authentication algorithm or an encryption algorithm used by the receiver in the initiator. Therefore, when the receiver sends the receiver's second-stage configuration parameter to the initiator, all or part of the algorithm that the receiver can use (authentication) The algorithm or encryption algorithm is sent to the initiator.
  • the slave algorithm sets Select one or several algorithms from all or part of the algorithms that the receiver can use to generate the second-stage configuration modification parameters, which improves the accuracy of the I PSEC negotiation and improves the negotiation speed.
  • the second phase configuration parameter of the receiver further includes: a second phase SA timeout period of the receiver; similarly, the initiator also configures the second phase SA timeout time for the initiator.
  • the purpose of configuring the SA timeout period is to improve the encryption performance.
  • the receiver's second-stage SA timeout period can have two working modes, namely, the time working mode and the traffic working mode. Simply put, the time mode of operation is to define a duration for the second phase SA, as discussed in this paragraph.
  • the traffic mode is to specify a traffic limit for the second phase SA, that is, the traffic passing in the second phase SA is higher than a data traffic threshold (either the data traffic passing through the unit time or the specified time).
  • a data traffic threshold either the data traffic passing through the unit time or the specified time.
  • This second stage SA can no longer be used when the total data flow is passed.
  • the receiver's second-stage SA timeout can work in one of the modes, or it can work in both modes at the same time.
  • the configuration modification parameter in the second phase of the I KE specifies the second phase SA negotiation timeout period.
  • the second phase SA negotiation timeout period is the minimum of the initiator second phase S A timeout period and the receiver second phase SA timeout time configured by the initiator.
  • All parameters except the initiator second-stage SA timeout period in the I KE second-stage configuration parameters sent by the initiator must be identical to all parameters except the receiver second-stage SA timeout period in the receiver's second-stage configuration parameters. In order to ensure the success of the first phase I PSEC negotiation.
  • the receiver second phase configuration parameter is carried in the I KE i nf orma t i on (I KE information) of the receiver to the initiator.
  • the initiator is sent as described in step 307.
  • the first stage configuration parameter of the I KE sent is inconsistent with the first stage configuration parameter of the receiver.
  • the receiving direction initiator sends the error type data.
  • the initiator In order to facilitate the maintenance of the system when the I PSEC negotiation is in error, it is convenient for the initiator to generate the appropriate I KE second-stage configuration modification parameters according to the error type data selection.
  • the I KE second-stage configuration modification parameter sent by the initiator is completely the configuration parameter used by the receiver, when the receiver receives the I KE second-stage configuration modification parameter, the I KE second-stage configuration modification parameter is detected through detection.
  • the second phase configuration parameter of the receiver is consistent, and the receiving direction sends the second phase parameter confirmation information to indicate that the receiver accepts the second phase I PSEC negotiation initiated by the initiator, and agrees to establish the second phase SA.
  • the initiator After receiving the second-stage parameter confirmation information, the initiator establishes a second-stage SA with the receiver by using the fast mode, that is, the initiator and the receiver generate and exchange the second-stage key, and use the key to identify each other. After verification, after the verification is successful, the second stage SA is established.
  • steps 307 to 31 1 that is, the establishment of the second phase SA is based on the first phase SA, that is, the first phase SA transmits between the receiver and the initiator in the process of establishing the second phase SA.
  • the data is encrypted (using the encryption algorithm, authentication algorithm, key, etc. in the first stage SA to encrypt and authenticate the data).
  • the initiator involved in I PSEC negotiation includes the following steps:
  • the first stage configuration parameters of the I KE sent by the originating party include: initiator I KE version, initiator negotiation mode, initiator authentication mode, initiator authentication algorithm, initiator encryption algorithm, and initiator key exchange algorithm group.
  • the first phase configuration parameters of the receiver include: Receiver I KE version, Receiver negotiation mode, Receiver authentication mode, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group.
  • the receiver first stage configuration parameter and the I KE first stage configuration modification parameter include: a receiver I KE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiving Party key exchange algorithm group.
  • the receiver authentication algorithm in the first stage configuration modification parameter of the I KE is a sum or any one of all authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the first stage configuration modification parameter of the I KE is a sum of any encryption algorithms stored by the receiver or any one of them.
  • the first phase configuration modification parameter generated by the initiator is the first phase configuration parameter of the receiver received by the initiator from the receiver, that is, the first phase configuration parameter is used in the first phase configuration modification parameter of the I KE.
  • the parameters in the first stage configuration modification parameters of the I KE are: Receiver I KE version, Receiver negotiation mode, Receiver authentication mode, Receiver authentication algorithm, Receiver encryption algorithm, and Receiver key exchange. Algorithm group. The purpose of fully using the configuration parameters used by the receiver is to allow the receiver to establish the first phase SA as soon as possible after receiving the I KE Phase 1 configuration modification parameters and confirming.
  • the slave algorithm set (all or part of the algorithms that the receiver can use) Select one or several algorithms to generate the first stage configuration modification parameters. It is worth noting that the algorithm selected by the initiator from the algorithm set must be an algorithm in the initiator. Otherwise, even if the algorithm used by the receiver is known, it is impossible to generate a receiver authentication algorithm and a receiver encryption algorithm that meet the requirements of the receiver. .
  • the receiver's first-stage configuration parameters include: Receiver first-stage SA timeout time; Similarly, the initiator also configures the first-stage SA timeout time for the initiator.
  • the purpose of configuring the SA timeout period is to improve the encryption performance. After the initiator and receiver have established a secure and reliable first-stage SA, set a duration for the first-stage SA. Only during the first phase of the lifetime. The SA is available, otherwise the first stage SA cannot be used even if all the parameters specified in the first stage SA match.
  • the initiator configures the modification parameters in the first phase of the I KE to determine the first-phase SA negotiation timeout period.
  • the first phase S A negotiation timeout period is the minimum of the initiator first phase S A timeout period and the receiver first phase SA timeout time configured by the initiator.
  • the I KE first phase configuration modification parameter is carried in the initiator to the receiver's I KE i nf orma t i on.
  • the I KE can be automatically generated, as described above (for the explanation part of step 403), or manually generated, that is, when the initiator receives the reception sent by the receiver.
  • the first-stage configuration parameters of the receiver are sent to the administrator through the human-machine interface.
  • the administrator selects the authentication algorithm, encryption algorithm, authentication mode, negotiation mode, and I KE version according to the actual situation of the system operation.
  • One or several of the key exchange algorithm groups The initiator then generates an I KE first stage configuration modification parameter according to the instructions of the manager.
  • the receiver and the initiator After the initiator receives the first-stage parameter confirmation information, the receiver and the initiator generate their respective keys through the key exchange algorithm group and exchange keys with each other, and then use the exchanged key to verify each other's identity and exchange process. . If the verification is successful, the first stage SA is established.
  • the I KE second-stage configuration parameters sent by the originating party to the receiver include: an initiator authentication algorithm, an initiator encryption algorithm, a full successor secret of the initiator key, an initiator security protocol, and an originating encapsulation mode.
  • the second phase configuration parameters of the receiver include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the I KE second-stage configuration modification parameters include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the slave algorithm set (all or part of the algorithms that the receiver can use) Select one or several algorithms to generate the first stage configuration modification parameters. It is worth noting that the algorithm selected by the initiator from the algorithm set must be the algorithm stored in the initiator. Otherwise, even if the algorithm used by the receiver is known, it is impossible to generate a receiver authentication algorithm and a receiver encryption algorithm that meet the requirements of the receiver. .
  • the receiver's second-stage configuration parameters include: Receiver second-phase SA timeout; Similarly, the initiator configures the second-stage SA timeout for the initiator.
  • the purpose of configuring the SA timeout period is to improve the encryption performance.
  • After the initiator and the receiver have established a secure and reliable second-stage SA set a duration for the second-stage SA. Only during the second phase of the duration. The SA is available, otherwise the second stage SA cannot be used even if all the parameters specified in the first stage SA match.
  • the receiver's second-stage SA timeout period can have two working modes, namely, the time working mode and the traffic working mode. Simply put, the time mode of operation is to define a duration for the second phase SA, as discussed in this paragraph.
  • the traffic mode is to specify a traffic limit for the second phase SA, that is, the traffic passing in the second phase SA is higher than a data traffic threshold (either the data traffic passing through the unit time or the specified time).
  • a data traffic threshold either the data traffic passing through the unit time or the specified time.
  • This second stage SA can no longer be used when the total data flow is passed.
  • the receiver's second-stage SA timeout can work in one of the modes, or it can work in both modes at the same time.
  • the configuration modification parameter in the second phase of the I KE specifies the second phase SA negotiation timeout period.
  • the second-stage SA negotiation timeout period is the originator second-stage SA timeout period configured by the initiator and the second phase of the receiver. The minimum value of the SA timeout period.
  • All parameters except the initiator second-stage SA timeout period in the I KE second-stage configuration parameters sent by the initiator must be identical to all parameters except the receiver second-stage SA timeout period in the receiver's second-stage configuration parameters. In order to ensure the success of the second phase I PSEC negotiation.
  • the receiver second phase configuration parameter is carried in the I KE i nf orma t i on (I KE information) of the initiator to the receiver.
  • the configuration modification parameter when the configuration modification parameter is generated in the second stage of the I KE, it may be automatically generated, as described above (in the explanation part of step 403), or manually generated, that is, when the initiator receives the reception sent by the receiver.
  • the first phase configuration parameters After the first phase configuration parameters, the first phase configuration parameters of the receiver are sent to the management personnel through the human-computer interaction interface.
  • the management personnel select the authentication algorithm, the encryption algorithm, the complete successor secret of the key, and the security protocol according to the actual situation of the system operation. And one or more of the encapsulation modes.
  • the initiator then generates an I KE Phase 2 configuration modification parameter based on the manager's instructions.
  • the I KE second-stage configuration modification parameter sent by the initiator is completely the configuration parameter used by the receiver, when the receiver receives the I KE second-stage configuration modification parameter, the I KE second-stage configuration modification parameter is detected through detection.
  • the second phase configuration parameter of the receiver is consistent, and the receiving direction sends the second phase parameter confirmation information to indicate that the receiver accepts the second phase I PSEC negotiation initiated by the initiator, and agrees to establish the second phase SA.
  • the initiator After receiving the second-stage parameter confirmation information, the initiator establishes a second-stage SA with the receiver by using the fast mode, that is, the initiator and the receiver generate and exchange the second-stage key, and then use the key to perform the identity of the second phase. After verification, after the verification is successful, the second stage SA is established.
  • steps 405 to 409 that is, the establishment of the second phase SA is based on the first phase SA, that is, the data transmitted between the receiver and the initiator in the process of establishing the second phase SA by the first phase SA.
  • Encryption using the encryption algorithm in the first stage SA, the authentication algorithm, Keys, etc. encrypt and authenticate data).
  • the embodiment provides a method for IPSEC negotiation.
  • the first key configuration parameter of the Internet Key Exchange IKE sent by the initiator is received, and the IKE first stage configuration parameter and the receiver are sent by the initiator.
  • the receiver first-stage configuration parameter is sent to the initiator; then the IKE first-stage configuration modification parameter is received, and the first-stage SA is established with the initiator; Receiving the IKE second-stage configuration parameter sent by the initiator; when the IKE second-stage configuration parameter sent by the initiator is inconsistent with the second-stage configuration parameter of the receiver, the receiver is second The phase configuration parameters are sent to the initiator, and then the IKE second phase configuration modification parameters are received and a second phase SA is established with the initiator.
  • the correct parameters can be directly sent to the peer end, which reduces the time consumed by the negotiation process and improves the negotiation efficiency.
  • the first stage configuration modification parameter and the second stage configuration modification parameter increase the first stage SA negotiation timeout period and the second stage SA negotiation timeout time, and increase the data transmission in the first stage SA and the second stage SA. reliability.
  • One embodiment of the present invention provides an apparatus for IPSEC negotiation.
  • the apparatus includes: a first stage receiving unit 51, configured to receive an Internet Key Exchange IKE first stage configuration parameter sent by the initiator.
  • the first stage determining unit 52 is configured to determine whether the IKE first stage configuration parameter sent by the initiator is consistent with the first stage configuration parameter of the receiver.
  • a first stage sending unit 53 configured to: when the first stage determining unit of the receiving party determines that the IKE first stage configuration parameter sent by the initiator is inconsistent with the first stage configuration parameter of the receiver, The first stage configuration parameter is sent to the initiator, so that the initiator generates an IKE first stage configuration modification parameter according to the receiver first stage configuration parameter; the receiver first stage configuration parameter and the IKE first
  • the phase configuration modification parameters include: receiver IKE version, receiver negotiation mode, receiver authentication mode, receiver authentication algorithm, Receiver encryption algorithm and receiver key exchange algorithm group.
  • the first stage receiving unit 51 is further configured to receive the first stage configuration modification parameter of the I KE.
  • the first phase security association establishing unit 54 is configured to establish a first phase S A with the initiator.
  • the second stage receiving unit 55 is configured to receive the I KE second phase configuration parameter sent by the initiator.
  • the second stage determining unit 56 is configured to determine whether the I KE second stage configuration parameter sent by the initiator is consistent with the receiver second stage configuration parameter.
  • a second stage sending unit 57 configured to: when the second stage determining unit determines that the I KE second stage configuration parameter sent by the initiator is inconsistent with the second stage configuration parameter of the receiver, the receiving The second phase configuration parameter is sent to the initiator, so that the initiator generates an I KE second phase configuration modification parameter according to the receiver second phase configuration parameter; the receiver second phase configuration parameter and the I KE
  • the second stage configuration modification parameters include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the second stage receiving unit 55 is further configured to receive the I KE second stage configuration modification parameter.
  • the second phase security association establishing unit 58 is configured to establish a second phase S A with the initiator.
  • the first-stage configuration parameter of the receiver further includes: a first-stage SA timeout period of the receiver.
  • the first stage configuration modification parameter of the I KE further includes: a first stage SA negotiation timeout period.
  • the first phase SA negotiation timeout period is a minimum value of the first phase SA timeout period of the initiator configured by the initiator and the first phase SA timeout time of the receiver.
  • the second phase configuration parameter of the receiver further includes: a second phase of the receiver
  • the second stage configuration modification parameter of the I KE further includes: a second stage SA negotiation timeout period.
  • the second phase SA negotiation timeout time is a minimum value of the second phase SA timeout time of the initiator configured by the initiator and the SA timeout time of the second phase of the receiver.
  • the receiver authentication algorithm in the first phase configuration parameter of the receiver is the The sum of all authentication algorithms stored by the receiver or any one of them; and/or
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the second stage configuration parameter of the receiver is a sum or any one of all the authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the second phase configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the first phase sending unit of the receiver sends the first phase configuration parameter of the receiver to the initiator, specifically for:
  • the IKE informa t i on is sent to the originator.
  • receiver second stage sending unit sends the receiver second stage configuration parameter to the initiator, specifically for:
  • first stage sending unit 53 is further configured to:
  • the first phase parameter confirmation information is sent to the initiator, so that the initiator establishes a first phase SA with the receiver.
  • receiver second stage sending unit 57 is further configured to:
  • the second phase parameter confirmation information is sent to the initiator, so that the initiator establishes a second phase SA with the receiver.
  • the apparatus includes: a first stage sending unit 61, configured to send an Internet Key Exchange IKE first stage configuration parameter to the receiver.
  • the first stage receiving unit 62 is configured to receive a first phase configuration parameter of the receiver sent by the receiver.
  • a first stage parameter generating unit 63 configured to generate an IKE first stage configuration modification parameter according to the receiver first stage configuration parameter; the receiver first stage configuration parameter and the The first stage configuration modification parameters of the I KE include: a receiver I KE version, a receiver negotiation mode, a receiver authentication mode, a receiver authentication algorithm, a receiver encryption algorithm, and a receiver key exchange algorithm group.
  • the first stage sending unit 61 is further configured to send the I KE first stage configuration modification parameter to the receiver.
  • the first phase security association establishing unit 64 is configured to establish a first phase SA with the receiver when receiving the first phase parameter confirmation information of the receiver.
  • the second stage sending unit 65 is configured to send the I KE second stage configuration parameter to the receiver.
  • the second stage receiving unit 66 is configured to receive a second phase configuration parameter of the receiver sent by the receiver.
  • a second stage parameter generating unit 67 configured to generate an I KE second stage configuration modification parameter according to the receiver second stage configuration parameter; the receiver second stage configuration parameter and the I KE second stage configuration modification parameter
  • the method includes: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the receiver key, a receiver security protocol, and a receiver encapsulation mode.
  • the second stage sending unit 65 is further configured to send the I KE second stage configuration modification parameter to the receiver.
  • the second phase security association establishing unit 66 is configured to establish a second phase SA with the initiator when receiving the second phase parameter confirmation information of the receiver.
  • the initiator first phase configuration parameter further includes: an initiator first phase SA timeout period.
  • the first stage configuration modification parameter of the I KE further includes: a first stage SA negotiation timeout period.
  • the first phase SA negotiation timeout period is a minimum value of the first phase SA timeout time of the initiator and the first phase SA timeout time of the receiver configured by the receiver.
  • the second stage configuration parameter of the initiator further includes: a second stage of the initiator
  • the I KE second phase configuration modification parameter further includes: a second phase SA negotiation timeout period.
  • the second phase SA negotiation timeout period is the second phase SA timeout of the initiator.
  • the receiver authentication algorithm in the IKE first-stage configuration modification parameter is a sum or any one of all the authentication algorithms stored by the receiver.
  • the receiver encryption algorithm in the first stage configuration modification parameter of the IKE is a sum of any encryption algorithms stored by the receiver or any one of them.
  • the receiver authentication algorithm in the IKE second-stage configuration modification parameter is a sum or a combination of all the authentication algorithms stored by the receiver.
  • the receiver encryption algorithm in the IKE second stage configuration modification parameter is a sum of any encryption algorithm stored by the receiver or any one of them.
  • the first stage sending unit 61 sends the IKE first stage configuration modification parameter to the receiver, specifically for:
  • the second stage sending unit 61 is specifically configured to:
  • the embodiment provides an apparatus for IPSEC negotiation.
  • the first key configuration parameter of the Internet Key Exchange IKE sent by the initiator is received, and the IKE first stage configuration parameter and the receiver are sent by the initiator.
  • the receiver first-stage configuration parameter is sent to the initiator; then the IKE first-stage configuration modification parameter is received, and the first-stage SA is established with the initiator; Receiving the IKE second-stage configuration parameter sent by the initiator; when the IKE second-stage configuration parameter sent by the initiator is inconsistent with the second-stage configuration parameter of the receiver, the receiver is second
  • the phase configuration parameters are sent to the initiator, and then the IKE second phase configuration modification parameters are received and a second phase SA is established with the initiator.
  • Example 4 One embodiment of the present invention provides an IPSEC negotiated device.
  • the receiver device involved in the IPSEC negotiation includes: a communication interface 71, configured to receive the first phase configuration parameter of the Internet Key Exchange IKE sent by the initiator.
  • the processor 72 is configured to: when the IKE first phase configuration parameter sent by the initiator is inconsistent with the first phase configuration parameter of the receiver, send the receiver first phase configuration parameter to the initiator, so that The initiator generates an IKE first-stage configuration modification parameter according to the first-stage configuration parameter of the receiver; the first-stage configuration parameter of the receiver and the first-stage configuration modification parameter of the IKE include: a receiver IKE version, Receiver negotiation mode, receiver authentication mode, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group.
  • the communication interface 71 is further configured to receive the first stage configuration modification parameter of the I KE.
  • the processor 72 is further configured to establish a first phase SA with the initiator.
  • the communication interface 71 is further configured to receive an IKE second phase configuration parameter sent by the initiator.
  • the communication interface 71 is further configured to: when the processor detects that the IKE second-stage configuration parameter sent by the initiator is inconsistent with the second-stage configuration parameter of the receiver, The phase configuration parameter is sent to the initiator, so that the initiator generates an IKE second phase configuration modification parameter according to the receiver second phase configuration parameter; the receiver second phase configuration parameter and the IKE second phase configuration modification
  • the parameters include: a receiver authentication algorithm, a receiver encryption algorithm, a complete successor secret of the recipient key, a receiver security protocol, and a receiver encapsulation mode.
  • the communication interface 71 is further configured to receive the I KE second phase configuration modification parameter.
  • the processor 72 is further configured to establish a second phase SA with the initiator.
  • the memory 73 is configured to store the first stage configuration parameter of the receiver, the IKE first stage configuration modification parameter, the second stage configuration parameter of the receiver, the IKE second stage configuration modification parameter, and a processor performing an operation. The code you need when you need it.
  • bus 74 for connecting the processor 72, the communication interface 71, and the memory
  • the first stage configuration parameter of the receiver stored in the memory 73 further includes: a first phase SA timeout period of the receiver.
  • the first stage configuration modification parameter of the I KE further includes: a first stage SA negotiation timeout period.
  • the first phase SA negotiation timeout period is a minimum value of the first phase SA timeout period of the initiator configured by the initiator and the first phase SA timeout time of the receiver.
  • the second phase configuration parameter of the receiver stored in the memory 73 further includes: a second phase SA timeout period of the receiver.
  • the second stage configuration modification parameter of the I KE further includes: a second stage SA negotiation timeout period.
  • the second phase SA negotiation timeout time is a minimum value of the second phase SA timeout time of the initiator configured by the initiator and the SA timeout time of the second phase of the receiver.
  • the receiver authentication algorithm in the first stage configuration parameter of the receiver stored in the memory 73 is a sum or a combination of all the authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the first stage configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the receiver authentication algorithm in the receiver second stage configuration parameter stored in the memory 73 is a sum or a combination of all the authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the second phase configuration parameter of the receiver is the sum or any one of all encryption algorithms stored by the receiver.
  • the communication interface 71 is specifically configured to:
  • the communication interface 71 is specifically configured to:
  • the communication interface 71 is further configured to receive the first stage configuration of the I KE After the parameter is changed, the first stage parameter confirmation information is sent to the initiator, so that the initiator establishes the first stage SA with the receiver.
  • the communication interface 71 is further configured to: after receiving the IKE second phase configuration modification parameter, send the second phase parameter confirmation information to the initiator, so that the initiator establishes a second with the receiver. Stage SA.
  • an initiator device involving IPSEC negotiation the device includes:
  • the communication interface 81 is configured to send an Internet Key Exchange IKE Phase 1 configuration parameter to the receiver.
  • the communication interface 81 is further configured to receive a first phase configuration parameter of the receiver sent by the receiver.
  • the processor 82 is configured to generate an IKE first phase configuration modification parameter according to the receiver first phase configuration parameter, where the receiver first phase configuration parameter and the IKE first phase configuration modification parameter include: a receiver IKE Version, receiver negotiation mode, receiver authentication mode, receiver authentication algorithm, receiver encryption algorithm, and receiver key exchange algorithm group.
  • the communication interface 81 is further configured to send the IKE first phase configuration modification parameter to the receiver.
  • the processor 82 is further configured to establish a first-stage SA with the receiver when receiving the first-stage parameter confirmation information of the receiver.
  • the communication interface 81 is further configured to send an IKE second phase configuration parameter to the receiver.
  • the communication interface 81 is further configured to receive a second phase configuration parameter of the receiver sent by the receiver.
  • the processor 82 is further configured to generate an IKE second phase configuration modification parameter according to the receiver second phase configuration parameter; the receiver second phase configuration parameter and the IKE second phase configuration modification parameter include: Receiver authentication algorithm, receiver encryption algorithm, full successor secret of the recipient key, receiver security protocol, and receiver encapsulation mode.
  • the communication interface 81 is further configured to send the IKE second phase configuration modification parameter to the receiver.
  • the processor 82 is further configured to establish a second phase SA with the initiator when the communication interface receives the second phase parameter confirmation information of the receiver.
  • the memory 83 is configured to store the receiver first phase configuration parameter, the I KE first phase configuration modification parameter, the receiver second phase configuration parameter, and the I KE second phase configuration modification parameter and processor The code required to perform the operation.
  • a bus 84 is provided for connecting the processor 82, the communication interface 81 and the memory 83, and provides a physical channel for data transmission of the processor 82, the communication interface 81 and the memory 83.
  • the initiator first-stage configuration parameter stored in the memory 83 further includes: an initiator first-stage SA timeout period.
  • the first stage configuration modification parameter of the I KE further includes: a first stage SA negotiation timeout period.
  • the first phase SA negotiation timeout period is a minimum value of the first phase SA timeout time of the initiator and the first phase SA timeout time of the receiver configured by the receiver.
  • the initiator second phase configuration parameter stored in the memory 83 further includes: an initiator second phase SA timeout period.
  • the second stage configuration modification parameter of the I KE further includes: a second stage SA negotiation timeout period.
  • the second phase SA negotiation timeout period is a minimum value of the initiator second phase SA timeout period and the receiver second phase S A timeout time configured by the receiver.
  • the receiver authentication algorithm in the first stage configuration modification parameter stored in the memory 83 is a sum or any one of all the authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the first stage configuration modification parameter of the I KE is a sum of any encryption algorithms stored by the receiver or any one of them.
  • the receiver authentication algorithm in the I KE second-stage configuration modification parameter stored in the memory 83 is a sum or any one of all the authentication algorithms stored by the receiver;
  • the receiver encryption algorithm in the second stage configuration modification parameter of the I KE is a sum of any encryption algorithms stored by the receiver or any one of them. Further, the communication interface 81 is specifically configured to:
  • Transmitting the IKE first-stage configuration modification parameter to the receiver in the IKE informa t i on from the initiator to the receiver.
  • the communication interface 81 is specifically configured to:
  • Transmitting the IKE second-stage configuration modification parameter to the receiver in the IKE informa t i on from the initiator to the receiver.
  • a system for IPSEC negotiation including: any one of the foregoing receiver devices and any one of the initiator devices.
  • the embodiment provides a method for IPSEC negotiation.
  • the first key configuration parameter of the Internet Key Exchange IKE sent by the initiator is received, and the IKE first stage configuration parameter and the receiver are sent by the initiator.
  • the receiver first-stage configuration parameter is sent to the initiator; then the IKE first-stage configuration modification parameter is received, and the first-stage SA is established with the initiator; Receiving the IKE second-stage configuration parameter sent by the initiator; when the IKE second-stage configuration parameter sent by the initiator is inconsistent with the second-stage configuration parameter of the receiver, the receiver is second The phase configuration parameters are sent to the initiator, and then the IKE second phase configuration modification parameters are received and a second phase SA is established with the initiator.
  • the negotiation parameters are not required, the correct parameters can be directly sent to the peer end, which reduces the time consumed by the negotiation process and improves the negotiation efficiency.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明的实施例公开一种IPSEC协商的方法。涉及通信领域,解决IPSEC协商过程消耗时间长,协商效率低的问题。一种IPSEC协商的方法,第一阶段,接收方在IKE第一阶段配置参数与接收方第一阶段配置参数不一致时,将接收方第一阶段配置参数发送至发起方;然后接收IKE第一阶段配置修改参数,建立第一阶段SA;第二阶段,接收方接收IKE第二阶段配置参数;当发起方发送的所述IKE第二阶段配置参数与接收方第二阶段配置参数不一致时,将所述接收方第二阶段配置参数发送至所述发起方,然后接收所述IKE第二阶段配置修改参数并与所述发起方建立第二阶段SA。本发明主要应用于数据传输中。

Description

一种 IPSEC协商的方法、 装置、 设备和系统 技术领域 本发明涉及通信领域, 特别涉及一种 IPSEC协商的方法、 装置、 设备 和系统。
背景技术
IPSEC ( Internet Protocol Security, 网络协议安全) 为不同物理 地域的用户提供安全的数据通信, 以防止数据在网络传输过程中被查看、 篡改等。
一般情况下, 发起方和接收方需要在发送数据前进行 IKE ( Internet Key Exchange,互联网密钥交换协议) 协商, 以确保发起方和接收方釆用 一致的加密和认证算法, 从而保证数据的正确接收。 IKE协商包括两个过 程, 第一阶段是建立一个为第二阶段提供保护的 SA ( Security Association, 安全联盟), 第二阶段建立一个为数据提供保护的 SA。 具体的协商过程为: 接收方接收到发起方发送的协商信息后, 若判断 结果为协商信息不符合要求, 则向发起方发送协商不成功的信息。 发起方 接收到协商不成功的信息后, 改变协商信息, 然后将改变后的协商信息发 送至接收方。 接收方接收到改变后的协商信息后再判断是否协商成功。 实现上述方案的过程中,发明人发现在现有技术中至少存在以下技术 问题: 接收方认为协商信息不合要求时, 向发起方返回协商不成功的信息, 之后发起方将重新发起协商, 如果协商信息仍不合要求, 则接收方继续向 发起方返回协商不成功的消息, 使发起方再次发起协商, 持续以上过程直 至协商成功, 这致使协商过程耗时较长, 效率很低。
发明内容 本发明的实施例提供一种 IPSEC协商的方法、 装置、 设备和系统, 解 决 IPSEC协商过程耗时长, 效率低的技术问题。
为达到上述目的, 本发明实施例釆用如下技术方案:
第一方面, 提供一种 IPSEC协商的方法, 包括:
接收发起方发送的互联网密钥交换 I KE第一阶段配置参数;
当所述发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段 配置参数不一致时, 将所述接收方第一阶段配置参数发送至所述发起方, 以便所述发起方按照所述接收方第一阶段配置参数生成 IKE 第一阶段配 置修改参数;所述接收方第一阶段配置参数和所述 IKE第一阶段配置修改 参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收 方认证算法、 接收方加密算法和接收方密钥交换算法组;
接收所述发起方发送的所述 IKE第一阶段配置修改参数;
与所述发起方建立第一阶段安全联盟 SA;
接收所述发起方发送的 IKE第二阶段配置参数;
当所述发起方发送的所述 IKE 第二阶段配置参数与所述接收方第二 阶段配置参数不一致时,将所述接收方第二阶段配置参数发送至所述发起 方,以便所述发起方按照接收方第二阶段配置参数生成 IKE第二阶段配置 修改参数;所述接收方第二阶段配置参数和所述 IKE第二阶段配置修改参 数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保 密、 接收方安全协议和接收方封装模式;
接收所述发起方发送的所述 IKE第二阶段配置修改参数;
与所述发起方建立第二阶段 SA。
结合第一方面, 在第一方面的第一种可能的实现方式中, 所述接收方 第一阶段配置参数还包括: 接收方第一阶段 SA超时时间;
所述 IKE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是发起方配置的发起方第一阶 段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
结合第一方面, 在第一方面的第二种可能的实现方式中, 所述接收方 第二阶段配置参数还包括: 接收方第二阶段 SA超时时间;
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是发起方配置的发起方第二阶 段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
结合第一方面, 在第一方面的第三种可能的实现方式中, 所述接收方 第一阶段配置参数中的接收方认证算法为所述接收方存储的所有认证算 法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第一方面, 在第一方面的第四种可能的实现方式中, 所述接收方 第二阶段配置参数中的接收方认证算法为所述接收方存储的所有认证算 法的总和或其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第 四种可能的实现方式中任意一种实现方式,在第一方面的第五种可能的实 现方式中, 所述将所述接收方第一阶段配置参数发送至所述发起方, 具体 包括:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的 I KE i nf orma t i on中发送至所述发起方。
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第 四种可能的实现方式中任意一种实现方式,在第一方面的第六种可能的实 现方式中, 所述将所述接收方第二阶段配置参数发送至所述发起方, 具体 包括:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 I KE i nf orma t i on中发送至所述发起方。
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第 六种可能的实现方式中任意一种实现方式,在第一方面的第七种可能的实 现方式中, 在接收所述 I KE第一阶段配置修改参数后, 还包括: 向所述发起方发送第一阶段参数确认信息,以便所述发起方与所述接 收方建立第一阶段 SA。
结合第一方面或第一方面的第一种可能的实现方式至第一方面的第 六种可能的实现方式中的任意一种实现方式,在第一方面的第八种可能的 实现方式中, 在接收所述 I KE第二阶段配置修改参数后, 还包括:
向所述发起方发送第二阶段参数确认信息,以便所述发起方与所述接 收方建立第二阶段 SA。
第二方面, 提供一种 I PSEC协商的方法, 包括:
向接收方发送互联网密钥交换 I KE第一阶段配置参数;
接收所述接收方发送的接收方第一阶段配置参数;
按照所述接收方第一阶段配置参数生成 I KE第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 I KE第一阶段配置修改参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组;
向所述接收方发送所述 I KE第一阶段配置修改参数;
当收到所述接收方的第一阶段参数确认信息时,与所述接收方建立第 一阶段安全联盟 SA ;
向所述接收方发送 I KE第二阶段配置参数;
接收所述接收方发送的接收方第二阶段配置参数;
按照所述接收方第二阶段配置参数生成 I KE第二阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE第二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方 安全协议和接收方封装模式;
向所述接收方发送所述 I KE第二阶段配置修改参数;
当收到所述接收方的第二阶段参数确认信息时,与所述发起方建立第 二阶段 SA。
结合第二方面, 在第二方面的第一种可能的实现方式中, 所述发起方 第一阶段配置参数还包括: 发起方第一阶段 SA超时时间;
所述 IKE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中,所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
结合第二方面, 在第二方面的第二种可能的实现方式中, 所述发起方 第二阶段配置参数还包括: 发起方第二阶段 SA超时时间;
所述 IKE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中,所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
结合第二方面, 在第二方面的第三种可能的实现方式中, 所述 IKE 第一阶段配置修改参数中的接收方认证算法为所述接收方存储的所有认 证算法的总和或其中任意一种; 和 /或
所述 IKE第一阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
结合第二方面, 在第二方面的第四种可能的实现方式中, 所述 IKE 第二阶段配置修改参数中的接收方认证算法为所述接收方存储的所有认 证算法的总和或其中任意一种; 和 /或
所述 IKE第二阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第 四种可能的实现方式中任意一种可能的实现方式,在第二方面的第五种可 能的实现方式中, 其特征在于, 所述将所述 IKE第一阶段配置修改参数发 送至所述接收方, 具体包括:
将所述 IKE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 IKE informa t i on中发送至所述接收方。
结合第二方面或第二方面的第一种可能的实现方式至第二方面的第 四种可能的实现方式中任意一种可能的实现方式,在第二方面的第六种可 能的实现方式中,所述将所述 IKE第二阶段配置修改参数发送至所述接收 方, 具体包括:
将所述 IKE 第二阶段配置修改参数承载于所述发起方至所述接收方 的 IKE information中发送至所述接收方。
第三方面, 提供一种 IPSEC协商的装置, 包括:
第一阶段接收单元,用于接收发起方发送的互联网密钥交换 IKE第一 阶段配置参数;
第一阶段判断单元,用于判断所述发起方发送的所述 IKE第一阶段配 置参数与接收方第一阶段配置参数是否一致;
第一阶段发送单元,用于当第一阶段判断单元判断出所述发起方发送 的所述 IKE第一阶段配置参数与接收方第一阶段配置参数不一致时,将所 述接收方第一阶段配置参数发送至所述发起方,以便所述发起方按照所述 接收方第一阶段配置参数生成 IKE第一阶段配置修改参数;所述接收方第 一阶段配置参数和所述 IKE 第一阶段配置修改参数中包括: 接收方 IKE 版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密 算法和接收方密钥交换算法组;
所述第一阶段接收单元, 还用于接收所述 IKE 第一阶段配置修改参 数;
第一阶段安全联盟建立单元,用于与所述发起方建立第一阶段安全联 盟 SA;
第二阶段接收单元,用于接收所述发起方发送的 IKE第二阶段配置参 数;
第二阶段判断单元,用于判断所述发起方发送的所述 IKE第二阶段配 置参数与所述接收方第二阶段配置参数是否一致;
第二阶段发送单元,用于所述第二阶段判断单元判断出所述发起方发 送的所述 IKE 第二阶段配置参数与所述接收方第二阶段配置参数不一致 时, 将所述接收方第二阶段配置参数发送至所述发起方, 以便所述发起方 按照接收方第二阶段配置参数生成 IKE第二阶段配置修改参数;所述接收 方第二阶段配置参数和所述 IKE第二阶段配置修改参数中包括:接收方认 证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议 和接收方封装模式;
所述第二阶段接收单元, 还用于接收所述 I KE 第二阶段配置修改参 数;
第二阶段安全联盟建立单元, 用于与所述发起方建立第二阶段 SA。 结合第三方面, 在第三方面的第一种可能的实现方式中, 所述接收方 第一阶段配置参数还包括: 接收方第一阶段 SA超时时间;
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是发起方配置的发起方第一阶 段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
结合第三方面, 在第三方面的第二种可能的实现方式中, 所述接收方 第二阶段配置参数还包括: 接收方第二阶段 SA超时时间;
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是发起方配置的发起方第二阶 段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
结合第三方面, 在第三方面的第三种可能的实现方式中, 所述接收方 第一阶段配置参数中的接收方认证算法为所述接收方存储的所有认证算 法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第三方面, 在第三方面的第四种可能的实现方式中, 所述接收方 第二阶段配置参数中的接收方认证算法为所述接收方存储的所有认证算 法的总和或其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第三方面或第三方面的第一种可能的实现方式至第三方面的第 四种可能的实现方式中任意一种可能的实现方式,在第三方面的第五种可 能的实现方式中, 所述第一阶段发送单元, 具体用于: 将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的
IKE informa t i on中发送至所述发起方。
结合第三方面或第三方面的第一种可能的实现方式至第三方面的第 四种可能的实现方式中任意一种可能的实现方式,在第三方面的第六种可 能的实现方式中, 所述第二阶段发送单元, 具体用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE informa t i on中发送至所述发起方。
结合第三方面或第三方面的第一种可能的实现方式至第三方面的第 六种可能的实现方式中任意一种可能的实现方式,在第三方面的第七种可 能的实现方式中, 所述第一阶段发送单元, 还用于:
向所述发起方发送第一阶段参数确认信息,以便所述发起方与所述接 收方建立第一阶段 SA。
结合第三方面或第三方面的第一种可能的实现方式至第三方面的第 六种可能的实现方式中任意一种可能的实现方式,在第三方面的第八种可 能的实现方式中, 所述第二阶段发送单元, 还用于:
向所述发起方发送第二阶段参数确认信息,以便所述发起方与所述接 收方建立第二阶段 SA。
第四方面, 提供一种 IPSEC协商的装置, 包括:
第一阶段发送单元,用于向接收方发送互联网密钥交换 IKE第一阶段 配置参数;
第一阶段接收单元,用于接收所述接收方发送的接收方第一阶段配置 参数;
第一阶段参数生成单元,用于按照所述接收方第一阶段配置参数生成 IKE第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 IKE第 一阶段配置修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方 认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组; 所述第一阶段发送单元,还用于向所述接收方发送所述 IKE第一阶段 配置修改参数; 第一阶段安全联盟建立单元,用于当收到所述接收方的第一阶段参数 确认信息时, 与所述接收方建立第一阶段安全联盟 SA;
第二阶段发送单元, 用于向所述接收方发送 I KE第二阶段配置参数; 第二阶段接收单元,用于接收所述接收方发送的接收方第二阶段配置 参数;
第二阶段参数生成单元,用于按照所述接收方第二阶段配置参数生成 I KE第二阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE第 二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方 密钥的完全后继保密、 接收方安全协议和接收方封装模式;
所述第二阶段发送单元,还用于向所述接收方发送所述 I KE第二阶段 配置修改参数;
第二阶段安全联盟建立单元,用于当收到所述接收方的第二阶段参数 确认信息时, 与所述发起方建立第二阶段 SA。
结合第四方面, 在第四方面的第一种可能的实现方式中, 所述发起方 第一阶段配置参数还包括: 发起方第一阶段 SA超时时间;
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中,所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
结合第四方面, 在第四方面的第二种可能的实现方式中, 所述发起方 第二阶段配置参数还包括: 发起方第二阶段 SA超时时间;
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中,所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
结合第四方面, 在第四方面的第三种可能的实现方式中, 所述 I KE 第一阶段配置修改参数中的接收方认证算法为所述接收方存储的所有认 证算法的总和或其中任意一种; 和 /或
所述 I KE第一阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。 结合第四方面, 在第四方面的第四种可能的实现方式中, 所述 IKE 第二阶段配置修改参数中的接收方认证算法为所述接收方存储的所有认 证算法的总和或其中任意一种; 和 /或
所述 IKE第二阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
结合第四方面或第四方面的第一种可能的实现方式至第四方面的第 四种可能的实现方式中任意一种可能的实现方式,在第四方面的第五种可 能的实现方式中, 所述第一阶段发送单元, 具体用于:
将所述 IKE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 IKE informa t i on中发送至所述接收方。
结合第四方面或第四方面的第一种可能的实现方式至第四方面的第 四种可能的实现方式中任意一种可能的实现方式,在第四方面的第六种可 能的实现方式中, 所述第一阶段发送单元, 具体用于:
将所述 IKE 第二阶段配置修改参数承载于所述发起方至所述接收方 的 IKE informa t i on中发送至所述接收方。
第五方面, 提供一种 IPSEC协商的接收方设备, 包括:
通信接口,用于接收发起方发送的互联网密钥交换 IKE第一阶段配置 参数;
处理器,用于当所述发起方发送的所述 IKE第一阶段配置参数与接收 方第一阶段配置参数不一致时,将所述接收方第一阶段配置参数发送至所 述发起方, 以便所述发起方按照所述接收方第一阶段配置参数生成 IKE 第一阶段配置修改参数;所述接收方第一阶段配置参数和所述 IKE第一阶 段配置修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证 方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组;
所述通信接口, 还用于接收所述 IKE第一阶段配置修改参数; 所述处理器, 还用于与所述发起方建立第一阶段安全联盟 SA;
所述通信接口, 还用于接收所述发起方发送的 IKE 第二阶段配置参 数; 所述通信接口, 还用于当所述处理器检测到所述发起方发送的所述
I KE第二阶段配置参数与所述接收方第二阶段配置参数不一致时, 将所述 接收方第二阶段配置参数发送至所述发起方,以便所述发起方按照接收方 第二阶段配置参数生成 I KE第二阶段配置修改参数;所述接收方第二阶段 配置参数和所述 I KE第二阶段配置修改参数中包括: 接收方认证算法、接 收方加密算法、接收方密钥的完全后继保密、接收方安全协议和接收方封 装模式;
所述通信接口, 还用于接收所述 I KE第二阶段配置修改参数; 所述处理器, 还用于与所述发起方建立第二阶段 SA;
存储器, 用于存储所述接收方第一阶段配置参数、 所述 I KE第一阶段 配置修改参数、 所述接收方第二阶段配置参数、 所述 I KE第二阶段配置修 改参数和处理器执行操作时需要的代码;
总线, 用于连接所述处理器、 所述通信接口和所述存储器, 并为所述 处理器、 所述通信接口和所述存储器提供数据传输的物理通道。
结合第五方面, 在第五方面的第一种可能的实现方式中, 所述存储器 中存储的所述接收方第一阶段配置参数还包括: 接收方第一阶段 SA超时 时间;
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是发起方配置的发起方第一阶 段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
结合第五方面, 在第五方面的第二种可能的实现方式中, 所述存储器 中存储的所述接收方第二阶段配置参数还包括: 接收方第二阶段 SA超时 时间;
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是发起方配置的发起方第二阶 段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
结合第五方面, 在第五方面的第三种可能的实现方式中, 所述存储器 中存储的所述接收方第一阶段配置参数中的接收方认证算法为所述接收 方存储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第五方面, 在第五方面的第四种可能的实现方式中, 所述存储器 中存储的所述接收方第二阶段配置参数中的接收方认证算法为所述接收 方存储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
结合第五方面或第五方面的第一种可能的实现方式至第五方面的第 四种可能的实现方式中任意一种可能的实现方式,在第五方面的第五种可 能的实现方式中, 所述通信接口, 具体用于:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的
IKE informa t i on中发送至所述发起方。
结合第五方面或第五方面的第一种可能的实现方式至第五方面的第 四种可能的实现方式中任意一种可能的实现方式,在第五方面的第六种可 能的实现方式中, 所述通信接口, 具体还用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE informa t i on中发送至所述发起方。
结合第五方面或第五方面的第一种可能的实现方式至第五方面的第 六种可能的实现方式中任意一种可能的实现方式,在第五方面的第七种可 能的实现方式中,所述通信接口还用于在接收所述 IKE第一阶段配置修改 参数后, 向所述发起方发送第一阶段参数确认信息, 以便所述发起方与所 述接收方建立第一阶段 SA。
结合第五方面或第五方面的第一种可能的实现方式至第五方面的第 六种可能的实现方式中任意一种可能的实现方式,在第五方面的第八种可 能的实现方式中,所述通信接口还用于在接收所述 IKE第二阶段配置修改 参数后, 向所述发起方发送第二阶段参数确认信息, 以便所述发起方与所 述接收方建立第二阶段 SA。 第六方面, 提供一种 I PSEC协商的发起方设备, 包括:
通信接口, 用于向接收方发送互联网密钥交换 I KE 第一阶段配置参 数;
所述通信接口,还用于接收所述接收方发送的接收方第一阶段配置参 数;
处理器,用于按照所述接收方第一阶段配置参数生成 I KE第一阶段配 置修改参数;所述接收方第一阶段配置参数和所述 I KE第一阶段配置修改 参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、 接收 方认证算法、 接收方加密算法和接收方密钥交换算法组;
所述通信接口,还用于向所述接收方发送所述 I KE第一阶段配置修改 参数;
所述处理器, 还用于当收到所述接收方的第一阶段参数确认信息时, 与所述接收方建立第一阶段安全联盟 SA;
所述通信接口, 还用于向所述接收方发送 I KE第二阶段配置参数; 所述通信接口,还用于接收所述接收方发送的接收方第二阶段配置参 数;
所述处理器,还用于按照所述接收方第二阶段配置参数生成 I KE第二 阶段配置修改参数;所述接收方第二阶段配置参数和所述 I KE第二阶段配 置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完 全后继保密、 接收方安全协议和接收方封装模式;
所述通信接口,还用于向所述接收方发送所述 I KE第二阶段配置修改 参数;
所述处理器,还用于当所述通信接口接收到所述接收方的第二阶段参 数确认信息时, 与所述发起方建立第二阶段 SA。
存储器, 用于存储所述接收方第一阶段配置参数、 所述 I KE第一阶段 配置修改参数、所述接收方第二阶段配置参数和所述 I KE第二阶段配置修 改参数和处理器执行操作时需要的代码;
总线, 用于连接所述处理器、 所述通信接口和所述存储器, 并为所述 处理器、 所述通信接口和所述存储器提供数据传输的物理通道。 结合第六方面, 在第六方面的第一种可能的实现方式中, 所述存储器 中存储的所述发起方第一阶段配置参数还包括: 发起方第一阶段 SA超时 时间;
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间; 其中,所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
结合第六方面, 在第六方面的第二种可能的实现方式中, 所述存储器 中存储的所述发起方第二阶段配置参数还包括: 发起方第二阶段 SA超时 时间;
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间; 其中,所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
结合第六方面, 在第六方面的第三种可能的实现方式中, 所述存储器 中存储的所述 I KE 第一阶段配置修改参数中的接收方认证算法为所述接 收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述存储器中存储的所述 I KE 第一阶段配置修改参数中的接收方加 密算法, 为所述接收方存储的所有加密算法的总和或其中任意一种。
结合第六方面, 在第六方面的第四种可能的实现方式中, 所述存储器 中存储的所述 I KE 第二阶段配置修改参数中的接收方认证算法为所述接 收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述 I KE第二阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
结合第六方面或第六方面的第一种可能的实现方式至第六方面的第 四种可能的实现方式中任意一种可能的实现方式,在第六方面的第五种可 能的实现方式中, 所述通信接口, 具体用于:
将所述 I KE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 I KE i nf orma t i on中发送至所述接收方。 结合第六方面或第六方面的第一种可能的实现方式至第六方面的第 四种可能的实现方式中任意一种可能的实现方式,在第六方面的第六种可 能的实现方式中, 所述通信接口, 具体还用于:
将所述 IKE 第二阶段配置修改参数承载于所述发起方至所述接收方 的 IKE information中发送至所述接收方。
第七方面, 提供一种 IPSEC协商的系统, 其特征在于, 包括: 第五方 面所述的任意一项所述的接收方设备,以及第六方面所述的任意一项所述 的发起方设备。
本实施例提供一种 IPSEC协商的方法、 装置、 设备和系统, 第一阶段, 接 收发起方发送的互联网密钥交换 IKE第一阶段配置参数,当所述发起方发 送的所述 IKE第一阶段配置参数与接收方第一阶段配置参数不一致时,将 所述接收方第一阶段配置参数发送至所述发起方;然后接收所述 IKE第一 阶段配置修改参数并与所述发起方建立第一阶段 SA; 第二阶段, 接收所 述发起方发送的 IKE 第二阶段配置参数; 当所述发起方发送的所述 IKE 第二阶段配置参数与所述接收方第二阶段配置参数不一致时,将所述接收 方第二阶段配置参数发送至所述发起方,然后接收所述 IKE第二阶段配置 修改参数并与所述发起方建立第二阶段 SA。 通过上述方案, 在协商参数 不合要求时, 可以直接将正确的参数发送至对端, 减少协商过程消耗的时 间, 提高协商效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。
图 la为对数据进行加密传输的示意图;
图 lb为本发明实施例 1 中一种 IPSEC协商的方法涉及接收方的流程 图; 图 2 为本发明实施例 1 中一种 IPSEC协商的方法涉及发起方的流程 图;
图 3为本发明实施例 2 中一种 IPSEC协商的方法涉及接收方的流程 图;
图 4 为本发明实施例 2 中一种 IPSEC协商的方法涉及发起方的流程 图;
图 5为本发明实施例 3中一种 IPSEC协商涉及接收方的装置的框图; 图 6为本发明实施例 3中一种 IPSEC协商涉及发起方的装置的框图; 图 7为本发明实施例 4中一种接收方设备的示意图;
图 8为本发明实施例 4中一种发起方设备的示意图;
图 9为本发明实施例 4中一种 IPSEC协商的系统的示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进 行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没 有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的 范围。
为保证传输数据的安全, 通常情况下会对传输的数据进行加密, 以防 止数据被查看、 篡改。 如图 la所示, 数据从终端 101a (可以是计算机) 中发出, 经过支持 IPSEC ( Internet Protocol Security, 网络协议安 全) 的设备 103a后, 通过未知网络 104a (例如, 未知的互联网), 然后 进入支持 IPSEC 的设备 105a 并最终到达目的地终端 107a (可以是计算 机)。 由于数据经过了未知网络 104a, 故不能保证到达终端 107a 的数据 是否安全, 因此需要对数据进行加密, 以保证数据在经过未知网络 104a 时, 不被查看、 篡改。
若数据需要从终端 101a发送至目的地终端 107a,则设备 103a可以理 解为本发明实施例中所述的发起方, 设备 105a可以理解为本发明实施例 中所述的接收方。 若数据需要从终端 107a发送至终端 101 a,则 105a可以 理解为本发明实施例中所述的发起方, 设备 103a可以理解为本发明实施 例中所述的接收方。
更一般的情况是, 多个终端 101 a组成一个内部网络 102a,多个终端 107a组成一个内部网络 106a。 因为内部网络中的数据未经过任何未知网 络, 故无需对内部网络传输中的数据进行加密。 所以, 在此种情况下, 设 备 103a与设备 105a的加密对象为内部网络 102a与内部网络 106a之间传 输的数据。
实施例 1 :
本发明的一个实施例提供一种 IPSEC ( Interne t Pro toco l Secur i ty , 网际协议安全) 协商的方法。
一方面, 涉及 IPSEC协商的接收方, 如图 l b所示, 包括如下步骤:
101、 接收发起方发送的 IKE ( Interne t Key Exchange,互联网密钥 交换协议) 第一阶段配置参数。
发起方向接收方发送的 IKE第一阶段配置参数包括:发起方 IKE版本、 发起方协商模式、 发起方认证方式、 发起方认证算法、 发起方加密算法和 发起方密钥交换算法组。
102、 当所述发起方发送的所述 IKE第一阶段配置参数与接收方第一 阶段配置参数不一致时,将所述接收方第一阶段配置参数发送至所述发起 方,以便所述发起方按照所述接收方第一阶段配置参数生成 IKE第一阶段 配置修改参数。
所述接收方第一阶段配置参数和所述 IKE 第一阶段配置修改参数中 包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证 算法、 接收方加密算法和接收方密钥交换算法组。
发起方发送的 IKE 第一阶段配置参数中的所有参数必须与接收方第 一阶段配置参数中的所有参数完全一致,才可以保证第一阶段 IPSEC协商 成功, 具体来说: 发起方 IKE版本与接收方 IKE版本一致, 即釆用相同的 IKE版本; 发起方协商模式与接收方协商模式一致,即发起方和接收方都釆用主 模式协商或都釆用野蛮模式协商;
发起方认证方式与接收方认证方式一致,即都釆用完全相同的认证方 式: 数字签名认证方式或 \和公钥加密方式或 \和改进的公钥加密方式或 \ 和预共享公钥加密方式;
发起方认证算法与接收方认证算法一致, 即釆用相同的算法进行认 证, 比如都釆用 MD5 (Message Digest Algorithm 5, 消息摘要算法第 5 版)或都釆用 SHA1 (Secure Hash Algor i thm,哈希算法)或其它一种或一种 以上算法及其组合;
发起方加密算法与接收方加密算法一致, 即釆用相同的算法进行加 密, 比^口采用 3DES (Triple Data Encryption Algorithm, 三重数据力口密 算法)或其它一种或一种以上算法及其组合;
发起方密钥交换算法组与接收方密钥交换算法组一致,即釆用相同的 密钥交换算法组, 比如釆用 DH ( Diff ie-Hellman, 密钥交换算法) 组。
若发起方发送的 IKE 第一阶段配置参数中的所有参数中存在有一条 与接收方第一阶段配置参数中的参数不一致,即为步骤 102所述的发起方 发送的所述 IKE第一阶段配置参数与接收方第一阶段配置参数不一致。
当发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段配置 参数不一致时, 接收方将接收方第一阶段配置参数 (接收方使用的 IKE 版本、 协商模式、 认证方式、 认证算法、 加密算法和密钥交换算法组)发 送至发起方, 在本实施例中, 依次被称为接收方 IKE版本、 接收方协商模 式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交 换算法组。
103、 接收所述发起方发送的所述 IKE第一阶段配置修改参数。
步骤 103所述的 IKE第一阶段配置修改参数由发起方根据接收方发送 的所述接收方第一阶段配置参数生成, 所述第一阶段配置修改参数包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组,即发起方完全釆用接收方使用 的配置参数, 并再次向接收方发起协商。
104、 与所述发起方建立第一阶段 SA ( Security Association, 安全 联盟)。
由于发起方发送的 IKE 第一阶段配置修改参数与接收方使用的配置 参数相同, 因此当接收方接收到 IKE第一阶段配置修改参数时, 通过检测 发现 IKE第一阶段配置修改参数与接收方第一阶段配置参数一致,接收方 向发起方发送第一阶段参数确认信息,以表示接收方接受发起方发起的第 一阶段 IPSEC协商, 同意建立第一阶段 SA。 发起方接收到第一阶段参数 确认信息后,接收方和发起方通过密钥交换算法组生成各自的密钥并互相 交换密钥, 然后利用交换后的密钥对彼此的身份和交换过程进行验证。 验 证成功, 则建立起第一阶段 SA。
105、 接收所述发起方发送的 IKE第二阶段配置参数。
发起方向接收方发送的 IKE 第二阶段配置参数包括: 发起方认证算 法、 发起方加密算法、 发起方密钥的完全后继保密、 发起方安全协议和发 起方封装模式。
106、 当所述发起方发送的所述 IKE第二阶段配置参数与所述接收方 第二阶段配置参数不一致时,将所述接收方第二阶段配置参数发送至所述 发起方,以便所述发起方按照接收方第二阶段配置参数生成 IKE第二阶段 配置修改参数。
所述接收方第二阶段配置参数和所述 IKE 第二阶段配置修改参数中 包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
发起方发送的 IKE 第二阶段配置参数中的所有参数必须与接收方第 二阶段配置参数中的所有参数完全一致,才可以保证第二阶段 IPSEC协商 成功, 具体来说:
接收方认证算法与接收方认证算法一致, 即釆用相同的算法进行认 证, 比如都釆用 MD5 (Message Digest Algorithm 5, 消息摘要算法第 5 版)或都釆用 SHA1 (Secure Hash Algor i thm,哈希算法)或其它一种或一种 以上算法及其组合。 在第二阶段 IPSEC协商中, 认证算法可适用的对象为 ESP (Encapsulated Security Payload, 压缩安全载荷) 认证或 \和 AH (Authent ica t ion Header , 头部认证)认证;
接收方加密算法与接收方加密算法, 即釆用相同的算法进行加密, 比 ^口采用 3DES (Triple Data Encryption Algorithm, 三重数据力口密算法) 或其它一种或一种以上算法及其组合;
接收方密钥的完全后继保密与接收方密钥的完全后继保密,即釆用相 同的密钥保密方式, 即发起方和接收方都釆用 PFS(perfect forward secrecy, 完全后继保密)或都釆用其它一种或多种保密方式;
接收方安全协议与接收方安全协议,即发起方和接收方釆用相同的密 码算法和协议逻辑;
接收方封装模式与接收方封装模式,即发起方和接收方釆用相同的报 文封装格式。
若发起方发送的 IKE 第二阶段配置参数中的所有参数有一条与接收 方第二阶段配置参数中的参数不一致,即为步骤 106所述的发起方发送的 所述 IKE第二阶段配置参数与接收方第二阶段配置参数不一致。
当发起方发送的所述 IKE 第二阶段配置参数与接收方第二阶段配置 参数不一致时, 接收方将接收方第二阶段配置参数(接收方使用的认证算 法、 加密算法、 密钥的完全后继保密、 安全协议和封装模式)发送至发起 方, 在本实施例中, 依次被称为接收方认证算法、 接收方加密算法、 接收 方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
107、 接收所述发起方发送的所述 IKE第二阶段配置修改参数。
步骤 107所述的 IKE第二阶段配置修改参数由发起方根据接收方发送 的所述接收方第二阶段配置参数生成, 所述第二阶段配置修改参数包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方 安全协议和接收方封装模式, 即发起方完全釆用接收方使用的配置参数, 并再次向接收方发起协商。 1 08、 与所述发起方建立第二阶段 SA。
由于发起方发送的 I KE 第二阶段配置修改参数完全是接收方使用的 配置参数, 因此当接收方接收到 I KE第二阶段配置修改参数时, 通过检测 发现 I KE第二阶段配置修改参数与接收方第二阶段配置参数一致,接收方 向发起方发送第二阶段参数确认信息,以表示接收方接受发起方发起的第 二阶段 I PSEC协商, 同意建立第二阶段 SA。 发起方接收到第二阶段参数 确认信息后, 利用快速模式与接收方建立起第二阶段 SA , 即发起方和接 收方生成并交换第二阶段的密钥后, 利用该密钥对各自的身份进行验证, 验证成功后, 建立起第二阶段 SA。
需要注意的是, 步骤 1 05至 1 08 , 即第二阶段 SA的建立以第一阶段 SA为基础, 即第一阶段 SA会对第二阶段 SA的建立过程中接收方和发起 方之间传输的数据进行加密(使用第一阶段 SA中的加密算法, 认证算法, 密钥等对数据进行加密和认证)。
另一方面, 涉及 I PSEC协商的发起方, 如图 2所示, 包括如下步骤:
201、 向接收方发送 I KE第一阶段配置参数。
发起方向接收方发送的 I KE第一阶段配置参数包括:发起方 I KE版本、 发起方协商模式、 发起方认证方式、 发起方认证算法、 发起方加密算法和 发起方密钥交换算法组。
202、 接收所述接收方发送的接收方第一阶段配置参数。
接收方第一阶段配置参数包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、接收方认证算法、接收方加密算法和接收方密钥交换算 法组。
当接收方接收到 I KE第一阶段配置参数后, 经检测发现, I KE第一阶 段配置参数与接收方使用的配置参数即接收方第一阶段配置参数不一致, 则向发起方发送接收方第一阶段配置参数。 特别说明的是, 只要在 I KE 第一阶段配置参数中有一项参数与接收方第一阶段配置参数中的参数不 一致, 就需要向发起方发送接收方第一阶段配置参数。
显然, 若 I KE第一阶段配置参数与接收方使用的配置参数一致, 则发 起方与接收方直接建立第一阶段 SA。
203、 按照所述接收方第一阶段配置参数生成 IKE第一阶段配置修改 参数。
所述接收方第一阶段配置参数和所述 IKE 第一阶段配置修改参数中 包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证 算法、 接收方加密算法和接收方密钥交换算法组。
发起方生成的 IKE 第一阶段配置修改参数是发起方从接收方接收到 的接收方第一阶段配置参数,即在 IKE第一阶段配置修改参数中釆用与接 收方第一阶段配置参数相同的 IKE版本、 相同的协商模式、相同的认证方 式、 相同的认证算法、 相同的加密算法和相同的密钥交换算法组。
由此可见, IKE第一阶段配置修改参数中的各项参数为: 接收方 IKE 版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密 算法和接收方密钥交换算法组。 完全釆用接收方使用的配置参数的目的 是, 让接收方接收到 IKE第一阶段配置修改参数并确认后, 尽快建立第一 阶段 SA。
204、 向所述接收方发送所述 IKE第一阶段配置修改参数。
205、 当收到所述接收方的第一阶段参数确认信息时, 与所述接收方 建立第一阶段 SA。
由于发起方发送的 IKE 第一阶段配置修改参数完全是接收方使用的 配置参数, 因此当接收方接收到 IKE第一阶段配置修改参数时, 通过检测 发现 IKE第一阶段配置修改参数与接收方第一阶段配置参数一致,接收方 向发起方发送第一阶段参数确认信息,以表示接收方接受发起方发起的第 一阶段 IPSEC协商, 同意建立第一阶段 SA。 发起方接收到第一阶段参数 确认信息后,接收方和发起方通过密钥交换算法组生成各自的密钥并互相 交换密钥, 然后利用交换后的密钥对彼此的身份和交换过程进行验证。 验 证成功, 则建立起第一阶段 SA。
206、 向所述接收方发送 IKE第二阶段配置参数。
IKE第二阶段配置参数包括: 发起方认证算法、 发起方加密算法、 发 起方密钥的完全后继保密、 发起方安全协议和发起方封装模式。
207、 接收所述接收方发送的接收方第二阶段配置参数。
接收方第二阶段配置参数包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
当接收方接收到 I KE第二阶段配置参数后, 经检测发现, I KE第二阶 段配置参数与接收方使用的配置参数即接收方第二阶段配置参数不一致, 则向发起方发送接收方第二阶段配置参数。 特别说明的是, 只要在 I KE 第二阶段配置参数中有一项参数与接收方第二阶段配置参数中的参数不 一致, 就需要向发起方发送接收方第一阶段配置参数。
显然, 若 I KE第二阶段配置参数与接收方使用的配置参数一致, 则发 起方与接收方直接建立第二阶段 SA。
208、 按照所述接收方第二阶段配置参数生成 I KE第二阶段配置修改 参数。
I KE第二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算 法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
发起方生成的 I KE 第二阶段配置修改参数是发起方从接收方接收到 的接收方第二阶段配置参数,即在 I KE第二阶段配置修改参数中釆用与接 收方第二阶段配置参数相同的认证算法、 相同的加密算法、相同的密钥的 完全后继保密、 相同的安全协议和相同的封装模式。
由此可见, I KE第二阶段配置修改参数中的各项参数为: 接收方 I KE 版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密 算法和接收方密钥交换算法组。 完全釆用接收方使用的配置参数的目的 是, 让接收方接收到 I KE第二阶段配置修改参数并确认后, 尽快建立第二 阶段 SA。
209、 向所述接收方发送所述 I KE第二阶段配置修改参数。
I KE第二阶段配置修改参数包括:接收方 I KE版本、接收方协商模式、 接收方认证方式、接收方认证算法、接收方加密算法和接收方密钥交换算 法组。 21 0、 当收到所述接收方的第二阶段参数确认信息时, 与所述发起方 建立第二阶段 SA。
由于发起方发送的 I KE 第二阶段配置修改参数完全是接收方使用的 配置参数, 因此当接收方接收到 I KE第二阶段配置修改参数时, 通过检测 发现 I KE第二阶段配置修改参数与接收方第二阶段配置参数一致,接收方 向发起方发送第二阶段参数确认信息,以表示接收方接受发起方发起的第 二阶段 I PSEC协商, 同意建立第二阶段 SA。 发起方接收到第二阶段参数 确认信息后, 利用快速模式与接收方建立起第二阶段 SA , 即发起方和接 收方生成并交换第二阶段的密钥后, 利用该密钥对各自身份进行验证, 验 证成功后, 建立起第二阶段 SA。
需要注意的是, 步骤 206至 21 0 , 即第二阶段 SA的建立以第一阶段 SA为基础, 即第一阶段 SA会对第二阶段 SA的建立过程中接收方和发起 方之间传输的数据进行加密(使用第一阶段 SA中的加密算法, 认证算法, 密钥等对数据进行加密和认证)。
本实施例提供一种 I PSEC协商的方法, 第一阶段, 接收发起方发送的 互联网密钥交换 I KE 第一阶段配置参数, 当所述发起方发送的所述 I KE 第一阶段配置参数与接收方第一阶段配置参数不一致时,将所述接收方第 一阶段配置参数发送至所述发起方;然后接收所述 I KE第一阶段配置修改 参数并与所述发起方建立第一阶段 SA; 第二阶段, 接收所述发起方发送 的 I KE第二阶段配置参数; 当所述发起方发送的所述 I KE第二阶段配置参 数与所述接收方第二阶段配置参数不一致时,将所述接收方第二阶段配置 参数发送至所述发起方,然后接收所述 I KE第二阶段配置修改参数并与所 述发起方建立第二阶段 SA。 通过上述方案, 在协商参数不合要求时, 可 以直接将正确的参数发送至对端, 减少协商过程消耗的时间, 提高协商效 率。
实施例 2
本发明的一个实施例提供一种 I PSEC协商的方法。 一方面, 涉及 IPSEC协商的接收方, 如图 3所示, 包括如下步骤: 301、 接收发起方发送的互联网密钥交换 IKE第一阶段配置参数。 发起方向接收方发送的 IKE第一阶段配置参数包括:发起方 IKE版本、 发起方协商模式、 发起方认证方式、 发起方认证算法、 发起方加密算法和 发起方密钥交换算法组。
302、 判断 IKE第一阶段配置参数和接收方第一阶段配置参数是否一 致。
当一致时, 执行 305 , 当不一致时, 执行 303。
303、 当所述发起方发送的所述 IKE第一阶段配置参数与接收方第一 阶段配置参数不一致时,将所述接收方第一阶段配置参数发送至所述发起 方,以便所述发起方按照所述接收方第一阶段配置参数生成 IKE第一阶段 配置修改参数。
所述接收方第一阶段配置参数和所述 IKE 第一阶段配置修改参数中 包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证 算法、 接收方加密算法和接收方密钥交换算法组。
接收方第一阶段配置参数中的接收方认证算法为所述接收方存储的 所有认证算法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
接收方向发起方发送接收方使用的配置参数即接收方第一阶段配置 参数, 希望发起方按照接收方第一阶段配置参数生成一套相同的参数即 IKE第一阶段配置修改参数, 以加快 IPSEC第一阶段的协商速度。 但是接 收方并不知道发起方中是否存在接收方使用的认证算法或加密算法,因此 接收方在向发起方发送接收方第一阶段配置参数时,将接收方能够使用的 全部或一部分算法(认证算法或加密算法)发送至发起方。 当发起方接收 到承载有接收方算法集合的接收方第一阶段配置参数后, 从算法集合(接 收方能够使用的全部或一部分算法)中选取一个或几个算法生成第一阶段 配置修改参数, 这样提高了 IPSEC协商的正确率, 提高了协商速度。 可选的, 接收方第一阶段配置参数还包括: 接收方第一阶段 SA超时 时间; 同样地, 发起方同样会为发起方配置第一阶段 SA超时时间。 配置 SA 超时时间的目的是提高加密性能, 即当发起方和接收方已经建立了安 全可靠的第一阶段 SA后, 为该第一阶段 SA设定一个存续期间, 只有在这 个存续期间第一阶段 SA才是可用的,否则即使第一阶段 SA中规定的所有 参数都匹配, 也不能使用该第一阶段 SA。
为提高加密的可靠性, 发起方在生成 I KE第一阶段配置修改参数时, 在 I KE第一阶段配置修改参数规定了第一阶段 SA协商超时时间。 该第一 阶段 S A协商超时时间是发起方配置的发起方第一阶段 S A超时时间和所述 接收方第一阶段 SA超时时间中的最小值。
步骤 303中,接收方发送的接收方第一阶段配置参数承载于接收方至 发起方的 I KE i nf orma t i on中。
发起方发送的 I KE第一阶段配置参数中除了发起方第一阶段 SA超时 时间之外的所有参数必须与接收方第一阶段配置参数中除了接收方第二 阶段 SA超时时间之外的所有参数完全一致, 才可以保证第一阶段 I PSEC 协商成功。
相反, 若发起方发送的 I KE第一阶段配置参数中的所有参数(除了发 起方第一阶段 SA超时时间之外) 有一条与接收方第一阶段配置参数 (除 了接收方第一阶段 SA超时时间之外) 中的参数不一致, 即为步骤 302所 述的发起方发送的所述 I KE 第一阶段配置参数与接收方第一阶段配置参 数不一致。
需要注意的是,当 I KE第一阶段配置参数与接收方第一阶段配置参数 不一致时, 接收方向发起方发送错误类型数据。 以便当 I PSEC协商出现错 误时,方便对系统进行维护或方便发起方根据错误类型数据选择生成合适 的 I KE第一阶段配置修改参数。
304、 接收所述 I KE第一阶段配置修改参数。
305、 向所述发起方发送第一阶段参数确认信息, 以便所述发起方与 所述接收方建立第一阶段 SA。 在建立第一阶段 SA之前, 接收方和发起方必须要确认彼此使用相同 的配置参数。 经检测, 接收方发现第一阶段配置修改参数与接收方第一阶 段配置参数一致, 于是向发起方发送第一阶段参数确认信息。
306、 与所述发起方建立第一阶段 SA。
发起方接收到第一阶段参数确认信息后,接收方和发起方通过密钥交 换算法组生成各自的密钥并互相交换密钥,然后利用交换后的密钥对彼此 的身份和交换过程进行验证。 验证成功, 则建立起第一阶段 SA。
307、 接收所述发起方发送的 I KE第二阶段配置参数。
发起方向接收方发送的 I KE 第二阶段配置参数包括: 发起方认证算 法、 发起方加密算法、 发起方密钥的完全后继保密、 发起方安全协议和发 起方封装模式。
308、 判断 I KE第二阶段配置参数和接收方第二阶段配置参数是否一 致。
当一致时, 执行 31 1 , 当不一致时, 执行 309。
309、 当所述发起方发送的所述 I KE第二阶段配置参数与接收方第二 阶段配置参数不一致时,将所述接收方第二阶段配置参数发送至所述发起 方,以便所述发起方按照接收方第二阶段配置参数生成 I KE第二阶段配置 修改参数。
所述接收方第二阶段配置参数和所述 I KE 第二阶段配置修改参数中 包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
接收方向发起方发送接收方使用的配置参数即接收方第二阶段配置 参数,是希望发起方按照接收方第二阶段配置参数生成一套相同的参数即 I KE第二阶段配置修改参数, 以加快 I PSEC第二阶段的协商速度。 但是接 收方并不知道发起方中是否存在接收方使用的认证算法或加密算法,因此 接收方在向发起方发送接收方第二阶段配置参数时,将接收方能够使用的 全部或一部分算法(认证算法或加密算法)发送至发起方。 当发起方接收 到承载有接收方算法集合的接收方第一阶段配置参数后, 从算法集合(接 收方能够使用的全部或一部分算法)中选取一个或几个算法生成第二阶段 配置修改参数, 这样提高了 I PSEC协商的正确率, 提高了协商速度。
可选的, 接收方第二阶段配置参数还包括: 接收方第二阶段 SA超时 时间; 同样地, 发起方同样会为发起方配置第二阶段 SA超时时间。 配置 SA 超时时间的目的是提高加密性能, 即当发起方和接收方已经建立了安 全可靠的第二阶段 SA后, 为该第二阶段 SA设定一个存续期间, 只有在这 个存续期间第二阶段 SA才是可用的,否则即使第一阶段 SA中规定的所有 参数都匹配, 也不能使用该第二阶段 SA。 需要注意的是, 接收方第二阶 段 SA超时时间可以有两种工作模式, 即时间工作模式和流量工作模式。 简单的说, 时间工作模式是为第二阶段 SA规定一个存续期间, 如本段所 诉。 流量工作模式则是为第二阶段 SA规定一个流量限额, 即在第二阶段 SA 中通过的流量高于一个数据流量阀值 (既可以指单位时间内通过的数 据流量也可以指在规定的时间内通过的数据总流量) 时, 该第二阶段 SA 就不能再使用。 显然, 为确保加密的可靠性, 接收方第二阶段 SA超时时 间可以工作在其中一种模式下, 也可以同时工作在两种模式下。
因此, 发起方在生成 I KE第二阶段配置修改参数时, 在 I KE第二阶段 配置修改参数规定了第二阶段 SA协商超时时间。该第二阶段 SA协商超时 时间是发起方配置的发起方第二阶段 S A超时时间和所述接收方第二阶段 SA超时时间中的最小值。
发起方发送的 I KE第二阶段配置参数中除了发起方第二阶段 SA超时 时间外的所有参数必须与接收方第二阶段配置参数中除了接收方第二阶 段 SA超时时间外的所有参数完全一致, 才可以保证第一阶段 I PSEC协商 成功。
所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 I KE i nf orma t i on ( I KE信息) 中。
相反,若发起方发送的 I KE第二阶段配置参数中除了发起方第二阶段 SA 超时时间外的所有参数有一条与接收方第二阶段配置参数中除了接收 方第二阶段 SA超时时间外的参数不一致, 即为步骤 307所述的发起方发 送的所述 I KE第一阶段配置参数与接收方第一阶段配置参数不一致。
需要注意的是,当 I KE第二阶段配置参数与接收方第二阶段配置参数 不一致时, 接收方向发起方发送错误类型数据。 以便当 I PSEC协商出现错 误时,方便对系统进行维护或方便发起方根据错误类型数据选择生成合适 的 I KE第二阶段配置修改参数。
310、 接收所述 I KE第二阶段配置修改参数。
31 1、 向所述发起方发送第二阶段参数确认信息, 以便所述发起方与 所述接收方建立第二阶段 SA。
由于发起方发送的 I KE 第二阶段配置修改参数完全是接收方使用的 配置参数, 因此当接收方接收到 I KE第二阶段配置修改参数时, 通过检测 发现 I KE第二阶段配置修改参数与接收方第二阶段配置参数一致,接收方 向发起方发送第二阶段参数确认信息,以表示接收方接受发起方发起的第 二阶段 I PSEC协商, 同意建立第二阶段 SA。
312、 与所述发起方建立第二阶段 SA。
发起方接收到第二阶段参数确认信息后,利用快速模式与接收方建立 起第二阶段 SA , 即发起方和接收方生成并交换第二阶段的密钥后, 利用 该密钥对各自的身份进行验证, 验证成功后, 建立起第二阶段 SA。
需要注意的是, 步骤 307至 31 1 , 即第二阶段 SA的建立以第一阶段 SA为基础, 即第一阶段 SA会对第二阶段 SA的建立过程中接收方和发起 方之间传输的数据进行加密(使用第一阶段 SA中的加密算法, 认证算法, 密钥等对数据进行加密和认证)。
另一方面, 涉及 I PSEC协商的发起方, 如图 4所示, 包括如下步骤:
401、 向接收方发送 I KE第一阶段配置参数。
发起方向接收方发送的 I KE第一阶段配置参数包括:发起方 I KE版本、 发起方协商模式、 发起方认证方式、 发起方认证算法、 发起方加密算法和 发起方密钥交换算法组。
402、 接收所述接收方发送的接收方第一阶段配置参数。
接收方第一阶段配置参数包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、接收方认证算法、接收方加密算法和接收方密钥交换算 法组。
4 03、 按照所述接收方第一阶段配置参数生成 I KE第一阶段配置修改 参数。
所述接收方第一阶段配置参数和所述 I KE 第一阶段配置修改参数中 包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、 接收方认证 算法、 接收方加密算法和接收方密钥交换算法组。
所述 I KE 第一阶段配置修改参数中的接收方认证算法为所述接收方 存储的所有认证算法的总和或其中任意一种; 和 /或
所述 I KE第一阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
发起方生成的 I KE 第一阶段配置修改参数是发起方从接收方接收到 的接收方第一阶段配置参数,即在 I KE第一阶段配置修改参数中釆用与接 收方第一阶段配置参数相同的 I KE版本、 相同的协商模式、相同的认证方 式、 相同的认证算法、 相同的加密算法和相同的密钥交换算法组。
由此可见, I KE第一阶段配置修改参数中的各项参数为: 接收方 I KE 版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密 算法和接收方密钥交换算法组。 完全釆用接收方使用的配置参数的目的 是, 让接收方接收到 I KE第一阶段配置修改参数并确认后, 尽快建立第一 阶段 SA。
在生成接收方认证算法、接收方加密算法的过程中, 当发起方接收到 承载有接收方算法集合的接收方第一阶段配置参数后, 从算法集合(接收 方能够使用的全部或一部分算法)中选取一个或几个算法生成第一阶段配 置修改参数。 值得注意的是, 发起方从算法集合中选取的算法必须是发起 方中具有的算法, 否则即使知道接收方使用的算法, 也不可能生成符合接 收方要求的接收方认证算法、 接收方加密算法。
在大多数情况下, 接收方第一阶段配置参数还包括: 接收方第一阶段 SA超时时间; 同样地,发起方同样会为发起方配置第一阶段 SA超时时间。 配置 SA超时时间的目的是提高加密性能, 即当发起方和接收方已经建立 了安全可靠的第一阶段 SA后, 为该第一阶段 SA设定一个存续期间, 只有 在这个存续期间第一阶段 SA才是可用的,否则即使第一阶段 SA中规定的 所有参数都匹配, 也不能使用该第一阶段 SA。
为提高加密的可靠性, 发起方在生成 I KE第一阶段配置修改参数时, 在 I KE第一阶段配置修改参数规定了第一阶段 SA协商超时时间。 该第一 阶段 S A协商超时时间是发起方配置的发起方第一阶段 S A超时时间和所述 接收方第一阶段 SA超时时间中的最小值。
另外, I KE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 I KE i nf orma t i on中。
可选的, 在生成 I KE第一阶段配置修改参数时, 既可以自动生成, 如 前所述 (对步骤 403的解释部分), 也可以手动生成, 即当发起方接收到 接收方发送的接收方第一阶段配置参数后,通过人机交互界面将接收方第 一阶段配置参数发送至管理人员,管理人员根据系统运行的实际情况选择 认证算法、 加密算法、 认证方式、 协商模式、 I KE版本、 密钥交换算法组 中的其中一个或几个。 然后发起方根据管理人员的指令, 生成 I KE第一阶 段配置修改参数。
404、 向所述接收方发送所述 I KE第一阶段配置修改参数。
405、 当收到所述接收方的第一阶段参数确认信息时, 与所述接收方 建立第一阶段 SA。
发起方接收到第一阶段参数确认信息后,接收方和发起方通过密钥交 换算法组生成各自的密钥并互相交换密钥,然后利用交换后的密钥对彼此 的身份和交换过程进行验证。 验证成功, 则建立起第一阶段 SA。
406、 向所述接收方发送 I KE第二阶段配置参数。
发起方向接收方发送的 I KE 第二阶段配置参数包括: 发起方认证算 法、 发起方加密算法、 发起方密钥的完全后继保密、 发起方安全协议和发 起方封装模式。
407、 接收所述接收方发送的接收方第二阶段配置参数。 所述接收方第二阶段配置参数中包括: 接收方认证算法、接收方加密 算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
4 08、 按照所述接收方第二阶段配置参数生成 I KE第二阶段配置修改 参数。 所述 I KE第二阶段配置修改参数中包括: 接收方认证算法、 接收方 加密算法、接收方密钥的完全后继保密、接收方安全协议和接收方封装模 式。
在生成接收方认证算法、接收方加密算法的过程中, 当发起方接收到 承载有接收方算法集合的接收方第一阶段配置参数后, 从算法集合(接收 方能够使用的全部或一部分算法)中选取一个或几个算法生成第一阶段配 置修改参数。 值得注意的是, 发起方从算法集合中选取的算法必须是发起 方中存储的算法, 否则即使知道接收方使用的算法, 也不可能生成符合接 收方要求的接收方认证算法、 接收方加密算法。
在大多数情况下, 接收方第二阶段配置参数还包括: 接收方第二阶段 SA超时时间; 同样地, 发起方会为发起方配置第二阶段 SA超时时间。 配 置 SA超时时间的目的是提高加密性能, 即当发起方和接收方已经建立了 安全可靠的第二阶段 SA后, 为该第二阶段 SA设定一个存续期间, 只有在 这个存续期间第二阶段 SA才是可用的,否则即使第一阶段 SA中规定的所 有参数都匹配, 也不能使用该第二阶段 SA。 需要注意的是, 接收方第二 阶段 SA超时时间可以有两种工作模式,即时间工作模式和流量工作模式。 简单的说, 时间工作模式是为第二阶段 SA规定一个存续期间, 如本段所 诉。 流量工作模式则是为第二阶段 SA规定一个流量限额, 即在第二阶段 SA 中通过的流量高于一个数据流量阀值 (既可以指单位时间内通过的数 据流量也可以指在规定的时间内通过的数据总流量) 时, 该第二阶段 SA 就不能再使用。 显然, 为确保加密的可靠性, 接收方第二阶段 SA超时时 间可以工作在其中一种模式下, 也可以同时工作在两种模式下。
因此, 发起方在生成 I KE第二阶段配置修改参数时, 在 I KE第二阶段 配置修改参数规定了第二阶段 SA协商超时时间。该第二阶段 SA协商超时 时间是发起方配置的发起方第二阶段 S A超时时间和所述接收方第二阶段 SA超时时间中的最小值。
发起方发送的 I KE第二阶段配置参数中除了发起方第二阶段 SA超时 时间外的所有参数必须与接收方第二阶段配置参数中除了接收方第二阶 段 SA超时时间外的所有参数完全一致, 才可以保证第二阶段 I PSEC协商 成功。
所述接收方第二阶段配置参数承载于所述发起方至所述接收方的 I KE i nf orma t i on ( I KE信息) 中。
可选的, 在生成 I KE第二阶段配置修改参数时, 既可以自动生成, 如 前所述 (对步骤 403的解释部分), 也可以手动生成, 即当发起方接收到 接收方发送的接收方第一阶段配置参数后,通过人机交互界面将接收方第 一阶段配置参数发送至管理人员,管理人员根据系统运行的实际情况选择 认证算法、 加密算法、 密钥的完全后继保密、 安全协议和封装模式中的其 中一个或几个。 然后发起方根据管理人员的指令, 生成 I KE第二阶段配置 修改参数。
409、 向所述接收方发送所述 I KE第二阶段配置修改参数。
41 0、 当收到所述接收方的第二阶段参数确认信息时, 与所述发起方 建立第二阶段 SA。
由于发起方发送的 I KE 第二阶段配置修改参数完全是接收方使用的 配置参数, 因此当接收方接收到 I KE第二阶段配置修改参数时, 通过检测 发现 I KE第二阶段配置修改参数与接收方第二阶段配置参数一致,接收方 向发起方发送第二阶段参数确认信息,以表示接收方接受发起方发起的第 二阶段 I PSEC协商, 同意建立第二阶段 SA。 发起方接收到第二阶段参数 确认信息后, 利用快速模式与接收方建立起第二阶段 SA , 即发起方和接 收方生成并交换第二阶段的密钥后, 利用该密钥对各自身份进行验证, 验 证成功后, 建立起第二阶段 SA。
需要注意的是, 步骤 405至 409 , 即第二阶段 SA的建立以第一阶段 SA为基础, 即第一阶段 SA会对第二阶段 SA的建立过程中接收方和发起 方之间传输的数据进行加密(使用第一阶段 SA中的加密算法, 认证算法, 密钥等对数据进行加密和认证)。
本实施例提供一种 IPSEC协商的方法, 第一阶段, 接收发起方发送的 互联网密钥交换 IKE 第一阶段配置参数, 当所述发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段配置参数不一致时,将所述接收方第 一阶段配置参数发送至所述发起方;然后接收所述 IKE第一阶段配置修改 参数并与所述发起方建立第一阶段 SA; 第二阶段, 接收所述发起方发送 的 IKE第二阶段配置参数; 当所述发起方发送的所述 IKE第二阶段配置参 数与所述接收方第二阶段配置参数不一致时,将所述接收方第二阶段配置 参数发送至所述发起方,然后接收所述 IKE第二阶段配置修改参数并与所 述发起方建立第二阶段 SA。 通过上述方案, 在协商参数不合要求时, 可 以直接将正确的参数发送至对端, 减少协商过程消耗的时间, 提高协商效 率。 此外, 在第一阶段配置修改参数和第二阶段配置修改参数增加了第一 阶段 SA协商超时时间和第二阶段 SA协商超时时间, 增加了在第一阶段 SA和第二阶段 SA中数据传输的可靠性。
实施例 3
本发明的一个实施例提供一种 IPSEC协商的装置。
一方面, 涉及 IPSEC协商的接收方, 如图 5所示, 该装置包括: 第一阶段接收单元 51 , 用于接收发起方发送的互联网密钥交换 IKE 第一阶段配置参数。
第一阶段判断单元 52 , 用于判断所述发起方发送的所述 IKE第一阶 段配置参数与接收方第一阶段配置参数是否一致。
第一阶段发送单元 53 , 用于当接收方第一阶段判断单元判断出所述 发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段配置参数不 一致时, 将所述接收方第一阶段配置参数发送至所述发起方, 以便所述发 起方按照所述接收方第一阶段配置参数生成 IKE第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 IKE第一阶段配置修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组。
所述第一阶段接收单元 51 , 还用于接收所述 I KE第一阶段配置修改 参数。
第一阶段安全联盟建立单元 54 ,用于与所述发起方建立第一阶段 S A。 第二阶段接收单元 55 , 用于接收所述发起方发送的 I KE第二阶段配 置参数。
第二阶段判断单元 56 , 用于判断所述发起方发送的所述 I KE第二阶 段配置参数与所述接收方第二阶段配置参数是否一致。
第二阶段发送单元 57 , 用于所述第二阶段判断单元判断出所述发起 方发送的所述 I KE 第二阶段配置参数与所述接收方第二阶段配置参数不 一致时, 将所述接收方第二阶段配置参数发送至所述发起方, 以便所述发 起方按照接收方第二阶段配置参数生成 I KE第二阶段配置修改参数;所述 接收方第二阶段配置参数和所述 I KE第二阶段配置修改参数中包括:接收 方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全 协议和接收方封装模式。
第二阶段接收单元 55 , 还用于接收所述 I KE第二阶段配置修改参数。 第二阶段安全联盟建立单元 58 ,用于与所述发起方建立第二阶段 S A。 需要说明的是, 所述接收方第一阶段配置参数还包括: 接收方第一阶 段 SA超时时间。
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间。 其中, 所述第一阶段 SA协商超时时间是发起方配置的发起方第一阶 段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
进一步的, 所述接收方第二阶段配置参数还包括: 接收方第二阶段
SA超时时间。
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间。 其中, 所述第二阶段 SA协商超时时间是发起方配置的发起方第二阶 段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
进一步的,所述接收方第一阶段配置参数中的接收方认证算法为所述 接收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
进一步的,所述接收方第二阶段配置参数中的接收方认证算法为所述 接收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
进一步的,所述接收方第一阶段发送单元将所述接收方第一阶段配置 参数发送至所述发起方, 具体用于:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的
IKE informa t i on中发送至所述发起方。
进一步的,所述接收方第二阶段发送单元将所述接收方第二阶段配置 参数发送至所述发起方, 具体用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE informa t i on中发送至所述发起方。
进一步的, 所述第一阶段发送单元 53 , 还用于:
向所述发起方发送第一阶段参数确认信息,以便所述发起方与所述接 收方建立第一阶段 SA。
进一步的, 所述接收方第二阶段发送单元 57 , 还用于:
向所述发起方发送第二阶段参数确认信息,以便所述发起方与所述接 收方建立第二阶段 SA。
另一方面, 涉及 IPSEC协商的发起方, 如图 6所示, 该装置包括: 第一阶段发送单元 61 , 用于向接收方发送互联网密钥交换 IKE第一 阶段配置参数。
第一阶段接收单元 62 , 用于接收所述接收方发送的接收方第一阶段 配置参数。
第一阶段参数生成单元 63 , 用于按照所述接收方第一阶段配置参数 生成 IKE 第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 I KE第一阶段配置修改参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、接收方认证算法、接收方加密算法和接收方密钥交换算 法组。
第一阶段发送单元 61 , 还用于向所述接收方发送所述 I KE第一阶段 配置修改参数。
第一阶段安全联盟建立单元 64 , 用于当收到所述接收方的第一阶段 参数确认信息时, 与所述接收方建立第一阶段 SA。
第二阶段发送单元 65 , 用于向所述接收方发送 I KE第二阶段配置参 数。
第二阶段接收单元 66 , 用于接收所述接收方发送的接收方第二阶段 配置参数。
第二阶段参数生成单元 67 , 用于按照所述接收方第二阶段配置参数 生成 I KE 第二阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE第二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式。
所述第二阶段发送单元 65 , 还用于向所述接收方发送所述 I KE第二 阶段配置修改参数。
第二阶段安全联盟建立单元 66 , 用于当收到所述接收方的第二阶段 参数确认信息时, 与所述发起方建立第二阶段 SA。
进一步的, 所述发起方第一阶段配置参数还包括: 发起方第一阶段 SA超时时间。
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间。 其中,所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
进一步的, 所述发起方第二阶段配置参数还包括: 发起方第二阶段
SA超时时间。
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间。 其中,所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
进一步的,所述 IKE第一阶段配置修改参数中的接收方认证算法为所 述接收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述 IKE第一阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
进一步的,所述 IKE第二阶段配置修改参数中的接收方认证算法为所 述接收方存储的所有认证算法的总和或其中任意一种; 和 /或
所述 IKE第二阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
进一步的, 所述第一阶段发送单元 61将所述 IKE第一阶段配置修改 参数发送至所述接收方, 具体用于:
将所述 IKE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 IKE information中发送至所述接收方。
进一步的, 所述第二阶段发送单元 61具体用于:
将所述 IKE 第二阶段配置修改参数承载于所述发起方至所述接收方 的 IKE information中发送至所述接收方。
本实施例提供一种 IPSEC协商的装置, 第一阶段, 接收发起方发送的 互联网密钥交换 IKE 第一阶段配置参数, 当所述发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段配置参数不一致时,将所述接收方第 一阶段配置参数发送至所述发起方;然后接收所述 IKE第一阶段配置修改 参数并与所述发起方建立第一阶段 SA; 第二阶段, 接收所述发起方发送 的 IKE第二阶段配置参数; 当所述发起方发送的所述 IKE第二阶段配置参 数与所述接收方第二阶段配置参数不一致时,将所述接收方第二阶段配置 参数发送至所述发起方,然后接收所述 IKE第二阶段配置修改参数并与所 述发起方建立第二阶段 SA。 通过上述方案, 在协商参数不合要求时, 可 以直接将正确的参数发送至对端, 减少协商过程消耗的时间, 提高协商效 率。
实施例 4 本发明的一个实施例提供一种 IPSEC协商的设备。
一方面, 涉及 IPSEC协商的接收方设备, 如图 7所示, 该设备包括: 通信接口 71 , 用于接收发起方发送的互联网密钥交换 IKE第一阶段 配置参数。
处理器 72 , 用于当所述发起方发送的所述 IKE第一阶段配置参数与 接收方第一阶段配置参数不一致时,将所述接收方第一阶段配置参数发送 至所述发起方, 以便所述发起方按照所述接收方第一阶段配置参数生成 IKE第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 IKE第 一阶段配置修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方 认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组。
所述通信接口 71 , 还用于接收所述 I KE第一阶段配置修改参数。 所述处理器 72 , 还用于与所述发起方建立第一阶段 SA。
所述通信接口 71 , 还用于接收所述发起方发送的 IKE第二阶段配置 参数;
所述通信接口 71 , 还用于当所述处理器检测到所述发起方发送的所 述 IKE第二阶段配置参数与所述接收方第二阶段配置参数不一致时,将所 述接收方第二阶段配置参数发送至所述发起方,以便所述发起方按照接收 方第二阶段配置参数生成 IKE第二阶段配置修改参数;所述接收方第二阶 段配置参数和所述 IKE第二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、接收方密钥的完全后继保密、接收方安全协议和接收方 封装模式。
所述通信接口 71 , 还用于接收所述 I KE第二阶段配置修改参数。 所述处理器 72 , 还用于与所述发起方建立第二阶段 SA。
存储器 73 , 用于存储所述接收方第一阶段配置参数、 所述 IKE第一 阶段配置修改参数、 所述接收方第二阶段配置参数、 所述 IKE第二阶段配 置修改参数和处理器执行操作时需要的代码。
总线 74 , 用于连接所述处理器 72、 所述通信接口 71 和所述存储器
73 , 并为所述处理器 72、 所述通信接口 71 和所述存储器 73提供数据传 输的物理通道。
进一步的, 所述存储器 73 中存储的所述接收方第一阶段配置参数还 包括: 接收方第一阶段 SA超时时间。
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间。 其中, 所述第一阶段 SA协商超时时间是发起方配置的发起方第一阶 段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
进一步的, 所述存储器 73 中存储的所述接收方第二阶段配置参数还 包括: 接收方第二阶段 SA超时时间。
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间。 其中, 所述第二阶段 SA协商超时时间是发起方配置的发起方第二阶 段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
进一步的, 所述存储器 73 中存储的所述接收方第一阶段配置参数中 的接收方认证算法为所述接收方存储的所有认证算法的总和或其中任意 一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
进一步的, 所述存储器 73 中存储的所述接收方第二阶段配置参数中 的接收方认证算法为所述接收方存储的所有认证算法的总和或其中任意 一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法,为所述接收方存 储的所有加密算法的总和或其中任意一种。
进一步的, 所述通信接口 71 , 具体用于:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的 I KE i nf orma t i on中发送至所述发起方。
进一步的, 所述通信接口 71 , 具体还用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 I KE i nf orma t i on中发送至所述发起方。
进一步的, 所述通信接口 71还用于在接收所述 I KE第一阶段配置修 改参数后, 向所述发起方发送第一阶段参数确认信息, 以便所述发起方与 所述接收方建立第一阶段 SA。
进一步的, 所述通信接口 71还用于在接收所述 IKE第二阶段配置修 改参数后, 向所述发起方发送第二阶段参数确认信息, 以便所述发起方与 所述接收方建立第二阶段 SA。
另一方面, 涉及 IPSEC协商的发起方设备, 该设备包括:
其特征在于, 包括:
通信接口 81 , 用于向接收方发送互联网密钥交换 IKE第一阶段配置 参数。
所述通信接口 81 , 还用于接收所述接收方发送的接收方第一阶段配 置参数。
处理器 82 , 用于按照所述接收方第一阶段配置参数生成 IKE第一阶 段配置修改参数;所述接收方第一阶段配置参数和所述 IKE第一阶段配置 修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组。
所述通信接口 81 , 还用于向所述接收方发送所述 IKE第一阶段配置 修改参数。
所述处理器 82 , 还用于当收到所述接收方的第一阶段参数确认信息 时, 与所述接收方建立第一阶段 SA。
所述通信接口 81 , 还用于向所述接收方发送 IKE第二阶段配置参数。 所述通信接口 81 , 还用于接收所述接收方发送的接收方第二阶段配 置参数。
所述处理器 82 , 还用于按照所述接收方第二阶段配置参数生成 IKE 第二阶段配置修改参数;所述接收方第二阶段配置参数和所述 IKE第二阶 段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥 的完全后继保密、 接收方安全协议和接收方封装模式。
所述通信接口 81 , 还用于向所述接收方发送所述 IKE第二阶段配置 修改参数。 所述处理器 82 , 还用于当所述通信接口接收到所述接收方的第二阶 段参数确认信息时, 与所述发起方建立第二阶段 SA。
存储器 83 , 用于存储所述接收方第一阶段配置参数、 所述 I KE第一 阶段配置修改参数、所述接收方第二阶段配置参数和所述 I KE第二阶段配 置修改参数和处理器执行操作时需要的代码。
总线 84 , 用于连接所述处理器 82、 所述通信接口 81 和所述存储器 83 , 并为所述处理器 82、 所述通信接口 81 和所述存储器 83提供数据传 输的物理通道。
进一步的, 所述存储器 83 中存储的所述发起方第一阶段配置参数还 包括: 发起方第一阶段 SA超时时间。
所述 I KE第一阶段配置修改参数还包括:第一阶段 SA协商超时时间。 其中,所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
进一步的, 所述存储器 83 中存储的所述发起方第二阶段配置参数还 包括: 发起方第二阶段 SA超时时间。
所述 I KE第二阶段配置修改参数还包括:第二阶段 SA协商超时时间。 其中,所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
进一步的, 所述存储器 83中存储的所述 I KE第一阶段配置修改参数 中的接收方认证算法为所述接收方存储的所有认证算法的总和或其中任 意一种; 和 /或
所述 I KE第一阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。
进一步的, 所述存储器 83中存储的所述 I KE第二阶段配置修改参数 中的接收方认证算法为所述接收方存储的所有认证算法的总和或其中任 意一种; 和 /或
所述 I KE第二阶段配置修改参数中的接收方加密算法,为所述接收方 存储的所有加密算法的总和或其中任意一种。 进一步的, 所述通信接口 81 , 具体用于:
将所述 IKE 第一阶段配置修改参数承载于所述发起方至所述接收方 的 IKE informa t i on中发送至所述接收方。
进一步的, 所述通信接口 81 , 具体还用于:
将所述 IKE 第二阶段配置修改参数承载于所述发起方至所述接收方 的 IKE informa t i on中发送至所述接收方。
再一方面, 如图 9所示, 提供一种 IPSEC协商的系统, 包括: 上述的 任意一种接收方设备和任意一种发起方设备。
本实施例提供一种 IPSEC协商的方法, 第一阶段, 接收发起方发送的 互联网密钥交换 IKE 第一阶段配置参数, 当所述发起方发送的所述 IKE 第一阶段配置参数与接收方第一阶段配置参数不一致时,将所述接收方第 一阶段配置参数发送至所述发起方;然后接收所述 IKE第一阶段配置修改 参数并与所述发起方建立第一阶段 SA; 第二阶段, 接收所述发起方发送 的 IKE第二阶段配置参数; 当所述发起方发送的所述 IKE第二阶段配置参 数与所述接收方第二阶段配置参数不一致时,将所述接收方第二阶段配置 参数发送至所述发起方,然后接收所述 IKE第二阶段配置修改参数并与所 述发起方建立第二阶段 SA。 通过上述方案, 在协商参数不合要求时, 可 以直接将正确的参数发送至对端, 减少协商过程消耗的时间, 提高协商效 率。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到 本发明可借助软件加必需的通用硬件的方式来实现, 当然也可以通过硬 件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式 体现出来, 该计算机软件产品存储在可读取的存储介质中, 如计算机的软 盘, 硬盘或光盘等, 包括若干指令用以使得一台计算机设备(可以是个人 计算机, 服务器, 或者网络设备等) 执行本发明各个实施例所述的方法。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局 限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可 轻易想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发 明的保护范围应以所述权利要求的保护范围为准。

Claims

权 利 要 求 书
1、 一种 IPSEC协商的方法, 其特征在于, 包括:
接收发起方发送的互联网密钥交换 IKE第一阶段配置参数;
当所述发起方发送的所述 IKE第一阶段配置参数与接收方第一阶段配 置参数不一致时, 将所述接收方第一阶段配置参数发送至所述发起方, 以 便所述发起方按照所述接收方第一阶段配置参数生成 IKE第一阶段配置修 改参数; 所述接收方第一阶段配置参数和所述 IKE第一阶段配置修改参数 中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方式、 接收方认 证算法、 接收方加密算法和接收方密钥交换算法组;
接收所述发起方发送的 IKE第一阶段配置修改参数;
与所述发起方建立第一阶段安全联盟 SA;
接收所述发起方发送的 IKE第二阶段配置参数;
当所述发起方发送的所述 IKE第二阶段配置参数与所述接收方第二阶 段配置参数不一致时,将所述接收方第二阶段配置参数发送至所述发起方, 以便所述发起方按照接收方第二阶段配置参数生成 IKE第二阶段配置修改 参数; 所述接收方第二阶段配置参数和所述 IKE第二阶段配置修改参数中 包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模式;
接收所述发起方发送的所述 IKE第二阶段配置修改参数;
与所述发起方建立第二阶段 SA。
2、 根据权利要求 1所述的方法, 其特征在于, 所述接收方第一阶段配 置参数还包括: 接收方第一阶段 SA超时时间;
所述 IKE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中,所述第一阶段 S A协商超时时间是发起方配置的发起方第一阶段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
3、 根据权利要求 1所述的方法, 其特征在于, 所述接收方第二阶段配 置参数还包括: 接收方第二阶段 SA超时时间;
所述 IKE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中,所述第二阶段 S A协商超时时间是发起方配置的发起方第二阶段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
4、 根据权利要求 1所述的方法, 其特征在于, 所述接收方第一阶段配 置参数中的接收方认证算法为所述接收方存储的所有认证算法的总和或其 中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
5、 根据权利要求 1所述的方法, 其特征在于, 所述接收方第二阶段配 置参数中的接收方认证算法为所述接收方存储的所有认证算法的总和或其 中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
6、 根据权利要 1至 5中任意一项所述的方法, 其特征在于, 所述将所 述接收方第一阶段配置参数发送至所述发起方, 具体包括:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
7、 根据权利要 1至 5中任意一项所述的方法, 其特征在于, 所述将所 述接收方第二阶段配置参数发送至所述发起方, 具体包括:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
8、 根据权利要求 1至 7中任意一项所述的方法, 其特征在于, 在接收 所述 IKE第一阶段配置修改参数后, 还包括:
向所述发起方发送第一阶段参数确认信息, 以便所述发起方与所述接 收方建立第一阶段 SA。
9、 根据权利要求 1至 7中任意一项所述的方法, 其特征在于, 在接收 所述 IKE第二阶段配置修改参数后, 还包括:
向所述发起方发送第二阶段参数确认信息, 以便所述发起方与所述接 收方建立第二阶段 SA。
1 0、 一种 I PSEC协商的方法, 其特征在于, 包括:
向接收方发送互联网密钥交换 I KE第一阶段配置参数;
接收所述接收方发送的接收方第一阶段配置参数;
按照所述接收方第一阶段配置参数生成 I KE第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 I KE第一阶段配置修改参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组;
向所述接收方发送所述 I KE第一阶段配置修改参数;
当收到所述接收方的第一阶段参数确认信息时, 与所述接收方建立第 一阶段安全联盟 SA;
向所述接收方发送 I KE第二阶段配置参数;
接收所述接收方发送的接收方第二阶段配置参数;
按照所述接收方第二阶段配置参数生成 I KE第二阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE第二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方 安全协议和接收方封装模式;
向所述接收方发送所述 I KE第二阶段配置修改参数;
当收到所述接收方的第二阶段参数确认信息时, 与所述发起方建立第 二阶段 SA。
1 1、 根据权利要求 1 0所述的方法, 其特征在于, 所述发起方第一阶段 配置参数还包括: 发起方第一阶段 SA超时时间;
所述 I KE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
1 2、 根据权利要求 1 0所述的方法, 其特征在于, 所述发起方第二阶段 配置参数还包括: 发起方第二阶段 SA超时时间;
所述 I KE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
13、 根据权利要求 10所述的方法, 其特征在于, 所述 IKE第一阶段配 置修改参数中的接收方认证算法为所述接收方存储的所有认证算法的总和 或其中任意一种; 和 /或
所述 IKE第一阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
14、 根据权利要求 10所述的方法, 其特征在于, 所述 IKE第二阶段配 置修改参数中的接收方认证算法为所述接收方存储的所有认证算法的总和 或其中任意一种; 和 /或
所述 IKE第二阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
15、 根据权利要 10至 14中任意一项所述的方法, 其特征在于, 所述 将所述 IKE第一阶段配置修改参数发送至所述接收方, 具体包括:
将所述 IKE第一阶段配置修改参数承载于所述发起方至所述接收方的 IKE informa t i on中发送至所述接收方。
16、 根据权利要 10至 14中任意一项所述的方法, 其特征在于, 所述 将所述 IKE第二阶段配置修改参数发送至所述接收方, 具体包括:
将所述 IKE第二阶段配置修改参数承载于所述发起方至所述接收方的 IKE informa t i on中发送至所述接收方。
17、 一种 IPSEC协商的装置, 其特征在于, 包括:
第一阶段接收单元, 用于接收发起方发送的互联网密钥交换 IKE第一 阶段配置参数;
第一阶段判断单元, 用于判断所述发起方发送的所述 IKE第一阶段配 置参数与接收方第一阶段配置参数是否一致;
第一阶段发送单元, 用于当第一阶段判断单元判断出所述发起方发送 的所述 IKE第一阶段配置参数与接收方第一阶段配置参数不一致时, 将所 述接收方第一阶段配置参数发送至所述发起方, 以便所述发起方按照所述 接收方第一阶段配置参数生成 IKE第一阶段配置修改参数; 所述接收方第 一阶段配置参数和所述 IKE第一阶段配置修改参数中包括: 接收方 IKE版 本、 接收方协商模式、 接收方认证方式、 接收方认证算法、 接收方加密算 法和接收方密钥交换算法组;
所述第一阶段接收单元,还用于接收所述 IKE第一阶段配置修改参数; 第一阶段安全联盟建立单元, 用于与所述发起方建立第一阶段安全联 盟 SA;
第二阶段接收单元, 用于接收所述发起方发送的 IKE第二阶段配置参 数;
第二阶段判断单元, 用于判断所述发起方发送的所述 IKE第二阶段配 置参数与所述接收方第二阶段配置参数是否一致;
第二阶段发送单元, 用于所述第二阶段判断单元判断出所述发起方发 送的所述 IKE 第二阶段配置参数与所述接收方第二阶段配置参数不一致 时, 将所述接收方第二阶段配置参数发送至所述发起方, 以便所述发起方 按照接收方第二阶段配置参数生成 IKE第二阶段配置修改参数; 所述接收 方第二阶段配置参数和所述 IKE第二阶段配置修改参数中包括: 接收方认 证算法、 接收方加密算法、 接收方密钥的完全后继保密、 接收方安全协议 和接收方封装模式;
所述第二阶段接收单元,还用于接收所述 IKE第二阶段配置修改参数; 第二阶段安全联盟建立单元, 用于与所述发起方建立第二阶段 SA。
18、 根据权利要求 17所述的装置, 其特征在于, 所述接收方第一阶段 配置参数还包括: 接收方第一阶段 SA超时时间;
所述 IKE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中,所述第一阶段 S A协商超时时间是发起方配置的发起方第一阶段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
19、 根据权利要求 17所述的装置, 其特征在于, 所述接收方第二阶段 配置参数还包括: 接收方第二阶段 SA超时时间;
所述 IKE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中,所述第二阶段 S A协商超时时间是发起方配置的发起方第二阶段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
20、 根据权利要求 17所述的装置, 其特征在于, 所述接收方第一阶段 配置参数中的接收方认证算法为所述接收方存储的所有认证算法的总和或 其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
21、 根据权利要求 17所述的装置, 其特征在于, 所述接收方第二阶段 配置参数中的接收方认证算法为所述接收方存储的所有认证算法的总和或 其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
22、 根据权利要 17至 21 中任意一项所述的装置, 其特征在于, 所述 第一阶段发送单元, 具体用于:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
23、 根据权利要 17至 21 中任意一项所述的装置, 其特征在于, 所述 第二阶段发送单元, 具体用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
24、 根据权利要求 17至 23中任意一项所述的装置, 其特征在于, 所 述第一阶段发送单元, 还用于:
向所述发起方发送第一阶段参数确认信息, 以便所述发起方与所述接 收方建立第一阶段 SA。
25、 根据权利要求 17至 23中任意一项所述的装置, 其特征在于, 所 述第二阶段发送单元, 还用于:
向所述发起方发送第二阶段参数确认信息, 以便所述发起方与所述接 收方建立第二阶段 SA。
26、 一种 IPSEC协商的装置, 其特征在于, 包括: 第一阶段发送单元, 用于向接收方发送互联网密钥交换 I KE第一阶段 配置参数;
第一阶段接收单元, 用于接收所述接收方发送的接收方第一阶段配置 参数;
第一阶段参数生成单元, 用于按照所述接收方第一阶段配置参数生成 I KE 第一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 I KE 第 一阶段配置修改参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方 认证方式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组; 所述第一阶段发送单元, 还用于向所述接收方发送所述 I KE第一阶段 配置修改参数;
第一阶段安全联盟建立单元, 用于当收到所述接收方的第一阶段参数 确认信息时, 与所述接收方建立第一阶段安全联盟 SA ;
第二阶段发送单元, 用于向所述接收方发送 I KE第二阶段配置参数; 第二阶段接收单元, 用于接收所述接收方发送的接收方第二阶段配置 参数;
第二阶段参数生成单元, 用于按照所述接收方第二阶段配置参数生成 I KE 第二阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE 第 二阶段配置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方 密钥的完全后继保密、 接收方安全协议和接收方封装模式;
所述第二阶段发送单元, 还用于向所述接收方发送所述 I KE第二阶段 配置修改参数;
第二阶段安全联盟建立单元, 用于当收到所述接收方的第二阶段参数 确认信息时, 与所述发起方建立第二阶段 SA。
27、 根据权利要求 26所述的装置, 其特征在于, 所述发起方第一阶段 配置参数还包括: 发起方第一阶段 SA超时时间;
所述 I KE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
28、 根据权利要求 26所述的装置, 其特征在于, 所述发起方第二阶段 配置参数还包括: 发起方第二阶段 SA超时时间;
所述 IKE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
29、 根据权利要求 26所述的装置, 其特征在于, 所述 IKE第一阶段配 置修改参数中的接收方认证算法为所述接收方存储的所有认证算法的总和 或其中任意一种; 和 /或
所述 IKE第一阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
30、 根据权利要求 26所述的装置, 其特征在于, 所述 IKE第二阶段配 置修改参数中的接收方认证算法为所述接收方存储的所有认证算法的总和 或其中任意一种; 和 /或
所述 IKE第二阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
31、 根据权利要 26至 30中任意一项所述的装置, 其特征在于, 所述 第一阶段发送单元, 具体用于:
将所述 IKE第一阶段配置修改参数承载于所述发起方至所述接收方的 IKE informa t i on中发送至所述接收方。
32、 根据权利要 26至 30中任意一项所述的装置, 其特征在于, 所述 第一阶段发送单元, 具体用于:
将所述 IKE第二阶段配置修改参数承载于所述发起方至所述接收方的 IKE informa t i on中发送至所述接收方。
33、 一种 IPSEC协商的接收方设备, 其特征在于, 包括:
通信接口, 用于接收发起方发送的互联网密钥交换 IKE第一阶段配置 参数;
处理器, 用于当所述发起方发送的所述 IKE第一阶段配置参数与接收 方第一阶段配置参数不一致时, 将所述接收方第一阶段配置参数发送至所 述发起方, 以便所述发起方按照所述接收方第一阶段配置参数生成 IKE第 一阶段配置修改参数; 所述接收方第一阶段配置参数和所述 IKE第一阶段 配置修改参数中包括: 接收方 IKE版本、 接收方协商模式、 接收方认证方 式、 接收方认证算法、 接收方加密算法和接收方密钥交换算法组;
所述通信接口, 还用于接收所述 IKE第一阶段配置修改参数; 所述处理器, 还用于与所述发起方建立第一阶段安全联盟 SA;
所述通信接口,还用于接收所述发起方发送的 IKE第二阶段配置参数; 所述通信接口,还用于当所述处理器检测到所述发起方发送的所述 IKE 第二阶段配置参数与所述接收方第二阶段配置参数不一致时, 将所述接收 方第二阶段配置参数发送至所述发起方, 以便所述发起方按照接收方第二 阶段配置参数生成 IKE第二阶段配置修改参数; 所述接收方第二阶段配置 参数和所述 IKE第二阶段配置修改参数中包括: 接收方认证算法、 接收方 加密算法、 接收方密钥的完全后继保密、 接收方安全协议和接收方封装模 式;
所述通信接口, 还用于接收所述 IKE第二阶段配置修改参数; 所述处理器, 还用于与所述发起方建立第二阶段 SA;
存储器, 用于存储所述接收方第一阶段配置参数、 所述 IKE第一阶段 配置修改参数、 所述接收方第二阶段配置参数、 所述 IKE第二阶段配置修 改参数和处理器执行操作时需要的代码;
总线, 用于连接所述处理器、 所述通信接口和所述存储器, 并为所述 处理器、 所述通信接口和所述存储器提供数据传输的物理通道。
34、 根据权利要求 33所述的接收方设备, 其特征在于, 所述存储器中 存储的所述接收方第一阶段配置参数还包括: 接收方第一阶段 SA 超时时 间;
所述 IKE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中,所述第一阶段 S A协商超时时间是发起方配置的发起方第一阶段 SA超时时间和所述接收方第一阶段 SA超时时间中的最小值。
35、 根据权利要求 33所述的接收方设备, 其特征在于, 所述存储器中 存储的所述接收方第二阶段配置参数还包括: 接收方第二阶段 SA 超时时 间;
所述 IKE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中,所述第二阶段 S A协商超时时间是发起方配置的发起方第二阶段 SA超时时间和所述接收方第二阶段 SA超时时间的最小值。
36、 根据权利要求 33所述的接收方设备, 其特征在于, 所述存储器中 存储的所述接收方第一阶段配置参数中的接收方认证算法为所述接收方存 储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第一阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
37、 根据权利要求 33所述的接收方设备, 其特征在于, 所述存储器中 存储的所述接收方第二阶段配置参数中的接收方认证算法为所述接收方存 储的所有认证算法的总和或其中任意一种; 和 /或
所述接收方第二阶段配置参数中的接收方加密算法, 为所述接收方存 储的所有加密算法的总和或其中任意一种。
38、 根据权利要 33至 37中任意一项所述的接收方设备, 其特征在于, 所述通信接口, 具体用于:
将所述接收方第一阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
39、 根据权利要 33至 37中任意一项所述的接收方设备, 其特征在于, 所述通信接口, 具体还用于:
将所述接收方第二阶段配置参数承载于所述接收方至所述发起方的 IKE inf orma t i on中发送至所述发起方。
40、 根据权利要求 33至 39中任意一项所述的接收方设备, 其特征在 于, 所述通信接口还用于在接收所述 IKE第一阶段配置修改参数后, 向所 述发起方发送第一阶段参数确认信息, 以便所述发起方与所述接收方建立 第一阶段 SA。
41、 根据权利要求 33至 39中任意一项所述的接收方设备, 其特征在 于, 所述通信接口还用于在接收所述 I KE第二阶段配置修改参数后, 向所 述发起方发送第二阶段参数确认信息, 以便所述发起方与所述接收方建立 第二阶段 SA。
42、 一种 I PSEC协商的发起方设备, 其特征在于, 包括:
通信接口,用于向接收方发送互联网密钥交换 I KE第一阶段配置参数; 所述通信接口, 还用于接收所述接收方发送的接收方第一阶段配置参 数;
处理器, 用于按照所述接收方第一阶段配置参数生成 I KE第一阶段配 置修改参数; 所述接收方第一阶段配置参数和所述 I KE第一阶段配置修改 参数中包括: 接收方 I KE版本、 接收方协商模式、 接收方认证方式、 接收 方认证算法、 接收方加密算法和接收方密钥交换算法组;
所述通信接口, 还用于向所述接收方发送所述 I KE第一阶段配置修改 参数;
所述处理器, 还用于当收到所述接收方的第一阶段参数确认信息时, 与所述接收方建立第一阶段安全联盟 SA;
所述通信接口, 还用于向所述接收方发送 I KE第二阶段配置参数; 所述通信接口, 还用于接收所述接收方发送的接收方第二阶段配置参 数;
所述处理器, 还用于按照所述接收方第二阶段配置参数生成 I KE第二 阶段配置修改参数; 所述接收方第二阶段配置参数和所述 I KE第二阶段配 置修改参数中包括: 接收方认证算法、 接收方加密算法、 接收方密钥的完 全后继保密、 接收方安全协议和接收方封装模式;
所述通信接口, 还用于向所述接收方发送所述 I KE第二阶段配置修改 参数;
所述处理器, 还用于当所述通信接口接收到所述接收方的第二阶段参 数确认信息时, 与所述发起方建立第二阶段 SA;
存储器, 用于存储所述接收方第一阶段配置参数、 所述 I KE第一阶段 配置修改参数、 所述接收方第二阶段配置参数和所述 I KE第二阶段配置修 改参数和处理器执行操作时需要的代码;
总线, 用于连接所述处理器、 所述通信接口和所述存储器, 并为所述 处理器、 所述通信接口和所述存储器提供数据传输的物理通道。
4 3、 根据权利要求 42所述的发起方设备, 其特征在于, 所述存储器存 储的所述发起方第一阶段配置参数还包括: 发起方第一阶段 S A超时时间; 所述 I KE第一阶段配置修改参数还包括: 第一阶段 SA协商超时时间; 其中, 所述第一阶段 SA协商超时时间是所述发起方第一阶段 SA超时 时间和所述接收方配置的接收方第一阶段 SA超时时间中的最小值。
44、 根据权利要求 42所述的发起方设备, 其特征在于, 所述存储器存 储的所述发起方第二阶段配置参数还包括: 发起方第二阶段 S A超时时间; 所述 I KE第二阶段配置修改参数还包括: 第二阶段 SA协商超时时间; 其中, 所述第二阶段 SA协商超时时间是所述发起方第二阶段 SA超时 时间和所述接收方配置的接收方第二阶段 S A超时时间的最小值。
45、 根据权利要求 42所述的发起方设备, 其特征在于, 所述存储器存 储的所述 I KE第一阶段配置修改参数中的接收方认证算法为所述接收方存 储的所有认证算法的总和或其中任意一种; 和 /或
所述 I KE第一阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
46、 根据权利要求 42所述的发起方设备, 其特征在于, 所述存储器存 储的所述 I KE第二阶段配置修改参数中的接收方认证算法为所述接收方存 储的所有认证算法的总和或其中任意一种; 和 /或
所述 I KE第二阶段配置修改参数中的接收方加密算法, 为所述接收方 存储的所有加密算法的总和或其中任意一种。
47、 根据权利要 42至 46中任意一项所述的发起方设备, 其特征在于, 所述通信接口, 具体用于:
将所述 I KE第一阶段配置修改参数承载于所述发起方至所述接收方的 I KE i nf orma t i on中发送至所述接收方。
48、 根据权利要 42至 46中任意一项所述的发起方设备, 其特征在于, 所述通信接口, 具体还用于:
将所述 IKE第二阶段配置修改参数承载于所述发起方至所述接收方的 IKE informa t i on中发送至所述接收方。
49、 一种 IPSEC协商的系统, 其特征在于, 包括: 如权利要求 33 至 41任意一项所述的接收方设备, 以及如权利要求 42至 48任意一项所述的 发起方设备。
PCT/CN2012/087399 2012-12-25 2012-12-25 一种ipsec协商的方法、装置、设备和系统 WO2014100967A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2012/087399 WO2014100967A1 (zh) 2012-12-25 2012-12-25 一种ipsec协商的方法、装置、设备和系统
CN201280003089.6A CN103392323B (zh) 2012-12-25 2012-12-25 一种ipsec协商的方法和设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/087399 WO2014100967A1 (zh) 2012-12-25 2012-12-25 一种ipsec协商的方法、装置、设备和系统

Publications (1)

Publication Number Publication Date
WO2014100967A1 true WO2014100967A1 (zh) 2014-07-03

Family

ID=49535845

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/087399 WO2014100967A1 (zh) 2012-12-25 2012-12-25 一种ipsec协商的方法、装置、设备和系统

Country Status (2)

Country Link
CN (1) CN103392323B (zh)
WO (1) WO2014100967A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650107A (zh) * 2018-06-26 2020-01-03 杭州海康威视数字技术股份有限公司 一种数据处理方法、装置及系统
CN109639553B (zh) * 2018-12-25 2021-04-27 杭州迪普科技股份有限公司 IPSec协商方法和装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845523A (zh) * 2005-04-07 2006-10-11 华为技术有限公司 互通无线局域网中实现服务质量协商的方法
CN1863048A (zh) * 2005-05-11 2006-11-15 中兴通讯股份有限公司 用户与接入设备间因特网密钥交换协商方法
CN102761553A (zh) * 2012-07-23 2012-10-31 杭州华三通信技术有限公司 IPSec SA协商方法及装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6915437B2 (en) * 2000-12-20 2005-07-05 Microsoft Corporation System and method for improved network security
TWI264890B (en) * 2005-01-26 2006-10-21 Zyxel Communications Corp Method to avoid IKE process conflict
CN101626374B (zh) * 2008-07-11 2013-08-28 成都市华为赛门铁克科技有限公司 IPv6网络中协商SA的方法、系统和设备
CN101527729A (zh) * 2009-05-05 2009-09-09 杭州华三通信技术有限公司 一种ike可靠报文协商的方法、设备及系统
CN102025742A (zh) * 2010-12-16 2011-04-20 成都市华为赛门铁克科技有限公司 一种ike报文的协商方法和设备

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1845523A (zh) * 2005-04-07 2006-10-11 华为技术有限公司 互通无线局域网中实现服务质量协商的方法
CN1863048A (zh) * 2005-05-11 2006-11-15 中兴通讯股份有限公司 用户与接入设备间因特网密钥交换协商方法
CN102761553A (zh) * 2012-07-23 2012-10-31 杭州华三通信技术有限公司 IPSec SA协商方法及装置

Also Published As

Publication number Publication date
CN103392323A (zh) 2013-11-13
CN103392323B (zh) 2016-09-28

Similar Documents

Publication Publication Date Title
US11451614B2 (en) Cloud authenticated offline file sharing
US10003966B2 (en) Key configuration method and apparatus
RU2739435C2 (ru) Система беспроводной связи с несколькими уровнями безопасности
US20160269176A1 (en) Key Configuration Method, System, and Apparatus
EP3700124B1 (en) Security authentication method, configuration method, and related device
EP3057351B1 (en) Access method, system, and device of terminal, and computer storage medium
US10305684B2 (en) Secure connection method for network device, related apparatus, and system
CN106788989B (zh) 一种建立安全加密信道的方法及设备
WO2014180296A1 (zh) 一种设备之间建立连接的方法、配置设备和无线设备
US11736304B2 (en) Secure authentication of remote equipment
WO2010003335A1 (zh) IPv6网络中协商SA的方法、系统和设备
US10097524B2 (en) Network configuration method, and related apparatus and system
WO2014127751A1 (zh) 无线终端配置方法及装置和无线终端
WO2014100967A1 (zh) 一种ipsec协商的方法、装置、设备和系统
WO2009030166A1 (fr) Procédé, système et équipement destinés à établir une association de sécurité
CN108990052B (zh) Wpa2协议脆弱性的检测方法
TWI641271B (zh) 一種存取認證方法、ue和存取設備
WO2016176902A1 (zh) 一种终端认证方法、管理终端及申请终端
WO2016187850A1 (zh) 无线通信网络中设备配置的方法、装置及系统
WO2014071886A1 (zh) 一种信息配置方法、设备及系统
US20220255911A1 (en) Method for Secure Communication and Device
CN111147344A (zh) 一种虚拟专用网络实现方法、装置、设备及介质
JP2013211633A (ja) 通信装置、暗号化通信システム、暗号化通信プログラム、および暗号化通信方法

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12891034

Country of ref document: EP

Kind code of ref document: A1