Skip to contentSkip to conversation

Extending the RC4106 AES-GCM test vectors

PATCH In review [email protected] 1 participant 1 message Oct 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Extending the RC4106 AES-GCM test vectors

Quoted 1 line

From 587c5f011d8608bef97e7711fe87900225ce8722 Mon Sep 17 00:00:00 2001

From: Adrian Hoban <[email protected]>
Date: Fri, 10 Sep 2010 18:12:57 +0100
Subject: [PATCH 3/3] Extending the RC4106 AES-GCM test vectors

Updated RFC4106 AES-GCM testing. Some test vectors were taken from
http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
gcm/gcm-test-vectors.tar.gz

---
 crypto/tcrypt.c  |   11 ++
 crypto/testmgr.c |   24 ++++
 crypto/testmgr.h |  361 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 396 insertions(+), 0 deletions(-)
crypto/tcrypt.c +11 -0
index 3ca68f9..9aac5e5 100644
@@ -8,6 +8,13 @@
  * Copyright (c) 2002 Jean-Francois Dive <[email protected]>
  * Copyright (c) 2007 Nokia Siemens Networks
  *
+ * Updated RFC4106 AES-GCM testing.
+ *    Authors: Aidan O'Mahony ([email protected])
+ *             Adrian Hoban <[email protected]>
+ *             Gabriele Paoloni <[email protected]>
+ *             Tadeusz Struk ([email protected])
+ *             Copyright (c) 2010, Intel Corporation.
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 2 of the License, or (at your option)
@@ -980,6 +987,10 @@ static int do_test(int m)
 		ret += tcrypt_test("ansi_cprng");
 		break;
 
+	case 151:
+		ret += tcrypt_test("rfc4106(gcm(aes))");
+		break;
+
 	case 200:
 		test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
 				speed_template_16_24_32);
crypto/testmgr.c +24 -0
index fa8c8f7..27ea9fe 100644
@@ -6,6 +6,13 @@
  * Copyright (c) 2007 Nokia Siemens Networks
  * Copyright (c) 2008 Herbert Xu <[email protected]>
  *
+ * Updated RFC4106 AES-GCM testing.
+ *    Authors: Aidan O'Mahony ([email protected])
+ *             Adrian Hoban <[email protected]>
+ *             Gabriele Paoloni <[email protected]>
+ *             Tadeusz Struk ([email protected])
+ *    Copyright (c) 2010, Intel Corporation.
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 2 of the License, or (at your option)
@@ -2242,6 +2249,23 @@ static const struct alg_test_desc alg_test_descs[] = {
 			}
 		}
 	}, {
+		.alg = "rfc4106(gcm(aes))",
+		.test = alg_test_aead,
+		.suite = {
+			.aead = {
+				.enc = {
+					.vecs = aes_gcm_rfc4106_enc_tv_template,
+					.count = AES_GCM_4106_ENC_TEST_VECTORS
+				},
+				.dec = {
+					.vecs = aes_gcm_rfc4106_dec_tv_template,
+					.count = AES_GCM_4106_DEC_TEST_VECTORS
+				}
+			}
+		}
+	}, {
+
+
 		.alg = "rfc4309(ccm(aes))",
 		.test = alg_test_aead,
 		.fips_allowed = 1,
crypto/testmgr.h +361 -0

379 lines not on this page · raw message

Signature · 10 lines
1.5.3.rc5

--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.