Lines Matching refs:tfm
47 struct crypto_cipher *tfm; member
156 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes()
273 crypto_free_cipher(ctx->tfm); in free_prng_context()
306 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context()
309 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context()
320 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument
322 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init()
325 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init()
326 if (IS_ERR(ctx->tfm)) { in cprng_init()
329 return PTR_ERR(ctx->tfm); in cprng_init()
344 static void cprng_exit(struct crypto_tfm *tfm) in cprng_exit() argument
346 free_prng_context(crypto_tfm_ctx(tfm)); in cprng_exit()
349 static int cprng_get_random(struct crypto_rng *tfm, in cprng_get_random() argument
353 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_get_random()
364 static int cprng_reset(struct crypto_rng *tfm, in cprng_reset() argument
367 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_reset()
385 static int fips_cprng_get_random(struct crypto_rng *tfm, in fips_cprng_get_random() argument
389 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_get_random()
394 static int fips_cprng_reset(struct crypto_rng *tfm, in fips_cprng_reset() argument
401 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_reset()
410 rc = cprng_reset(tfm, seed, slen); in fips_cprng_reset()