Lines Matching refs:tfm
46 struct crypto_cipher *tfm; member
155 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes()
272 crypto_free_cipher(ctx->tfm); in free_prng_context()
305 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context()
308 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context()
319 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument
321 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init()
324 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init()
325 if (IS_ERR(ctx->tfm)) { in cprng_init()
328 return PTR_ERR(ctx->tfm); in cprng_init()
343 static void cprng_exit(struct crypto_tfm *tfm) in cprng_exit() argument
345 free_prng_context(crypto_tfm_ctx(tfm)); in cprng_exit()
348 static int cprng_get_random(struct crypto_rng *tfm, in cprng_get_random() argument
352 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_get_random()
363 static int cprng_reset(struct crypto_rng *tfm, in cprng_reset() argument
366 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_reset()
384 static int fips_cprng_get_random(struct crypto_rng *tfm, in fips_cprng_get_random() argument
388 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_get_random()
393 static int fips_cprng_reset(struct crypto_rng *tfm, in fips_cprng_reset() argument
400 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_reset()
409 rc = cprng_reset(tfm, seed, slen); in fips_cprng_reset()