Lines Matching refs:tfm
109 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm); in jent_hash_time()
114 desc->tfm = hash_state_desc->tfm; in jent_hash_time()
116 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) { in jent_hash_time()
196 struct crypto_shash *tfm; member
200 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) in jent_kcapi_cleanup() argument
202 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_cleanup()
212 if (rng->tfm) in jent_kcapi_cleanup()
213 crypto_free_shash(rng->tfm); in jent_kcapi_cleanup()
214 rng->tfm = NULL; in jent_kcapi_cleanup()
222 static int jent_kcapi_init(struct crypto_tfm *tfm) in jent_kcapi_init() argument
224 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_init()
245 rng->tfm = hash; in jent_kcapi_init()
254 sdesc->tfm = hash; in jent_kcapi_init()
270 jent_kcapi_cleanup(tfm); in jent_kcapi_init()
274 static int jent_kcapi_random(struct crypto_rng *tfm, in jent_kcapi_random() argument
278 struct jitterentropy *rng = crypto_rng_ctx(tfm); in jent_kcapi_random()
312 static int jent_kcapi_reset(struct crypto_rng *tfm, in jent_kcapi_reset() argument
335 SHASH_DESC_ON_STACK(desc, tfm); in jent_mod_init()
336 struct crypto_shash *tfm; in jent_mod_init() local
341 tfm = crypto_alloc_shash(JENT_CONDITIONING_HASH, 0, 0); in jent_mod_init()
342 if (IS_ERR(tfm)) { in jent_mod_init()
344 return PTR_ERR(tfm); in jent_mod_init()
347 desc->tfm = tfm; in jent_mod_init()
351 crypto_free_shash(tfm); in jent_mod_init()