"cast6", "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
"arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea",
"khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", "fcrypt",
- "camellia", "seed", "salsa20", NULL
+ "camellia", "seed", "salsa20", "lzo", NULL
};
static void hexdump(unsigned char *buf, unsigned int len)
/* setup the dummy buffer first */
memset(xbuf, 0, XBUFSIZE);
- memset(axbuf, 0, XBUFSIZE);
j = 0;
for (i = 0; i < tcount; i++) {
return;
}
- authsize = crypto_aead_authsize(tfm);
-
req = aead_request_alloc(tfm, GFP_KERNEL);
if (!req) {
printk(KERN_INFO "failed to allocate request for %s\n", algo);
goto out;
}
+ authsize = abs(aead_tv[i].rlen - aead_tv[i].ilen);
+ ret = crypto_aead_setauthsize(tfm, authsize);
+ if (ret) {
+ printk(KERN_INFO
+ "failed to set authsize = %u\n",
+ authsize);
+ goto out;
+ }
+
sg_init_one(&sg[0], aead_tv[i].input,
aead_tv[i].ilen + (enc ? authsize : 0));
printk(KERN_INFO "\ntesting %s %s across pages (chunking)\n", algo, e);
memset(xbuf, 0, XBUFSIZE);
+ memset(axbuf, 0, XBUFSIZE);
for (i = 0, j = 0; i < tcount; i++) {
if (aead_tv[i].np) {
aead_tv[i].tap[k]);
}
+ authsize = abs(aead_tv[i].rlen - aead_tv[i].ilen);
+ ret = crypto_aead_setauthsize(tfm, authsize);
+ if (ret) {
+ printk(KERN_INFO
+ "failed to set authsize = %u\n",
+ authsize);
+ goto out;
+ }
+
if (enc)
sg[k - 1].length += authsize;
AES_XTS_ENC_TEST_VECTORS);
test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template,
AES_XTS_DEC_TEST_VECTORS);
- test_cipher("ctr(aes,4,8,4)", ENCRYPT, aes_ctr_enc_tv_template,
+ test_cipher("rfc3686(ctr(aes))", ENCRYPT, aes_ctr_enc_tv_template,
AES_CTR_ENC_TEST_VECTORS);
- test_cipher("ctr(aes,4,8,4)", DECRYPT, aes_ctr_dec_tv_template,
+ test_cipher("rfc3686(ctr(aes))", DECRYPT, aes_ctr_dec_tv_template,
AES_CTR_DEC_TEST_VECTORS);
test_aead("gcm(aes)", ENCRYPT, aes_gcm_enc_tv_template,
AES_GCM_ENC_TEST_VECTORS);
test_aead("gcm(aes)", DECRYPT, aes_gcm_dec_tv_template,
AES_GCM_DEC_TEST_VECTORS);
+ test_aead("ccm(aes)", ENCRYPT, aes_ccm_enc_tv_template,
+ AES_CCM_ENC_TEST_VECTORS);
+ test_aead("ccm(aes)", DECRYPT, aes_ccm_dec_tv_template,
+ AES_CCM_DEC_TEST_VECTORS);
//CAST5
test_cipher("ecb(cast5)", ENCRYPT, cast5_enc_tv_template,
test_comp("deflate", deflate_comp_tv_template,
deflate_decomp_tv_template, DEFLATE_COMP_TEST_VECTORS,
DEFLATE_DECOMP_TEST_VECTORS);
+ test_comp("lzo", lzo_comp_tv_template, lzo_decomp_tv_template,
+ LZO_COMP_TEST_VECTORS, LZO_DECOMP_TEST_VECTORS);
test_hash("crc32c", crc32c_tv_template, CRC32C_TEST_VECTORS);
test_hash("hmac(md5)", hmac_md5_tv_template,
HMAC_MD5_TEST_VECTORS);
AES_XTS_ENC_TEST_VECTORS);
test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template,
AES_XTS_DEC_TEST_VECTORS);
- test_cipher("ctr(aes,4,8,4)", ENCRYPT, aes_ctr_enc_tv_template,
+ test_cipher("rfc3686(ctr(aes))", ENCRYPT, aes_ctr_enc_tv_template,
AES_CTR_ENC_TEST_VECTORS);
- test_cipher("ctr(aes,4,8,4)", DECRYPT, aes_ctr_dec_tv_template,
+ test_cipher("rfc3686(ctr(aes))", DECRYPT, aes_ctr_dec_tv_template,
AES_CTR_DEC_TEST_VECTORS);
break;
AES_GCM_DEC_TEST_VECTORS);
break;
+ case 36:
+ test_comp("lzo", lzo_comp_tv_template, lzo_decomp_tv_template,
+ LZO_COMP_TEST_VECTORS, LZO_DECOMP_TEST_VECTORS);
+ break;
+
+ case 37:
+ test_aead("ccm(aes)", ENCRYPT, aes_ccm_enc_tv_template,
+ AES_CCM_ENC_TEST_VECTORS);
+ test_aead("ccm(aes)", DECRYPT, aes_ccm_dec_tv_template,
+ AES_CCM_DEC_TEST_VECTORS);
+ break;
+
case 100:
test_hash("hmac(md5)", hmac_md5_tv_template,
HMAC_MD5_TEST_VECTORS);
test_hash("hmac(sha512)", hmac_sha512_tv_template,
HMAC_SHA512_TEST_VECTORS);
break;
+
case 105:
test_hash("hmac(sha224)", hmac_sha224_tv_template,
HMAC_SHA224_TEST_VECTORS);
break;
+ case 106:
+ test_hash("xcbc(aes)", aes_xcbc128_tv_template,
+ XCBC_AES_TEST_VECTORS);
+ break;
+
case 200:
test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
aes_speed_template);
camellia_speed_template);
break;
+ case 206:
+ test_cipher_speed("salsa20", ENCRYPT, sec, NULL, 0,
+ salsa20_speed_template);
+ break;
+
case 300:
/* fall through */