Next: Random number generation, Previous: Public key algorithms, Up: Using GnuTLS as a cryptographic library [Contents][Index]
The available operations to access hash functions and hash-MAC (HMAC) algorithms are shown below. HMAC algorithms provided keyed hash functionality. The supported MAC and HMAC algorithms are listed in Figure 8.3.
GNUTLS_MAC_UNKNOWNUnknown MAC algorithm.
GNUTLS_MAC_NULLNULL MAC algorithm (empty output).
GNUTLS_MAC_MD5HMAC-MD5 algorithm.
GNUTLS_MAC_SHA1HMAC-SHA-1 algorithm.
GNUTLS_MAC_RMD160HMAC-RMD160 algorithm.
GNUTLS_MAC_MD2HMAC-MD2 algorithm.
GNUTLS_MAC_SHA256HMAC-SHA-256 algorithm.
GNUTLS_MAC_SHA384HMAC-SHA-384 algorithm.
GNUTLS_MAC_SHA512HMAC-SHA-512 algorithm.
GNUTLS_MAC_SHA224HMAC-SHA-224 algorithm.
GNUTLS_MAC_AEADMAC implicit through AEAD cipher.
GNUTLS_MAC_UMAC_96The UMAC-96 MAC algorithm.
GNUTLS_MAC_UMAC_128The UMAC-128 MAC algorithm.
Figure 8.3: The supported MAC and HMAC algorithms.
int gnutls_hmac_init (gnutls_hmac_hd_t * dig, gnutls_mac_algorithm_t algorithm, const void * key, size_t keylen)int gnutls_hmac (gnutls_hmac_hd_t handle, const void * ptext, size_t ptext_len)void gnutls_hmac_output (gnutls_hmac_hd_t handle, void * digest)void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void * digest)int gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm)int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, const void * key, size_t keylen, const void * ptext, size_t ptext_len, void * digest)The available functions to access hash functions are shown below. The supported hash functions are shown in Figure 8.4.
int gnutls_hash_init (gnutls_hash_hd_t * dig, gnutls_digest_algorithm_t algorithm)int gnutls_hash (gnutls_hash_hd_t handle, const void * ptext, size_t ptext_len)void gnutls_hash_output (gnutls_hash_hd_t handle, void * digest)void gnutls_hash_deinit (gnutls_hash_hd_t handle, void * digest)int gnutls_hash_get_len (gnutls_digest_algorithm_t algorithm)int gnutls_hash_fast (gnutls_digest_algorithm_t algorithm, const void * ptext, size_t ptext_len, void * digest)int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void * result, size_t * result_size)GNUTLS_DIG_UNKNOWNUnknown hash algorithm.
GNUTLS_DIG_NULLNULL hash algorithm (empty output).
GNUTLS_DIG_MD5MD5 algorithm.
GNUTLS_DIG_SHA1SHA-1 algorithm.
GNUTLS_DIG_RMD160RMD160 algorithm.
GNUTLS_DIG_MD2MD2 algorithm.
GNUTLS_DIG_SHA256SHA-256 algorithm.
GNUTLS_DIG_SHA384SHA-384 algorithm.
GNUTLS_DIG_SHA512SHA-512 algorithm.
GNUTLS_DIG_SHA224SHA-224 algorithm.
Figure 8.4: The supported hash algorithms.
Next: Random number generation, Previous: Public key algorithms, Up: Using GnuTLS as a cryptographic library [Contents][Index]