Home
last modified time | relevance | path

Searched refs:tctx (Results 1 – 8 of 8) sorted by relevance

/crypto/
Dhctr2.c83 static inline u8 *hctr2_hashed_tweaklen(const struct hctr2_tfm_ctx *tctx, in hctr2_hashed_tweaklen() argument
86 u8 *p = (u8 *)tctx + sizeof(*tctx); in hctr2_hashed_tweaklen()
89 p += crypto_shash_statesize(tctx->polyval); in hctr2_hashed_tweaklen()
93 static inline u8 *hctr2_hashed_tweak(const struct hctr2_tfm_ctx *tctx, in hctr2_hashed_tweak() argument
96 return (u8 *)rctx + tctx->hashed_tweak_offset; in hctr2_hashed_tweak()
109 static int hctr2_hash_tweaklen(struct hctr2_tfm_ctx *tctx, bool has_remainder) in hctr2_hash_tweaklen() argument
115 shash->tfm = tctx->polyval; in hctr2_hash_tweaklen()
126 return crypto_shash_export(shash, hctr2_hashed_tweaklen(tctx, has_remainder)); in hctr2_hash_tweaklen()
132 struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in hctr2_setkey() local
136 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in hctr2_setkey()
[all …]
Dessiv.c69 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
[all …]
Dadiantum.c120 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()
[all …]
Dvmac.c399 static void vhash_blocks(const struct vmac_tfm_ctx *tctx, in vhash_blocks() argument
403 const u64 *kptr = tctx->nhkey; in vhash_blocks()
404 const u64 pkh = tctx->polykey[0]; in vhash_blocks()
405 const u64 pkl = tctx->polykey[1]; in vhash_blocks()
433 struct vmac_tfm_ctx *tctx = crypto_shash_ctx(tfm); in vmac_setkey() local
442 err = crypto_cipher_setkey(tctx->cipher, key, keylen); in vmac_setkey()
448 for (i = 0; i < ARRAY_SIZE(tctx->nhkey); i += 2) { in vmac_setkey()
449 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in); in vmac_setkey()
450 tctx->nhkey[i] = be64_to_cpu(out[0]); in vmac_setkey()
451 tctx->nhkey[i+1] = be64_to_cpu(out[1]); in vmac_setkey()
[all …]
Dxxhash_generic.c23 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(tfm); in xxhash64_setkey() local
25 if (keylen != sizeof(tctx->seed)) in xxhash64_setkey()
27 tctx->seed = get_unaligned_le64(key); in xxhash64_setkey()
33 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_init() local
36 xxh64_reset(&dctx->xxhstate, tctx->seed); in xxhash64_init()
63 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_digest() local
65 put_unaligned_le64(xxh64(data, length, tctx->seed), out); in xxhash64_digest()
Dxcbc.c90 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_update() local
92 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update()
136 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_final() local
138 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final()
140 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
Dcmac.c123 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_update() local
125 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update()
169 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_final() local
171 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final()
173 u8 *consts = PTR_ALIGN((void *)tctx->ctx, in crypto_cmac_digest_final()
Dccm.c802 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_update() local
804 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_update()
828 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_final() local
830 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_final()