]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
cipher: fix AES-SIV-GCM key lengths
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 11 Sep 2023 08:45:39 +0000 (10:45 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 11 Sep 2023 09:20:04 +0000 (11:20 +0200)
Fix provided key lengths of AES-SIV-GCM ciphers, which have halved keys
when compared to AES-SIV-CMAC.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
lib/algorithms/ciphers.c

index c3139352fc7e7ce8810aa65da9c7fb53765c04b3..4f1222b1969454b24e0339b14b81f5e9d2e8e5d3 100644 (file)
@@ -311,7 +311,7 @@ static const cipher_entry_st algorithms[] = {
        { .name = "AES-128-SIV-GCM",
          .id = GNUTLS_CIPHER_AES_128_SIV_GCM,
          .blocksize = 16,
-         .keysize = 32,
+         .keysize = 16,
          .type = CIPHER_AEAD,
          .explicit_iv = 12,
          .cipher_iv = 12,
@@ -320,7 +320,7 @@ static const cipher_entry_st algorithms[] = {
        { .name = "AES-256-SIV-GCM",
          .id = GNUTLS_CIPHER_AES_256_SIV_GCM,
          .blocksize = 16,
-         .keysize = 64,
+         .keysize = 32,
          .type = CIPHER_AEAD,
          .explicit_iv = 12,
          .cipher_iv = 12,