An SNMPv3 PDU (Protocol Data Unit) is authenticated using one of the following authentication protocols:
1. HMAC-MD5: This protocol uses a hashed message authentication code (HMAC) with the MD5 hashing algorithm to ensure message integrity and authentication.
1. HMAC-SHA: This protocol uses a HMAC with the SHA hashing algorithm to ensure message integrity and authentication.
1. HMAC-SHA-96: This protocol is similar to HMAC-SHA but uses a truncated 96-bit HMAC value for efficiency.
To generate an authentication code, the PDU’s authentication parameters (such as the username and authentication key) are combined with the PDU data and hashed using the selected authentication protocol. The resulting authentication code is then added to the PDU header and sent to the receiving SNMP agent. Upon receiving the PDU, the agent re-computes the authentication code using the same parameters and protocol. If the computed code matches the code received in the PDU header, the PDU is considered authenticated. Otherwise, the PDU is discarded as invalid.