Lines Matching defs:tfm
47 struct crypto_cipher *tfm;
156 crypto_cipher_encrypt_one(ctx->tfm, output, tmp);
273 crypto_free_cipher(ctx->tfm);
306 ret = crypto_cipher_setkey(ctx->tfm, prng_key, klen);
309 crypto_cipher_get_flags(ctx->tfm));
320 static int cprng_init(struct crypto_tfm *tfm)
322 struct prng_context *ctx = crypto_tfm_ctx(tfm);
325 ctx->tfm = crypto_alloc_cipher("aes", 0, 0);
326 if (IS_ERR(ctx->tfm)) {
327 dbgprint(KERN_CRIT "Failed to alloc tfm for context %p\n",
329 return PTR_ERR(ctx->tfm);
344 static void cprng_exit(struct crypto_tfm *tfm)
346 free_prng_context(crypto_tfm_ctx(tfm));
349 static int cprng_get_random(struct crypto_rng *tfm,
353 struct prng_context *prng = crypto_rng_ctx(tfm);
364 static int cprng_reset(struct crypto_rng *tfm,
367 struct prng_context *prng = crypto_rng_ctx(tfm);
385 static int fips_cprng_get_random(struct crypto_rng *tfm,
389 struct prng_context *prng = crypto_rng_ctx(tfm);
394 static int fips_cprng_reset(struct crypto_rng *tfm,
401 struct prng_context *prng = crypto_rng_ctx(tfm);
410 rc = cprng_reset(tfm, seed, slen);