/linux-master/drivers/crypto/virtio/ |
H A D | virtio_crypto_akcipher_algs.c | 29 struct crypto_akcipher *tfm; member in struct:virtio_crypto_akcipher_ctx 365 static int virtio_crypto_rsa_set_key(struct crypto_akcipher *tfm, argument 372 struct virtio_crypto_akcipher_ctx *ctx = akcipher_tfm_ctx(tfm); 429 static int virtio_crypto_rsa_raw_set_priv_key(struct crypto_akcipher *tfm, argument 433 return virtio_crypto_rsa_set_key(tfm, key, keylen, 1, 439 static int virtio_crypto_p1pad_rsa_sha1_set_priv_key(struct crypto_akcipher *tfm, argument 443 return virtio_crypto_rsa_set_key(tfm, key, keylen, 1, 448 static int virtio_crypto_rsa_raw_set_pub_key(struct crypto_akcipher *tfm, argument 452 return virtio_crypto_rsa_set_key(tfm, key, keylen, 0, 457 static int virtio_crypto_p1pad_rsa_sha1_set_pub_key(struct crypto_akcipher *tfm, argument 466 virtio_crypto_rsa_max_size(struct crypto_akcipher *tfm) argument 474 virtio_crypto_rsa_init_tfm(struct crypto_akcipher *tfm) argument 486 virtio_crypto_rsa_exit_tfm(struct crypto_akcipher *tfm) argument [all...] |
/linux-master/drivers/crypto/ |
H A D | mxs-dcp.c | 298 struct dcp_async_ctx *actx = crypto_tfm_ctx(arq->tfm); 429 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 431 struct dcp_async_ctx *ctx = crypto_skcipher_ctx(tfm); 452 struct dcp_async_ctx *actx = crypto_tfm_ctx(arq->tfm); 492 static int mxs_dcp_aes_setkey(struct crypto_skcipher *tfm, const u8 *key, argument 495 struct dcp_async_ctx *actx = crypto_skcipher_ctx(tfm); 515 tfm->base.crt_flags & CRYPTO_TFM_REQ_MASK); 519 static int mxs_dcp_aes_fallback_init_tfm(struct crypto_skcipher *tfm) argument 521 const char *name = crypto_tfm_alg_name(crypto_skcipher_tfm(tfm)); 522 struct dcp_async_ctx *actx = crypto_skcipher_ctx(tfm); 535 mxs_dcp_aes_fallback_exit_tfm(struct crypto_skcipher *tfm) argument 550 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 620 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 725 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 755 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 817 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 832 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 842 dcp_sha_cra_init(struct crypto_tfm *tfm) argument 849 dcp_sha_cra_exit(struct crypto_tfm *tfm) argument [all...] |
H A D | sa2ul.c | 447 shash->tfm = data->ctx->shash; 833 static void sa_cipher_cra_exit(struct crypto_skcipher *tfm) argument 835 struct sa_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); 839 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys, 848 static int sa_cipher_cra_init(struct crypto_skcipher *tfm) argument 850 struct sa_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); 852 const char *name = crypto_tfm_alg_name(&tfm->base); 876 crypto_skcipher_set_reqsize(tfm, crypto_skcipher_reqsize(child) + 880 __func__, tfm, ctx->enc.sc_id, &ctx->enc.sc_phys, 885 static int sa_cipher_setkey(struct crypto_skcipher *tfm, cons argument 947 sa_aes_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 967 sa_aes_ecb_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 985 sa_3des_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 999 sa_3des_ecb_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 1357 struct crypto_ahash *tfm; local 1382 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1492 sa_sha_cra_init_alg(struct crypto_tfm *tfm, const char *alg_base) argument 1541 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1557 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1572 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1586 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1604 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1617 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 1627 sa_sha1_cra_init(struct crypto_tfm *tfm) argument 1643 sa_sha256_cra_init(struct crypto_tfm *tfm) argument 1659 sa_sha512_cra_init(struct crypto_tfm *tfm) argument 1675 sa_sha_cra_exit(struct crypto_tfm *tfm) argument 1695 struct crypto_aead *tfm; local 1730 sa_cra_init_aead(struct crypto_aead *tfm, const char *hash, const char *fallback) argument 1775 sa_cra_init_aead_sha1(struct crypto_aead *tfm) argument 1781 sa_cra_init_aead_sha256(struct crypto_aead *tfm) argument 1787 sa_exit_tfm_aead(struct crypto_aead *tfm) argument 1876 sa_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) argument 1911 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local [all...] |
/linux-master/drivers/crypto/intel/keembay/ |
H A D | keembay-ocs-hcu-core.c | 166 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 167 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); 378 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 379 struct ocs_hcu_ctx *ctx = crypto_ahash_ctx(tfm); 391 WARN(1, "%s: Invalid key length in tfm context\n", __func__); 416 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 418 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); 565 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 566 struct ocs_hcu_ctx *ctx = crypto_ahash_ctx(tfm); 575 rctx->dig_sz = crypto_ahash_digestsize(tfm); 654 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 747 kmb_ocs_hcu_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 823 __cra_init(struct crypto_tfm *tfm, struct ocs_hcu_ctx *ctx) argument 829 kmb_ocs_hcu_sha_cra_init(struct crypto_tfm *tfm) argument 838 kmb_ocs_hcu_sm3_cra_init(struct crypto_tfm *tfm) argument 849 kmb_ocs_hcu_hmac_sm3_cra_init(struct crypto_tfm *tfm) argument 861 kmb_ocs_hcu_hmac_cra_init(struct crypto_tfm *tfm) argument 873 kmb_ocs_hcu_hmac_cra_exit(struct crypto_tfm *tfm) argument [all...] |
H A D | keembay-ocs-aes-core.c | 182 static int kmb_ocs_sk_set_key(struct crypto_skcipher *tfm, const u8 *in_key, argument 185 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); 197 tfm->base.crt_flags & 204 static int kmb_ocs_aead_set_key(struct crypto_aead *tfm, const u8 *in_key, argument 207 struct ocs_aes_tctx *tctx = crypto_aead_ctx(tfm); 218 crypto_aead_get_flags(tfm) & CRYPTO_TFM_REQ_MASK); 255 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 256 int iv_size = crypto_skcipher_ivsize(tfm); 313 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 315 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); 376 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 400 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 449 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 516 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 598 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 950 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 996 kmb_ocs_aes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len) argument 1002 kmb_ocs_aes_aead_set_key(struct crypto_aead *tfm, const u8 *in_key, unsigned int key_len) argument 1072 kmb_ocs_sm4_set_key(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len) argument 1078 kmb_ocs_sm4_aead_set_key(struct crypto_aead *tfm, const u8 *in_key, unsigned int key_len) argument 1148 ocs_aes_init_tfm(struct crypto_skcipher *tfm) argument 1166 ocs_sm4_init_tfm(struct crypto_skcipher *tfm) argument 1183 ocs_exit_tfm(struct crypto_skcipher *tfm) argument 1195 ocs_aes_aead_cra_init(struct crypto_aead *tfm) argument 1216 kmb_ocs_aead_ccm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) argument 1233 kmb_ocs_aead_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) argument 1239 ocs_sm4_aead_cra_init(struct crypto_aead *tfm) argument 1246 ocs_aead_cra_exit(struct crypto_aead *tfm) argument [all...] |
/linux-master/security/keys/encrypted-keys/ |
H A D | encrypted.c | 88 struct crypto_skcipher *tfm; local 90 tfm = crypto_alloc_skcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); 91 if (IS_ERR(tfm)) { 93 PTR_ERR(tfm)); 94 return PTR_ERR(tfm); 96 ivsize = crypto_skcipher_ivsize(tfm); 97 blksize = crypto_skcipher_blocksize(tfm); 98 crypto_free_skcipher(tfm); 335 struct crypto_shash *tfm; local 338 tfm 387 struct crypto_skcipher *tfm; local 458 struct crypto_skcipher *tfm; local 560 struct crypto_skcipher *tfm; local [all...] |
/linux-master/drivers/crypto/ccp/ |
H A D | ccp-crypto-aes-xts.c | 75 static int ccp_aes_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, argument 78 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); 82 ret = xts_verify_key(tfm, key, key_len); 107 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 108 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); 197 static int ccp_aes_xts_init_tfm(struct crypto_skcipher *tfm) argument 199 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); 213 crypto_skcipher_set_reqsize_dma(tfm, 220 static void ccp_aes_xts_exit_tfm(struct crypto_skcipher *tfm) argument 222 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); [all...] |
/linux-master/crypto/asymmetric_keys/ |
H A D | pkcs7_verify.c | 26 struct crypto_shash *tfm; local 43 tfm = crypto_alloc_shash(sinfo->sig->hash_algo, 0, 0); 44 if (IS_ERR(tfm)) 45 return (PTR_ERR(tfm) == -ENOENT) ? -ENOPKG : PTR_ERR(tfm); 47 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); 48 sig->digest_size = crypto_shash_digestsize(tfm); 59 desc->tfm = tfm; 120 crypto_free_shash(tfm); [all...] |
/linux-master/security/integrity/evm/ |
H A D | evm_crypto.c | 78 struct crypto_shash **tfm, *tmp_tfm; local 86 tfm = &hmac_tfm; 92 tfm = &evm_tfm[hash_algo]; 96 if (*tfm) 99 if (*tfm) 117 *tfm = tmp_tfm; 121 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(*tfm), 126 desc->tfm = *tfm; 243 data->hdr.length = crypto_shash_digestsize(desc->tfm); [all...] |
/linux-master/drivers/crypto/hisilicon/sec2/ |
H A D | sec_crypto.c | 684 static int sec_skcipher_fbtfm_init(struct crypto_skcipher *tfm) argument 686 const char *alg = crypto_tfm_alg_name(&tfm->base); 687 struct sec_ctx *ctx = crypto_skcipher_ctx(tfm); 692 /* Currently, only XTS mode need fallback tfm when using 192bit key */ 699 pr_err("failed to alloc xts mode fallback tfm!\n"); 706 static int sec_skcipher_init(struct crypto_skcipher *tfm) argument 708 struct sec_ctx *ctx = crypto_skcipher_ctx(tfm); 712 crypto_skcipher_set_reqsize(tfm, sizeof(struct sec_req)); 713 ctx->c_ctx.ivsize = crypto_skcipher_ivsize(tfm); 727 ret = sec_skcipher_fbtfm_init(tfm); 740 sec_skcipher_uninit(struct crypto_skcipher *tfm) argument 751 sec_skcipher_3des_setkey(struct crypto_skcipher *tfm, const u8 *key, const u32 keylen) argument 820 sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, const u32 keylen, const enum sec_calg c_alg, const enum sec_cmode c_mode) argument 896 struct crypto_aead *tfm; local 947 struct crypto_aead *tfm = crypto_aead_reqtfm(aead_req); local 1117 struct crypto_tfm *tfm = crypto_aead_tfm(aead); local 1127 sec_aead_fallback_setkey(struct sec_auth_ctx *a_ctx, struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 1137 sec_aead_setkey(struct crypto_aead *tfm, const u8 *key, const u32 keylen, const enum sec_hash_alg a_alg, const enum sec_calg c_alg, const enum sec_mac_len mac_len, const enum sec_cmode c_mode) argument 1514 struct crypto_aead *tfm = crypto_aead_reqtfm(aead_req); local 1703 struct crypto_aead *tfm = crypto_aead_reqtfm(a_req); local 1852 sec_skcipher_ctx_init(struct crypto_skcipher *tfm) argument 1872 sec_skcipher_ctx_exit(struct crypto_skcipher *tfm) argument 1877 sec_aead_init(struct crypto_aead *tfm) argument 1919 sec_aead_exit(struct crypto_aead *tfm) argument 1928 sec_aead_ctx_init(struct crypto_aead *tfm, const char *hash_name) argument 1950 sec_aead_ctx_exit(struct crypto_aead *tfm) argument 1958 sec_aead_xcm_ctx_init(struct crypto_aead *tfm) argument 1985 sec_aead_xcm_ctx_exit(struct crypto_aead *tfm) argument 1993 sec_aead_sha1_ctx_init(struct crypto_aead *tfm) argument 1998 sec_aead_sha256_ctx_init(struct crypto_aead *tfm) argument 2003 sec_aead_sha512_ctx_init(struct crypto_aead *tfm) argument 2108 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(sk_req); local 2233 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 2281 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 2354 struct crypto_aead *tfm = crypto_aead_reqtfm(a_req); local [all...] |
/linux-master/drivers/crypto/inside-secure/ |
H A D | safexcel_hash.c | 622 static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm) argument 624 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); 639 ahash_request_set_tfm(req, __crypto_ahash_cast(tfm)); 640 ctx = crypto_tfm_ctx(req->base.tfm); 918 static int safexcel_ahash_cra_init(struct crypto_tfm *tfm) argument 920 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); 922 container_of(__crypto_ahash_alg(tfm->__crt_alg), 930 crypto_ahash_set_reqsize_dma(__crypto_ahash_cast(tfm), 961 static void safexcel_ahash_cra_exit(struct crypto_tfm *tfm) argument 963 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); 1121 struct crypto_ahash *tfm; local 1190 safexcel_hmac_alg_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen, const char *alg, unsigned int state_sz) argument 1199 safexcel_hmac_sha1_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1352 safexcel_hmac_sha224_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1424 safexcel_hmac_sha256_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1610 safexcel_hmac_sha512_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1682 safexcel_hmac_sha384_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1835 safexcel_hmac_md5_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1884 safexcel_crc32_cra_init(struct crypto_tfm *tfm) argument 1916 safexcel_crc32_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 1988 safexcel_cbcmac_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int len) argument 2056 safexcel_xcbcmac_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int len) argument 2090 safexcel_xcbcmac_cra_init(struct crypto_tfm *tfm) argument 2099 safexcel_xcbcmac_cra_exit(struct crypto_tfm *tfm) argument 2139 safexcel_cmac_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int len) argument 2283 safexcel_hmac_sm3_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 2357 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2375 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2412 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2422 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2432 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2447 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2467 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2477 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local 2486 safexcel_sha3_cra_init(struct crypto_tfm *tfm) argument 2510 safexcel_sha3_cra_exit(struct crypto_tfm *tfm) argument 2551 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2609 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2667 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2723 safexcel_hmac_sha3_cra_init(struct crypto_tfm *tfm, const char *alg) argument 2747 safexcel_hmac_sha3_cra_exit(struct crypto_tfm *tfm) argument 2757 safexcel_hmac_sha3_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument 2817 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2849 safexcel_hmac_sha3_224_cra_init(struct crypto_tfm *tfm) argument 2888 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2920 safexcel_hmac_sha3_256_cra_init(struct crypto_tfm *tfm) argument 2959 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 2991 safexcel_hmac_sha3_384_cra_init(struct crypto_tfm *tfm) argument 3030 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); local 3062 safexcel_hmac_sha3_512_cra_init(struct crypto_tfm *tfm) argument [all...] |
/linux-master/arch/arm64/crypto/ |
H A D | sm4-ce-glue.c | 71 static int sm4_setkey(struct crypto_skcipher *tfm, const u8 *key, argument 74 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); 86 static int sm4_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, argument 89 struct sm4_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 95 ret = xts_verify_key(tfm, key, key_len); 140 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 141 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); 148 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 149 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); 192 struct crypto_skcipher *tfm local 200 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 208 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 280 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 323 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 507 sm4_cbcmac_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int key_len) argument 523 sm4_cmac_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int key_len) argument 559 sm4_xcbc_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int key_len) argument [all...] |
H A D | aes-neonbs-glue.c | 74 static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, argument 77 struct aesbs_ctx *ctx = crypto_skcipher_ctx(tfm); 98 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 99 struct aesbs_ctx *ctx = crypto_skcipher_ctx(tfm); 133 static int aesbs_cbc_ctr_setkey(struct crypto_skcipher *tfm, const u8 *in_key, argument 136 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); 158 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 159 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); 181 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 182 struct aesbs_cbc_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); 209 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 251 aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, unsigned int key_len) argument 280 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local [all...] |
/linux-master/drivers/crypto/intel/qat/qat_common/ |
H A D | qat_algs.c | 125 shash->tfm = ctx->hash_tfm; 546 static int qat_alg_aead_init_sessions(struct crypto_aead *tfm, const u8 *key, argument 558 if (qat_alg_aead_init_enc_session(tfm, alg, &keys, mode)) 561 if (qat_alg_aead_init_dec_session(tfm, alg, &keys, mode)) 589 static int qat_alg_aead_rekey(struct crypto_aead *tfm, const u8 *key, argument 592 struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm); 599 return qat_alg_aead_init_sessions(tfm, key, keylen, 603 static int qat_alg_aead_newkey(struct crypto_aead *tfm, const u8 *key, argument 606 struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm); 632 ret = qat_alg_aead_init_sessions(tfm, ke 655 qat_alg_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 786 struct crypto_tfm *tfm = crypto_aead_tfm(aead_tfm); local 832 struct crypto_tfm *tfm = crypto_aead_tfm(aead_tfm); local 938 qat_alg_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen, int mode) argument 952 qat_alg_skcipher_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 959 qat_alg_skcipher_ctr_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 966 qat_alg_skcipher_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keylen) argument 1020 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); local 1087 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); local 1152 qat_alg_aead_init(struct crypto_aead *tfm, enum icp_qat_hw_auth_algo hash, const char *hash_name) argument 1166 qat_alg_aead_sha1_init(struct crypto_aead *tfm) argument 1171 qat_alg_aead_sha256_init(struct crypto_aead *tfm) argument 1176 qat_alg_aead_sha512_init(struct crypto_aead *tfm) argument 1181 qat_alg_aead_exit(struct crypto_aead *tfm) argument 1206 qat_alg_skcipher_init_tfm(struct crypto_skcipher *tfm) argument 1212 qat_alg_skcipher_init_xts_tfm(struct crypto_skcipher *tfm) argument 1236 qat_alg_skcipher_exit_tfm(struct crypto_skcipher *tfm) argument 1263 qat_alg_skcipher_exit_xts_tfm(struct crypto_skcipher *tfm) argument [all...] |
/linux-master/crypto/ |
H A D | adiantum.c | 117 static int adiantum_setkey(struct crypto_skcipher *tfm, const u8 *key, argument 120 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); 134 crypto_skcipher_get_flags(tfm) & 162 crypto_skcipher_get_flags(tfm) & 175 crypto_shash_set_flags(tctx->hash, crypto_skcipher_get_flags(tfm) & 221 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 222 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); 280 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 281 const struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); 299 rctx->u.hash_desc.tfm 340 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 427 adiantum_init_tfm(struct crypto_skcipher *tfm) argument 479 adiantum_exit_tfm(struct crypto_skcipher *tfm) argument [all...] |
H A D | rsa-pkcs1pad.c | 130 static int pkcs1pad_set_pub_key(struct crypto_akcipher *tfm, const void *key, argument 133 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); 151 static int pkcs1pad_set_priv_key(struct crypto_akcipher *tfm, const void *key, argument 154 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); 172 static unsigned int pkcs1pad_get_max_size(struct crypto_akcipher *tfm) argument 174 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); 199 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 200 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); 251 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 252 struct pkcs1pad_ctx *ctx = akcipher_tfm_ctx(tfm); 299 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 366 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 399 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 456 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 553 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); local 586 pkcs1pad_init_tfm(struct crypto_akcipher *tfm) argument 605 pkcs1pad_exit_tfm(struct crypto_akcipher *tfm) argument [all...] |
/linux-master/fs/crypto/ |
H A D | keysetup.c | 103 struct crypto_skcipher *tfm; local 106 tfm = crypto_alloc_skcipher(mode->cipher_str, 0, 0); 107 if (IS_ERR(tfm)) { 108 if (PTR_ERR(tfm) == -ENOENT) { 115 mode->cipher_str, PTR_ERR(tfm)); 116 return tfm; 126 mode->friendly_name, crypto_skcipher_driver_name(tfm)); 128 if (WARN_ON_ONCE(crypto_skcipher_ivsize(tfm) != mode->ivsize)) { 132 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS); 133 err = crypto_skcipher_setkey(tfm, raw_ke 153 struct crypto_skcipher *tfm; local [all...] |
/linux-master/net/bluetooth/ |
H A D | selftest.c | 141 static int __init test_ecdh_sample(struct crypto_kpp *tfm, const u8 priv_a[32], argument 155 ret = set_ecdh_privkey(tfm, priv_a); 159 ret = compute_ecdh_secret(tfm, pub_b, dhkey_a); 168 ret = set_ecdh_privkey(tfm, priv_b); 172 ret = compute_ecdh_secret(tfm, pub_a, dhkey_b); 201 struct crypto_kpp *tfm; local 208 tfm = crypto_alloc_kpp("ecdh-nist-p256", 0, 0); 209 if (IS_ERR(tfm)) { 211 err = PTR_ERR(tfm); 215 err = test_ecdh_sample(tfm, priv_a_ [all...] |
/linux-master/drivers/target/iscsi/ |
H A D | iscsi_target_auth.c | 75 struct crypto_shash *tfm; local 77 tfm = crypto_alloc_shash(name, 0, 0); 78 if (IS_ERR(tfm)) 81 crypto_free_shash(tfm); 259 struct crypto_shash *tfm = NULL; local 356 tfm = crypto_alloc_shash(chap->digest_name, 0, 0); 357 if (IS_ERR(tfm)) { 358 tfm = NULL; 363 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(tfm), GFP_KERNEL); 369 desc->tfm [all...] |
/linux-master/drivers/nvme/common/ |
H A D | auth.c | 282 shash->tfm = key_tfm; 318 struct crypto_shash *tfm; local 327 tfm = crypto_alloc_shash(digest_name, 0, 0); 328 if (IS_ERR(tfm)) 331 ret = crypto_shash_tfm_digest(tfm, skey, skey_len, hkey); 336 crypto_free_shash(tfm); 343 struct crypto_shash *tfm; local 365 tfm = crypto_alloc_shash(hmac_name, 0, 0); 366 if (IS_ERR(tfm)) { 367 ret = PTR_ERR(tfm); [all...] |
/linux-master/arch/arm/crypto/ |
H A D | aes-ce-glue.c | 137 static int ce_aes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, argument 140 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); 150 static int xts_set_key(struct crypto_skcipher *tfm, const u8 *in_key, argument 153 struct crypto_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); 156 ret = xts_verify_key(tfm, in_key, key_len); 169 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 170 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); 189 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 190 struct crypto_aes_ctx *ctx = crypto_skcipher_ctx(tfm); 210 struct crypto_skcipher *tfm local 240 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 269 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 327 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 385 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 421 ctr_encrypt_one(struct crypto_skcipher *tfm, const u8 *src, u8 *dst) argument 446 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 518 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local [all...] |
/linux-master/drivers/crypto/qce/ |
H A D | aead.c | 28 struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm); 188 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 190 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); 332 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 333 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); 412 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 413 struct qce_aead_ctx *ctx = crypto_tfm_ctx(async_req->tfm); 429 rctx->ivsize = crypto_aead_ivsize(tfm); 504 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 506 struct qce_aead_ctx *ctx = crypto_aead_ctx(tfm); 565 qce_aead_ccm_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 595 qce_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 651 qce_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) argument 667 qce_aead_init(struct crypto_aead *tfm) argument 683 qce_aead_exit(struct crypto_aead *tfm) argument [all...] |
/linux-master/arch/sparc/crypto/ |
H A D | aes_glue.c | 168 static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, argument 171 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); 199 static int aes_set_key_skcipher(struct crypto_skcipher *tfm, const u8 *in_key, argument 202 return aes_set_key(crypto_skcipher_tfm(tfm), in_key, key_len); 205 static void crypto_aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument 207 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); 212 static void crypto_aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument 214 struct crypto_sparc64_aes_ctx *ctx = crypto_tfm_ctx(tfm); 221 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 222 const struct crypto_sparc64_aes_ctx *ctx = crypto_skcipher_ctx(tfm); 244 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 270 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 294 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local 336 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local [all...] |
/linux-master/drivers/crypto/ccree/ |
H A D | cc_aead.c | 64 static void cc_aead_exit(struct crypto_aead *tfm) argument 66 struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); 69 dev_dbg(dev, "Clearing context @%p for %s\n", crypto_aead_ctx(tfm), 70 crypto_tfm_alg_name(&tfm->base)); 118 static unsigned int cc_get_aead_hash_len(struct crypto_aead *tfm) argument 120 struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); 125 static int cc_aead_init(struct crypto_aead *tfm) argument 127 struct aead_alg *alg = crypto_aead_alg(tfm); 128 struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); 134 crypto_tfm_alg_name(&tfm 212 struct crypto_aead *tfm = crypto_aead_reqtfm(cc_req); local 410 cc_get_plain_hmac_key(struct crypto_aead *tfm, const u8 *authkey, unsigned int keylen) argument 541 cc_aead_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 655 cc_rfc4309_ccm_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 724 struct crypto_aead *tfm = crypto_aead_reqtfm(areq); local 768 struct crypto_aead *tfm = crypto_aead_reqtfm(areq); local 832 struct crypto_aead *tfm = crypto_aead_reqtfm(areq); local 874 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 924 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 991 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1024 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1100 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1162 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1213 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1266 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1412 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1533 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1592 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1616 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1694 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1731 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1831 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1880 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 1897 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 2107 cc_rfc4106_gcm_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument 2124 cc_rfc4543_gcm_setkey(struct crypto_aead *tfm, const u8 *key, unsigned int keylen) argument [all...] |
/linux-master/arch/x86/crypto/ |
H A D | aegis128-aesni-glue.c | 155 static int crypto_aegis128_aesni_setauthsize(struct crypto_aead *tfm, argument 170 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 171 struct aegis_ctx *ctx = crypto_aegis128_aesni_ctx(tfm); 195 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 197 unsigned int authsize = crypto_aead_authsize(tfm); 217 struct crypto_aead *tfm = crypto_aead_reqtfm(req); local 219 unsigned int authsize = crypto_aead_authsize(tfm);
|