aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 3ca68f9fc14d..2222617b3bed 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -8,6 +8,13 @@
8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> 8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
9 * Copyright (c) 2007 Nokia Siemens Networks 9 * Copyright (c) 2007 Nokia Siemens Networks
10 * 10 *
11 * Updated RFC4106 AES-GCM testing.
12 * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
13 * Adrian Hoban <adrian.hoban@intel.com>
14 * Gabriele Paoloni <gabriele.paoloni@intel.com>
15 * Tadeusz Struk (tadeusz.struk@intel.com)
16 * Copyright (c) 2010, Intel Corporation.
17 *
11 * This program is free software; you can redistribute it and/or modify it 18 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free 19 * under the terms of the GNU General Public License as published by the Free
13 * Software Foundation; either version 2 of the License, or (at your option) 20 * Software Foundation; either version 2 of the License, or (at your option)
@@ -139,7 +146,8 @@ static void test_cipher_speed(const char *algo, int enc, unsigned int sec,
139 unsigned int tcount, u8 *keysize) 146 unsigned int tcount, u8 *keysize)
140{ 147{
141 unsigned int ret, i, j, iv_len; 148 unsigned int ret, i, j, iv_len;
142 const char *key, iv[128]; 149 const char *key;
150 char iv[128];
143 struct crypto_blkcipher *tfm; 151 struct crypto_blkcipher *tfm;
144 struct blkcipher_desc desc; 152 struct blkcipher_desc desc;
145 const char *e; 153 const char *e;
@@ -980,6 +988,10 @@ static int do_test(int m)
980 ret += tcrypt_test("ansi_cprng"); 988 ret += tcrypt_test("ansi_cprng");
981 break; 989 break;
982 990
991 case 151:
992 ret += tcrypt_test("rfc4106(gcm(aes))");
993 break;
994
983 case 200: 995 case 200:
984 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, 996 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
985 speed_template_16_24_32); 997 speed_template_16_24_32);
@@ -997,6 +1009,10 @@ static int do_test(int m)
997 speed_template_32_48_64); 1009 speed_template_32_48_64);
998 test_cipher_speed("xts(aes)", DECRYPT, sec, NULL, 0, 1010 test_cipher_speed("xts(aes)", DECRYPT, sec, NULL, 0,
999 speed_template_32_48_64); 1011 speed_template_32_48_64);
1012 test_cipher_speed("ctr(aes)", ENCRYPT, sec, NULL, 0,
1013 speed_template_16_24_32);
1014 test_cipher_speed("ctr(aes)", DECRYPT, sec, NULL, 0,
1015 speed_template_16_24_32);
1000 break; 1016 break;
1001 1017
1002 case 201: 1018 case 201: