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()
142 crypto_skcipher_reqsize(tctx->streamcipher), GFP_KERNEL); in adiantum_setkey()
148 skcipher_request_set_tfm(&data->req, tctx->streamcipher); in adiantum_setkey()
160 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
161 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey()
164 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey()
171 poly1305_core_setkey(&tctx->header_hash_key, keyp); in adiantum_setkey()
174 crypto_shash_clear_flags(tctx->hash, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
175 crypto_shash_set_flags(tctx->hash, crypto_skcipher_get_flags(tfm) & in adiantum_setkey()
177 err = crypto_shash_setkey(tctx->hash, keyp, NHPOLY1305_KEY_SIZE); in adiantum_setkey()
222 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_hash_header() local
236 poly1305_core_blocks(&state, &tctx->header_hash_key, in adiantum_hash_header()
240 poly1305_core_blocks(&state, &tctx->header_hash_key, req->iv, in adiantum_hash_header()
251 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_hash_message() local
259 hash_desc->tfm = tctx->hash; in adiantum_hash_message()
285 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_finish() local
293 crypto_cipher_decrypt_one(tctx->blockcipher, rctx->rbuf.bytes, in adiantum_finish()
324 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_crypt() local
352 crypto_cipher_encrypt_one(tctx->blockcipher, rctx->rbuf.bytes, in adiantum_crypt()
376 skcipher_request_set_tfm(&rctx->u.streamcipher_req, tctx->streamcipher); in adiantum_crypt()
400 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_init_tfm() local
423 tctx->streamcipher = streamcipher; in adiantum_init_tfm()
424 tctx->blockcipher = blockcipher; in adiantum_init_tfm()
425 tctx->hash = hash; in adiantum_init_tfm()
450 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_exit_tfm() local
452 crypto_free_skcipher(tctx->streamcipher); in adiantum_exit_tfm()
453 crypto_free_cipher(tctx->blockcipher); in adiantum_exit_tfm()
454 crypto_free_shash(tctx->hash); in adiantum_exit_tfm()