summaryrefslogtreecommitdiff
path: root/doc/gcrypt.texi
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-11-21 21:34:21 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2013-11-21 21:34:21 +0200
commita34448c929b13bfb7b66d69169c89e7319a18b31 (patch)
treeb53d13266af4d87a0fda5353333f957e3fd0c0e1 /doc/gcrypt.texi
parentdbfa651618693da7ea73b4d2d00d4efd411bfb46 (diff)
downloadlibgcrypt-a34448c929b13bfb7b66d69169c89e7319a18b31.tar.gz
Add GMAC to MAC API
* cipher/Makefile.am: Add 'mac-gmac.c'. * cipher/mac-gmac.c: New. * cipher/mac-internal.h (gcry_mac_handle): Add 'u.gcm'. (_gcry_mac_type_spec_gmac_aes, _gcry_mac_type_spec_gmac_twofish) (_gcry_mac_type_spec_gmac_serpent, _gcry_mac_type_spec_gmac_seed) (_gcry_mac_type_spec_gmac_camellia): New externs. * cipher/mac.c (mac_list): Add GMAC specifications. * doc/gcrypt.texi: Add mention of GMAC. * src/gcrypt.h.in (gcry_mac_algos): Add GCM algorithms. * tests/basic.c (check_one_mac): Add support for MAC IVs. (check_mac): Add support for MAC IVs and add GMAC test vectors. * tests/bench-slope.c (mac_bench): Iterate algorithm numbers to 499. * tests/benchmark.c (mac_bench): Iterate algorithm numbers to 499. -- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'doc/gcrypt.texi')
-rw-r--r--doc/gcrypt.texi34
1 files changed, 27 insertions, 7 deletions
diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi
index 1f6ceec7..4870a1c1 100644
--- a/doc/gcrypt.texi
+++ b/doc/gcrypt.texi
@@ -3529,6 +3529,26 @@ block cipher algorithm.
This is CMAC message authentication algorithm based on the GOST 28147-89
block cipher algorithm.
+@item GCRY_MAC_GMAC_AES
+This is GMAC (GCM mode based MAC) message authentication algorithm based on
+the AES block cipher algorithm.
+
+@item GCRY_MAC_GMAC_CAMELLIA
+This is GMAC message authentication algorithm based on the Camellia
+block cipher algorithm.
+
+@item GCRY_MAC_GMAC_TWOFISH
+This is GMAC message authentication algorithm based on the Twofish
+block cipher algorithm.
+
+@item GCRY_MAC_GMAC_SERPENT
+This is GMAC message authentication algorithm based on the Serpent
+block cipher algorithm.
+
+@item GCRY_MAC_GMAC_SEED
+This is GMAC message authentication algorithm based on the SEED
+block cipher algorithm.
+
@end table
@c end table of MAC algorithms
@@ -3574,13 +3594,13 @@ underlying block cipher.
@end deftypefun
-@c Some MAC algorithms need initialization vector to be set, which can be
-@c performed with function:
-@c @c
-@c @deftypefun gcry_error_t gcry_mac_setiv (gcry_mac_hd_t @var{h}, const void *@var{iv}, size_t @var{ivlen})
-@c @c
-@c Set the IV to the value of @var{iv} of length @var{ivlen} bytes.
-@c @end deftypefun
+GMAC algorithms need initialization vector to be set, which can be
+performed with function:
+
+@deftypefun gcry_error_t gcry_mac_setiv (gcry_mac_hd_t @var{h}, const void *@var{iv}, size_t @var{ivlen})
+
+Set the IV to the value of @var{iv} of length @var{ivlen} bytes.
+@end deftypefun
After you are done with the MAC calculation, you should release the resources