aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/tcrypt.c11
-rw-r--r--crypto/testmgr.c24
-rw-r--r--crypto/testmgr.h361
3 files changed, 396 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 3ca68f9fc14d..9aac5e58be94 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)
@@ -980,6 +987,10 @@ static int do_test(int m)
980 ret += tcrypt_test("ansi_cprng"); 987 ret += tcrypt_test("ansi_cprng");
981 break; 988 break;
982 989
990 case 151:
991 ret += tcrypt_test("rfc4106(gcm(aes))");
992 break;
993
983 case 200: 994 case 200:
984 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, 995 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
985 speed_template_16_24_32); 996 speed_template_16_24_32);
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index fa8c8f78c8d4..27ea9fe9476f 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -6,6 +6,13 @@
6 * Copyright (c) 2007 Nokia Siemens Networks 6 * Copyright (c) 2007 Nokia Siemens Networks
7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au> 7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
8 * 8 *
9 * Updated RFC4106 AES-GCM testing.
10 * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
11 * Adrian Hoban <adrian.hoban@intel.com>
12 * Gabriele Paoloni <gabriele.paoloni@intel.com>
13 * Tadeusz Struk (tadeusz.struk@intel.com)
14 * Copyright (c) 2010, Intel Corporation.
15 *
9 * This program is free software; you can redistribute it and/or modify it 16 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the Free 17 * under the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2 of the License, or (at your option) 18 * 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[] = {
2242 } 2249 }
2243 } 2250 }
2244 }, { 2251 }, {
2252 .alg = "rfc4106(gcm(aes))",
2253 .test = alg_test_aead,
2254 .suite = {
2255 .aead = {
2256 .enc = {
2257 .vecs = aes_gcm_rfc4106_enc_tv_template,
2258 .count = AES_GCM_4106_ENC_TEST_VECTORS
2259 },
2260 .dec = {
2261 .vecs = aes_gcm_rfc4106_dec_tv_template,
2262 .count = AES_GCM_4106_DEC_TEST_VECTORS
2263 }
2264 }
2265 }
2266 }, {
2267
2268
2245 .alg = "rfc4309(ccm(aes))", 2269 .alg = "rfc4309(ccm(aes))",
2246 .test = alg_test_aead, 2270 .test = alg_test_aead,
2247 .fips_allowed = 1, 2271 .fips_allowed = 1,
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 74e35377fd30..834af7f2adee 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -6,6 +6,15 @@
6 * Copyright (c) 2007 Nokia Siemens Networks 6 * Copyright (c) 2007 Nokia Siemens Networks
7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au> 7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
8 * 8 *
9 * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
10 * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
11 * gcm/gcm-test-vectors.tar.gz
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 *
9 * 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
10 * 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
11 * 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)
@@ -2947,6 +2956,8 @@ static struct cipher_testvec cast6_dec_tv_template[] = {
2947#define AES_CTR_3686_DEC_TEST_VECTORS 6 2956#define AES_CTR_3686_DEC_TEST_VECTORS 6
2948#define AES_GCM_ENC_TEST_VECTORS 9 2957#define AES_GCM_ENC_TEST_VECTORS 9
2949#define AES_GCM_DEC_TEST_VECTORS 8 2958#define AES_GCM_DEC_TEST_VECTORS 8
2959#define AES_GCM_4106_ENC_TEST_VECTORS 7
2960#define AES_GCM_4106_DEC_TEST_VECTORS 7
2950#define AES_CCM_ENC_TEST_VECTORS 7 2961#define AES_CCM_ENC_TEST_VECTORS 7
2951#define AES_CCM_DEC_TEST_VECTORS 7 2962#define AES_CCM_DEC_TEST_VECTORS 7
2952#define AES_CCM_4309_ENC_TEST_VECTORS 7 2963#define AES_CCM_4309_ENC_TEST_VECTORS 7
@@ -5829,6 +5840,356 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = {
5829 } 5840 }
5830}; 5841};
5831 5842
5843static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
5844 { /* Generated using Crypto++ */
5845 .key = zeroed_string,
5846 .klen = 20,
5847 .iv = zeroed_string,
5848 .input = zeroed_string,
5849 .ilen = 16,
5850 .assoc = zeroed_string,
5851 .alen = 8,
5852 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
5853 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
5854 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
5855 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
5856 .rlen = 32,
5857 },{
5858 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5859 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5860 "\x00\x00\x00\x00",
5861 .klen = 20,
5862 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
5863 "\x00\x00\x00\x00",
5864 .input = zeroed_string,
5865 .ilen = 16,
5866 .assoc = zeroed_string,
5867 .alen = 8,
5868 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
5869 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
5870 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
5871 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
5872 .rlen = 32,
5873
5874 }, {
5875 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5876 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5877 "\x00\x00\x00\x00",
5878 .klen = 20,
5879 .iv = zeroed_string,
5880 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5881 "\x01\x01\x01\x01\x01\x01\x01\x01",
5882 .ilen = 16,
5883 .assoc = zeroed_string,
5884 .alen = 8,
5885 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
5886 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
5887 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
5888 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
5889 .rlen = 32,
5890 }, {
5891 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5892 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5893 "\x00\x00\x00\x00",
5894 .klen = 20,
5895 .iv = zeroed_string,
5896 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5897 "\x01\x01\x01\x01\x01\x01\x01\x01",
5898 .ilen = 16,
5899 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
5900 .alen = 8,
5901 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
5902 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
5903 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
5904 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
5905 .rlen = 32,
5906 }, {
5907 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5908 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5909 "\x00\x00\x00\x00",
5910 .klen = 20,
5911 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
5912 "\x00\x00\x00\x00",
5913 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5914 "\x01\x01\x01\x01\x01\x01\x01\x01",
5915 .ilen = 16,
5916 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
5917 .alen = 8,
5918 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
5919 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
5920 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
5921 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
5922 .rlen = 32,
5923 }, {
5924 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5925 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5926 "\x00\x00\x00\x00",
5927 .klen = 20,
5928 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
5929 "\x00\x00\x00\x00",
5930 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5931 "\x01\x01\x01\x01\x01\x01\x01\x01"
5932 "\x01\x01\x01\x01\x01\x01\x01\x01"
5933 "\x01\x01\x01\x01\x01\x01\x01\x01"
5934 "\x01\x01\x01\x01\x01\x01\x01\x01"
5935 "\x01\x01\x01\x01\x01\x01\x01\x01"
5936 "\x01\x01\x01\x01\x01\x01\x01\x01"
5937 "\x01\x01\x01\x01\x01\x01\x01\x01",
5938 .ilen = 64,
5939 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
5940 .alen = 8,
5941 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
5942 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
5943 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
5944 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
5945 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
5946 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
5947 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
5948 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
5949 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
5950 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
5951 .rlen = 80,
5952 }, {
5953 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
5954 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5955 "\x00\x00\x00\x00",
5956 .klen = 20,
5957 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
5958 "\x00\x00\x00\x00",
5959 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
5960 "\xff\xff\xff\xff\xff\xff\xff\xff"
5961 "\xff\xff\xff\xff\xff\xff\xff\xff"
5962 "\xff\xff\xff\xff\xff\xff\xff\xff"
5963 "\xff\xff\xff\xff\xff\xff\xff\xff"
5964 "\xff\xff\xff\xff\xff\xff\xff\xff"
5965 "\xff\xff\xff\xff\xff\xff\xff\xff"
5966 "\xff\xff\xff\xff\xff\xff\xff\xff"
5967 "\xff\xff\xff\xff\xff\xff\xff\xff"
5968 "\xff\xff\xff\xff\xff\xff\xff\xff"
5969 "\xff\xff\xff\xff\xff\xff\xff\xff"
5970 "\xff\xff\xff\xff\xff\xff\xff\xff"
5971 "\xff\xff\xff\xff\xff\xff\xff\xff"
5972 "\xff\xff\xff\xff\xff\xff\xff\xff"
5973 "\xff\xff\xff\xff\xff\xff\xff\xff"
5974 "\xff\xff\xff\xff\xff\xff\xff\xff"
5975 "\xff\xff\xff\xff\xff\xff\xff\xff"
5976 "\xff\xff\xff\xff\xff\xff\xff\xff"
5977 "\xff\xff\xff\xff\xff\xff\xff\xff"
5978 "\xff\xff\xff\xff\xff\xff\xff\xff"
5979 "\xff\xff\xff\xff\xff\xff\xff\xff"
5980 "\xff\xff\xff\xff\xff\xff\xff\xff"
5981 "\xff\xff\xff\xff\xff\xff\xff\xff"
5982 "\xff\xff\xff\xff\xff\xff\xff\xff",
5983 .ilen = 192,
5984 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
5985 "\xaa\xaa\xaa\xaa",
5986 .alen = 12,
5987 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
5988 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
5989 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
5990 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
5991 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
5992 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
5993 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
5994 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
5995 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
5996 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
5997 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
5998 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
5999 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
6000 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
6001 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
6002 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
6003 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
6004 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
6005 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
6006 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
6007 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
6008 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
6009 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
6010 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
6011 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
6012 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
6013 .rlen = 208,
6014 }
6015};
6016
6017static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
6018 { /* Generated using Crypto++ */
6019 .key = zeroed_string,
6020 .klen = 20,
6021 .iv = zeroed_string,
6022 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
6023 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
6024 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
6025 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
6026 .ilen = 32,
6027 .assoc = zeroed_string,
6028 .alen = 8,
6029 .result = zeroed_string,
6030 .rlen = 16,
6031
6032 },{
6033 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6034 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6035 "\x00\x00\x00\x00",
6036 .klen = 20,
6037 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6038 "\x00\x00\x00\x00",
6039 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
6040 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
6041 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
6042 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
6043 .ilen = 32,
6044 .assoc = zeroed_string,
6045 .alen = 8,
6046 .result = zeroed_string,
6047 .rlen = 16,
6048 }, {
6049 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6050 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6051 "\x00\x00\x00\x00",
6052 .klen = 20,
6053 .iv = zeroed_string,
6054 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
6055 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
6056 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
6057 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
6058 .ilen = 32,
6059 .assoc = zeroed_string,
6060 .alen = 8,
6061 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6062 "\x01\x01\x01\x01\x01\x01\x01\x01",
6063 .rlen = 16,
6064 }, {
6065 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6066 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6067 "\x00\x00\x00\x00",
6068 .klen = 20,
6069 .iv = zeroed_string,
6070 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
6071 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
6072 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
6073 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
6074 .ilen = 32,
6075 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6076 .alen = 8,
6077 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6078 "\x01\x01\x01\x01\x01\x01\x01\x01",
6079 .rlen = 16,
6080
6081 }, {
6082 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6083 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6084 "\x00\x00\x00\x00",
6085 .klen = 20,
6086 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6087 "\x00\x00\x00\x00",
6088 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6089 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6090 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
6091 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
6092 .ilen = 32,
6093 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6094 .alen = 8,
6095 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6096 "\x01\x01\x01\x01\x01\x01\x01\x01",
6097 .rlen = 16,
6098 }, {
6099 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6100 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6101 "\x00\x00\x00\x00",
6102 .klen = 20,
6103 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6104 "\x00\x00\x00\x00",
6105 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6106 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6107 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
6108 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
6109 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
6110 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
6111 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
6112 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
6113 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
6114 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
6115 .ilen = 80,
6116 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6117 .alen = 8,
6118 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6119 "\x01\x01\x01\x01\x01\x01\x01\x01"
6120 "\x01\x01\x01\x01\x01\x01\x01\x01"
6121 "\x01\x01\x01\x01\x01\x01\x01\x01"
6122 "\x01\x01\x01\x01\x01\x01\x01\x01"
6123 "\x01\x01\x01\x01\x01\x01\x01\x01"
6124 "\x01\x01\x01\x01\x01\x01\x01\x01"
6125 "\x01\x01\x01\x01\x01\x01\x01\x01",
6126 .rlen = 64,
6127 }, {
6128 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6129 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6130 "\x00\x00\x00\x00",
6131 .klen = 20,
6132 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
6133 "\x00\x00\x00\x00",
6134 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
6135 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
6136 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
6137 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
6138 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
6139 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
6140 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
6141 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
6142 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
6143 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
6144 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
6145 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
6146 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
6147 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
6148 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
6149 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
6150 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
6151 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
6152 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
6153 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
6154 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
6155 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
6156 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
6157 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
6158 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
6159 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
6160 .ilen = 208,
6161 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
6162 "\xaa\xaa\xaa\xaa",
6163 .alen = 12,
6164 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
6165 "\xff\xff\xff\xff\xff\xff\xff\xff"
6166 "\xff\xff\xff\xff\xff\xff\xff\xff"
6167 "\xff\xff\xff\xff\xff\xff\xff\xff"
6168 "\xff\xff\xff\xff\xff\xff\xff\xff"
6169 "\xff\xff\xff\xff\xff\xff\xff\xff"
6170 "\xff\xff\xff\xff\xff\xff\xff\xff"
6171 "\xff\xff\xff\xff\xff\xff\xff\xff"
6172 "\xff\xff\xff\xff\xff\xff\xff\xff"
6173 "\xff\xff\xff\xff\xff\xff\xff\xff"
6174 "\xff\xff\xff\xff\xff\xff\xff\xff"
6175 "\xff\xff\xff\xff\xff\xff\xff\xff"
6176 "\xff\xff\xff\xff\xff\xff\xff\xff"
6177 "\xff\xff\xff\xff\xff\xff\xff\xff"
6178 "\xff\xff\xff\xff\xff\xff\xff\xff"
6179 "\xff\xff\xff\xff\xff\xff\xff\xff"
6180 "\xff\xff\xff\xff\xff\xff\xff\xff"
6181 "\xff\xff\xff\xff\xff\xff\xff\xff"
6182 "\xff\xff\xff\xff\xff\xff\xff\xff"
6183 "\xff\xff\xff\xff\xff\xff\xff\xff"
6184 "\xff\xff\xff\xff\xff\xff\xff\xff"
6185 "\xff\xff\xff\xff\xff\xff\xff\xff"
6186 "\xff\xff\xff\xff\xff\xff\xff\xff"
6187 "\xff\xff\xff\xff\xff\xff\xff\xff",
6188 .rlen = 192,
6189
6190 }
6191};
6192
5832static struct aead_testvec aes_ccm_enc_tv_template[] = { 6193static struct aead_testvec aes_ccm_enc_tv_template[] = {
5833 { /* From RFC 3610 */ 6194 { /* From RFC 3610 */
5834 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" 6195 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"