My Project
Functions
hmac.h File Reference

Go to the source code of this file.

Functions

int wc_HmacSetKey (Hmac *hmac, int type, const byte *key, word32 keySz)
 This function initializes an Hmac object, setting its encryption type, key and HMAC length. More...
 
int wc_HmacUpdate (Hmac *hmac, const byte *in, word32 sz)
 This function updates the message to authenticate using HMAC. It should be called after the Hmac object has been initialized with wc_HmacSetKey. This function may be called multiple times to update the message to hash. After calling wc_HmacUpdate as desired, one should call wc_HmacFinal to obtain the final authenticated message tag. More...
 
int wc_HmacFinal (Hmac *hmac, byte *out)
 This function computes the final hash of an Hmac object's message. More...
 
int wolfSSL_GetHmacMaxSize (void)
 This function returns the largest HMAC digest size available based on the configured cipher suites. More...
 
int wc_HKDF (int type, const byte *inKey, word32 inKeySz, const byte *salt, word32 saltSz, const byte *info, word32 infoSz, byte *out, word32 outSz)
 This function provides access to a HMAC Key Derivation Function (HKDF). It utilizes HMAC to convert inKey, with an optional salt and optional info into a derived key, which it stores in out. The hash type defaults to MD5 if 0 or NULL is given. More...
 
int wc_HKDF_Extract (int type, const byte *salt, word32 saltSz, const byte *inKey, word32 inKeySz, byte *out)
 This function provides access to a HMAC Key Derivation Function (HKDF). It utilizes HMAC to convert inKey, with an optional salt into a derived key, which it stores in out. The hash type defaults to MD5 if 0 or NULL is given. More...
 
int wc_HKDF_Extract_ex (int type, const byte *salt, word32 saltSz, const byte *inKey, word32 inKeySz, byte *out, void *heap, int devId)
 This function provides access to a HMAC Key Derivation Function (HKDF). It utilizes HMAC to convert inKey, with an optional salt into a derived key, which it stores in out. The hash type defaults to MD5 if 0 or NULL is given. This is the _ex version adding heap hint and device identifier. More...
 
int wc_HKDF_Expand (int type, const byte *inKey, word32 inKeySz, const byte *info, word32 infoSz, byte *out, word32 outSz)
 This function provides access to a HMAC Key Derivation Function (HKDF). It utilizes HMAC to convert inKey, with optional info into a derived key, which it stores in out. The hash type defaults to MD5 if 0 or NULL is given. More...
 
int wc_HKDF_Expand_ex (int type, const byte *inKey, word32 inKeySz, const byte *info, word32 infoSz, byte *out, word32 outSz, void *heap, int devId)
 This function provides access to a HMAC Key Derivation Function (HKDF). It utilizes HMAC to convert inKey, with optional info into a derived key, which it stores in out. The hash type defaults to MD5 if 0 or NULL is given. This is the _ex version adding heap hint and device identifier. More...
 
int wc_Tls13_HKDF_Extract (byte *prk, const byte *salt, word32 saltLen, byte *ikm, word32 ikmLen, int digest)
 This function provides access to RFC 5869 HMAC-based Extract-and-Expand Key Derivation Function (HKDF) for TLS v1.3 key derivation. More...
 
int wc_Tls13_HKDF_Extract_ex (byte *prk, const byte *salt, word32 saltLen, byte *ikm, word32 ikmLen, int digest, void *heap, int devId)
 This function provides access to RFC 5869 HMAC-based Extract-and-Expand Key Derivation Function (HKDF) for TLS v1.3 key derivation. This is the _ex version adding heap hint and device identifier. More...
 
int wc_Tls13_HKDF_Expand_Label_ex (byte *okm, word32 okmLen, const byte *prk, word32 prkLen, const byte *protocol, word32 protocolLen, const byte *label, word32 labelLen, const byte *info, word32 infoLen, int digest, void *heap, int devId)
 Expand data using HMAC, salt and label and info. TLS v1.3 defines this function for key derivation. This is the _ex version adding heap hint and device identifier. More...
 
int wc_Tls13_HKDF_Expand_Label (byte *okm, word32 okmLen, const byte *prk, word32 prkLen, const byte *protocol, word32 protocolLen, const byte *label, word32 labelLen, const byte *info, word32 infoLen, int digest)
 Expand data using HMAC, salt and label and info. TLS v1.3 defines this function for key derivation. This is the _ex version adding heap hint and device identifier. More...
 
int wc_Tls13_HKDF_Expand_Label_Alloc (byte *okm, word32 okmLen, const byte *prk, word32 prkLen, const byte *protocol, word32 protocolLen, const byte *label, word32 labelLen, const byte *info, word32 infoLen, int digest, void *heap)
 This functions is very similar to wc_Tls13_HKDF_Expand_Label(), but it allocates memory if the stack space usually used isn't enough. Expand data using HMAC, salt and label and info. TLS v1.3 defines this function for key derivation. This is the _ex version adding heap hint and device identifier. More...