摘要 |
A key configuration method includes acquiring, by a configuration device, a public key of a second device, and sending the public key of the second device to a first device, generating, by the first device, a first shared key, and sending information for obtaining the first shared key to the second device using the public key of the second device, or generating, by the first device, a first shared key using the public key of the second device, and sending information for obtaining the first shared key to the second device, and generating, by the second device, the first shared key using a private key of the second device and the information for obtaining the first shared key, where the first shared key is used for a secure connection between the first device and the second device. |
主权项 |
1. A key configuration method, comprising:
receiving, by a first device, a public key of a second device that is sent by a configuration device after the configuration device acquires the public key of the second device; generating, by the first device, a first shared key according to a key exchange algorithm using the public key of the second device and a private key of the first device; and sending a public key of the first device to the second device such that the second device generates the first shared key according to the key exchange algorithm using a private key of the second device and the public key of the first device, wherein the key exchange algorithm is pre-agreed by the first device and the second device, and wherein the first shared key is used for a secure connection between the first device and the second device. |