Newer
Older
printk(KERN_ERR "alg: comp: Decompression test %d "
"failed for %s: output len = %d\n", i + 1, algo,
dlen);
ret = -EINVAL;
goto out;
}
if (memcmp(result, dtemplate[i].output, dlen)) {
printk(KERN_ERR "alg: comp: Decompression test %d "
"failed for %s\n", i + 1, algo);
hexdump(result, dlen);
ret = -EINVAL;
goto out;
}
}
ret = 0;
out:
return ret;
}
static int test_pcomp(struct crypto_pcomp *tfm,
struct pcomp_testvec *ctemplate,
struct pcomp_testvec *dtemplate, int ctcount,
int dtcount)
{
const char *algo = crypto_tfm_alg_driver_name(crypto_pcomp_tfm(tfm));
unsigned int i;
char result[COMP_BUF_SIZE];
Geert Uytterhoeven
committed
int res;
for (i = 0; i < ctcount; i++) {
struct comp_request req;
Geert Uytterhoeven
committed
unsigned int produced = 0;
Geert Uytterhoeven
committed
res = crypto_compress_setup(tfm, ctemplate[i].params,
ctemplate[i].paramsize);
if (res) {
pr_err("alg: pcomp: compression setup failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
res = crypto_compress_init(tfm);
if (res) {
pr_err("alg: pcomp: compression init failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
}
memset(result, 0, sizeof(result));
req.next_in = ctemplate[i].input;
req.avail_in = ctemplate[i].inlen / 2;
req.next_out = result;
req.avail_out = ctemplate[i].outlen / 2;
Geert Uytterhoeven
committed
res = crypto_compress_update(tfm, &req);
if (res < 0 && (res != -EAGAIN || req.avail_in)) {
pr_err("alg: pcomp: compression update failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
if (res > 0)
produced += res;
/* Add remaining input data */
req.avail_in += (ctemplate[i].inlen + 1) / 2;
Geert Uytterhoeven
committed
res = crypto_compress_update(tfm, &req);
if (res < 0 && (res != -EAGAIN || req.avail_in)) {
pr_err("alg: pcomp: compression update failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
if (res > 0)
produced += res;
/* Provide remaining output space */
req.avail_out += COMP_BUF_SIZE - ctemplate[i].outlen / 2;
Geert Uytterhoeven
committed
res = crypto_compress_final(tfm, &req);
if (res < 0) {
pr_err("alg: pcomp: compression final failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
produced += res;
if (COMP_BUF_SIZE - req.avail_out != ctemplate[i].outlen) {
pr_err("alg: comp: Compression test %d failed for %s: "
"output len = %d (expected %d)\n", i + 1, algo,
COMP_BUF_SIZE - req.avail_out,
ctemplate[i].outlen);
return -EINVAL;
}
Geert Uytterhoeven
committed
if (produced != ctemplate[i].outlen) {
pr_err("alg: comp: Compression test %d failed for %s: "
"returned len = %u (expected %d)\n", i + 1,
algo, produced, ctemplate[i].outlen);
return -EINVAL;
}
if (memcmp(result, ctemplate[i].output, ctemplate[i].outlen)) {
pr_err("alg: pcomp: Compression test %d failed for "
"%s\n", i + 1, algo);
hexdump(result, ctemplate[i].outlen);
return -EINVAL;
}
}
for (i = 0; i < dtcount; i++) {
struct comp_request req;
Geert Uytterhoeven
committed
unsigned int produced = 0;
Geert Uytterhoeven
committed
res = crypto_decompress_setup(tfm, dtemplate[i].params,
dtemplate[i].paramsize);
if (res) {
pr_err("alg: pcomp: decompression setup failed on "
Geert Uytterhoeven
committed
"test %d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
res = crypto_decompress_init(tfm);
if (res) {
pr_err("alg: pcomp: decompression init failed on test "
Geert Uytterhoeven
committed
"%d for %s: error=%d\n", i + 1, algo, res);
return res;
}
memset(result, 0, sizeof(result));
req.next_in = dtemplate[i].input;
req.avail_in = dtemplate[i].inlen / 2;
req.next_out = result;
req.avail_out = dtemplate[i].outlen / 2;
Geert Uytterhoeven
committed
res = crypto_decompress_update(tfm, &req);
if (res < 0 && (res != -EAGAIN || req.avail_in)) {
pr_err("alg: pcomp: decompression update failed on "
Geert Uytterhoeven
committed
"test %d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
if (res > 0)
produced += res;
/* Add remaining input data */
req.avail_in += (dtemplate[i].inlen + 1) / 2;
Geert Uytterhoeven
committed
res = crypto_decompress_update(tfm, &req);
if (res < 0 && (res != -EAGAIN || req.avail_in)) {
pr_err("alg: pcomp: decompression update failed on "
Geert Uytterhoeven
committed
"test %d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
if (res > 0)
produced += res;
/* Provide remaining output space */
req.avail_out += COMP_BUF_SIZE - dtemplate[i].outlen / 2;
Geert Uytterhoeven
committed
res = crypto_decompress_final(tfm, &req);
if (res < 0 && (res != -EAGAIN || req.avail_in)) {
pr_err("alg: pcomp: decompression final failed on "
Geert Uytterhoeven
committed
"test %d for %s: error=%d\n", i + 1, algo, res);
return res;
Geert Uytterhoeven
committed
if (res > 0)
produced += res;
if (COMP_BUF_SIZE - req.avail_out != dtemplate[i].outlen) {
pr_err("alg: comp: Decompression test %d failed for "
"%s: output len = %d (expected %d)\n", i + 1,
algo, COMP_BUF_SIZE - req.avail_out,
dtemplate[i].outlen);
return -EINVAL;
}
Geert Uytterhoeven
committed
if (produced != dtemplate[i].outlen) {
pr_err("alg: comp: Decompression test %d failed for "
"%s: returned len = %u (expected %d)\n", i + 1,
algo, produced, dtemplate[i].outlen);
return -EINVAL;
}
if (memcmp(result, dtemplate[i].output, dtemplate[i].outlen)) {
pr_err("alg: pcomp: Decompression test %d failed for "
"%s\n", i + 1, algo);
hexdump(result, dtemplate[i].outlen);
return -EINVAL;
}
}
return 0;
}
static int test_cprng(struct crypto_rng *tfm, struct cprng_testvec *template,
unsigned int tcount)
{
const char *algo = crypto_tfm_alg_driver_name(crypto_rng_tfm(tfm));
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
u8 *seed;
char result[32];
seedsize = crypto_rng_seedsize(tfm);
seed = kmalloc(seedsize, GFP_KERNEL);
if (!seed) {
printk(KERN_ERR "alg: cprng: Failed to allocate seed space "
"for %s\n", algo);
return -ENOMEM;
}
for (i = 0; i < tcount; i++) {
memset(result, 0, 32);
memcpy(seed, template[i].v, template[i].vlen);
memcpy(seed + template[i].vlen, template[i].key,
template[i].klen);
memcpy(seed + template[i].vlen + template[i].klen,
template[i].dt, template[i].dtlen);
err = crypto_rng_reset(tfm, seed, seedsize);
if (err) {
printk(KERN_ERR "alg: cprng: Failed to reset rng "
"for %s\n", algo);
goto out;
}
for (j = 0; j < template[i].loops; j++) {
err = crypto_rng_get_bytes(tfm, result,
template[i].rlen);
if (err != template[i].rlen) {
printk(KERN_ERR "alg: cprng: Failed to obtain "
"the correct amount of random data for "
"%s (requested %d, got %d)\n", algo,
template[i].rlen, err);
goto out;
}
}
err = memcmp(result, template[i].result,
template[i].rlen);
if (err) {
printk(KERN_ERR "alg: cprng: Test %d failed for %s\n",
i, algo);
hexdump(result, template[i].rlen);
err = -EINVAL;
goto out;
}
}
out:
kfree(seed);
return err;
}
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
static int alg_test_aead(const struct alg_test_desc *desc, const char *driver,
u32 type, u32 mask)
{
struct crypto_aead *tfm;
int err = 0;
tfm = crypto_alloc_aead(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: aead: Failed to load transform for %s: "
"%ld\n", driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
if (desc->suite.aead.enc.vecs) {
err = test_aead(tfm, ENCRYPT, desc->suite.aead.enc.vecs,
desc->suite.aead.enc.count);
if (err)
goto out;
}
if (!err && desc->suite.aead.dec.vecs)
err = test_aead(tfm, DECRYPT, desc->suite.aead.dec.vecs,
desc->suite.aead.dec.count);
out:
crypto_free_aead(tfm);
return err;
}
static int alg_test_cipher(const struct alg_test_desc *desc,
const char *driver, u32 type, u32 mask)
{
tfm = crypto_alloc_cipher(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: cipher: Failed to load transform for "
"%s: %ld\n", driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
if (desc->suite.cipher.enc.vecs) {
err = test_cipher(tfm, ENCRYPT, desc->suite.cipher.enc.vecs,
desc->suite.cipher.enc.count);
if (err)
goto out;
}
if (desc->suite.cipher.dec.vecs)
err = test_cipher(tfm, DECRYPT, desc->suite.cipher.dec.vecs,
desc->suite.cipher.dec.count);
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
out:
crypto_free_cipher(tfm);
return err;
}
static int alg_test_skcipher(const struct alg_test_desc *desc,
const char *driver, u32 type, u32 mask)
{
struct crypto_ablkcipher *tfm;
int err = 0;
tfm = crypto_alloc_ablkcipher(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: skcipher: Failed to load transform for "
"%s: %ld\n", driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
if (desc->suite.cipher.enc.vecs) {
err = test_skcipher(tfm, ENCRYPT, desc->suite.cipher.enc.vecs,
desc->suite.cipher.enc.count);
if (err)
goto out;
}
if (desc->suite.cipher.dec.vecs)
err = test_skcipher(tfm, DECRYPT, desc->suite.cipher.dec.vecs,
desc->suite.cipher.dec.count);
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
out:
crypto_free_ablkcipher(tfm);
return err;
}
static int alg_test_comp(const struct alg_test_desc *desc, const char *driver,
u32 type, u32 mask)
{
struct crypto_comp *tfm;
int err;
tfm = crypto_alloc_comp(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: comp: Failed to load transform for %s: "
"%ld\n", driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
err = test_comp(tfm, desc->suite.comp.comp.vecs,
desc->suite.comp.decomp.vecs,
desc->suite.comp.comp.count,
desc->suite.comp.decomp.count);
crypto_free_comp(tfm);
return err;
}
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
static int alg_test_pcomp(const struct alg_test_desc *desc, const char *driver,
u32 type, u32 mask)
{
struct crypto_pcomp *tfm;
int err;
tfm = crypto_alloc_pcomp(driver, type, mask);
if (IS_ERR(tfm)) {
pr_err("alg: pcomp: Failed to load transform for %s: %ld\n",
driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
err = test_pcomp(tfm, desc->suite.pcomp.comp.vecs,
desc->suite.pcomp.decomp.vecs,
desc->suite.pcomp.comp.count,
desc->suite.pcomp.decomp.count);
crypto_free_pcomp(tfm);
return err;
}
static int alg_test_hash(const struct alg_test_desc *desc, const char *driver,
u32 type, u32 mask)
{
struct crypto_ahash *tfm;
int err;
tfm = crypto_alloc_ahash(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: hash: Failed to load transform for %s: "
"%ld\n", driver, PTR_ERR(tfm));
return PTR_ERR(tfm);
}
err = test_hash(tfm, desc->suite.hash.vecs, desc->suite.hash.count);
crypto_free_ahash(tfm);
return err;
}
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
static int alg_test_crc32c(const struct alg_test_desc *desc,
const char *driver, u32 type, u32 mask)
{
struct crypto_shash *tfm;
u32 val;
int err;
err = alg_test_hash(desc, driver, type, mask);
if (err)
goto out;
tfm = crypto_alloc_shash(driver, type, mask);
if (IS_ERR(tfm)) {
printk(KERN_ERR "alg: crc32c: Failed to load transform for %s: "
"%ld\n", driver, PTR_ERR(tfm));
err = PTR_ERR(tfm);
goto out;
}
do {
struct {
struct shash_desc shash;
char ctx[crypto_shash_descsize(tfm)];
} sdesc;
sdesc.shash.tfm = tfm;
sdesc.shash.flags = 0;
*(u32 *)sdesc.ctx = le32_to_cpu(420553207);
err = crypto_shash_final(&sdesc.shash, (u8 *)&val);
if (err) {
printk(KERN_ERR "alg: crc32c: Operation failed for "
"%s: %d\n", driver, err);
break;
}
if (val != ~420553207) {
printk(KERN_ERR "alg: crc32c: Test failed for %s: "
"%d\n", driver, val);
err = -EINVAL;
}
} while (0);
crypto_free_shash(tfm);
out:
return err;
}
static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver,
u32 type, u32 mask)
{
struct crypto_rng *rng;
int err;
rng = crypto_alloc_rng(driver, type, mask);
if (IS_ERR(rng)) {
printk(KERN_ERR "alg: cprng: Failed to load transform for %s: "
"%ld\n", driver, PTR_ERR(rng));
return PTR_ERR(rng);
}
err = test_cprng(rng, desc->suite.cprng.vecs, desc->suite.cprng.count);
crypto_free_rng(rng);
return err;
}
static int alg_test_null(const struct alg_test_desc *desc,
const char *driver, u32 type, u32 mask)
{
return 0;
}
/* Please keep this list sorted by algorithm name. */
static const struct alg_test_desc alg_test_descs[] = {
{
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
.alg = "__driver-cbc-aes-aesni",
.test = alg_test_null,
.suite = {
.cipher = {
.enc = {
.vecs = NULL,
.count = 0
},
.dec = {
.vecs = NULL,
.count = 0
}
}
}
}, {
.alg = "__driver-ecb-aes-aesni",
.test = alg_test_null,
.suite = {
.cipher = {
.enc = {
.vecs = NULL,
.count = 0
},
.dec = {
.vecs = NULL,
.count = 0
}
}
}
}, {
.alg = "__ghash-pclmulqdqni",
.test = alg_test_null,
.suite = {
.hash = {
.vecs = NULL,
.count = 0
}
}
}, {
.alg = "ansi_cprng",
.test = alg_test_cprng,
.suite = {
.cprng = {
.vecs = ansi_cprng_aes_tv_template,
.count = ANSI_CPRNG_AES_TEST_VECTORS
}
}
}, {
.suite = {
.cipher = {
.enc = {
.vecs = aes_cbc_enc_tv_template,
.count = AES_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = aes_cbc_dec_tv_template,
.count = AES_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(anubis)",
.suite = {
.cipher = {
.enc = {
.vecs = anubis_cbc_enc_tv_template,
.count = ANUBIS_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = anubis_cbc_dec_tv_template,
.count = ANUBIS_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(blowfish)",
.suite = {
.cipher = {
.enc = {
.vecs = bf_cbc_enc_tv_template,
.count = BF_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = bf_cbc_dec_tv_template,
.count = BF_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(camellia)",
.suite = {
.cipher = {
.enc = {
.vecs = camellia_cbc_enc_tv_template,
.count = CAMELLIA_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = camellia_cbc_dec_tv_template,
.count = CAMELLIA_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(des)",
.suite = {
.cipher = {
.enc = {
.vecs = des_cbc_enc_tv_template,
.count = DES_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = des_cbc_dec_tv_template,
.count = DES_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(des3_ede)",
.suite = {
.cipher = {
.enc = {
.vecs = des3_ede_cbc_enc_tv_template,
.count = DES3_EDE_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = des3_ede_cbc_dec_tv_template,
.count = DES3_EDE_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cbc(twofish)",
.suite = {
.cipher = {
.enc = {
.vecs = tf_cbc_enc_tv_template,
.count = TF_CBC_ENC_TEST_VECTORS
},
.dec = {
.vecs = tf_cbc_dec_tv_template,
.count = TF_CBC_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ccm(aes)",
.test = alg_test_aead,
.suite = {
.aead = {
.enc = {
.vecs = aes_ccm_enc_tv_template,
.count = AES_CCM_ENC_TEST_VECTORS
},
.dec = {
.vecs = aes_ccm_dec_tv_template,
.count = AES_CCM_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "crc32c",
.suite = {
.hash = {
.vecs = crc32c_tv_template,
.count = CRC32C_TEST_VECTORS
}
}
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
}, {
.alg = "cryptd(__driver-ecb-aes-aesni)",
.test = alg_test_null,
.suite = {
.cipher = {
.enc = {
.vecs = NULL,
.count = 0
},
.dec = {
.vecs = NULL,
.count = 0
}
}
}
}, {
.alg = "cryptd(__ghash-pclmulqdqni)",
.test = alg_test_null,
.suite = {
.hash = {
.vecs = NULL,
.count = 0
}
}
}, {
.alg = "ctr(aes)",
.test = alg_test_skcipher,
.suite = {
.cipher = {
.enc = {
.vecs = aes_ctr_enc_tv_template,
.count = AES_CTR_ENC_TEST_VECTORS
},
.dec = {
.vecs = aes_ctr_dec_tv_template,
.count = AES_CTR_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "cts(cbc(aes))",
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
.suite = {
.cipher = {
.enc = {
.vecs = cts_mode_enc_tv_template,
.count = CTS_MODE_ENC_TEST_VECTORS
},
.dec = {
.vecs = cts_mode_dec_tv_template,
.count = CTS_MODE_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "deflate",
.test = alg_test_comp,
.suite = {
.comp = {
.comp = {
.vecs = deflate_comp_tv_template,
.count = DEFLATE_COMP_TEST_VECTORS
},
.decomp = {
.vecs = deflate_decomp_tv_template,
.count = DEFLATE_DECOMP_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(__aes-aesni)",
.test = alg_test_null,
.suite = {
.cipher = {
.enc = {
.vecs = NULL,
.count = 0
},
.dec = {
.vecs = NULL,
.count = 0
}
}
}
.suite = {
.cipher = {
.enc = {
.vecs = aes_enc_tv_template,
.count = AES_ENC_TEST_VECTORS
},
.dec = {
.vecs = aes_dec_tv_template,
.count = AES_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(anubis)",
.suite = {
.cipher = {
.enc = {
.vecs = anubis_enc_tv_template,
.count = ANUBIS_ENC_TEST_VECTORS
},
.dec = {
.vecs = anubis_dec_tv_template,
.count = ANUBIS_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(arc4)",
.suite = {
.cipher = {
.enc = {
.vecs = arc4_enc_tv_template,
.count = ARC4_ENC_TEST_VECTORS
},
.dec = {
.vecs = arc4_dec_tv_template,
.count = ARC4_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(blowfish)",
.suite = {
.cipher = {
.enc = {
.vecs = bf_enc_tv_template,
.count = BF_ENC_TEST_VECTORS
},
.dec = {
.vecs = bf_dec_tv_template,
.count = BF_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(camellia)",
.suite = {
.cipher = {
.enc = {
.vecs = camellia_enc_tv_template,
.count = CAMELLIA_ENC_TEST_VECTORS
},
.dec = {
.vecs = camellia_dec_tv_template,
.count = CAMELLIA_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(cast5)",
.suite = {
.cipher = {
.enc = {
.vecs = cast5_enc_tv_template,
.count = CAST5_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast5_dec_tv_template,
.count = CAST5_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(cast6)",
.suite = {
.cipher = {
.enc = {
.vecs = cast6_enc_tv_template,
.count = CAST6_ENC_TEST_VECTORS
},
.dec = {
.vecs = cast6_dec_tv_template,
.count = CAST6_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(des)",
.suite = {
.cipher = {
.enc = {
.vecs = des_enc_tv_template,
.count = DES_ENC_TEST_VECTORS
},
.dec = {
.vecs = des_dec_tv_template,
.count = DES_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(des3_ede)",
.suite = {
.cipher = {
.enc = {
.vecs = des3_ede_enc_tv_template,
.count = DES3_EDE_ENC_TEST_VECTORS
},
.dec = {
.vecs = des3_ede_dec_tv_template,
.count = DES3_EDE_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(khazad)",
.suite = {
.cipher = {
.enc = {
.vecs = khazad_enc_tv_template,
.count = KHAZAD_ENC_TEST_VECTORS
},
.dec = {
.vecs = khazad_dec_tv_template,
.count = KHAZAD_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(seed)",
.suite = {
.cipher = {
.enc = {
.vecs = seed_enc_tv_template,
.count = SEED_ENC_TEST_VECTORS
},
.dec = {
.vecs = seed_dec_tv_template,
.count = SEED_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(serpent)",
.suite = {
.cipher = {
.enc = {
.vecs = serpent_enc_tv_template,
.count = SERPENT_ENC_TEST_VECTORS
},
.dec = {
.vecs = serpent_dec_tv_template,
.count = SERPENT_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(tea)",
.suite = {
.cipher = {
.enc = {
.vecs = tea_enc_tv_template,
.count = TEA_ENC_TEST_VECTORS
},
.dec = {
.vecs = tea_dec_tv_template,
.count = TEA_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(tnepres)",
.suite = {
.cipher = {
.enc = {
.vecs = tnepres_enc_tv_template,
.count = TNEPRES_ENC_TEST_VECTORS
},
.dec = {
.vecs = tnepres_dec_tv_template,
.count = TNEPRES_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(twofish)",
.suite = {
.cipher = {
.enc = {
.vecs = tf_enc_tv_template,
.count = TF_ENC_TEST_VECTORS
},
.dec = {
.vecs = tf_dec_tv_template,
.count = TF_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(xeta)",
.suite = {
.cipher = {
.enc = {
.vecs = xeta_enc_tv_template,
.count = XETA_ENC_TEST_VECTORS
},
.dec = {
.vecs = xeta_dec_tv_template,
.count = XETA_DEC_TEST_VECTORS
}
}
}
}, {
.alg = "ecb(xtea)",