/linux-master/arch/arm64/crypto/ |
H A D | aes-glue.c | 910 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 923 mac_do_update(&tctx->key, p, blocks, ctx->dg, 950 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 953 mac_do_update(&tctx->key, NULL, 0, ctx->dg, (ctx->len != 0), 0); 962 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 964 u8 *consts = tctx->consts; 971 mac_do_update(&tctx->key, consts, 1, ctx->dg, 0, 1);
|
H A D | polyval-ce-glue.c | 75 struct polyval_tfm_ctx *tctx = crypto_shash_ctx(tfm); local 81 memcpy(tctx->key_powers[NUM_KEY_POWERS-1], key, POLYVAL_BLOCK_SIZE); 84 memcpy(tctx->key_powers[i], key, POLYVAL_BLOCK_SIZE); 85 internal_polyval_mul(tctx->key_powers[i], 86 tctx->key_powers[i+1]); 105 const struct polyval_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 122 tctx->key_powers[NUM_KEY_POWERS-1]); 128 internal_polyval_update(tctx, src, nblocks, dctx->buffer); 146 const struct polyval_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 150 tctx [all...] |
H A D | sm4-ce-glue.c | 602 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 622 sm4_ce_crypt_block(tctx->key.rkey_enc, 629 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, p, 652 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 654 const u8 *consts = tctx->consts; 662 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, consts, 1, 673 struct sm4_mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 678 sm4_ce_crypt_block(tctx->key.rkey_enc, ctx->digest,
|
/linux-master/arch/riscv/crypto/ |
H A D | ghash-riscv64-glue.c | 36 struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(tfm); local 41 memcpy(&tctx->key, key, GHASH_BLOCK_SIZE); 56 riscv64_ghash_blocks(const struct riscv64_ghash_tfm_ctx *tctx, argument 63 ghash_zvkg(&dctx->accumulator, &tctx->key, src, srclen); 69 gf128mul_lle(&dctx->accumulator, &tctx->key); 79 const struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 91 riscv64_ghash_blocks(tctx, dctx, dctx->buffer, 100 riscv64_ghash_blocks(tctx, dctx, src, len); 115 const struct riscv64_ghash_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 123 riscv64_ghash_blocks(tctx, dct [all...] |
/linux-master/arch/x86/crypto/ |
H A D | polyval-clmulni_glue.c | 84 struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(tfm); local 90 memcpy(tctx->key_powers[NUM_KEY_POWERS-1], key, POLYVAL_BLOCK_SIZE); 93 memcpy(tctx->key_powers[i], key, POLYVAL_BLOCK_SIZE); 94 internal_polyval_mul(tctx->key_powers[i], 95 tctx->key_powers[i+1]); 114 const struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(desc->tfm); local 131 tctx->key_powers[NUM_KEY_POWERS-1]); 137 internal_polyval_update(tctx, src, nblocks, dctx->buffer); 155 const struct polyval_tfm_ctx *tctx = polyval_tfm_ctx(desc->tfm); local 159 tctx [all...] |
/linux-master/crypto/ |
H A D | adiantum.c | 120 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 132 crypto_skcipher_clear_flags(tctx->streamcipher, CRYPTO_TFM_REQ_MASK); 133 crypto_skcipher_set_flags(tctx->streamcipher, 136 err = crypto_skcipher_setkey(tctx->streamcipher, key, keylen); 142 crypto_skcipher_reqsize(tctx->streamcipher), GFP_KERNEL); 148 skcipher_request_set_tfm(&data->req, tctx->streamcipher); 160 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); 161 crypto_cipher_set_flags(tctx->blockcipher, 164 err = crypto_cipher_setkey(tctx->blockcipher, keyp, 171 poly1305_core_setkey(&tctx 222 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 281 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 341 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 431 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 481 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local [all...] |
H A D | ccm.c | 799 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); local 801 struct crypto_cipher *tfm = tctx->child; 824 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); local 826 struct crypto_cipher *tfm = tctx->child;
|
H A D | cmac.c | 119 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); local 121 struct crypto_cipher *tfm = tctx->child; 164 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); local 166 struct crypto_cipher *tfm = tctx->child; 187 crypto_xor(prev, (const u8 *)tctx->consts + offset, bs);
|
H A D | essiv.c | 69 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 73 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); 74 crypto_skcipher_set_flags(tctx->u.skcipher, 77 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); 81 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); 85 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); 86 crypto_cipher_set_flags(tctx->essiv_cipher, 89 return crypto_cipher_setkey(tctx->essiv_cipher, salt, 90 crypto_shash_digestsize(tctx->hash)); 96 struct essiv_tfm_ctx *tctx local 129 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); local 144 const struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 186 const struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); local 270 essiv_init_tfm(struct essiv_instance_ctx *ictx, struct essiv_tfm_ctx *tctx) argument 301 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 326 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); local 357 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 366 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); local [all...] |
H A D | hctr2.c | 83 static inline u8 *hctr2_hashed_tweaklen(const struct hctr2_tfm_ctx *tctx, argument 86 u8 *p = (u8 *)tctx + sizeof(*tctx); 89 p += crypto_shash_statesize(tctx->polyval); 93 static inline u8 *hctr2_hashed_tweak(const struct hctr2_tfm_ctx *tctx, argument 96 return (u8 *)rctx + tctx->hashed_tweak_offset; 109 static int hctr2_hash_tweaklen(struct hctr2_tfm_ctx *tctx, bool has_remainder) argument 115 shash->tfm = tctx->polyval; 126 return crypto_shash_export(shash, hctr2_hashed_tweaklen(tctx, has_remainder)); 132 struct hctr2_tfm_ctx *tctx local 173 const struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 232 const struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 268 const struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 338 struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 387 struct hctr2_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local [all...] |
H A D | hmac.c | 37 struct hmac_ctx *tctx = crypto_shash_ctx(parent); local 38 struct crypto_shash *hash = tctx->hash; 39 u8 *ipad = &tctx->pads[0]; 40 u8 *opad = &tctx->pads[ss]; 86 const struct hmac_ctx *tctx = crypto_shash_ctx(pdesc->tfm); local 88 desc->tfm = tctx->hash; 95 const struct hmac_ctx *tctx = crypto_shash_ctx(pdesc->tfm); local 97 return hmac_import(pdesc, &tctx->pads[0]); 113 const struct hmac_ctx *tctx = crypto_shash_ctx(parent); local 114 const u8 *opad = &tctx 129 const struct hmac_ctx *tctx = crypto_shash_ctx(parent); local 143 struct hmac_ctx *tctx = crypto_shash_ctx(parent); local 172 struct hmac_ctx *tctx = crypto_shash_ctx(parent); local [all...] |
H A D | vmac.c | 399 static void vhash_blocks(const struct vmac_tfm_ctx *tctx, argument 403 const u64 *kptr = tctx->nhkey; 404 const u64 pkh = tctx->polykey[0]; 405 const u64 pkl = tctx->polykey[1]; 433 struct vmac_tfm_ctx *tctx = crypto_shash_ctx(tfm); local 442 err = crypto_cipher_setkey(tctx->cipher, key, keylen); 448 for (i = 0; i < ARRAY_SIZE(tctx->nhkey); i += 2) { 449 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in); 450 tctx->nhkey[i] = be64_to_cpu(out[0]); 451 tctx 482 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 494 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 535 vhash_final(const struct vmac_tfm_ctx *tctx, struct vmac_desc_ctx *dctx) argument 564 const struct vmac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 601 struct vmac_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 614 struct vmac_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local [all...] |
H A D | xcbc.c | 87 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); local 89 struct crypto_cipher *tfm = tctx->child; 132 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); local 134 struct crypto_cipher *tfm = tctx->child; 155 crypto_xor(prev, &tctx->consts[offset], bs);
|
H A D | xxhash_generic.c | 23 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(tfm); local 25 if (keylen != sizeof(tctx->seed)) 27 tctx->seed = get_unaligned_le64(key); 33 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 36 xxh64_reset(&dctx->xxhstate, tctx->seed); 63 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 65 put_unaligned_le64(xxh64(data, length, tctx->seed), out);
|
/linux-master/drivers/crypto/aspeed/ |
H A D | aspeed-hace-hash.c | 352 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 353 struct aspeed_sha_hmac_ctx *bctx = tctx->base; 538 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 539 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; 562 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 563 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; 585 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 586 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; 626 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 627 struct aspeed_hace_dev *hace_dev = tctx 640 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 665 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 754 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 791 struct aspeed_sham_ctx *tctx = crypto_tfm_ctx(tfm); local 821 struct aspeed_sham_ctx *tctx = crypto_tfm_ctx(tfm); local [all...] |
/linux-master/drivers/crypto/ |
H A D | atmel-sha.c | 405 static struct atmel_sha_dev *atmel_sha_find_dev(struct atmel_sha_ctx *tctx) argument 411 if (!tctx->dd) { 416 tctx->dd = dd; 418 dd = tctx->dd; 429 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); local 431 struct atmel_sha_dev *dd = atmel_sha_find_dev(tctx); 1153 struct atmel_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm); local 1154 struct atmel_sha_dev *dd = tctx->dd; 2170 struct atmel_sha_ctx *tctx; local 2204 tctx 2251 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); local [all...] |
H A D | geode-aes.c | 70 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, argument 97 _writefield(AES_WRITEKEY0_REG, tctx->key); 113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 115 tctx->keylen = len; 118 memcpy(tctx->key, key, len); 129 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; 130 tctx->fallback.cip->base.crt_flags |= 133 return crypto_cipher_setkey(tctx->fallback.cip, key, len); 139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 141 tctx 166 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 181 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 195 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 210 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); local 241 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 258 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local 266 const struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); local [all...] |
H A D | img-hash.c | 625 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); local 632 if (!tctx->hdev) { 637 tctx->hdev = hdev; 640 hdev = tctx->hdev; 673 err = img_hash_handle_queue(tctx->hdev, req); 718 struct img_hash_ctx *tctx = crypto_tfm_ctx(tfm); local 720 crypto_free_ahash(tctx->fallback);
|
H A D | omap-sham.c | 304 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 305 struct omap_sham_hmac_ctx *bctx = tctx->base; 451 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 452 struct omap_sham_hmac_ctx *bctx = tctx->base; 941 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 990 if (tctx->flags & BIT(FLAGS_HMAC)) { 992 struct omap_sham_hmac_ctx *bctx = tctx->base; 1101 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); local 1102 struct omap_sham_hmac_ctx *bctx = tctx->base; 1217 struct omap_sham_ctx *tctx local 1286 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); local 1322 struct omap_sham_ctx *tctx = crypto_tfm_ctx(tfm); local 1391 struct omap_sham_ctx *tctx = crypto_tfm_ctx(tfm); local [all...] |
H A D | s5p-sss.c | 1485 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); local 1489 return s5p_hash_handle_queue(tctx->dd, req); 1550 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); local 1552 return crypto_shash_tfm_digest(tctx->fallback, ctx->buffer, 1596 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); local 1598 ctx->dd = tctx->dd; 1606 dev_dbg(tctx->dd->dev, "init: digest size: %d\n", 1647 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); local 1650 tctx->dd = s5p_dev; 1652 tctx 1682 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); local 1711 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); local [all...] |
/linux-master/drivers/crypto/intel/keembay/ |
H A D | keembay-ocs-aes-core.c | 119 static struct ocs_aes_dev *kmb_ocs_aes_find_dev(struct ocs_aes_tctx *tctx) argument 125 if (tctx->aes_dev) { 126 aes_dev = tctx->aes_dev; 132 tctx->aes_dev = aes_dev; 165 static int save_key(struct ocs_aes_tctx *tctx, const u8 *in_key, size_t key_len, argument 174 memcpy(tctx->key, in_key, key_len); 175 tctx->key_len = key_len; 176 tctx->cipher = cipher; 185 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 188 tctx 207 struct ocs_aes_tctx *tctx = crypto_aead_ctx(tfm); local 315 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 378 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 402 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 451 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 518 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 640 struct ocs_aes_tctx *tctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); local 684 struct ocs_aes_tctx *tctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); local 721 struct ocs_aes_tctx *tctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); local 889 struct ocs_aes_tctx *tctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); local 951 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 977 struct ocs_aes_tctx *tctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); local 1151 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 1173 clear_key(struct ocs_aes_tctx *tctx) argument 1185 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); local 1198 struct ocs_aes_tctx *tctx = crypto_aead_ctx(tfm); local 1248 struct ocs_aes_tctx *tctx = crypto_aead_ctx(tfm); local [all...] |
H A D | keembay-ocs-ecc.c | 203 static struct ocs_ecc_dev *kmb_ocs_ecc_find_dev(struct ocs_ecc_ctx *tctx) argument 205 if (tctx->ecc_dev) 206 return tctx->ecc_dev; 211 tctx->ecc_dev = list_first_entry(&ocs_ecc.dev_list, struct ocs_ecc_dev, 216 return tctx->ecc_dev; 538 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); local 547 if (params.key_size > digits_to_bytes(tctx->curve->g.ndigits)) { 554 rc = kmb_ecc_gen_privkey(tctx->curve, tctx->private_key); 558 rc = kmb_ecc_is_key_valid(tctx 575 kmb_ecc_do_shared_secret(struct ocs_ecc_ctx *tctx, struct kpp_request *req) argument 658 kmb_ecc_do_public_key(struct ocs_ecc_ctx *tctx, struct kpp_request *req) argument 709 struct ocs_ecc_ctx *tctx = kmb_ocs_ecc_tctx(req); local 725 struct ocs_ecc_ctx *tctx = kmb_ocs_ecc_tctx(req); local 750 struct ocs_ecc_ctx *tctx = kmb_ocs_ecc_tctx(req); local 776 kmb_ecc_tctx_init(struct ocs_ecc_ctx *tctx, unsigned int curve_id) argument 797 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); local 804 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); local 811 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); local 818 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); local [all...] |
H A D | keembay-ocs-hcu-core.c | 167 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); local 170 if (tctx->hcu_dev) 171 return tctx->hcu_dev; 178 tctx->hcu_dev = list_first_entry_or_null(&ocs_hcu.dev_list, 183 return tctx->hcu_dev; 418 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); local 438 rc = ocs_hcu_hmac(hcu_dev, rctx->algo, tctx->key, tctx->key_len, 534 WARN_ON(tctx->key_len != rctx->blk_sz); 536 rctx->buffer[i] = tctx [all...] |
/linux-master/drivers/crypto/rockchip/ |
H A D | rk3288_crypto_ahash.c | 346 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); local 352 tctx->fallback_tfm = crypto_alloc_ahash(alg_name, 0, 354 if (IS_ERR(tctx->fallback_tfm)) { 356 return PTR_ERR(tctx->fallback_tfm); 361 crypto_ahash_reqsize(tctx->fallback_tfm)); 368 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); local 370 crypto_free_ahash(tctx->fallback_tfm);
|
/linux-master/drivers/crypto/xilinx/ |
H A D | zynqmp-sha.c | 84 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 86 dctx->fbk_req.tfm = tctx->fbk_tfm; 114 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); local 116 dctx->fbk_req.tfm = tctx->fbk_tfm;
|