• Home
  • Raw
  • Download

Lines Matching refs:tctx

69 	struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);  in essiv_skcipher_setkey()  local
73 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
74 crypto_skcipher_set_flags(tctx->u.skcipher, in essiv_skcipher_setkey()
77 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); in essiv_skcipher_setkey()
81 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); in essiv_skcipher_setkey()
85 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
86 crypto_cipher_set_flags(tctx->essiv_cipher, in essiv_skcipher_setkey()
89 return crypto_cipher_setkey(tctx->essiv_cipher, salt, in essiv_skcipher_setkey()
90 crypto_shash_digestsize(tctx->hash)); in essiv_skcipher_setkey()
96 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() local
97 SHASH_DESC_ON_STACK(desc, tctx->hash); in essiv_aead_setkey()
102 crypto_aead_clear_flags(tctx->u.aead, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey()
103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey()
105 err = crypto_aead_setkey(tctx->u.aead, key, keylen); in essiv_aead_setkey()
112 desc->tfm = tctx->hash; in essiv_aead_setkey()
119 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); in essiv_aead_setkey()
120 crypto_cipher_set_flags(tctx->essiv_cipher, crypto_aead_get_flags(tfm) & in essiv_aead_setkey()
122 return crypto_cipher_setkey(tctx->essiv_cipher, salt, in essiv_aead_setkey()
123 crypto_shash_digestsize(tctx->hash)); in essiv_aead_setkey()
129 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setauthsize() local
131 return crypto_aead_setauthsize(tctx->u.aead, authsize); in essiv_aead_setauthsize()
144 const struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_crypt() local
147 crypto_cipher_encrypt_one(tctx->essiv_cipher, req->iv, req->iv); in essiv_skcipher_crypt()
149 skcipher_request_set_tfm(subreq, tctx->u.skcipher); in essiv_skcipher_crypt()
186 const struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_crypt() local
192 crypto_cipher_encrypt_one(tctx->essiv_cipher, req->iv, req->iv); in essiv_aead_crypt()
205 u8 *iv = (u8 *)aead_request_ctx(req) + tctx->ivoffset; in essiv_aead_crypt()
246 aead_request_set_tfm(subreq, tctx->u.aead); in essiv_aead_crypt()
271 struct essiv_tfm_ctx *tctx) in essiv_init_tfm() argument
287 tctx->essiv_cipher = essiv_cipher; in essiv_init_tfm()
288 tctx->hash = hash; in essiv_init_tfm()
301 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_init_tfm() local
312 err = essiv_init_tfm(ictx, tctx); in essiv_skcipher_init_tfm()
318 tctx->u.skcipher = skcipher; in essiv_skcipher_init_tfm()
326 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_init_tfm() local
341 tctx->ivoffset = offsetof(struct essiv_aead_request_ctx, aead_req) + in essiv_aead_init_tfm()
343 crypto_aead_set_reqsize(tfm, tctx->ivoffset + crypto_aead_ivsize(aead)); in essiv_aead_init_tfm()
345 err = essiv_init_tfm(ictx, tctx); in essiv_aead_init_tfm()
351 tctx->u.aead = aead; in essiv_aead_init_tfm()
357 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_exit_tfm() local
359 crypto_free_skcipher(tctx->u.skcipher); in essiv_skcipher_exit_tfm()
360 crypto_free_cipher(tctx->essiv_cipher); in essiv_skcipher_exit_tfm()
361 crypto_free_shash(tctx->hash); in essiv_skcipher_exit_tfm()
366 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_exit_tfm() local
368 crypto_free_aead(tctx->u.aead); in essiv_aead_exit_tfm()
369 crypto_free_cipher(tctx->essiv_cipher); in essiv_aead_exit_tfm()
370 crypto_free_shash(tctx->hash); in essiv_aead_exit_tfm()