diff options
author | Nitesh Lal <NiteshNarayanLal@freescale.com> | 2014-05-21 07:39:08 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-05-22 09:03:18 -0400 |
commit | 5208ed2ca16526cdbec25abe594a3cc3aea210f4 (patch) | |
tree | b133e5a27ae52c3f6e26db1d72d5693c91958298 /crypto | |
parent | 9bac019dad8098a77cce555d929f678e22111783 (diff) |
crypto: testmgr - add aead cbc des, des3_ede tests
Test vectors were taken from existing test for
CBC(DES3_EDE). Associated data has been added to test vectors.
HMAC computed with Crypto++ has been used. Following algos have
been covered.
(a) "authenc(hmac(sha1),cbc(des))"
(b) "authenc(hmac(sha1),cbc(des3_ede))"
(c) "authenc(hmac(sha224),cbc(des))"
(d) "authenc(hmac(sha224),cbc(des3_ede))"
(e) "authenc(hmac(sha256),cbc(des))"
(f) "authenc(hmac(sha256),cbc(des3_ede))"
(g) "authenc(hmac(sha384),cbc(des))"
(h) "authenc(hmac(sha384),cbc(des3_ede))"
(i) "authenc(hmac(sha512),cbc(des))"
(j) "authenc(hmac(sha512),cbc(des3_ede))"
Signed-off-by: Vakul Garg <vakul@freescale.com>
[NiteshNarayanLal@freescale.com: added hooks for the missing algorithms test and tested the patch]
Signed-off-by: Nitesh Lal <NiteshNarayanLal@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/tcrypt.c | 31 | ||||
-rw-r--r-- | crypto/testmgr.c | 174 | ||||
-rw-r--r-- | crypto/testmgr.h | 666 |
3 files changed, 848 insertions, 23 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 09c93ff216e4..ba247cf30858 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -1519,7 +1519,36 @@ static int do_test(int m) | |||
1519 | case 157: | 1519 | case 157: |
1520 | ret += tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))"); | 1520 | ret += tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))"); |
1521 | break; | 1521 | break; |
1522 | 1522 | case 181: | |
1523 | ret += tcrypt_test("authenc(hmac(sha1),cbc(des))"); | ||
1524 | break; | ||
1525 | case 182: | ||
1526 | ret += tcrypt_test("authenc(hmac(sha1),cbc(des3_ede))"); | ||
1527 | break; | ||
1528 | case 183: | ||
1529 | ret += tcrypt_test("authenc(hmac(sha224),cbc(des))"); | ||
1530 | break; | ||
1531 | case 184: | ||
1532 | ret += tcrypt_test("authenc(hmac(sha224),cbc(des3_ede))"); | ||
1533 | break; | ||
1534 | case 185: | ||
1535 | ret += tcrypt_test("authenc(hmac(sha256),cbc(des))"); | ||
1536 | break; | ||
1537 | case 186: | ||
1538 | ret += tcrypt_test("authenc(hmac(sha256),cbc(des3_ede))"); | ||
1539 | break; | ||
1540 | case 187: | ||
1541 | ret += tcrypt_test("authenc(hmac(sha384),cbc(des))"); | ||
1542 | break; | ||
1543 | case 188: | ||
1544 | ret += tcrypt_test("authenc(hmac(sha384),cbc(des3_ede))"); | ||
1545 | break; | ||
1546 | case 189: | ||
1547 | ret += tcrypt_test("authenc(hmac(sha512),cbc(des))"); | ||
1548 | break; | ||
1549 | case 190: | ||
1550 | ret += tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))"); | ||
1551 | break; | ||
1523 | case 200: | 1552 | case 200: |
1524 | test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, | 1553 | test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, |
1525 | speed_template_16_24_32); | 1554 | speed_template_16_24_32); |
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 75c78e6b1a26..498649ac1953 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c | |||
@@ -1834,8 +1834,38 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1834 | .suite = { | 1834 | .suite = { |
1835 | .aead = { | 1835 | .aead = { |
1836 | .enc = { | 1836 | .enc = { |
1837 | .vecs = hmac_sha1_aes_cbc_enc_tv_template, | 1837 | .vecs = |
1838 | .count = HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS | 1838 | hmac_sha1_aes_cbc_enc_tv_temp, |
1839 | .count = | ||
1840 | HMAC_SHA1_AES_CBC_ENC_TEST_VEC | ||
1841 | } | ||
1842 | } | ||
1843 | } | ||
1844 | }, { | ||
1845 | .alg = "authenc(hmac(sha1),cbc(des))", | ||
1846 | .test = alg_test_aead, | ||
1847 | .fips_allowed = 1, | ||
1848 | .suite = { | ||
1849 | .aead = { | ||
1850 | .enc = { | ||
1851 | .vecs = | ||
1852 | hmac_sha1_des_cbc_enc_tv_temp, | ||
1853 | .count = | ||
1854 | HMAC_SHA1_DES_CBC_ENC_TEST_VEC | ||
1855 | } | ||
1856 | } | ||
1857 | } | ||
1858 | }, { | ||
1859 | .alg = "authenc(hmac(sha1),cbc(des3_ede))", | ||
1860 | .test = alg_test_aead, | ||
1861 | .fips_allowed = 1, | ||
1862 | .suite = { | ||
1863 | .aead = { | ||
1864 | .enc = { | ||
1865 | .vecs = | ||
1866 | hmac_sha1_des3_ede_cbc_enc_tv_temp, | ||
1867 | .count = | ||
1868 | HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC | ||
1839 | } | 1869 | } |
1840 | } | 1870 | } |
1841 | } | 1871 | } |
@@ -1846,12 +1876,44 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1846 | .suite = { | 1876 | .suite = { |
1847 | .aead = { | 1877 | .aead = { |
1848 | .enc = { | 1878 | .enc = { |
1849 | .vecs = hmac_sha1_ecb_cipher_null_enc_tv_template, | 1879 | .vecs = |
1850 | .count = HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VECTORS | 1880 | hmac_sha1_ecb_cipher_null_enc_tv_temp, |
1881 | .count = | ||
1882 | HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC | ||
1851 | }, | 1883 | }, |
1852 | .dec = { | 1884 | .dec = { |
1853 | .vecs = hmac_sha1_ecb_cipher_null_dec_tv_template, | 1885 | .vecs = |
1854 | .count = HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VECTORS | 1886 | hmac_sha1_ecb_cipher_null_dec_tv_temp, |
1887 | .count = | ||
1888 | HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC | ||
1889 | } | ||
1890 | } | ||
1891 | } | ||
1892 | }, { | ||
1893 | .alg = "authenc(hmac(sha224),cbc(des))", | ||
1894 | .test = alg_test_aead, | ||
1895 | .fips_allowed = 1, | ||
1896 | .suite = { | ||
1897 | .aead = { | ||
1898 | .enc = { | ||
1899 | .vecs = | ||
1900 | hmac_sha224_des_cbc_enc_tv_temp, | ||
1901 | .count = | ||
1902 | HMAC_SHA224_DES_CBC_ENC_TEST_VEC | ||
1903 | } | ||
1904 | } | ||
1905 | } | ||
1906 | }, { | ||
1907 | .alg = "authenc(hmac(sha224),cbc(des3_ede))", | ||
1908 | .test = alg_test_aead, | ||
1909 | .fips_allowed = 1, | ||
1910 | .suite = { | ||
1911 | .aead = { | ||
1912 | .enc = { | ||
1913 | .vecs = | ||
1914 | hmac_sha224_des3_ede_cbc_enc_tv_temp, | ||
1915 | .count = | ||
1916 | HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC | ||
1855 | } | 1917 | } |
1856 | } | 1918 | } |
1857 | } | 1919 | } |
@@ -1862,8 +1924,66 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1862 | .suite = { | 1924 | .suite = { |
1863 | .aead = { | 1925 | .aead = { |
1864 | .enc = { | 1926 | .enc = { |
1865 | .vecs = hmac_sha256_aes_cbc_enc_tv_template, | 1927 | .vecs = |
1866 | .count = HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS | 1928 | hmac_sha256_aes_cbc_enc_tv_temp, |
1929 | .count = | ||
1930 | HMAC_SHA256_AES_CBC_ENC_TEST_VEC | ||
1931 | } | ||
1932 | } | ||
1933 | } | ||
1934 | }, { | ||
1935 | .alg = "authenc(hmac(sha256),cbc(des))", | ||
1936 | .test = alg_test_aead, | ||
1937 | .fips_allowed = 1, | ||
1938 | .suite = { | ||
1939 | .aead = { | ||
1940 | .enc = { | ||
1941 | .vecs = | ||
1942 | hmac_sha256_des_cbc_enc_tv_temp, | ||
1943 | .count = | ||
1944 | HMAC_SHA256_DES_CBC_ENC_TEST_VEC | ||
1945 | } | ||
1946 | } | ||
1947 | } | ||
1948 | }, { | ||
1949 | .alg = "authenc(hmac(sha256),cbc(des3_ede))", | ||
1950 | .test = alg_test_aead, | ||
1951 | .fips_allowed = 1, | ||
1952 | .suite = { | ||
1953 | .aead = { | ||
1954 | .enc = { | ||
1955 | .vecs = | ||
1956 | hmac_sha256_des3_ede_cbc_enc_tv_temp, | ||
1957 | .count = | ||
1958 | HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC | ||
1959 | } | ||
1960 | } | ||
1961 | } | ||
1962 | }, { | ||
1963 | .alg = "authenc(hmac(sha384),cbc(des))", | ||
1964 | .test = alg_test_aead, | ||
1965 | .fips_allowed = 1, | ||
1966 | .suite = { | ||
1967 | .aead = { | ||
1968 | .enc = { | ||
1969 | .vecs = | ||
1970 | hmac_sha384_des_cbc_enc_tv_temp, | ||
1971 | .count = | ||
1972 | HMAC_SHA384_DES_CBC_ENC_TEST_VEC | ||
1973 | } | ||
1974 | } | ||
1975 | } | ||
1976 | }, { | ||
1977 | .alg = "authenc(hmac(sha384),cbc(des3_ede))", | ||
1978 | .test = alg_test_aead, | ||
1979 | .fips_allowed = 1, | ||
1980 | .suite = { | ||
1981 | .aead = { | ||
1982 | .enc = { | ||
1983 | .vecs = | ||
1984 | hmac_sha384_des3_ede_cbc_enc_tv_temp, | ||
1985 | .count = | ||
1986 | HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC | ||
1867 | } | 1987 | } |
1868 | } | 1988 | } |
1869 | } | 1989 | } |
@@ -1874,8 +1994,38 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
1874 | .suite = { | 1994 | .suite = { |
1875 | .aead = { | 1995 | .aead = { |
1876 | .enc = { | 1996 | .enc = { |
1877 | .vecs = hmac_sha512_aes_cbc_enc_tv_template, | 1997 | .vecs = |
1878 | .count = HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS | 1998 | hmac_sha512_aes_cbc_enc_tv_temp, |
1999 | .count = | ||
2000 | HMAC_SHA512_AES_CBC_ENC_TEST_VEC | ||
2001 | } | ||
2002 | } | ||
2003 | } | ||
2004 | }, { | ||
2005 | .alg = "authenc(hmac(sha512),cbc(des))", | ||
2006 | .test = alg_test_aead, | ||
2007 | .fips_allowed = 1, | ||
2008 | .suite = { | ||
2009 | .aead = { | ||
2010 | .enc = { | ||
2011 | .vecs = | ||
2012 | hmac_sha512_des_cbc_enc_tv_temp, | ||
2013 | .count = | ||
2014 | HMAC_SHA512_DES_CBC_ENC_TEST_VEC | ||
2015 | } | ||
2016 | } | ||
2017 | } | ||
2018 | }, { | ||
2019 | .alg = "authenc(hmac(sha512),cbc(des3_ede))", | ||
2020 | .test = alg_test_aead, | ||
2021 | .fips_allowed = 1, | ||
2022 | .suite = { | ||
2023 | .aead = { | ||
2024 | .enc = { | ||
2025 | .vecs = | ||
2026 | hmac_sha512_des3_ede_cbc_enc_tv_temp, | ||
2027 | .count = | ||
2028 | HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC | ||
1879 | } | 2029 | } |
1880 | } | 2030 | } |
1881 | } | 2031 | } |
@@ -3276,8 +3426,8 @@ test_done: | |||
3276 | panic("%s: %s alg self test failed in fips mode!\n", driver, alg); | 3426 | panic("%s: %s alg self test failed in fips mode!\n", driver, alg); |
3277 | 3427 | ||
3278 | if (fips_enabled && !rc) | 3428 | if (fips_enabled && !rc) |
3279 | printk(KERN_INFO "alg: self-tests for %s (%s) passed\n", | 3429 | pr_info(KERN_INFO "alg: self-tests for %s (%s) passed\n", |
3280 | driver, alg); | 3430 | driver, alg); |
3281 | 3431 | ||
3282 | return rc; | 3432 | return rc; |
3283 | 3433 | ||
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 3c95bda11d51..69d0dd8ef27e 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
@@ -13556,11 +13556,11 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = { | |||
13556 | #define AES_CBC_DEC_TEST_VECTORS 5 | 13556 | #define AES_CBC_DEC_TEST_VECTORS 5 |
13557 | #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 | 13557 | #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 |
13558 | #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 | 13558 | #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 |
13559 | #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 | 13559 | #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2 |
13560 | #define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 | 13560 | #define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2 |
13561 | #define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7 | 13561 | #define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7 |
13562 | #define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7 | 13562 | #define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7 |
13563 | #define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7 | 13563 | #define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7 |
13564 | #define AES_LRW_ENC_TEST_VECTORS 8 | 13564 | #define AES_LRW_ENC_TEST_VECTORS 8 |
13565 | #define AES_LRW_DEC_TEST_VECTORS 8 | 13565 | #define AES_LRW_DEC_TEST_VECTORS 8 |
13566 | #define AES_XTS_ENC_TEST_VECTORS 5 | 13566 | #define AES_XTS_ENC_TEST_VECTORS 5 |
@@ -14448,7 +14448,7 @@ static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = { | |||
14448 | }, | 14448 | }, |
14449 | }; | 14449 | }; |
14450 | 14450 | ||
14451 | static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = { | 14451 | static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = { |
14452 | { /* RFC 3602 Case 1 */ | 14452 | { /* RFC 3602 Case 1 */ |
14453 | #ifdef __LITTLE_ENDIAN | 14453 | #ifdef __LITTLE_ENDIAN |
14454 | .key = "\x08\x00" /* rta length */ | 14454 | .key = "\x08\x00" /* rta length */ |
@@ -14697,7 +14697,7 @@ static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = { | |||
14697 | }, | 14697 | }, |
14698 | }; | 14698 | }; |
14699 | 14699 | ||
14700 | static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_template[] = { | 14700 | static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = { |
14701 | { /* Input data from RFC 2410 Case 1 */ | 14701 | { /* Input data from RFC 2410 Case 1 */ |
14702 | #ifdef __LITTLE_ENDIAN | 14702 | #ifdef __LITTLE_ENDIAN |
14703 | .key = "\x08\x00" /* rta length */ | 14703 | .key = "\x08\x00" /* rta length */ |
@@ -14743,7 +14743,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_template[] = { | |||
14743 | }, | 14743 | }, |
14744 | }; | 14744 | }; |
14745 | 14745 | ||
14746 | static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_template[] = { | 14746 | static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = { |
14747 | { | 14747 | { |
14748 | #ifdef __LITTLE_ENDIAN | 14748 | #ifdef __LITTLE_ENDIAN |
14749 | .key = "\x08\x00" /* rta length */ | 14749 | .key = "\x08\x00" /* rta length */ |
@@ -14789,7 +14789,7 @@ static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_template[] = { | |||
14789 | }, | 14789 | }, |
14790 | }; | 14790 | }; |
14791 | 14791 | ||
14792 | static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = { | 14792 | static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = { |
14793 | { /* RFC 3602 Case 1 */ | 14793 | { /* RFC 3602 Case 1 */ |
14794 | #ifdef __LITTLE_ENDIAN | 14794 | #ifdef __LITTLE_ENDIAN |
14795 | .key = "\x08\x00" /* rta length */ | 14795 | .key = "\x08\x00" /* rta length */ |
@@ -15052,7 +15052,7 @@ static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = { | |||
15052 | }, | 15052 | }, |
15053 | }; | 15053 | }; |
15054 | 15054 | ||
15055 | static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = { | 15055 | static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = { |
15056 | { /* RFC 3602 Case 1 */ | 15056 | { /* RFC 3602 Case 1 */ |
15057 | #ifdef __LITTLE_ENDIAN | 15057 | #ifdef __LITTLE_ENDIAN |
15058 | .key = "\x08\x00" /* rta length */ | 15058 | .key = "\x08\x00" /* rta length */ |
@@ -15371,6 +15371,652 @@ static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = { | |||
15371 | }, | 15371 | }, |
15372 | }; | 15372 | }; |
15373 | 15373 | ||
15374 | #define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1 | ||
15375 | |||
15376 | static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = { | ||
15377 | { /*Generated with cryptopp*/ | ||
15378 | #ifdef __LITTLE_ENDIAN | ||
15379 | .key = "\x08\x00" /* rta length */ | ||
15380 | "\x01\x00" /* rta type */ | ||
15381 | #else | ||
15382 | .key = "\x00\x08" /* rta length */ | ||
15383 | "\x00\x01" /* rta type */ | ||
15384 | #endif | ||
15385 | "\x00\x00\x00\x08" /* enc key length */ | ||
15386 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15387 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15388 | "\x22\x33\x44\x55" | ||
15389 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", | ||
15390 | .klen = 8 + 20 + 8, | ||
15391 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15392 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15393 | .alen = 8, | ||
15394 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15395 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15396 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15397 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15398 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15399 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15400 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15401 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15402 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15403 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15404 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15405 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15406 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15407 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15408 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15409 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15410 | .ilen = 128, | ||
15411 | .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" | ||
15412 | "\x54\x31\x85\x37\xed\x6b\x01\x8d" | ||
15413 | "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" | ||
15414 | "\x41\xaa\x33\x91\xa7\x7d\x99\x88" | ||
15415 | "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" | ||
15416 | "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" | ||
15417 | "\xaa\x9c\x11\xd5\x76\x67\xce\xde" | ||
15418 | "\x56\xd7\x5a\x80\x69\xea\x3a\x02" | ||
15419 | "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" | ||
15420 | "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" | ||
15421 | "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" | ||
15422 | "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" | ||
15423 | "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" | ||
15424 | "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" | ||
15425 | "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" | ||
15426 | "\x53\xba\xe1\x76\xe3\x82\x07\x86" | ||
15427 | "\x95\x16\x20\x09\xf5\x95\x19\xfd" | ||
15428 | "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa" | ||
15429 | "\x5c\x44\xa9\x37", | ||
15430 | .rlen = 128 + 20, | ||
15431 | }, | ||
15432 | }; | ||
15433 | |||
15434 | #define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1 | ||
15435 | |||
15436 | static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = { | ||
15437 | { /*Generated with cryptopp*/ | ||
15438 | #ifdef __LITTLE_ENDIAN | ||
15439 | .key = "\x08\x00" /* rta length */ | ||
15440 | "\x01\x00" /* rta type */ | ||
15441 | #else | ||
15442 | .key = "\x00\x08" /* rta length */ | ||
15443 | "\x00\x01" /* rta type */ | ||
15444 | #endif | ||
15445 | "\x00\x00\x00\x08" /* enc key length */ | ||
15446 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15447 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15448 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15449 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", | ||
15450 | .klen = 8 + 24 + 8, | ||
15451 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15452 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15453 | .alen = 8, | ||
15454 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15455 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15456 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15457 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15458 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15459 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15460 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15461 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15462 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15463 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15464 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15465 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15466 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15467 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15468 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15469 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15470 | .ilen = 128, | ||
15471 | .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" | ||
15472 | "\x54\x31\x85\x37\xed\x6b\x01\x8d" | ||
15473 | "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" | ||
15474 | "\x41\xaa\x33\x91\xa7\x7d\x99\x88" | ||
15475 | "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" | ||
15476 | "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" | ||
15477 | "\xaa\x9c\x11\xd5\x76\x67\xce\xde" | ||
15478 | "\x56\xd7\x5a\x80\x69\xea\x3a\x02" | ||
15479 | "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" | ||
15480 | "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" | ||
15481 | "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" | ||
15482 | "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" | ||
15483 | "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" | ||
15484 | "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" | ||
15485 | "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" | ||
15486 | "\x53\xba\xe1\x76\xe3\x82\x07\x86" | ||
15487 | "\x9c\x2d\x7e\xee\x20\x34\x55\x0a" | ||
15488 | "\xce\xb5\x4e\x64\x53\xe7\xbf\x91" | ||
15489 | "\xab\xd4\xd9\xda\xc9\x12\xae\xf7", | ||
15490 | .rlen = 128 + 24, | ||
15491 | }, | ||
15492 | }; | ||
15493 | |||
15494 | #define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1 | ||
15495 | |||
15496 | static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = { | ||
15497 | { /*Generated with cryptopp*/ | ||
15498 | #ifdef __LITTLE_ENDIAN | ||
15499 | .key = "\x08\x00" /* rta length */ | ||
15500 | "\x01\x00" /* rta type */ | ||
15501 | #else | ||
15502 | .key = "\x00\x08" /* rta length */ | ||
15503 | "\x00\x01" /* rta type */ | ||
15504 | #endif | ||
15505 | "\x00\x00\x00\x08" /* enc key length */ | ||
15506 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15507 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15508 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15509 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15510 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", | ||
15511 | .klen = 8 + 32 + 8, | ||
15512 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15513 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15514 | .alen = 8, | ||
15515 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15516 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15517 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15518 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15519 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15520 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15521 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15522 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15523 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15524 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15525 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15526 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15527 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15528 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15529 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15530 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15531 | .ilen = 128, | ||
15532 | .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" | ||
15533 | "\x54\x31\x85\x37\xed\x6b\x01\x8d" | ||
15534 | "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" | ||
15535 | "\x41\xaa\x33\x91\xa7\x7d\x99\x88" | ||
15536 | "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" | ||
15537 | "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" | ||
15538 | "\xaa\x9c\x11\xd5\x76\x67\xce\xde" | ||
15539 | "\x56\xd7\x5a\x80\x69\xea\x3a\x02" | ||
15540 | "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" | ||
15541 | "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" | ||
15542 | "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" | ||
15543 | "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" | ||
15544 | "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" | ||
15545 | "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" | ||
15546 | "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" | ||
15547 | "\x53\xba\xe1\x76\xe3\x82\x07\x86" | ||
15548 | "\xc6\x58\xa1\x60\x70\x91\x39\x36" | ||
15549 | "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e" | ||
15550 | "\xde\x63\xde\x76\x52\xde\x9f\xba" | ||
15551 | "\x90\xcf\x15\xf2\xbb\x6e\x84\x00", | ||
15552 | .rlen = 128 + 32, | ||
15553 | }, | ||
15554 | }; | ||
15555 | |||
15556 | #define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1 | ||
15557 | |||
15558 | static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = { | ||
15559 | { /*Generated with cryptopp*/ | ||
15560 | #ifdef __LITTLE_ENDIAN | ||
15561 | .key = "\x08\x00" /* rta length */ | ||
15562 | "\x01\x00" /* rta type */ | ||
15563 | #else | ||
15564 | .key = "\x00\x08" /* rta length */ | ||
15565 | "\x00\x01" /* rta type */ | ||
15566 | #endif | ||
15567 | "\x00\x00\x00\x08" /* enc key length */ | ||
15568 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15569 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15570 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15571 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15572 | "\x33\x44\x55\x66\x77\x88\x99\xaa" | ||
15573 | "\xbb\xcc\xdd\xee\xff\x11\x22\x33" | ||
15574 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", | ||
15575 | .klen = 8 + 48 + 8, | ||
15576 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15577 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15578 | .alen = 8, | ||
15579 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15580 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15581 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15582 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15583 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15584 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15585 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15586 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15587 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15588 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15589 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15590 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15591 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15592 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15593 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15594 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15595 | .ilen = 128, | ||
15596 | .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" | ||
15597 | "\x54\x31\x85\x37\xed\x6b\x01\x8d" | ||
15598 | "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" | ||
15599 | "\x41\xaa\x33\x91\xa7\x7d\x99\x88" | ||
15600 | "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" | ||
15601 | "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" | ||
15602 | "\xaa\x9c\x11\xd5\x76\x67\xce\xde" | ||
15603 | "\x56\xd7\x5a\x80\x69\xea\x3a\x02" | ||
15604 | "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" | ||
15605 | "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" | ||
15606 | "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" | ||
15607 | "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" | ||
15608 | "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" | ||
15609 | "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" | ||
15610 | "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" | ||
15611 | "\x53\xba\xe1\x76\xe3\x82\x07\x86" | ||
15612 | "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0" | ||
15613 | "\xc8\x8c\xef\x25\x07\x83\x11\x3a" | ||
15614 | "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe" | ||
15615 | "\x5e\x67\xb5\x74\xe7\xe7\x85\x61" | ||
15616 | "\x6a\x95\x26\x75\xcc\x53\x89\xf3" | ||
15617 | "\x74\xc9\x2a\x76\x20\xa2\x64\x62", | ||
15618 | .rlen = 128 + 48, | ||
15619 | }, | ||
15620 | }; | ||
15621 | |||
15622 | #define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1 | ||
15623 | |||
15624 | static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = { | ||
15625 | { /*Generated with cryptopp*/ | ||
15626 | #ifdef __LITTLE_ENDIAN | ||
15627 | .key = "\x08\x00" /* rta length */ | ||
15628 | "\x01\x00" /* rta type */ | ||
15629 | #else | ||
15630 | .key = "\x00\x08" /* rta length */ | ||
15631 | "\x00\x01" /* rta type */ | ||
15632 | #endif | ||
15633 | "\x00\x00\x00\x08" /* enc key length */ | ||
15634 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15635 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15636 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15637 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15638 | "\x33\x44\x55\x66\x77\x88\x99\xaa" | ||
15639 | "\xbb\xcc\xdd\xee\xff\x11\x22\x33" | ||
15640 | "\x44\x55\x66\x77\x88\x99\xaa\xbb" | ||
15641 | "\xcc\xdd\xee\xff\x11\x22\x33\x44" | ||
15642 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", | ||
15643 | .klen = 8 + 64 + 8, | ||
15644 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15645 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15646 | .alen = 8, | ||
15647 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15648 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15649 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15650 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15651 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15652 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15653 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15654 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15655 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15656 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15657 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15658 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15659 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15660 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15661 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15662 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15663 | .ilen = 128, | ||
15664 | .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" | ||
15665 | "\x54\x31\x85\x37\xed\x6b\x01\x8d" | ||
15666 | "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" | ||
15667 | "\x41\xaa\x33\x91\xa7\x7d\x99\x88" | ||
15668 | "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" | ||
15669 | "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" | ||
15670 | "\xaa\x9c\x11\xd5\x76\x67\xce\xde" | ||
15671 | "\x56\xd7\x5a\x80\x69\xea\x3a\x02" | ||
15672 | "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" | ||
15673 | "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" | ||
15674 | "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" | ||
15675 | "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" | ||
15676 | "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" | ||
15677 | "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" | ||
15678 | "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" | ||
15679 | "\x53\xba\xe1\x76\xe3\x82\x07\x86" | ||
15680 | "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e" | ||
15681 | "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb" | ||
15682 | "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb" | ||
15683 | "\x58\x83\xda\x67\xfb\x21\x24\xa2" | ||
15684 | "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93" | ||
15685 | "\x97\xe2\xe3\xb8\xaa\x48\x85\xee" | ||
15686 | "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96" | ||
15687 | "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b", | ||
15688 | .rlen = 128 + 64, | ||
15689 | }, | ||
15690 | }; | ||
15691 | |||
15692 | #define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
15693 | |||
15694 | static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = { | ||
15695 | { /*Generated with cryptopp*/ | ||
15696 | #ifdef __LITTLE_ENDIAN | ||
15697 | .key = "\x08\x00" /* rta length */ | ||
15698 | "\x01\x00" /* rta type */ | ||
15699 | #else | ||
15700 | .key = "\x00\x08" /* rta length */ | ||
15701 | "\x00\x01" /* rta type */ | ||
15702 | #endif | ||
15703 | "\x00\x00\x00\x18" /* enc key length */ | ||
15704 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15705 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15706 | "\x22\x33\x44\x55" | ||
15707 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" | ||
15708 | "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" | ||
15709 | "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8", | ||
15710 | .klen = 8 + 20 + 24, | ||
15711 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15712 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15713 | .alen = 8, | ||
15714 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15715 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15716 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15717 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15718 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15719 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15720 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15721 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15722 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15723 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15724 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15725 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15726 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15727 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15728 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15729 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15730 | .ilen = 128, | ||
15731 | .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4" | ||
15732 | "\x67\x17\x21\xc7\x6e\x8a\xd5\x49" | ||
15733 | "\x74\xb3\x49\x05\xc5\x1c\xd0\xed" | ||
15734 | "\x12\x56\x5c\x53\x96\xb6\x00\x7d" | ||
15735 | "\x90\x48\xfc\xf5\x8d\x29\x39\xcc" | ||
15736 | "\x8a\xd5\x35\x18\x36\x23\x4e\xd7" | ||
15737 | "\x76\xd1\xda\x0c\x94\x67\xbb\x04" | ||
15738 | "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea" | ||
15739 | "\x22\x64\x47\xaa\x8f\x75\x13\xbf" | ||
15740 | "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a" | ||
15741 | "\x71\x63\x2e\x89\x7b\x1e\x12\xca" | ||
15742 | "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a" | ||
15743 | "\xd6\xf9\x21\x31\x62\x44\x45\xa6" | ||
15744 | "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc" | ||
15745 | "\x9d\xde\xa5\x70\xe9\x42\x45\x8a" | ||
15746 | "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19" | ||
15747 | "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6" | ||
15748 | "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf" | ||
15749 | "\xd1\x60\x91\xb3", | ||
15750 | .rlen = 128 + 20, | ||
15751 | }, | ||
15752 | }; | ||
15753 | |||
15754 | #define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
15755 | |||
15756 | static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = { | ||
15757 | { /*Generated with cryptopp*/ | ||
15758 | #ifdef __LITTLE_ENDIAN | ||
15759 | .key = "\x08\x00" /* rta length */ | ||
15760 | "\x01\x00" /* rta type */ | ||
15761 | #else | ||
15762 | .key = "\x00\x08" /* rta length */ | ||
15763 | "\x00\x01" /* rta type */ | ||
15764 | #endif | ||
15765 | "\x00\x00\x00\x18" /* enc key length */ | ||
15766 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15767 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15768 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15769 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" | ||
15770 | "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" | ||
15771 | "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8", | ||
15772 | .klen = 8 + 24 + 24, | ||
15773 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15774 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15775 | .alen = 8, | ||
15776 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15777 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15778 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15779 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15780 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15781 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15782 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15783 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15784 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15785 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15786 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15787 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15788 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15789 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15790 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15791 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15792 | .ilen = 128, | ||
15793 | .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4" | ||
15794 | "\x67\x17\x21\xc7\x6e\x8a\xd5\x49" | ||
15795 | "\x74\xb3\x49\x05\xc5\x1c\xd0\xed" | ||
15796 | "\x12\x56\x5c\x53\x96\xb6\x00\x7d" | ||
15797 | "\x90\x48\xfc\xf5\x8d\x29\x39\xcc" | ||
15798 | "\x8a\xd5\x35\x18\x36\x23\x4e\xd7" | ||
15799 | "\x76\xd1\xda\x0c\x94\x67\xbb\x04" | ||
15800 | "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea" | ||
15801 | "\x22\x64\x47\xaa\x8f\x75\x13\xbf" | ||
15802 | "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a" | ||
15803 | "\x71\x63\x2e\x89\x7b\x1e\x12\xca" | ||
15804 | "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a" | ||
15805 | "\xd6\xf9\x21\x31\x62\x44\x45\xa6" | ||
15806 | "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc" | ||
15807 | "\x9d\xde\xa5\x70\xe9\x42\x45\x8a" | ||
15808 | "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19" | ||
15809 | "\x15\x24\x7f\x5a\x45\x4a\x66\xce" | ||
15810 | "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c" | ||
15811 | "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0", | ||
15812 | .rlen = 128 + 24, | ||
15813 | }, | ||
15814 | }; | ||
15815 | |||
15816 | #define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
15817 | |||
15818 | static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = { | ||
15819 | { /*Generated with cryptopp*/ | ||
15820 | #ifdef __LITTLE_ENDIAN | ||
15821 | .key = "\x08\x00" /* rta length */ | ||
15822 | "\x01\x00" /* rta type */ | ||
15823 | #else | ||
15824 | .key = "\x00\x08" /* rta length */ | ||
15825 | "\x00\x01" /* rta type */ | ||
15826 | #endif | ||
15827 | "\x00\x00\x00\x18" /* enc key length */ | ||
15828 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15829 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15830 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15831 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15832 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" | ||
15833 | "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" | ||
15834 | "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8", | ||
15835 | .klen = 8 + 32 + 24, | ||
15836 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15837 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15838 | .alen = 8, | ||
15839 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15840 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15841 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15842 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15843 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15844 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15845 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15846 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15847 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15848 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15849 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15850 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15851 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15852 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15853 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15854 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15855 | .ilen = 128, | ||
15856 | .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4" | ||
15857 | "\x67\x17\x21\xc7\x6e\x8a\xd5\x49" | ||
15858 | "\x74\xb3\x49\x05\xc5\x1c\xd0\xed" | ||
15859 | "\x12\x56\x5c\x53\x96\xb6\x00\x7d" | ||
15860 | "\x90\x48\xfc\xf5\x8d\x29\x39\xcc" | ||
15861 | "\x8a\xd5\x35\x18\x36\x23\x4e\xd7" | ||
15862 | "\x76\xd1\xda\x0c\x94\x67\xbb\x04" | ||
15863 | "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea" | ||
15864 | "\x22\x64\x47\xaa\x8f\x75\x13\xbf" | ||
15865 | "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a" | ||
15866 | "\x71\x63\x2e\x89\x7b\x1e\x12\xca" | ||
15867 | "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a" | ||
15868 | "\xd6\xf9\x21\x31\x62\x44\x45\xa6" | ||
15869 | "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc" | ||
15870 | "\x9d\xde\xa5\x70\xe9\x42\x45\x8a" | ||
15871 | "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19" | ||
15872 | "\x73\xb0\xea\x9f\xe8\x18\x80\xd6" | ||
15873 | "\x56\x38\x44\xc0\xdb\xe3\x4f\x71" | ||
15874 | "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f" | ||
15875 | "\xca\x43\x95\xdf\x80\x61\x81\xa9", | ||
15876 | .rlen = 128 + 32, | ||
15877 | }, | ||
15878 | }; | ||
15879 | |||
15880 | #define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
15881 | |||
15882 | static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = { | ||
15883 | { /*Generated with cryptopp*/ | ||
15884 | #ifdef __LITTLE_ENDIAN | ||
15885 | .key = "\x08\x00" /* rta length */ | ||
15886 | "\x01\x00" /* rta type */ | ||
15887 | #else | ||
15888 | .key = "\x00\x08" /* rta length */ | ||
15889 | "\x00\x01" /* rta type */ | ||
15890 | #endif | ||
15891 | "\x00\x00\x00\x18" /* enc key length */ | ||
15892 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15893 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15894 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15895 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15896 | "\x33\x44\x55\x66\x77\x88\x99\xaa" | ||
15897 | "\xbb\xcc\xdd\xee\xff\x11\x22\x33" | ||
15898 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" | ||
15899 | "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" | ||
15900 | "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8", | ||
15901 | .klen = 8 + 48 + 24, | ||
15902 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15903 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15904 | .alen = 8, | ||
15905 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15906 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15907 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15908 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15909 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15910 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15911 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15912 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15913 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15914 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15915 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15916 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15917 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15918 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15919 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15920 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15921 | .ilen = 128, | ||
15922 | .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4" | ||
15923 | "\x67\x17\x21\xc7\x6e\x8a\xd5\x49" | ||
15924 | "\x74\xb3\x49\x05\xc5\x1c\xd0\xed" | ||
15925 | "\x12\x56\x5c\x53\x96\xb6\x00\x7d" | ||
15926 | "\x90\x48\xfc\xf5\x8d\x29\x39\xcc" | ||
15927 | "\x8a\xd5\x35\x18\x36\x23\x4e\xd7" | ||
15928 | "\x76\xd1\xda\x0c\x94\x67\xbb\x04" | ||
15929 | "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea" | ||
15930 | "\x22\x64\x47\xaa\x8f\x75\x13\xbf" | ||
15931 | "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a" | ||
15932 | "\x71\x63\x2e\x89\x7b\x1e\x12\xca" | ||
15933 | "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a" | ||
15934 | "\xd6\xf9\x21\x31\x62\x44\x45\xa6" | ||
15935 | "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc" | ||
15936 | "\x9d\xde\xa5\x70\xe9\x42\x45\x8a" | ||
15937 | "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19" | ||
15938 | "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7" | ||
15939 | "\x70\xe7\x93\xbf\x73\xe6\x9f\x83" | ||
15940 | "\x99\x62\x23\xe6\x5b\xd0\xda\x18" | ||
15941 | "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39" | ||
15942 | "\x36\x5d\x13\x2f\x86\x10\x78\xd6" | ||
15943 | "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b", | ||
15944 | .rlen = 128 + 48, | ||
15945 | }, | ||
15946 | }; | ||
15947 | |||
15948 | #define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1 | ||
15949 | |||
15950 | static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = { | ||
15951 | { /*Generated with cryptopp*/ | ||
15952 | #ifdef __LITTLE_ENDIAN | ||
15953 | .key = "\x08\x00" /* rta length */ | ||
15954 | "\x01\x00" /* rta type */ | ||
15955 | #else | ||
15956 | .key = "\x00\x08" /* rta length */ | ||
15957 | "\x00\x01" /* rta type */ | ||
15958 | #endif | ||
15959 | "\x00\x00\x00\x18" /* enc key length */ | ||
15960 | "\x11\x22\x33\x44\x55\x66\x77\x88" | ||
15961 | "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" | ||
15962 | "\x22\x33\x44\x55\x66\x77\x88\x99" | ||
15963 | "\xaa\xbb\xcc\xdd\xee\xff\x11\x22" | ||
15964 | "\x33\x44\x55\x66\x77\x88\x99\xaa" | ||
15965 | "\xbb\xcc\xdd\xee\xff\x11\x22\x33" | ||
15966 | "\x44\x55\x66\x77\x88\x99\xaa\xbb" | ||
15967 | "\xcc\xdd\xee\xff\x11\x22\x33\x44" | ||
15968 | "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24" | ||
15969 | "\x44\x4D\x99\x5A\x12\xD6\x40\xC0" | ||
15970 | "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8", | ||
15971 | .klen = 8 + 64 + 24, | ||
15972 | .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", | ||
15973 | .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", | ||
15974 | .alen = 8, | ||
15975 | .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" | ||
15976 | "\x53\x20\x63\x65\x65\x72\x73\x74" | ||
15977 | "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" | ||
15978 | "\x20\x79\x65\x53\x72\x63\x74\x65" | ||
15979 | "\x20\x73\x6f\x54\x20\x6f\x61\x4d" | ||
15980 | "\x79\x6e\x53\x20\x63\x65\x65\x72" | ||
15981 | "\x73\x74\x54\x20\x6f\x6f\x4d\x20" | ||
15982 | "\x6e\x61\x20\x79\x65\x53\x72\x63" | ||
15983 | "\x74\x65\x20\x73\x6f\x54\x20\x6f" | ||
15984 | "\x61\x4d\x79\x6e\x53\x20\x63\x65" | ||
15985 | "\x65\x72\x73\x74\x54\x20\x6f\x6f" | ||
15986 | "\x4d\x20\x6e\x61\x20\x79\x65\x53" | ||
15987 | "\x72\x63\x74\x65\x20\x73\x6f\x54" | ||
15988 | "\x20\x6f\x61\x4d\x79\x6e\x53\x20" | ||
15989 | "\x63\x65\x65\x72\x73\x74\x54\x20" | ||
15990 | "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", | ||
15991 | .ilen = 128, | ||
15992 | .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4" | ||
15993 | "\x67\x17\x21\xc7\x6e\x8a\xd5\x49" | ||
15994 | "\x74\xb3\x49\x05\xc5\x1c\xd0\xed" | ||
15995 | "\x12\x56\x5c\x53\x96\xb6\x00\x7d" | ||
15996 | "\x90\x48\xfc\xf5\x8d\x29\x39\xcc" | ||
15997 | "\x8a\xd5\x35\x18\x36\x23\x4e\xd7" | ||
15998 | "\x76\xd1\xda\x0c\x94\x67\xbb\x04" | ||
15999 | "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea" | ||
16000 | "\x22\x64\x47\xaa\x8f\x75\x13\xbf" | ||
16001 | "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a" | ||
16002 | "\x71\x63\x2e\x89\x7b\x1e\x12\xca" | ||
16003 | "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a" | ||
16004 | "\xd6\xf9\x21\x31\x62\x44\x45\xa6" | ||
16005 | "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc" | ||
16006 | "\x9d\xde\xa5\x70\xe9\x42\x45\x8a" | ||
16007 | "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19" | ||
16008 | "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32" | ||
16009 | "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e" | ||
16010 | "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b" | ||
16011 | "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60" | ||
16012 | "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0" | ||
16013 | "\x2a\x74\xd4\x65\x12\xcb\x55\xf2" | ||
16014 | "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2" | ||
16015 | "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb", | ||
16016 | .rlen = 128 + 64, | ||
16017 | }, | ||
16018 | }; | ||
16019 | |||
15374 | static struct cipher_testvec aes_lrw_enc_tv_template[] = { | 16020 | static struct cipher_testvec aes_lrw_enc_tv_template[] = { |
15375 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ | 16021 | /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */ |
15376 | { /* LRW-32-AES 1 */ | 16022 | { /* LRW-32-AES 1 */ |