*/
#define MD4_TEST_VECTORS 7
-static struct hash_testvec md4_tv_template [] = {
+struct hash_testvec md4_tv_template [] = {
{
.plaintext = "",
.digest = { 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31,
*/
#define MD5_TEST_VECTORS 7
-static struct hash_testvec md5_tv_template[] = {
+struct hash_testvec md5_tv_template[] = {
{
.digest = { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e },
*/
#define SHA1_TEST_VECTORS 2
-static struct hash_testvec sha1_tv_template[] = {
+struct hash_testvec sha1_tv_template[] = {
{
.plaintext = "abc",
.psize = 3,
*/
#define SHA256_TEST_VECTORS 2
-static struct hash_testvec sha256_tv_template[] = {
+struct hash_testvec sha256_tv_template[] = {
{
.plaintext = "abc",
.psize = 3,
*/
#define SHA384_TEST_VECTORS 4
-static struct hash_testvec sha384_tv_template[] = {
+struct hash_testvec sha384_tv_template[] = {
{
.plaintext= "abc",
.psize = 3,
*/
#define SHA512_TEST_VECTORS 4
-static struct hash_testvec sha512_tv_template[] = {
+struct hash_testvec sha512_tv_template[] = {
{
.plaintext = "abc",
.psize = 3,
*/
#define WP512_TEST_VECTORS 8
-static struct hash_testvec wp512_tv_template[] = {
+struct hash_testvec wp512_tv_template[] = {
{
.plaintext = "",
.psize = 0,
#define WP384_TEST_VECTORS 8
-static struct hash_testvec wp384_tv_template[] = {
+struct hash_testvec wp384_tv_template[] = {
{
.plaintext = "",
.psize = 0,
#define WP256_TEST_VECTORS 8
-static struct hash_testvec wp256_tv_template[] = {
+struct hash_testvec wp256_tv_template[] = {
{
.plaintext = "",
.psize = 0,
},
};
-/*
- * TIGER test vectors from Tiger website
- */
-#define TGR192_TEST_VECTORS 6
-
-static struct hash_testvec tgr192_tv_template[] = {
- {
- .plaintext = "",
- .psize = 0,
- .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32,
- 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f,
- 0xf3, 0x73, 0xde, 0x2d, 0x49, 0x58, 0x4e, 0x7a },
- }, {
- .plaintext = "abc",
- .psize = 3,
- .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a,
- 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf,
- 0x93, 0x5f, 0x7b, 0x95, 0x1c, 0x13, 0x29, 0x51 },
- }, {
- .plaintext = "Tiger",
- .psize = 5,
- .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd,
- 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec,
- 0x37, 0x79, 0x0c, 0x11, 0x6f, 0x9d, 0x2b, 0xdf },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
- .psize = 64,
- .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7,
- 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e,
- 0xb5, 0x86, 0x44, 0x50, 0x34, 0xa5, 0xa3, 0x86 },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
- .psize = 64,
- .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48,
- 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9,
- 0x57, 0x89, 0x65, 0x65, 0x97, 0x5f, 0x91, 0x97 },
- }, {
- .plaintext = "Tiger - A Fast New Hash Function, "
- "by Ross Anderson and Eli Biham, "
- "proceedings of Fast Software Encryption 3, "
- "Cambridge, 1996.",
- .psize = 125,
- .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63,
- 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24,
- 0xdd, 0x68, 0x15, 0x1d, 0x50, 0x39, 0x74, 0xfc },
- },
-};
-
-#define TGR160_TEST_VECTORS 6
-
-static struct hash_testvec tgr160_tv_template[] = {
- {
- .plaintext = "",
- .psize = 0,
- .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32,
- 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f,
- 0xf3, 0x73, 0xde, 0x2d },
- }, {
- .plaintext = "abc",
- .psize = 3,
- .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a,
- 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf,
- 0x93, 0x5f, 0x7b, 0x95 },
- }, {
- .plaintext = "Tiger",
- .psize = 5,
- .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd,
- 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec,
- 0x37, 0x79, 0x0c, 0x11 },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
- .psize = 64,
- .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7,
- 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e,
- 0xb5, 0x86, 0x44, 0x50 },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
- .psize = 64,
- .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48,
- 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9,
- 0x57, 0x89, 0x65, 0x65 },
- }, {
- .plaintext = "Tiger - A Fast New Hash Function, "
- "by Ross Anderson and Eli Biham, "
- "proceedings of Fast Software Encryption 3, "
- "Cambridge, 1996.",
- .psize = 125,
- .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63,
- 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24,
- 0xdd, 0x68, 0x15, 0x1d },
- },
-};
-
-#define TGR128_TEST_VECTORS 6
-
-static struct hash_testvec tgr128_tv_template[] = {
- {
- .plaintext = "",
- .psize = 0,
- .digest = { 0x24, 0xf0, 0x13, 0x0c, 0x63, 0xac, 0x93, 0x32,
- 0x16, 0x16, 0x6e, 0x76, 0xb1, 0xbb, 0x92, 0x5f },
- }, {
- .plaintext = "abc",
- .psize = 3,
- .digest = { 0xf2, 0x58, 0xc1, 0xe8, 0x84, 0x14, 0xab, 0x2a,
- 0x52, 0x7a, 0xb5, 0x41, 0xff, 0xc5, 0xb8, 0xbf },
- }, {
- .plaintext = "Tiger",
- .psize = 5,
- .digest = { 0x9f, 0x00, 0xf5, 0x99, 0x07, 0x23, 0x00, 0xdd,
- 0x27, 0x6a, 0xbb, 0x38, 0xc8, 0xeb, 0x6d, 0xec },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
- .psize = 64,
- .digest = { 0x87, 0xfb, 0x2a, 0x90, 0x83, 0x85, 0x1c, 0xf7,
- 0x47, 0x0d, 0x2c, 0xf8, 0x10, 0xe6, 0xdf, 0x9e },
- }, {
- .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
- .psize = 64,
- .digest = { 0x46, 0x7d, 0xb8, 0x08, 0x63, 0xeb, 0xce, 0x48,
- 0x8d, 0xf1, 0xcd, 0x12, 0x61, 0x65, 0x5d, 0xe9 },
- }, {
- .plaintext = "Tiger - A Fast New Hash Function, "
- "by Ross Anderson and Eli Biham, "
- "proceedings of Fast Software Encryption 3, "
- "Cambridge, 1996.",
- .psize = 125,
- .digest = { 0x3d, 0x9a, 0xeb, 0x03, 0xd1, 0xbd, 0x1a, 0x63,
- 0x57, 0xb2, 0x77, 0x4d, 0xfd, 0x6d, 0x5b, 0x24 },
- },
-};
#ifdef CONFIG_CRYPTO_HMAC
/*
*/
#define HMAC_MD5_TEST_VECTORS 7
-static struct hmac_testvec hmac_md5_tv_template[] =
+struct hmac_testvec hmac_md5_tv_template[] =
{
{
.key = { [0 ... 15] = 0x0b },
*/
#define HMAC_SHA1_TEST_VECTORS 7
-static struct hmac_testvec hmac_sha1_tv_template[] = {
+struct hmac_testvec hmac_sha1_tv_template[] = {
{
.key = { [0 ... 19] = 0x0b },
.ksize = 20,
*/
#define HMAC_SHA256_TEST_VECTORS 10
-static struct hmac_testvec hmac_sha256_tv_template[] = {
+struct hmac_testvec hmac_sha256_tv_template[] = {
{
.key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
#define DES3_EDE_ENC_TEST_VECTORS 3
#define DES3_EDE_DEC_TEST_VECTORS 3
-static struct cipher_testvec des_enc_tv_template[] = {
+struct cipher_testvec des_enc_tv_template[] = {
{ /* From Applied Cryptography */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
.klen = 8,
},
};
-static struct cipher_testvec des_dec_tv_template[] = {
+struct cipher_testvec des_dec_tv_template[] = {
{ /* From Applied Cryptography */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
.klen = 8,
},
};
-static struct cipher_testvec des_cbc_enc_tv_template[] = {
+struct cipher_testvec des_cbc_enc_tv_template[] = {
{ /* From OpenSSL */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
.klen = 8,
},
};
-static struct cipher_testvec des_cbc_dec_tv_template[] = {
+struct cipher_testvec des_cbc_dec_tv_template[] = {
{ /* FIPS Pub 81 */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
.klen = 8,
/*
* We really need some more test vectors, especially for DES3 CBC.
*/
-static struct cipher_testvec des3_ede_enc_tv_template[] = {
+struct cipher_testvec des3_ede_enc_tv_template[] = {
{ /* These are from openssl */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
},
};
-static struct cipher_testvec des3_ede_dec_tv_template[] = {
+struct cipher_testvec des3_ede_dec_tv_template[] = {
{ /* These are from openssl */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
#define BF_CBC_ENC_TEST_VECTORS 1
#define BF_CBC_DEC_TEST_VECTORS 1
-static struct cipher_testvec bf_enc_tv_template[] = {
+struct cipher_testvec bf_enc_tv_template[] = {
{ /* DES test vectors from OpenSSL */
.key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
.klen = 8,
},
};
-static struct cipher_testvec bf_dec_tv_template[] = {
+struct cipher_testvec bf_dec_tv_template[] = {
{ /* DES test vectors from OpenSSL */
.key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
.klen = 8,
},
};
-static struct cipher_testvec bf_cbc_enc_tv_template[] = {
+struct cipher_testvec bf_cbc_enc_tv_template[] = {
{ /* From OpenSSL */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
},
};
-static struct cipher_testvec bf_cbc_dec_tv_template[] = {
+struct cipher_testvec bf_cbc_dec_tv_template[] = {
{ /* From OpenSSL */
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
#define TF_CBC_ENC_TEST_VECTORS 4
#define TF_CBC_DEC_TEST_VECTORS 4
-static struct cipher_testvec tf_enc_tv_template[] = {
+struct cipher_testvec tf_enc_tv_template[] = {
{
.key = { [0 ... 15] = 0x00 },
.klen = 16,
},
};
-static struct cipher_testvec tf_dec_tv_template[] = {
+struct cipher_testvec tf_dec_tv_template[] = {
{
.key = { [0 ... 15] = 0x00 },
.klen = 16,
},
};
-static struct cipher_testvec tf_cbc_enc_tv_template[] = {
+struct cipher_testvec tf_cbc_enc_tv_template[] = {
{ /* Generated with Nettle */
.key = { [0 ... 15] = 0x00 },
.klen = 16,
},
};
-static struct cipher_testvec tf_cbc_dec_tv_template[] = {
+struct cipher_testvec tf_cbc_dec_tv_template[] = {
{ /* Reverse of the first four above */
.key = { [0 ... 15] = 0x00 },
.klen = 16,
#define TNEPRES_ENC_TEST_VECTORS 4
#define TNEPRES_DEC_TEST_VECTORS 4
-static struct cipher_testvec serpent_enc_tv_template[] =
+struct cipher_testvec serpent_enc_tv_template[] =
{
{
.input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
},
};
-static struct cipher_testvec tnepres_enc_tv_template[] =
+struct cipher_testvec tnepres_enc_tv_template[] =
{
{ /* KeySize=128, PT=0, I=1 */
.input = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-static struct cipher_testvec serpent_dec_tv_template[] =
+struct cipher_testvec serpent_dec_tv_template[] =
{
{
.input = { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
},
};
-static struct cipher_testvec tnepres_dec_tv_template[] =
+struct cipher_testvec tnepres_dec_tv_template[] =
{
{
.input = { 0x41, 0xcc, 0x6b, 0x31, 0x59, 0x31, 0x45, 0x97,
#define CAST6_ENC_TEST_VECTORS 3
#define CAST6_DEC_TEST_VECTORS 3
-static struct cipher_testvec cast6_enc_tv_template[] =
+struct cipher_testvec cast6_enc_tv_template[] =
{
{
.key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
},
};
-static struct cipher_testvec cast6_dec_tv_template[] =
+struct cipher_testvec cast6_dec_tv_template[] =
{
{
.key = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
#define AES_ENC_TEST_VECTORS 3
#define AES_DEC_TEST_VECTORS 3
-static struct cipher_testvec aes_enc_tv_template[] = {
+struct cipher_testvec aes_enc_tv_template[] = {
{ /* From FIPS-197 */
.key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
},
};
-static struct cipher_testvec aes_dec_tv_template[] = {
+struct cipher_testvec aes_dec_tv_template[] = {
{ /* From FIPS-197 */
.key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
#define CAST5_ENC_TEST_VECTORS 3
#define CAST5_DEC_TEST_VECTORS 3
-static struct cipher_testvec cast5_enc_tv_template[] =
+struct cipher_testvec cast5_enc_tv_template[] =
{
{
.key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
},
};
-static struct cipher_testvec cast5_dec_tv_template[] =
+struct cipher_testvec cast5_dec_tv_template[] =
{
{
.key = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
#define ARC4_ENC_TEST_VECTORS 7
#define ARC4_DEC_TEST_VECTORS 7
-static struct cipher_testvec arc4_enc_tv_template[] =
+struct cipher_testvec arc4_enc_tv_template[] =
{
{
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
},
};
-static struct cipher_testvec arc4_dec_tv_template[] =
+struct cipher_testvec arc4_dec_tv_template[] =
{
{
.key = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
#define TEA_ENC_TEST_VECTORS 4
#define TEA_DEC_TEST_VECTORS 4
-static struct cipher_testvec tea_enc_tv_template[] =
+struct cipher_testvec tea_enc_tv_template[] =
{
{
.key = { [0 ... 15] = 0x00 },
}
};
-static struct cipher_testvec tea_dec_tv_template[] =
+struct cipher_testvec tea_dec_tv_template[] =
{
{
.key = { [0 ... 15] = 0x00 },
#define XTEA_ENC_TEST_VECTORS 4
#define XTEA_DEC_TEST_VECTORS 4
-static struct cipher_testvec xtea_enc_tv_template[] =
+struct cipher_testvec xtea_enc_tv_template[] =
{
{
.key = { [0 ... 15] = 0x00 },
}
};
-static struct cipher_testvec xtea_dec_tv_template[] =
+struct cipher_testvec xtea_dec_tv_template[] =
{
{
.key = { [0 ... 15] = 0x00 },
#define KHAZAD_ENC_TEST_VECTORS 5
#define KHAZAD_DEC_TEST_VECTORS 5
-static struct cipher_testvec khazad_enc_tv_template[] = {
+struct cipher_testvec khazad_enc_tv_template[] = {
{
.key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
},
};
-static struct cipher_testvec khazad_dec_tv_template[] = {
+struct cipher_testvec khazad_dec_tv_template[] = {
{
.key = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
#define ANUBIS_CBC_ENC_TEST_VECTORS 2
#define ANUBIS_CBC_DEC_TEST_VECTORS 2
-static struct cipher_testvec anubis_enc_tv_template[] = {
+struct cipher_testvec anubis_enc_tv_template[] = {
{
.key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
},
};
-static struct cipher_testvec anubis_dec_tv_template[] = {
+struct cipher_testvec anubis_dec_tv_template[] = {
{
.key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
},
};
-static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
+struct cipher_testvec anubis_cbc_enc_tv_template[] = {
{
.key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
},
};
-static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
+struct cipher_testvec anubis_cbc_dec_tv_template[] = {
{
.key = { 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe },
#define DEFLATE_COMP_TEST_VECTORS 2
#define DEFLATE_DECOMP_TEST_VECTORS 2
-static struct comp_testvec deflate_comp_tv_template[] = {
+struct comp_testvec deflate_comp_tv_template[] = {
{
.inlen = 70,
.outlen = 38,
},
};
-static struct comp_testvec deflate_decomp_tv_template[] = {
+struct comp_testvec deflate_decomp_tv_template[] = {
{
.inlen = 122,
.outlen = 191,
*/
#define MICHAEL_MIC_TEST_VECTORS 6
-static struct hash_testvec michael_mic_tv_template[] =
+struct hash_testvec michael_mic_tv_template[] =
{
{
.key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },