Lines Matching refs:tfm
53 #define get_driver_name(tfm_type, tfm) crypto_tfm_alg_driver_name(tfm_type ## _tfm(tfm)) argument
274 struct crypto_aead *tfm; in test_aead_speed() local
317 tfm = crypto_alloc_aead(algo, 0, 0); in test_aead_speed()
319 if (IS_ERR(tfm)) { in test_aead_speed()
321 PTR_ERR(tfm)); in test_aead_speed()
326 get_driver_name(crypto_aead, tfm), e); in test_aead_speed()
328 req = aead_request_alloc(tfm, GFP_KERNEL); in test_aead_speed()
357 ret = crypto_aead_setkey(tfm, key, *keysize); in test_aead_speed()
358 ret = crypto_aead_setauthsize(tfm, authsize); in test_aead_speed()
360 iv_len = crypto_aead_ivsize(tfm); in test_aead_speed()
364 crypto_aead_clear_flags(tfm, ~0); in test_aead_speed()
373 crypto_aead_get_flags(tfm)); in test_aead_speed()
405 crypto_free_aead(tfm); in test_aead_speed()
426 struct crypto_blkcipher *tfm; in test_cipher_speed() local
436 tfm = crypto_alloc_blkcipher(algo, 0, CRYPTO_ALG_ASYNC); in test_cipher_speed()
438 if (IS_ERR(tfm)) { in test_cipher_speed()
440 PTR_ERR(tfm)); in test_cipher_speed()
443 desc.tfm = tfm; in test_cipher_speed()
447 get_driver_name(crypto_blkcipher, tfm), e); in test_cipher_speed()
477 ret = crypto_blkcipher_setkey(tfm, key, *keysize); in test_cipher_speed()
480 crypto_blkcipher_get_flags(tfm)); in test_cipher_speed()
492 iv_len = crypto_blkcipher_ivsize(tfm); in test_cipher_speed()
495 crypto_blkcipher_set_iv(tfm, iv, iv_len); in test_cipher_speed()
516 crypto_free_blkcipher(tfm); in test_cipher_speed()
692 struct crypto_hash *tfm; in test_hash_speed() local
698 tfm = crypto_alloc_hash(algo, 0, CRYPTO_ALG_ASYNC); in test_hash_speed()
700 if (IS_ERR(tfm)) { in test_hash_speed()
702 PTR_ERR(tfm)); in test_hash_speed()
707 get_driver_name(crypto_hash, tfm)); in test_hash_speed()
709 desc.tfm = tfm; in test_hash_speed()
712 if (crypto_hash_digestsize(tfm) > sizeof(output)) { in test_hash_speed()
714 crypto_hash_digestsize(tfm), sizeof(output)); in test_hash_speed()
728 crypto_hash_setkey(tfm, tvmem[0], speed[i].klen); in test_hash_speed()
748 crypto_free_hash(tfm); in test_hash_speed()
932 struct crypto_ahash *tfm; in test_ahash_speed() local
936 tfm = crypto_alloc_ahash(algo, 0, 0); in test_ahash_speed()
937 if (IS_ERR(tfm)) { in test_ahash_speed()
939 algo, PTR_ERR(tfm)); in test_ahash_speed()
944 get_driver_name(crypto_ahash, tfm)); in test_ahash_speed()
946 if (crypto_ahash_digestsize(tfm) > sizeof(output)) { in test_ahash_speed()
948 crypto_ahash_digestsize(tfm), sizeof(output)); in test_ahash_speed()
953 req = ahash_request_alloc(tfm, GFP_KERNEL); in test_ahash_speed()
992 crypto_free_ahash(tfm); in test_ahash_speed()
1089 struct crypto_ablkcipher *tfm; in test_acipher_speed() local
1100 tfm = crypto_alloc_ablkcipher(algo, 0, 0); in test_acipher_speed()
1102 if (IS_ERR(tfm)) { in test_acipher_speed()
1104 PTR_ERR(tfm)); in test_acipher_speed()
1109 get_driver_name(crypto_ablkcipher, tfm), e); in test_acipher_speed()
1111 req = ablkcipher_request_alloc(tfm, GFP_KERNEL); in test_acipher_speed()
1149 crypto_ablkcipher_clear_flags(tfm, ~0); in test_acipher_speed()
1151 ret = crypto_ablkcipher_setkey(tfm, key, *keysize); in test_acipher_speed()
1154 crypto_ablkcipher_get_flags(tfm)); in test_acipher_speed()
1178 iv_len = crypto_ablkcipher_ivsize(tfm); in test_acipher_speed()
1193 crypto_ablkcipher_get_flags(tfm)); in test_acipher_speed()
1205 crypto_free_ablkcipher(tfm); in test_acipher_speed()