Lines Matching refs:tctx

120 	struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm);  in adiantum_setkey()  local
132 crypto_skcipher_clear_flags(tctx->streamcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
133 crypto_skcipher_set_flags(tctx->streamcipher, in adiantum_setkey()
136 err = crypto_skcipher_setkey(tctx->streamcipher, key, keylen); in adiantum_setkey()
138 crypto_skcipher_get_flags(tctx->streamcipher) & in adiantum_setkey()
145 crypto_skcipher_reqsize(tctx->streamcipher), GFP_KERNEL); in adiantum_setkey()
151 skcipher_request_set_tfm(&data->req, tctx->streamcipher); in adiantum_setkey()
163 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
164 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey()
167 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey()
170 crypto_cipher_get_flags(tctx->blockcipher) & in adiantum_setkey()
177 poly1305_core_setkey(&tctx->header_hash_key, keyp); in adiantum_setkey()
180 crypto_shash_clear_flags(tctx->hash, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
181 crypto_shash_set_flags(tctx->hash, crypto_skcipher_get_flags(tfm) & in adiantum_setkey()
183 err = crypto_shash_setkey(tctx->hash, keyp, NHPOLY1305_KEY_SIZE); in adiantum_setkey()
184 crypto_skcipher_set_flags(tfm, crypto_shash_get_flags(tctx->hash) & in adiantum_setkey()
230 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_hash_header() local
244 poly1305_core_blocks(&state, &tctx->header_hash_key, in adiantum_hash_header()
248 poly1305_core_blocks(&state, &tctx->header_hash_key, req->iv, in adiantum_hash_header()
259 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_hash_message() local
267 hash_desc->tfm = tctx->hash; in adiantum_hash_message()
293 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_finish() local
301 crypto_cipher_decrypt_one(tctx->blockcipher, rctx->rbuf.bytes, in adiantum_finish()
333 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_crypt() local
361 crypto_cipher_encrypt_one(tctx->blockcipher, rctx->rbuf.bytes, in adiantum_crypt()
385 skcipher_request_set_tfm(&rctx->u.streamcipher_req, tctx->streamcipher); in adiantum_crypt()
409 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_init_tfm() local
432 tctx->streamcipher = streamcipher; in adiantum_init_tfm()
433 tctx->blockcipher = blockcipher; in adiantum_init_tfm()
434 tctx->hash = hash; in adiantum_init_tfm()
459 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_exit_tfm() local
461 crypto_free_skcipher(tctx->streamcipher); in adiantum_exit_tfm()
462 crypto_free_cipher(tctx->blockcipher); in adiantum_exit_tfm()
463 crypto_free_shash(tctx->hash); in adiantum_exit_tfm()