Using the tcp-algorithm-id command, you can specify TCP algorithm ids to represent algorithms supported by the keychain uniquely.
Using the undo tcp-algorithm-id command, you can restore the default values specified by Internet Assigned Numbers Authority (IANA).
By default, the algorithm IDs supported by IANA are used.
tcp-algorithm-id md5 md5-algorithm-id
tcp-algorithm-id sha-1 sha1-algorithm-id
tcp-algorithm-id hmac-md5 hmac-md5-algorithm-id
tcp-algorithm-id hmac-sha1-12 hmac-sha1-12-algorithm-id
tcp-algorithm-id hmac-sha1-20 hmac-sha1-20-algorithm-id
tcp-algorithm-id hmac-sha-256 hmac-sha-256-algorithm-id
tcp-algorithm-id sha-256 sha-256-algorithm-id
tcp-algorithm-id sm3 sm3-algorithm-id
tcp-algorithm-id aes-128-cmac aes-128-cmac-id
undo tcp-algorithm-id md5
undo tcp-algorithm-id sha-1
undo tcp-algorithm-id hmac-md5
undo tcp-algorithm-id hmac-sha1-12
undo tcp-algorithm-id hmac-sha1-20
undo tcp-algorithm-id hmac-sha-256
undo tcp-algorithm-id sha-256
undo tcp-algorithm-id sm3
undo tcp-algorithm-id aes-128-cmac
Parameter | Description | Value |
---|---|---|
md5-algorithm-id |
Specifies the TCP algorithm ID to represent the MD5 algorithm. |
The value is a string of 1 to 63 characters. The default value is 3. |
sha-1 |
Indicates that SHA-1 is used for packet encryption and authentication. To ensure high security, do not use the SHA-1 algorithm. |
The length of the key is 20 bytes. |
sha1-algorithm-id |
Specifies the TCP algorithm ID to represent the SHA-1 algorithm. |
The value is a string of 1 to 63 characters. The default value is 4. |
hmac-md5 |
Indicates that HMAC-MD5 is used for packet encryption and authentication. |
The length of the key is 16 bytes. |
hmac-md5-algorithm-id |
Specifies the TCP algorithm ID to represent the HMAC-MD5 algorithm. |
The value is a string of 1 to 63 characters. The default value is 5. |
hmac-sha1-12 |
Indicates that HMAC-SHA1-12 is used for packet encryption and authentication. |
The length of the key is 12 bytes. |
hmac-sha1-12-algorithm-id |
Specifies the TCP algorithm ID to represent the HMAC-SHA1-12 algorithm. |
The value is a string of 1 to 63 characters. The default value is 2. |
hmac-sha1-20 |
Indicates that HMAC-SHA1-20 is used for packet encryption and authentication. |
The length of the key is 20 bytes. |
hmac-sha1-20-algorithm-id |
Specifies the TCP algorithm ID to represent the HMAC-SHA1-20 algorithm. |
The value is a string of 1 to 63 characters. The default value is 6. |
hmac-sha-256 |
Indicates that HMAC-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. |
The length of the key is 32 bytes. |
hmac-sha-256-algorithm-id |
Specifies the TCP algorithm ID to represent the HMAC-SHA-256 algorithm. |
The value is a string of 1 to 63 characters. The default value is 7. |
sha-256 |
Indicates that SHA-256 is used for packet encryption and authentication. |
The length of the key is 32 bytes. |
sha-256-algorithm-id |
Specifies the TCP algorithm ID to represent the SHA-256 algorithm. |
The value is a string of 1 to 63 characters. The default value is 8. |
sm3 |
Indicates that SM3 is used for packet encryption and authentication. |
The length of the key is 32 bytes. |
sm3-algorithm-id |
Specifies the TCP algorithm ID to represent the SM3 algorithm. |
The value is a string of 1 to 63 characters. The default value is 9. |
aes-128-cmac |
Indicates that AES-128-CMAC is used for packet encryption and authentication. |
The key length is 16 bytes. |
aes-128-cmac-id |
Specifies the TCP algorithm ID to represent the AES-128-CMAC algorithm. |
The value is a string of 1 to 63 characters. The default value is 10. |
md5 |
Indicates that MD5 is used for packet encryption and authentication. To ensure high security, do not use the MD5 algorithm. |
The length of the key is 16 bytes. |
Usage Scenario
A keychain ensures a secure protocol packet transmission by changing the authentication algorithm and key dynamically. Packets to be transmitted over non-TCP and TCP connections are authenticated using the authentication and encryption algorithms corresponding to a key ID. The difference lies in that the TCP connection needs to be authenticated to enhance the security.
The TCP connection is authenticated using the authentication algorithm specified by the algorithm ID. The algorithm ID is not defined by the IANA. Different vendors use different algorithm IDs to identify authentication algorithms. When two devices of different vendors are connected, ensure that algorithm IDs configured on the two devices are identical.Prerequisites
The authentication algorithm used to authenticate the TCP connection needs to be specified.
Implementation Procedure
The algorithm IDs configured for the two communication devices must be identical:
The characteristics of each authentication algorithm are as follows:Precautions
Each algorithm ID uniquely identifies an algorithm.