Calculate OCB L-tables when setting key instead of when setting nonce
* cipher/cipher-internal.h (gcry_cipher_handle): Mark areas of u_mode.ocb that are and are not cleared by gcry_cipher_reset. (_gcry_cipher_ocb_setkey): New. * cipher/cipher-ocb.c (_gcry_cipher_ocb_set_nonce): Split L-table generation to ... (_gcry_cipher_ocb_setkey): ... this new function. * cipher/cipher.c (cipher_setkey): Add handling for OCB mode. (cipher_reset): Do not clear L-values for OCB mode.
OCB L-tables do not depend on nonce value, but only on cipher key.
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>