Lines Matching defs:tfm
65 static int essiv_skcipher_setkey(struct crypto_skcipher *tfm,
68 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
74 crypto_skcipher_get_flags(tfm) &
86 crypto_skcipher_get_flags(tfm) &
92 static int essiv_aead_setkey(struct crypto_aead *tfm, const u8 *key,
95 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);
102 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) &
111 desc->tfm = tctx->hash;
119 crypto_cipher_set_flags(tctx->essiv_cipher, crypto_aead_get_flags(tfm) &
125 static int essiv_aead_setauthsize(struct crypto_aead *tfm,
128 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);
142 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req);
143 const struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
184 struct crypto_aead *tfm = crypto_aead_reqtfm(req);
185 const struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);
201 req->assoclen - crypto_aead_ivsize(tfm),
202 crypto_aead_ivsize(tfm), 1);
205 int ivsize = crypto_aead_ivsize(tfm);
296 static int essiv_skcipher_init_tfm(struct crypto_skcipher *tfm)
298 struct skcipher_instance *inst = skcipher_alg_instance(tfm);
300 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
308 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) +
321 static int essiv_aead_init_tfm(struct crypto_aead *tfm)
323 struct aead_instance *inst = aead_alg_instance(tfm);
325 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);
342 crypto_aead_set_reqsize(tfm, tctx->ivoffset + crypto_aead_ivsize(aead));
354 static void essiv_skcipher_exit_tfm(struct crypto_skcipher *tfm)
356 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);
363 static void essiv_aead_exit_tfm(struct crypto_aead *tfm)
365 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm);