Lines Matching refs:desc
127 int (*test)(const struct alg_test_desc *desc, const char *driver,
1091 struct shash_desc *desc, in test_shash_vec_cfg() argument
1095 struct crypto_shash *tfm = desc->tfm; in test_shash_vec_cfg()
1132 testmgr_poison(desc->__ctx, crypto_shash_descsize(tfm)); in test_shash_vec_cfg()
1142 err = crypto_shash_digest(desc, sg_data(&tsgl->sgl[0]), in test_shash_vec_cfg()
1166 err = crypto_shash_init(desc); in test_shash_vec_cfg()
1178 err = crypto_shash_finup(desc, sg_data(&tsgl->sgl[i]), in test_shash_vec_cfg()
1190 err = crypto_shash_update(desc, sg_data(&tsgl->sgl[i]), in test_shash_vec_cfg()
1201 err = crypto_shash_export(desc, hashstate); in test_shash_vec_cfg()
1212 testmgr_poison(desc->__ctx, crypto_shash_descsize(tfm)); in test_shash_vec_cfg()
1213 err = crypto_shash_import(desc, hashstate); in test_shash_vec_cfg()
1223 err = crypto_shash_final(desc, result); in test_shash_vec_cfg()
1440 struct shash_desc *desc, in test_hash_vec_cfg() argument
1452 if (desc) { in test_hash_vec_cfg()
1453 err = test_shash_vec_cfg(driver, vec, vec_name, cfg, desc, tsgl, in test_hash_vec_cfg()
1465 struct shash_desc *desc, struct test_sglist *tsgl, in test_hash_vec() argument
1477 req, desc, tsgl, hashstate); in test_hash_vec()
1491 req, desc, tsgl, hashstate); in test_hash_vec()
1506 static void generate_random_hash_testvec(struct shash_desc *desc, in generate_random_hash_testvec() argument
1528 vec->setkey_error = crypto_shash_setkey(desc->tfm, vec->key, in generate_random_hash_testvec()
1536 vec->digest_error = crypto_shash_digest(desc, vec->plaintext, in generate_random_hash_testvec()
1551 struct shash_desc *desc, in test_hash_vs_generic_impl() argument
1602 generic_desc = kzalloc(sizeof(*desc) + in test_hash_vs_generic_impl()
1647 req, desc, tsgl, hashstate); in test_hash_vs_generic_impl()
1667 struct shash_desc *desc, in test_hash_vs_generic_impl() argument
1680 struct shash_desc *desc; in alloc_shash() local
1696 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(tfm), GFP_KERNEL); in alloc_shash()
1697 if (!desc) { in alloc_shash()
1701 desc->tfm = tfm; in alloc_shash()
1704 *desc_ret = desc; in alloc_shash()
1716 struct shash_desc *desc = NULL; in __alg_test_hash() local
1747 err = alloc_shash(driver, type, mask, &stfm, &desc); in __alg_test_hash()
1773 err = test_hash_vec(driver, &vecs[i], i, req, desc, tsgl, in __alg_test_hash()
1780 desc, tsgl, hashstate); in __alg_test_hash()
1787 kfree(desc); in __alg_test_hash()
1794 static int alg_test_hash(const struct alg_test_desc *desc, const char *driver, in alg_test_hash() argument
1797 const struct hash_testvec *template = desc->suite.hash.vecs; in alg_test_hash()
1798 unsigned int tcount = desc->suite.hash.count; in alg_test_hash()
1816 "unkeyed ones must come first\n", desc->alg); in alg_test_hash()
1826 desc->generic_driver, maxkeysize); in alg_test_hash()
1832 desc->generic_driver, maxkeysize); in alg_test_hash()
2294 static int alg_test_aead(const struct alg_test_desc *desc, const char *driver, in alg_test_aead() argument
2297 const struct aead_test_suite *suite = &desc->suite.aead; in alg_test_aead()
2339 err = test_aead_vs_generic_impl(driver, desc, req, tsgls); in alg_test_aead()
2844 static int alg_test_skcipher(const struct alg_test_desc *desc, in alg_test_skcipher() argument
2847 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_skcipher()
2889 err = test_skcipher_vs_generic_impl(driver, desc->generic_driver, req, in alg_test_skcipher()
3235 static int alg_test_cipher(const struct alg_test_desc *desc, in alg_test_cipher() argument
3238 const struct cipher_test_suite *suite = &desc->suite.cipher; in alg_test_cipher()
3257 static int alg_test_comp(const struct alg_test_desc *desc, const char *driver, in alg_test_comp() argument
3272 err = test_acomp(acomp, desc->suite.comp.comp.vecs, in alg_test_comp()
3273 desc->suite.comp.decomp.vecs, in alg_test_comp()
3274 desc->suite.comp.comp.count, in alg_test_comp()
3275 desc->suite.comp.decomp.count); in alg_test_comp()
3285 err = test_comp(comp, desc->suite.comp.comp.vecs, in alg_test_comp()
3286 desc->suite.comp.decomp.vecs, in alg_test_comp()
3287 desc->suite.comp.comp.count, in alg_test_comp()
3288 desc->suite.comp.decomp.count); in alg_test_comp()
3295 static int alg_test_crc32c(const struct alg_test_desc *desc, in alg_test_crc32c() argument
3302 err = alg_test_hash(desc, driver, type, mask); in alg_test_crc32c()
3347 static int alg_test_cprng(const struct alg_test_desc *desc, const char *driver, in alg_test_cprng() argument
3360 err = test_cprng(rng, desc->suite.cprng.vecs, desc->suite.cprng.count); in alg_test_cprng()
3436 static int alg_test_drbg(const struct alg_test_desc *desc, const char *driver, in alg_test_drbg() argument
3442 const struct drbg_testvec *template = desc->suite.drbg.vecs; in alg_test_drbg()
3443 unsigned int tcount = desc->suite.drbg.count; in alg_test_drbg()
3619 static int alg_test_kpp(const struct alg_test_desc *desc, const char *driver, in alg_test_kpp() argument
3631 if (desc->suite.kpp.vecs) in alg_test_kpp()
3632 err = test_kpp(tfm, desc->alg, desc->suite.kpp.vecs, in alg_test_kpp()
3633 desc->suite.kpp.count); in alg_test_kpp()
3839 static int alg_test_akcipher(const struct alg_test_desc *desc, in alg_test_akcipher() argument
3851 if (desc->suite.akcipher.vecs) in alg_test_akcipher()
3852 err = test_akcipher(tfm, desc->alg, desc->suite.akcipher.vecs, in alg_test_akcipher()
3853 desc->suite.akcipher.count); in alg_test_akcipher()
3859 static int alg_test_null(const struct alg_test_desc *desc, in alg_test_null() argument