The invention discloses a method for using a
quantum key through IKEv2 negotiation, and relates to the technical field of communication. The technical problem that an existing network
encryption method is easy to crack and is not safe enough can be solved. The method comprises the following steps: generating a
quantum key QK by using a
quantum key distribution protocol QKD, and replace the sharedkey g^ir generated by QK or combined with Diffie-Hellman
key exchange giving a specific step of calculating a key material and a HASH value by using a QK value, so that generated IKE SA and
IPSEC SA keys indirectly use a quantum key; A quantum key bill QKT load is newly added in an ISAKMP protocol, the QK key generated this time is uniquely identified, and the QKT load is used for replacing or combining with the KE load of Diffie-Hellman
key exchange to carry out on the KE load of Hellman
key exchange, and a specific exchange step during IKEv2 negotiation is given. According to the invention,a novel quantum
encryption technology can be combined, so that the traditional
IPSEC technology can generate IKE SA and CHILD SA by using a quantum key in an IKEv2 negotiation stage, and the
encryption in the negotiation stage and the encryption of a tunnel message are improved in security due to the use of the quantum key.