Lines Matching refs:tfm

28 int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,  in shash_no_setkey()  argument
35 static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key, in shash_setkey_unaligned() argument
38 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_setkey_unaligned()
39 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_setkey_unaligned()
51 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned()
56 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, in crypto_shash_setkey() argument
59 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_setkey()
60 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_setkey()
64 err = shash_setkey_unaligned(tfm, key, keylen); in crypto_shash_setkey()
66 err = shash->setkey(tfm, key, keylen); in crypto_shash_setkey()
71 crypto_shash_clear_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_shash_setkey()
86 struct crypto_shash *tfm = desc->tfm; in shash_update_unaligned() local
87 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_update_unaligned()
88 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_update_unaligned()
110 struct crypto_shash *tfm = desc->tfm; in crypto_shash_update() local
111 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_update()
112 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_update()
123 struct crypto_shash *tfm = desc->tfm; in shash_final_unaligned() local
124 unsigned long alignmask = crypto_shash_alignmask(tfm); in shash_final_unaligned()
125 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_final_unaligned()
126 unsigned int ds = crypto_shash_digestsize(tfm); in shash_final_unaligned()
145 struct crypto_shash *tfm = desc->tfm; in crypto_shash_final() local
146 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_final()
147 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_final()
166 struct crypto_shash *tfm = desc->tfm; in crypto_shash_finup() local
167 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_finup()
168 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_finup()
187 struct crypto_shash *tfm = desc->tfm; in crypto_shash_digest() local
188 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_digest()
189 unsigned long alignmask = crypto_shash_alignmask(tfm); in crypto_shash_digest()
191 if (crypto_shash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) in crypto_shash_digest()
203 memcpy(out, shash_desc_ctx(desc), crypto_shash_descsize(desc->tfm)); in shash_default_export()
209 memcpy(shash_desc_ctx(desc), in, crypto_shash_descsize(desc->tfm)); in shash_default_import()
213 static int shash_async_setkey(struct crypto_ahash *tfm, const u8 *key, in shash_async_setkey() argument
216 struct crypto_shash **ctx = crypto_ahash_ctx(tfm); in shash_async_setkey()
226 desc->tfm = *ctx; in shash_async_init()
281 desc->tfm = *ctx; in shash_async_finup()
317 desc->tfm = *ctx; in shash_async_digest()
333 desc->tfm = *ctx; in shash_async_import()
339 static void crypto_exit_shash_ops_async(struct crypto_tfm *tfm) in crypto_exit_shash_ops_async() argument
341 struct crypto_shash **ctx = crypto_tfm_ctx(tfm); in crypto_exit_shash_ops_async()
346 int crypto_init_shash_ops_async(struct crypto_tfm *tfm) in crypto_init_shash_ops_async() argument
348 struct crypto_alg *calg = tfm->__crt_alg; in crypto_init_shash_ops_async()
350 struct crypto_ahash *crt = __crypto_ahash_cast(tfm); in crypto_init_shash_ops_async()
351 struct crypto_shash **ctx = crypto_tfm_ctx(tfm); in crypto_init_shash_ops_async()
364 tfm->exit = crypto_exit_shash_ops_async; in crypto_init_shash_ops_async()
386 static int crypto_shash_init_tfm(struct crypto_tfm *tfm) in crypto_shash_init_tfm() argument
388 struct crypto_shash *hash = __crypto_shash_cast(tfm); in crypto_shash_init_tfm()