Lines Matching refs:tfm
99 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm); in jent_hash_time()
104 desc->tfm = hash_state_desc->tfm; in jent_hash_time()
106 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) { in jent_hash_time()
186 struct crypto_shash *tfm; member
190 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) in jent_kcapi_cleanup() argument
192 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_cleanup()
202 if (rng->tfm) in jent_kcapi_cleanup()
203 crypto_free_shash(rng->tfm); in jent_kcapi_cleanup()
204 rng->tfm = NULL; in jent_kcapi_cleanup()
212 static int jent_kcapi_init(struct crypto_tfm *tfm) in jent_kcapi_init() argument
214 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_init()
235 rng->tfm = hash; in jent_kcapi_init()
244 sdesc->tfm = hash; in jent_kcapi_init()
258 jent_kcapi_cleanup(tfm); in jent_kcapi_init()
262 static int jent_kcapi_random(struct crypto_rng *tfm, in jent_kcapi_random() argument
266 struct jitterentropy *rng = crypto_rng_ctx(tfm); in jent_kcapi_random()
300 static int jent_kcapi_reset(struct crypto_rng *tfm, in jent_kcapi_reset() argument
323 SHASH_DESC_ON_STACK(desc, tfm); in jent_mod_init()
324 struct crypto_shash *tfm; in jent_mod_init() local
329 tfm = crypto_alloc_shash(JENT_CONDITIONING_HASH, 0, 0); in jent_mod_init()
330 if (IS_ERR(tfm)) { in jent_mod_init()
332 return PTR_ERR(tfm); in jent_mod_init()
335 desc->tfm = tfm; in jent_mod_init()
339 crypto_free_shash(tfm); in jent_mod_init()