summaryrefslogtreecommitdiff
path: root/cipher/mac.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-11-20 15:44:27 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2013-11-21 11:58:09 +0200
commitdbfa651618693da7ea73b4d2d00d4efd411bfb46 (patch)
tree64bfe4135eb663dacc8459af97fef7ad1e4b5142 /cipher/mac.c
parentfb1e52e3fe231671de546eacd6becd31c26c4f7b (diff)
downloadlibgcrypt-dbfa651618693da7ea73b4d2d00d4efd411bfb46.tar.gz
GCM: Move gcm_table initialization to setkey
* cipher/cipher-gcm.c: Change all 'c->u_iv.iv' to 'c->u_mode.gcm.u_ghash_key.key'. (_gcry_cipher_gcm_setkey): New. (_gcry_cipher_gcm_initiv): Move ghash initialization to function above. * cipher/cipher-internal.h (gcry_cipher_handle): Add 'u_mode.gcm.u_ghash_key'; Reorder 'u_mode.gcm' members for partial clearing in gcry_cipher_reset. (_gcry_cipher_gcm_setkey): New prototype. * cipher/cipher.c (cipher_setkey): Add GCM setkey. (cipher_reset): Clear 'u_mode' only partially for GCM. -- GHASH tables can be generated at setkey time. No need to regenerate for every new IV. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/mac.c')
0 files changed, 0 insertions, 0 deletions