[PATCH 1/4] Fix reseting cipher in OCB mode
Jussi Kivilinna
jussi.kivilinna at iki.fi
Fri May 1 15:07:57 CEST 2015
* cipher/cipher.c (cipher_reset): Setup default taglen for OCB after
clearing state.
--
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
cipher/cipher.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cipher/cipher.c b/cipher/cipher.c
index 6e1173f..d1550c0 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -744,6 +744,8 @@ cipher_reset (gcry_cipher_hd_t c)
case GCRY_CIPHER_MODE_OCB:
memset (&c->u_mode.ocb, 0, sizeof c->u_mode.ocb);
+ /* Setup default taglen. */
+ c->u_mode.ocb.taglen = 16;
break;
default:
More information about the Gcrypt-devel
mailing list