Lines Matching refs:tfm
54 struct crypto_cipher *tfm; member
163 crypto_cipher_encrypt_one(ctx->tfm, output, tmp); in _get_more_prng_bytes()
280 crypto_free_cipher(ctx->tfm); in free_prng_context()
313 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen); in reset_prng_context()
316 crypto_cipher_get_flags(ctx->tfm)); in reset_prng_context()
327 static int cprng_init(struct crypto_tfm *tfm) in cprng_init() argument
329 struct prng_context *ctx = crypto_tfm_ctx(tfm); in cprng_init()
332 ctx->tfm = crypto_alloc_cipher("aes", 0, 0); in cprng_init()
333 if (IS_ERR(ctx->tfm)) { in cprng_init()
336 return PTR_ERR(ctx->tfm); in cprng_init()
351 static void cprng_exit(struct crypto_tfm *tfm) in cprng_exit() argument
353 free_prng_context(crypto_tfm_ctx(tfm)); in cprng_exit()
356 static int cprng_get_random(struct crypto_rng *tfm, u8 *rdata, in cprng_get_random() argument
359 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_get_random()
370 static int cprng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int slen) in cprng_reset() argument
372 struct prng_context *prng = crypto_rng_ctx(tfm); in cprng_reset()
390 static int fips_cprng_get_random(struct crypto_rng *tfm, u8 *rdata, in fips_cprng_get_random() argument
393 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_get_random()
398 static int fips_cprng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int slen) in fips_cprng_reset() argument
404 struct prng_context *prng = crypto_rng_ctx(tfm); in fips_cprng_reset()
413 rc = cprng_reset(tfm, seed, slen); in fips_cprng_reset()