SNMPv3 supports two methods of encryption: Authentication and Privacy.
Authentication uses a message digest to protect SNMP messages from tampering or replay attacks. The SNMPv3 protocol uses the HMAC-SHA-1 (Hash-based Message Authentication Code) algorithm to ensure the authenticity of SNMP messages. Each SNMPv3 message has an Authentication Header that includes a message digest based on the message data and a secret key known only to the sender and receiver.
Privacy encrypts SNMP messages to protect them from eavesdropping by unauthorized parties. The SNMPv3 protocol uses the AES (Advanced Encryption Standard) algorithm in the Counter Mode with CBC-MAC (CCM) mode of operation to encrypt SNMP messages.
In SNMPv3, each SNMPv3 message has an optional Privacy Header that includes an encrypted data part, which is a ciphertext of message data using the AES algorithm. The encrypted data is decrypted using the Receiver’s secret key to retrieve the original message.
Overall, SNMPv3 provides strong security features to protect SNMP messages from tampering, replay, and eavesdropping attacks through the use of Authentication and Privacy mechanisms.