Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: testmgr - Add test vectors for authenc(hmac(md5),cbc(des))

Test vector was generated using a software implementation and then double
checked on Mediatek MT7981 (safexcel) and NXP P2020 (talitos). Both
platforms pass self-tests.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Aleksander Jan Bajkowski and committed by
Herbert Xu
404ba6b4 0441ee8d

+64
+7
crypto/testmgr.c
··· 4080 4080 .aead = __VECS(aegis128_tv_template) 4081 4081 } 4082 4082 }, { 4083 + .alg = "authenc(hmac(md5),cbc(des))", 4084 + .generic_driver = "authenc(hmac-md5-lib,cbc(des-generic))", 4085 + .test = alg_test_aead, 4086 + .suite = { 4087 + .aead = __VECS(hmac_md5_des_cbc_tv_temp) 4088 + } 4089 + }, { 4083 4090 .alg = "authenc(hmac(md5),cbc(des3_ede))", 4084 4091 .generic_driver = "authenc(hmac-md5-lib,cbc(des3_ede-generic))", 4085 4092 .test = alg_test_aead,
+57
crypto/testmgr.h
··· 16137 16137 }, 16138 16138 }; 16139 16139 16140 + static const struct aead_testvec hmac_md5_des_cbc_tv_temp[] = { 16141 + { /*Generated with cryptopp*/ 16142 + #ifdef __LITTLE_ENDIAN 16143 + .key = "\x08\x00" /* rta length */ 16144 + "\x01\x00" /* rta type */ 16145 + #else 16146 + .key = "\x00\x08" /* rta length */ 16147 + "\x00\x01" /* rta type */ 16148 + #endif 16149 + "\x00\x00\x00\x08" /* enc key length */ 16150 + "\x11\x22\x33\x44\x55\x66\x77\x88" 16151 + "\x99\xaa\xbb\xcc\xdd\xee\xff\x11" 16152 + "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24", 16153 + .klen = 8 + 16 + 8, 16154 + .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42", 16155 + .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01" 16156 + "\x7D\x33\x88\x93\x0F\x93\xB2\x42", 16157 + .alen = 16, 16158 + .ptext = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e" 16159 + "\x53\x20\x63\x65\x65\x72\x73\x74" 16160 + "\x54\x20\x6f\x6f\x4d\x20\x6e\x61" 16161 + "\x20\x79\x65\x53\x72\x63\x74\x65" 16162 + "\x20\x73\x6f\x54\x20\x6f\x61\x4d" 16163 + "\x79\x6e\x53\x20\x63\x65\x65\x72" 16164 + "\x73\x74\x54\x20\x6f\x6f\x4d\x20" 16165 + "\x6e\x61\x20\x79\x65\x53\x72\x63" 16166 + "\x74\x65\x20\x73\x6f\x54\x20\x6f" 16167 + "\x61\x4d\x79\x6e\x53\x20\x63\x65" 16168 + "\x65\x72\x73\x74\x54\x20\x6f\x6f" 16169 + "\x4d\x20\x6e\x61\x20\x79\x65\x53" 16170 + "\x72\x63\x74\x65\x20\x73\x6f\x54" 16171 + "\x20\x6f\x61\x4d\x79\x6e\x53\x20" 16172 + "\x63\x65\x65\x72\x73\x74\x54\x20" 16173 + "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79", 16174 + .plen = 128, 16175 + .ctext = "\x70\xd6\xde\x64\x87\x17\xf1\xe8" 16176 + "\x54\x31\x85\x37\xed\x6b\x01\x8d" 16177 + "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1" 16178 + "\x41\xaa\x33\x91\xa7\x7d\x99\x88" 16179 + "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82" 16180 + "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b" 16181 + "\xaa\x9c\x11\xd5\x76\x67\xce\xde" 16182 + "\x56\xd7\x5a\x80\x69\xea\x3a\x02" 16183 + "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52" 16184 + "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1" 16185 + "\xe3\x26\x1f\xe1\x15\x41\xc7\xba" 16186 + "\x99\xdb\x08\x51\x1c\xd3\x01\xf4" 16187 + "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb" 16188 + "\x66\x13\xdf\x1c\x01\x44\xf0\x7a" 16189 + "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba" 16190 + "\x53\xba\xe1\x76\xe3\x82\x07\x86" 16191 + "\x95\x9e\x7d\x37\x1e\x60\xaf\x7c" 16192 + "\x53\x12\x61\x68\xef\xb4\x47\xa6", 16193 + .clen = 128 + 16, 16194 + }, 16195 + }; 16196 + 16140 16197 static const struct aead_testvec hmac_sha1_des_cbc_tv_temp[] = { 16141 16198 { /*Generated with cryptopp*/ 16142 16199 #ifdef __LITTLE_ENDIAN