diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-21 21:34:21 +0200 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-11-21 21:34:21 +0200 |
commit | a34448c929b13bfb7b66d69169c89e7319a18b31 (patch) | |
tree | b53d13266af4d87a0fda5353333f957e3fd0c0e1 /cipher/mac.c | |
parent | dbfa651618693da7ea73b4d2d00d4efd411bfb46 (diff) | |
download | libgcrypt-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 'cipher/mac.c')
-rw-r--r-- | cipher/mac.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cipher/mac.c b/cipher/mac.c index 8d1dec05..5ac87291 100644 --- a/cipher/mac.c +++ b/cipher/mac.c @@ -74,21 +74,26 @@ static gcry_mac_spec_t *mac_list[] = { #endif #if USE_AES &_gcry_mac_type_spec_cmac_aes, + &_gcry_mac_type_spec_gmac_aes, #endif #if USE_TWOFISH &_gcry_mac_type_spec_cmac_twofish, + &_gcry_mac_type_spec_gmac_twofish, #endif #if USE_SERPENT &_gcry_mac_type_spec_cmac_serpent, + &_gcry_mac_type_spec_gmac_serpent, #endif #if USE_RFC2268 &_gcry_mac_type_spec_cmac_rfc2268, #endif #if USE_SEED &_gcry_mac_type_spec_cmac_seed, + &_gcry_mac_type_spec_gmac_seed, #endif #if USE_CAMELLIA &_gcry_mac_type_spec_cmac_camellia, + &_gcry_mac_type_spec_gmac_camellia, #endif #ifdef USE_IDEA &_gcry_mac_type_spec_cmac_idea, |