aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r--crypto/testmgr.h451
1 files changed, 450 insertions, 1 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 74e35377fd30..27e60619538e 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)
@@ -442,8 +451,9 @@ static struct hash_testvec rmd320_tv_template[] = {
442 451
443/* 452/*
444 * SHA1 test vectors from from FIPS PUB 180-1 453 * SHA1 test vectors from from FIPS PUB 180-1
454 * Long vector from CAVS 5.0
445 */ 455 */
446#define SHA1_TEST_VECTORS 2 456#define SHA1_TEST_VECTORS 3
447 457
448static struct hash_testvec sha1_tv_template[] = { 458static struct hash_testvec sha1_tv_template[] = {
449 { 459 {
@@ -458,6 +468,33 @@ static struct hash_testvec sha1_tv_template[] = {
458 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1", 468 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
459 .np = 2, 469 .np = 2,
460 .tap = { 28, 28 } 470 .tap = { 28, 28 }
471 }, {
472 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
473 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
474 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
475 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
476 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
477 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
478 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
479 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
480 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
481 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
482 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
483 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
484 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
485 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
486 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
487 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
488 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
489 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
490 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
491 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
492 "\x5a\x90\x11",
493 .psize = 163,
494 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
495 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
496 .np = 4,
497 .tap = { 63, 64, 31, 5 }
461 } 498 }
462}; 499};
463 500
@@ -2943,10 +2980,14 @@ static struct cipher_testvec cast6_dec_tv_template[] = {
2943#define AES_XTS_DEC_TEST_VECTORS 4 2980#define AES_XTS_DEC_TEST_VECTORS 4
2944#define AES_CTR_ENC_TEST_VECTORS 3 2981#define AES_CTR_ENC_TEST_VECTORS 3
2945#define AES_CTR_DEC_TEST_VECTORS 3 2982#define AES_CTR_DEC_TEST_VECTORS 3
2983#define AES_OFB_ENC_TEST_VECTORS 1
2984#define AES_OFB_DEC_TEST_VECTORS 1
2946#define AES_CTR_3686_ENC_TEST_VECTORS 7 2985#define AES_CTR_3686_ENC_TEST_VECTORS 7
2947#define AES_CTR_3686_DEC_TEST_VECTORS 6 2986#define AES_CTR_3686_DEC_TEST_VECTORS 6
2948#define AES_GCM_ENC_TEST_VECTORS 9 2987#define AES_GCM_ENC_TEST_VECTORS 9
2949#define AES_GCM_DEC_TEST_VECTORS 8 2988#define AES_GCM_DEC_TEST_VECTORS 8
2989#define AES_GCM_4106_ENC_TEST_VECTORS 7
2990#define AES_GCM_4106_DEC_TEST_VECTORS 7
2950#define AES_CCM_ENC_TEST_VECTORS 7 2991#define AES_CCM_ENC_TEST_VECTORS 7
2951#define AES_CCM_DEC_TEST_VECTORS 7 2992#define AES_CCM_DEC_TEST_VECTORS 7
2952#define AES_CCM_4309_ENC_TEST_VECTORS 7 2993#define AES_CCM_4309_ENC_TEST_VECTORS 7
@@ -5467,6 +5508,64 @@ static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
5467 }, 5508 },
5468}; 5509};
5469 5510
5511static struct cipher_testvec aes_ofb_enc_tv_template[] = {
5512 /* From NIST Special Publication 800-38A, Appendix F.5 */
5513 {
5514 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
5515 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
5516 .klen = 16,
5517 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
5518 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5519 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5520 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5521 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5522 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5523 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5524 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5525 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5526 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5527 .ilen = 64,
5528 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
5529 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
5530 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
5531 "\x3c\x52\xda\xc5\x4e\xd8\x25"
5532 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
5533 "\x44\xf7\xa8\x22\x60\xed\xcc"
5534 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
5535 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
5536 .rlen = 64,
5537 }
5538};
5539
5540static struct cipher_testvec aes_ofb_dec_tv_template[] = {
5541 /* From NIST Special Publication 800-38A, Appendix F.5 */
5542 {
5543 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
5544 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
5545 .klen = 16,
5546 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
5547 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5548 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
5549 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
5550 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
5551 "\x3c\x52\xda\xc5\x4e\xd8\x25"
5552 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
5553 "\x44\xf7\xa8\x22\x60\xed\xcc"
5554 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
5555 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
5556 .ilen = 64,
5557 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
5558 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
5559 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
5560 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
5561 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
5562 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
5563 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
5564 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
5565 .rlen = 64,
5566 }
5567};
5568
5470static struct aead_testvec aes_gcm_enc_tv_template[] = { 5569static struct aead_testvec aes_gcm_enc_tv_template[] = {
5471 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ 5570 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
5472 .key = zeroed_string, 5571 .key = zeroed_string,
@@ -5829,6 +5928,356 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = {
5829 } 5928 }
5830}; 5929};
5831 5930
5931static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
5932 { /* Generated using Crypto++ */
5933 .key = zeroed_string,
5934 .klen = 20,
5935 .iv = zeroed_string,
5936 .input = zeroed_string,
5937 .ilen = 16,
5938 .assoc = zeroed_string,
5939 .alen = 8,
5940 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
5941 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
5942 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
5943 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
5944 .rlen = 32,
5945 },{
5946 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5947 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5948 "\x00\x00\x00\x00",
5949 .klen = 20,
5950 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
5951 "\x00\x00\x00\x00",
5952 .input = zeroed_string,
5953 .ilen = 16,
5954 .assoc = zeroed_string,
5955 .alen = 8,
5956 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
5957 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
5958 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
5959 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
5960 .rlen = 32,
5961
5962 }, {
5963 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5964 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5965 "\x00\x00\x00\x00",
5966 .klen = 20,
5967 .iv = zeroed_string,
5968 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5969 "\x01\x01\x01\x01\x01\x01\x01\x01",
5970 .ilen = 16,
5971 .assoc = zeroed_string,
5972 .alen = 8,
5973 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
5974 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
5975 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
5976 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
5977 .rlen = 32,
5978 }, {
5979 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5980 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5981 "\x00\x00\x00\x00",
5982 .klen = 20,
5983 .iv = zeroed_string,
5984 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
5985 "\x01\x01\x01\x01\x01\x01\x01\x01",
5986 .ilen = 16,
5987 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
5988 .alen = 8,
5989 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
5990 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
5991 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
5992 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
5993 .rlen = 32,
5994 }, {
5995 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5996 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5997 "\x00\x00\x00\x00",
5998 .klen = 20,
5999 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6000 "\x00\x00\x00\x00",
6001 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
6002 "\x01\x01\x01\x01\x01\x01\x01\x01",
6003 .ilen = 16,
6004 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6005 .alen = 8,
6006 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6007 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6008 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
6009 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
6010 .rlen = 32,
6011 }, {
6012 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6013 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6014 "\x00\x00\x00\x00",
6015 .klen = 20,
6016 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6017 "\x00\x00\x00\x00",
6018 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
6019 "\x01\x01\x01\x01\x01\x01\x01\x01"
6020 "\x01\x01\x01\x01\x01\x01\x01\x01"
6021 "\x01\x01\x01\x01\x01\x01\x01\x01"
6022 "\x01\x01\x01\x01\x01\x01\x01\x01"
6023 "\x01\x01\x01\x01\x01\x01\x01\x01"
6024 "\x01\x01\x01\x01\x01\x01\x01\x01"
6025 "\x01\x01\x01\x01\x01\x01\x01\x01",
6026 .ilen = 64,
6027 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6028 .alen = 8,
6029 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6030 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6031 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
6032 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
6033 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
6034 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
6035 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
6036 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
6037 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
6038 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
6039 .rlen = 80,
6040 }, {
6041 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6042 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6043 "\x00\x00\x00\x00",
6044 .klen = 20,
6045 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
6046 "\x00\x00\x00\x00",
6047 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
6048 "\xff\xff\xff\xff\xff\xff\xff\xff"
6049 "\xff\xff\xff\xff\xff\xff\xff\xff"
6050 "\xff\xff\xff\xff\xff\xff\xff\xff"
6051 "\xff\xff\xff\xff\xff\xff\xff\xff"
6052 "\xff\xff\xff\xff\xff\xff\xff\xff"
6053 "\xff\xff\xff\xff\xff\xff\xff\xff"
6054 "\xff\xff\xff\xff\xff\xff\xff\xff"
6055 "\xff\xff\xff\xff\xff\xff\xff\xff"
6056 "\xff\xff\xff\xff\xff\xff\xff\xff"
6057 "\xff\xff\xff\xff\xff\xff\xff\xff"
6058 "\xff\xff\xff\xff\xff\xff\xff\xff"
6059 "\xff\xff\xff\xff\xff\xff\xff\xff"
6060 "\xff\xff\xff\xff\xff\xff\xff\xff"
6061 "\xff\xff\xff\xff\xff\xff\xff\xff"
6062 "\xff\xff\xff\xff\xff\xff\xff\xff"
6063 "\xff\xff\xff\xff\xff\xff\xff\xff"
6064 "\xff\xff\xff\xff\xff\xff\xff\xff"
6065 "\xff\xff\xff\xff\xff\xff\xff\xff"
6066 "\xff\xff\xff\xff\xff\xff\xff\xff"
6067 "\xff\xff\xff\xff\xff\xff\xff\xff"
6068 "\xff\xff\xff\xff\xff\xff\xff\xff"
6069 "\xff\xff\xff\xff\xff\xff\xff\xff"
6070 "\xff\xff\xff\xff\xff\xff\xff\xff",
6071 .ilen = 192,
6072 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
6073 "\xaa\xaa\xaa\xaa",
6074 .alen = 12,
6075 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
6076 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
6077 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
6078 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
6079 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
6080 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
6081 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
6082 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
6083 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
6084 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
6085 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
6086 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
6087 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
6088 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
6089 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
6090 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
6091 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
6092 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
6093 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
6094 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
6095 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
6096 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
6097 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
6098 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
6099 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
6100 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
6101 .rlen = 208,
6102 }
6103};
6104
6105static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
6106 { /* Generated using Crypto++ */
6107 .key = zeroed_string,
6108 .klen = 20,
6109 .iv = zeroed_string,
6110 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
6111 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
6112 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
6113 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
6114 .ilen = 32,
6115 .assoc = zeroed_string,
6116 .alen = 8,
6117 .result = zeroed_string,
6118 .rlen = 16,
6119
6120 },{
6121 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6122 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6123 "\x00\x00\x00\x00",
6124 .klen = 20,
6125 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6126 "\x00\x00\x00\x00",
6127 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
6128 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
6129 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
6130 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
6131 .ilen = 32,
6132 .assoc = zeroed_string,
6133 .alen = 8,
6134 .result = zeroed_string,
6135 .rlen = 16,
6136 }, {
6137 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6138 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6139 "\x00\x00\x00\x00",
6140 .klen = 20,
6141 .iv = zeroed_string,
6142 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
6143 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
6144 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
6145 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
6146 .ilen = 32,
6147 .assoc = zeroed_string,
6148 .alen = 8,
6149 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6150 "\x01\x01\x01\x01\x01\x01\x01\x01",
6151 .rlen = 16,
6152 }, {
6153 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6154 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6155 "\x00\x00\x00\x00",
6156 .klen = 20,
6157 .iv = zeroed_string,
6158 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
6159 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
6160 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
6161 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
6162 .ilen = 32,
6163 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6164 .alen = 8,
6165 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6166 "\x01\x01\x01\x01\x01\x01\x01\x01",
6167 .rlen = 16,
6168
6169 }, {
6170 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6171 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6172 "\x00\x00\x00\x00",
6173 .klen = 20,
6174 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6175 "\x00\x00\x00\x00",
6176 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6177 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6178 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
6179 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
6180 .ilen = 32,
6181 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6182 .alen = 8,
6183 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6184 "\x01\x01\x01\x01\x01\x01\x01\x01",
6185 .rlen = 16,
6186 }, {
6187 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
6188 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
6189 "\x00\x00\x00\x00",
6190 .klen = 20,
6191 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
6192 "\x00\x00\x00\x00",
6193 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
6194 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
6195 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
6196 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
6197 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
6198 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
6199 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
6200 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
6201 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
6202 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
6203 .ilen = 80,
6204 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
6205 .alen = 8,
6206 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
6207 "\x01\x01\x01\x01\x01\x01\x01\x01"
6208 "\x01\x01\x01\x01\x01\x01\x01\x01"
6209 "\x01\x01\x01\x01\x01\x01\x01\x01"
6210 "\x01\x01\x01\x01\x01\x01\x01\x01"
6211 "\x01\x01\x01\x01\x01\x01\x01\x01"
6212 "\x01\x01\x01\x01\x01\x01\x01\x01"
6213 "\x01\x01\x01\x01\x01\x01\x01\x01",
6214 .rlen = 64,
6215 }, {
6216 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6217 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6218 "\x00\x00\x00\x00",
6219 .klen = 20,
6220 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
6221 "\x00\x00\x00\x00",
6222 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
6223 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
6224 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
6225 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
6226 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
6227 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
6228 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
6229 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
6230 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
6231 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
6232 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
6233 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
6234 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
6235 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
6236 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
6237 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
6238 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
6239 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
6240 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
6241 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
6242 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
6243 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
6244 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
6245 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
6246 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
6247 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
6248 .ilen = 208,
6249 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
6250 "\xaa\xaa\xaa\xaa",
6251 .alen = 12,
6252 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
6253 "\xff\xff\xff\xff\xff\xff\xff\xff"
6254 "\xff\xff\xff\xff\xff\xff\xff\xff"
6255 "\xff\xff\xff\xff\xff\xff\xff\xff"
6256 "\xff\xff\xff\xff\xff\xff\xff\xff"
6257 "\xff\xff\xff\xff\xff\xff\xff\xff"
6258 "\xff\xff\xff\xff\xff\xff\xff\xff"
6259 "\xff\xff\xff\xff\xff\xff\xff\xff"
6260 "\xff\xff\xff\xff\xff\xff\xff\xff"
6261 "\xff\xff\xff\xff\xff\xff\xff\xff"
6262 "\xff\xff\xff\xff\xff\xff\xff\xff"
6263 "\xff\xff\xff\xff\xff\xff\xff\xff"
6264 "\xff\xff\xff\xff\xff\xff\xff\xff"
6265 "\xff\xff\xff\xff\xff\xff\xff\xff"
6266 "\xff\xff\xff\xff\xff\xff\xff\xff"
6267 "\xff\xff\xff\xff\xff\xff\xff\xff"
6268 "\xff\xff\xff\xff\xff\xff\xff\xff"
6269 "\xff\xff\xff\xff\xff\xff\xff\xff"
6270 "\xff\xff\xff\xff\xff\xff\xff\xff"
6271 "\xff\xff\xff\xff\xff\xff\xff\xff"
6272 "\xff\xff\xff\xff\xff\xff\xff\xff"
6273 "\xff\xff\xff\xff\xff\xff\xff\xff"
6274 "\xff\xff\xff\xff\xff\xff\xff\xff"
6275 "\xff\xff\xff\xff\xff\xff\xff\xff",
6276 .rlen = 192,
6277
6278 }
6279};
6280
5832static struct aead_testvec aes_ccm_enc_tv_template[] = { 6281static struct aead_testvec aes_ccm_enc_tv_template[] = {
5833 { /* From RFC 3610 */ 6282 { /* From RFC 3610 */
5834 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" 6283 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"