Using the algorithm command, you can specify the algorithm that should be associated with the key-id.
Using the undo algorithm command, you can delete the algorithm configured for that key-id.
By default, no algorithm is configured.
Parameter | Description | Value |
---|---|---|
md5 |
Indicates that MD5 is used for packet encryption and authentication. To ensure high security, do not use the MD5 algorithm. |
- |
sha-1 |
Indicates that SHA-1 is used for packet encryption and authentication. To ensure high security, do not use the SHA-1 algorithm. |
- |
hmac-md5 |
Indicates that HMAC (Keyed-Hashing for Message Authentication)-Message Digest 5 (MD5) is used for packet encryption and authentication. |
- |
hmac-sha1-12 |
Indicates that HMAC-Secure Hash Algorithm 1-12 (SHA1-12) is used for packet encryption and authentication. |
- |
hmac-sha1-20 |
Indicates that HMAC-SHA1-20 is used for packet encryption and authentication. |
- |
hmac-sha-256 |
Indicates that HMAC-Secure Hash Algorithm-256 (SHA-256) is used for packet encryption and authentication. HAMC-SHA-256 authentication mode is better and more secure than other authentication modes. To ensure high security, HAMC-SHA-256 authentication algorithm is recommended. |
- |
sha-256 |
Indicates that SHA-256 is used for packet encryption and authentication. |
- |
sm3 |
Indicates that SM3 is used for packet encryption and authentication. |
- |
aes-128-cmac |
Specifies that message authentication algorithm used is AES-128-CMAC. |
- |
Usage Scenario
A keychain ensures the security of application protocol packet transmission by dynamically changing the authentication algorithm and key string. A keychain consists of multiple key IDs, each of which needs to be configured with an authentication algorithm. Different key IDs are valid within different time periods, ensuring dynamic change of keychain authentication algorithms.
Packets are authenticated and encrypted based on the authentication algorithm associated with a specified key ID, improving the packet transmission security. The characteristics of each authentication algorithm are as follows:Prerequisites
Key IDs have been configured.
Precautions
Key IDs configured on the sender and receiver of packets must correspond to the same authentication and encryption algorithms. Otherwise, packet transmission fails for not passing the authentication.
If algorithm is not configured, key-id will never be active. The aes-128-cmac algorithm is used only when the key of the keychain is bound to TCP-AO authentication. Keychain authentication cannot use the aes-128-cmac algorithm.