snmp_agent_usm.c
error_t snmpEncryptData(const SnmpUserEntry *user, SnmpMessage *message, uint64_t *salt)
Data encryption.
Definition: snmp_agent_usm.c:563
__weak_func error_t cfbEncrypt(const CipherAlgo *cipher, void *context, uint_t s, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CFB encryption.
Definition: cfb.c:64
error_t snmpDecryptData(const SnmpUserEntry *user, SnmpMessage *message)
Data decryption.
Definition: snmp_agent_usm.c:705
__weak_func error_t cbcEncrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *p, uint8_t *c, size_t length)
CBC encryption.
Definition: cbc.c:61
error_t snmpCheckEngineTime(SnmpAgentContext *context, SnmpMessage *message)
Replay protection.
Definition: snmp_agent_usm.c:411
error_t asn1DumpObject(const uint8_t *data, size_t length, uint_t level)
Display an ASN.1 data object.
Definition: asn1.c:706
error_t asn1ReadTag(const uint8_t *data, size_t length, Asn1Tag *tag)
Read an ASN.1 tag from the input stream.
Definition: asn1.c:52
SNMP agent (Simple Network Management Protocol)
void snmpCloneSecurityParameters(SnmpUserEntry *user, const SnmpUserEntry *cloneFromUser)
Clone security parameters.
Definition: snmp_agent_usm.c:306
SnmpUserEntry * snmpCreateUserEntry(SnmpAgentContext *context)
Create a new user entry.
Definition: snmp_agent_usm.c:75
const uint8_t usmStatsNotInTimeWindowsObject[10]
Definition: snmp_agent_usm.c:58
__weak_func error_t cfbDecrypt(const CipherAlgo *cipher, void *context, uint_t s, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CFB decryption.
Definition: cfb.c:124
SnmpUserEntry * snmpFindUserEntry(SnmpAgentContext *context, const char_t *name, size_t length)
Search the user table for a given user name.
Definition: snmp_agent_usm.c:130
__weak_func error_t aesInit(AesContext *context, const uint8_t *key, size_t keyLen)
Key expansion.
Definition: aes.c:242
error_t snmpAuthIncomingMessage(const SnmpUserEntry *user, SnmpMessage *message)
Authenticate incoming SNMP message.
Definition: snmp_agent_usm.c:509
error_t snmpCheckSecurityParameters(const SnmpUserEntry *user, SnmpMessage *message, const uint8_t *engineId, size_t engineIdLen)
Check security parameters.
Definition: snmp_agent_usm.c:329
const HashAlgo * snmpGetHashAlgo(SnmpAuthProtocol authProtocol)
Get the hash algorithm to be used for a given authentication protocol.
Definition: snmp_agent_usm.c:827
General definitions for cryptographic algorithms.
__weak_func error_t desInit(DesContext *context, const uint8_t *key, size_t keyLen)
Initialize a DES context using the supplied key.
Definition: des.c:296
error_t asn1WriteTag(Asn1Tag *tag, bool_t reverse, uint8_t *data, size_t *written)
Write an ASN.1 tag.
Definition: asn1.c:334
const uint8_t usmStatsWrongDigestsObject[10]
Definition: snmp_agent_usm.c:64
const uint8_t usmStatsUnknownEngineIdsObject[10]
Definition: snmp_agent_usm.c:62
void snmpChangeKey(const HashAlgo *hashAlgo, const uint8_t *random, const uint8_t *delta, SnmpKey *key)
Change secret key.
Definition: snmp_agent_usm.c:277
__weak_func void hmacUpdate(HmacContext *context, const void *data, size_t length)
Update the HMAC context with a portion of the message being hashed.
Definition: hmac.c:201
size_t snmpGetMacLength(SnmpAuthProtocol authProtocol)
Get the length of the truncated MAC for a given authentication protocol.
Definition: snmp_agent_usm.c:903
const uint8_t usmStatsDecryptionErrorsObject[10]
Definition: snmp_agent_usm.c:66
__weak_func void hmacFinal(HmacContext *context, uint8_t *digest)
Finish the HMAC calculation.
Definition: hmac.c:218
__weak_func error_t cbcDecrypt(const CipherAlgo *cipher, void *context, uint8_t *iv, const uint8_t *c, uint8_t *p, size_t length)
CBC decryption.
Definition: cbc.c:108
error_t snmpLocalizeKey(SnmpAuthProtocol authProtocol, const uint8_t *engineId, size_t engineIdLen, SnmpKey *key, SnmpKey *localizedKey)
Key localization algorithm.
Definition: snmp_agent_usm.c:238
error_t snmpGenerateKey(SnmpAuthProtocol authProtocol, const char_t *password, SnmpKey *key)
Password to key algorithm.
Definition: snmp_agent_usm.c:178
const uint8_t usmStatsUnsupportedSecLevelsObject[10]
Definition: snmp_agent_usm.c:56
error_t snmpAuthOutgoingMessage(const SnmpUserEntry *user, SnmpMessage *message)
Authenticate outgoing SNMP message.
Definition: snmp_agent_usm.c:469
void snmpRefreshEngineTime(SnmpAgentContext *context)
Refresh SNMP engine time.
Definition: snmp_agent_usm.c:374
TCP/IP stack core.
__weak_func error_t hmacInit(HmacContext *context, const HashAlgo *hash, const void *key, size_t keyLen)
Initialize HMAC calculation.
Definition: hmac.c:140
error_t asn1CheckTag(const Asn1Tag *tag, bool_t constructed, uint_t objClass, uint_t objType)
Enforce the type of a specified tag.
Definition: asn1.c:653
HMAC (Keyed-Hashing for Message Authentication)
Debugging facilities.
ASN.1 (Abstract Syntax Notation One)
User-based Security Model (USM) for SNMPv3.
const uint8_t usmStatsUnknownUserNamesObject[10]
Definition: snmp_agent_usm.c:60