summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-06-28 16:54:30 +0300
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-06-28 16:54:30 +0300
commit7afa9278fce2f0996fa616d4da47f7f106a12673 (patch)
treee849eb54e5d9e03f7bb7821db919b1c276cd35ff
parentf3054866e5e0b6833cac931c7960077a2ea7ab43 (diff)
downloadgnutls-7afa9278fce2f0996fa616d4da47f7f106a12673.tar.gz
lib: document gnutls_hmac_fast vs nonce relationship
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
-rw-r--r--lib/crypto-api.c3
-rw-r--r--lib/includes/gnutls/gnutls.h.in10
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/crypto-api.c b/lib/crypto-api.c
index 0cd3d21723..8af3f3b7dc 100644
--- a/lib/crypto-api.c
+++ b/lib/crypto-api.c
@@ -464,7 +464,8 @@ unsigned gnutls_hmac_get_len(gnutls_mac_algorithm_t algorithm)
* @digest: is the output value of the hash
*
* This convenience function will hash the given data and return output
- * on a single call.
+ * on a single call. Note, this call will not work for MAC algorithms
+ * that require nonce (like UMAC or GMAC).
*
* Returns: Zero or a negative error code on error.
*
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 074967603a..11652a8c2b 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -278,13 +278,13 @@ typedef enum {
* @GNUTLS_MAC_STREEBOG_256: HMAC GOST R 34.11-2001 (Streebog) algorithm, 256 bit.
* @GNUTLS_MAC_STREEBOG_512: HMAC GOST R 34.11-2001 (Streebog) algorithm, 512 bit.
* @GNUTLS_MAC_AEAD: MAC implicit through AEAD cipher.
- * @GNUTLS_MAC_UMAC_96: The UMAC-96 MAC algorithm.
- * @GNUTLS_MAC_UMAC_128: The UMAC-128 MAC algorithm.
+ * @GNUTLS_MAC_UMAC_96: The UMAC-96 MAC algorithm (requires nonce).
+ * @GNUTLS_MAC_UMAC_128: The UMAC-128 MAC algorithm (requires nonce).
* @GNUTLS_MAC_AES_CMAC_128: The AES-CMAC-128 MAC algorithm.
* @GNUTLS_MAC_AES_CMAC_256: The AES-CMAC-256 MAC algorithm.
- * @GNUTLS_MAC_AES_GMAC_128: The AES-GMAC-128 MAC algorithm.
- * @GNUTLS_MAC_AES_GMAC_192: The AES-GMAC-192 MAC algorithm.
- * @GNUTLS_MAC_AES_GMAC_256: The AES-GMAC-256 MAC algorithm.
+ * @GNUTLS_MAC_AES_GMAC_128: The AES-GMAC-128 MAC algorithm (requires nonce).
+ * @GNUTLS_MAC_AES_GMAC_192: The AES-GMAC-192 MAC algorithm (requires nonce).
+ * @GNUTLS_MAC_AES_GMAC_256: The AES-GMAC-256 MAC algorithm (requires nonce).
* @GNUTLS_MAC_SHA3_224: Reserved; unimplemented.
* @GNUTLS_MAC_SHA3_256: Reserved; unimplemented.
* @GNUTLS_MAC_SHA3_384: Reserved; unimplemented.