]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
corrected overhead calculation in AEAD ciphers.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 29 Jul 2013 14:22:16 +0000 (16:22 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 29 Jul 2013 14:22:16 +0000 (16:22 +0200)
lib/gnutls_dtls.c
tests/mini-overhead.c

index 754c97277b6636633c040c9fba5df8864dc3c489..009b63cd2d3d149ba192aff9d9c36c010562e541 100644 (file)
@@ -601,9 +601,7 @@ int t, ret;
 
   if (mac->id == GNUTLS_MAC_AEAD)
     {
-      t = _gnutls_cipher_get_iv_size(cipher);
-      total += t;
-
+      total += AEAD_EXPLICIT_DATA_SIZE;
       total += _gnutls_cipher_get_tag_size(cipher);
     }
   else
index b4d90f63fd53d18c252943f87fd17ebf734543bf..1802079461f65b6868a15991c10e27d4f47ff518 100644 (file)
@@ -348,7 +348,7 @@ doit (void)
   /* 13 + 20(sha1) + 16(iv) + 16(max pad) */
   start("NONE:+VERS-DTLS1.0:+AES-128-CBC:+SHA1:+SIGN-ALL:+COMP-NULL:+RSA", 65);
   /* 13 + 16(tag) + 4(iv) */
-  start("NONE:+VERS-DTLS1.0:+AES-128-GCM:+AEAD:+SIGN-ALL:+COMP-NULL:+RSA", 33);
+  start("NONE:+VERS-DTLS1.0:+AES-128-GCM:+AEAD:+SIGN-ALL:+COMP-NULL:+RSA", 37);
   /* 13 + 20(tag) */
   start("NONE:+VERS-DTLS1.0:+SALSA20-256:+SHA1:+SIGN-ALL:+COMP-NULL:+RSA", 33);
   /* 13 + 12(tag) */