Home
last modified time | relevance | path

Searched refs:tfm (Results 176 – 200 of 481) sorted by relevance

12345678910>>...20

/openbmc/linux/arch/s390/crypto/
H A Dcrc32-vx.c84 static int crc32_vx_cra_init_zero(struct crypto_tfm *tfm) in DEFINE_CRC32_VX()
86 struct crc_ctx *mctx = crypto_tfm_ctx(tfm); in DEFINE_CRC32_VX()
92 static int crc32_vx_cra_init_invert(struct crypto_tfm *tfm) in crc32_vx_cra_init_invert() argument
94 struct crc_ctx *mctx = crypto_tfm_ctx(tfm); in crc32_vx_cra_init_invert()
102 struct crc_ctx *mctx = crypto_shash_ctx(desc->tfm); in crc32_vx_init()
109 static int crc32_vx_setkey(struct crypto_shash *tfm, const u8 *newkey, in crc32_vx_setkey() argument
112 struct crc_ctx *mctx = crypto_shash_ctx(tfm); in crc32_vx_setkey()
120 static int crc32be_vx_setkey(struct crypto_shash *tfm, const u8 *newkey, in crc32be_vx_setkey() argument
123 struct crc_ctx *mctx = crypto_shash_ctx(tfm); in crc32be_vx_setkey()
201 return __ ## alg ## _vx_finup(crypto_shash_ctx(desc->tfm), \
/openbmc/linux/drivers/crypto/ccp/
H A Dccp-crypto-aes-xts.c75 static int ccp_aes_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, in ccp_aes_xts_setkey() argument
78 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_aes_xts_setkey()
82 ret = xts_verify_key(tfm, key, key_len); in ccp_aes_xts_setkey()
107 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ccp_aes_xts_crypt() local
108 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_aes_xts_crypt()
197 static int ccp_aes_xts_init_tfm(struct crypto_skcipher *tfm) in ccp_aes_xts_init_tfm() argument
199 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_aes_xts_init_tfm()
213 crypto_skcipher_set_reqsize_dma(tfm, in ccp_aes_xts_init_tfm()
220 static void ccp_aes_xts_exit_tfm(struct crypto_skcipher *tfm) in ccp_aes_xts_exit_tfm() argument
222 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_aes_xts_exit_tfm()
H A Dccp-crypto-des3.c37 static int ccp_des3_setkey(struct crypto_skcipher *tfm, const u8 *key, in ccp_des3_setkey() argument
40 struct ccp_crypto_skcipher_alg *alg = ccp_crypto_skcipher_alg(tfm); in ccp_des3_setkey()
41 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_des3_setkey()
44 err = verify_skcipher_des3_key(tfm, key); in ccp_des3_setkey()
63 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ccp_des3_crypt() local
64 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_des3_crypt()
116 static int ccp_des3_init_tfm(struct crypto_skcipher *tfm) in ccp_des3_init_tfm() argument
118 struct ccp_ctx *ctx = crypto_skcipher_ctx_dma(tfm); in ccp_des3_init_tfm()
123 crypto_skcipher_set_reqsize_dma(tfm, sizeof(struct ccp_des3_req_ctx)); in ccp_des3_init_tfm()
/openbmc/linux/drivers/crypto/ccree/
H A Dcc_aead.c64 static void cc_aead_exit(struct crypto_aead *tfm) in cc_aead_exit() argument
66 struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm); in cc_aead_exit()
70 crypto_tfm_alg_name(&tfm->base)); in cc_aead_exit()
127 struct aead_alg *alg = crypto_aead_alg(tfm); in cc_aead_init()
134 crypto_tfm_alg_name(&tfm->base)); in cc_aead_init()
199 ctx->hash_len = cc_get_aead_hash_len(tfm); in cc_aead_init()
204 cc_aead_exit(tfm); in cc_aead_init()
666 return cc_aead_setkey(tfm, key, keylen); in cc_rfc4309_ccm_setkey()
1948 crypto_aead_ivsize(tfm)); in cc_proc_aead()
2121 return cc_aead_setkey(tfm, key, keylen); in cc_rfc4106_gcm_setkey()
[all …]
/openbmc/linux/crypto/
H A Dghash-generic.c55 static int ghash_setkey(struct crypto_shash *tfm, in ghash_setkey() argument
58 struct ghash_ctx *ctx = crypto_shash_ctx(tfm); in ghash_setkey()
82 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_update()
134 struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm); in ghash_final()
143 static void ghash_exit_tfm(struct crypto_tfm *tfm) in ghash_exit_tfm() argument
145 struct ghash_ctx *ctx = crypto_tfm_ctx(tfm); in ghash_exit_tfm()
H A Dccm.c396 struct crypto_ccm_ctx *ctx = crypto_aead_ctx(tfm); in crypto_ccm_init_tfm()
414 align = crypto_aead_alignmask(tfm); in crypto_ccm_init_tfm()
417 tfm, in crypto_ccm_init_tfm()
684 tfm, in crypto_rfc4309_init_tfm()
788 int bs = crypto_shash_digestsize(pdesc->tfm); in crypto_cbcmac_digest_init()
800 struct crypto_shash *parent = pdesc->tfm; in crypto_cbcmac_digest_update()
803 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_update() local
816 crypto_cipher_encrypt_one(tfm, dg, dg); in crypto_cbcmac_digest_update()
826 struct crypto_shash *parent = pdesc->tfm; in crypto_cbcmac_digest_final()
829 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_final() local
[all …]
H A Dgeniv.c19 static int aead_geniv_setkey(struct crypto_aead *tfm, in aead_geniv_setkey() argument
22 struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm); in aead_geniv_setkey()
27 static int aead_geniv_setauthsize(struct crypto_aead *tfm, in aead_geniv_setauthsize() argument
30 struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm); in aead_geniv_setauthsize()
153 void aead_exit_geniv(struct crypto_aead *tfm) in aead_exit_geniv() argument
155 struct aead_geniv_ctx *ctx = crypto_aead_ctx(tfm); in aead_exit_geniv()
H A Dhmac.c34 static inline struct hmac_ctx *hmac_ctx(struct crypto_shash *tfm) in hmac_ctx() argument
36 return align_ptr(crypto_shash_ctx_aligned(tfm) + in hmac_ctx()
37 crypto_shash_statesize(tfm) * 2, in hmac_ctx()
58 shash->tfm = hash; in hmac_setkey()
97 struct hmac_ctx *ctx = hmac_ctx(pdesc->tfm); in hmac_import()
99 desc->tfm = ctx->hash; in hmac_import()
106 return hmac_import(pdesc, crypto_shash_ctx_aligned(pdesc->tfm)); in hmac_init()
119 struct crypto_shash *parent = pdesc->tfm; in hmac_final()
134 struct crypto_shash *parent = pdesc->tfm; in hmac_finup()
H A Dtcrypt.c249 struct crypto_aead *tfm; in test_mb_aead_speed() local
278 if (IS_ERR(tfm)) { in test_mb_aead_speed()
280 algo, PTR_ERR(tfm)); in test_mb_aead_speed()
446 crypto_free_aead(tfm); in test_mb_aead_speed()
567 if (IS_ERR(tfm)) { in test_aead_speed()
569 PTR_ERR(tfm)); in test_aead_speed()
688 crypto_free_aead(tfm); in test_aead_speed()
877 if (IS_ERR(tfm)) { in test_ahash_speed_common()
1083 if (IS_ERR(tfm)) { in test_mb_skcipher_speed()
1085 algo, PTR_ERR(tfm)); in test_mb_skcipher_speed()
[all …]
H A Ddrbg.c1682 struct crypto_shash *tfm; in drbg_init_hash_kernel() local
1685 if (IS_ERR(tfm)) { in drbg_init_hash_kernel()
1688 return PTR_ERR(tfm); in drbg_init_hash_kernel()
1694 crypto_free_shash(tfm); in drbg_init_hash_kernel()
1698 sdesc->shash.tfm = tfm; in drbg_init_hash_kernel()
1741 if (tfm) in drbg_fini_sym_kernel()
1742 crypto_free_cipher(tfm); in drbg_fini_sym_kernel()
1761 struct crypto_cipher *tfm; in drbg_init_sym_kernel() local
1768 if (IS_ERR(tfm)) { in drbg_init_sym_kernel()
1771 return PTR_ERR(tfm); in drbg_init_sym_kernel()
[all …]
/openbmc/linux/arch/x86/crypto/
H A Dtwofish_glue.c54 static void twofish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_encrypt() argument
56 twofish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_encrypt()
59 static void twofish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in twofish_decrypt() argument
61 twofish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in twofish_decrypt()
H A Dblowfish_glue.c43 static void blowfish_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_encrypt() argument
45 blowfish_enc_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_encrypt()
48 static void blowfish_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in blowfish_decrypt() argument
50 blowfish_dec_blk(crypto_tfm_ctx(tfm), dst, src); in blowfish_decrypt()
53 static int blowfish_setkey_skcipher(struct crypto_skcipher *tfm, in blowfish_setkey_skcipher() argument
56 return blowfish_setkey(&tfm->base, key, keylen); in blowfish_setkey_skcipher()
/openbmc/linux/arch/loongarch/crypto/
H A Dcrc32-loongarch.c113 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_init()
125 static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen) in chksum_setkey() argument
127 struct chksum_ctx *mctx = crypto_shash_ctx(tfm); in chksum_setkey()
197 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksum_digest()
204 struct chksum_ctx *mctx = crypto_shash_ctx(desc->tfm); in chksumc_digest()
209 static int chksum_cra_init(struct crypto_tfm *tfm) in chksum_cra_init() argument
211 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in chksum_cra_init()
217 static int chksumc_cra_init(struct crypto_tfm *tfm) in chksumc_cra_init() argument
219 struct chksum_ctx *mctx = crypto_tfm_ctx(tfm); in chksumc_cra_init()
/openbmc/linux/drivers/crypto/aspeed/
H A Daspeed-hace-hash.c351 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in aspeed_ahash_hmac_resume() local
537 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in aspeed_ahash_do_request() local
615 SHASH_DESC_ON_STACK(shash, tfm); in aspeed_sham_shash_digest()
617 shash->tfm = tfm; in aspeed_sham_shash_digest()
670 crypto_tfm_alg_name(&tfm->base), in aspeed_sham_init()
671 crypto_ahash_digestsize(tfm)); in aspeed_sham_init()
676 switch (crypto_ahash_digestsize(tfm)) { in aspeed_sham_init()
726 crypto_ahash_digestsize(tfm)); in aspeed_sham_init()
791 struct aspeed_sham_ctx *tctx = crypto_tfm_ctx(tfm); in aspeed_sham_cra_init()
798 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in aspeed_sham_cra_init()
[all …]
/openbmc/linux/drivers/target/iscsi/
H A Discsi_target_auth.c75 struct crypto_shash *tfm; in chap_test_algorithm() local
77 tfm = crypto_alloc_shash(name, 0, 0); in chap_test_algorithm()
78 if (IS_ERR(tfm)) in chap_test_algorithm()
81 crypto_free_shash(tfm); in chap_test_algorithm()
259 struct crypto_shash *tfm = NULL; in chap_server_compute_hash() local
356 tfm = crypto_alloc_shash(chap->digest_name, 0, 0); in chap_server_compute_hash()
357 if (IS_ERR(tfm)) { in chap_server_compute_hash()
358 tfm = NULL; in chap_server_compute_hash()
369 desc->tfm = tfm; in chap_server_compute_hash()
560 if (tfm) in chap_server_compute_hash()
[all …]
/openbmc/linux/drivers/crypto/
H A Dimg-hash.c491 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_init()
555 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_update()
570 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_final()
584 struct img_hash_ctx *ctx = crypto_ahash_ctx(tfm); in img_hash_finup()
646 ctx->digsize = crypto_ahash_digestsize(tfm); in img_hash_digest()
680 struct img_hash_ctx *ctx = crypto_tfm_ctx(tfm); in img_hash_cra_init()
698 return img_hash_cra_init(tfm, "md5-generic"); in img_hash_cra_md5_init()
703 return img_hash_cra_init(tfm, "sha1-generic"); in img_hash_cra_sha1_init()
708 return img_hash_cra_init(tfm, "sha224-generic"); in img_hash_cra_sha224_init()
713 return img_hash_cra_init(tfm, "sha256-generic"); in img_hash_cra_sha256_init()
[all …]
H A Dn2_core.c264 struct crypto_alg *alg = tfm->__crt_alg; in n2_ahash_alg()
279 struct crypto_alg *alg = tfm->__crt_alg; in n2_hmac_alg()
316 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_init()
328 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_update()
342 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_final()
355 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_finup()
416 struct n2_hmac_alg *n2alg = n2_hmac_alg(tfm); in n2_hmac_cra_init()
464 struct n2_hmac_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hmac_async_setkey()
965 err = __n2_crypt_chunk(tfm, c, qp, encrypt); in n2_do_ecb()
1024 err = __n2_crypt_chunk(tfm, c, qp, true); in n2_do_chaining()
[all …]
H A Datmel-aes.c954 ctx = crypto_tfm_ctx(areq->tfm); in atmel_aes_handle_queue()
1508 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in atmel_aes_gcm_start() local
1510 size_t ivsize = crypto_aead_ivsize(tfm); in atmel_aes_gcm_start()
1545 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in atmel_aes_gcm_process() local
1550 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_process()
1696 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in atmel_aes_gcm_finalize() local
1708 authsize = crypto_aead_authsize(tfm); in atmel_aes_gcm_finalize()
1876 err = xts_verify_key(tfm, key, keylen); in atmel_aes_xts_setkey()
2083 authsize = crypto_aead_authsize(tfm); in atmel_aes_authenc_final()
2112 crypto_aead_get_flags(tfm)); in atmel_aes_authenc_setkey()
[all …]
/openbmc/linux/drivers/crypto/hisilicon/hpre/
H A Dhpre_crypto.c593 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_dh_compute_value()
718 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_dh_set_secret()
744 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_dh_max_size()
751 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_dh_init_tfm()
760 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_dh_exit_tfm()
807 akcipher_request_set_tfm(req, tfm); in hpre_rsa_enc()
855 akcipher_request_set_tfm(req, tfm); in hpre_rsa_dec()
1394 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_ecdh_set_secret()
1587 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_ecdh_compute_value()
1629 struct hpre_ctx *ctx = kpp_tfm_ctx(tfm); in hpre_ecdh_max_size()
[all …]
/openbmc/linux/arch/arm64/crypto/
H A Daes-cipher-glue.c15 static void aes_arm64_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_arm64_encrypt() argument
17 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_arm64_encrypt()
23 static void aes_arm64_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_arm64_decrypt() argument
25 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_arm64_decrypt()
H A Daes-ce-glue.c46 static void aes_cipher_encrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_encrypt() argument
48 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_encrypt()
60 static void aes_cipher_decrypt(struct crypto_tfm *tfm, u8 dst[], u8 const src[]) in aes_cipher_decrypt() argument
62 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_cipher_decrypt()
142 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in ce_aes_setkey() argument
145 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in ce_aes_setkey()
/openbmc/linux/crypto/asymmetric_keys/
H A Dpkcs7_verify.c26 struct crypto_shash *tfm; in pkcs7_digest() local
43 tfm = crypto_alloc_shash(sinfo->sig->hash_algo, 0, 0); in pkcs7_digest()
44 if (IS_ERR(tfm)) in pkcs7_digest()
45 return (PTR_ERR(tfm) == -ENOENT) ? -ENOPKG : PTR_ERR(tfm); in pkcs7_digest()
47 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in pkcs7_digest()
48 sig->digest_size = crypto_shash_digestsize(tfm); in pkcs7_digest()
59 desc->tfm = tfm; in pkcs7_digest()
120 crypto_free_shash(tfm); in pkcs7_digest()
/openbmc/linux/arch/arm/crypto/
H A Daes-cipher-glue.c16 static void aes_arm_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_arm_encrypt() argument
18 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_arm_encrypt()
24 static void aes_arm_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in aes_arm_decrypt() argument
26 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm); in aes_arm_decrypt()
H A Dcurve25519-glue.c49 static int curve25519_set_secret(struct crypto_kpp *tfm, const void *buf, in curve25519_set_secret() argument
52 u8 *secret = kpp_tfm_ctx(tfm); in curve25519_set_secret()
66 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); in curve25519_compute_value() local
67 const u8 *secret = kpp_tfm_ctx(tfm); in curve25519_compute_value()
97 static unsigned int curve25519_max_size(struct crypto_kpp *tfm) in curve25519_max_size() argument
/openbmc/linux/net/mac80211/
H A Daes_cmac.h14 void ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad,
16 void ieee80211_aes_cmac_256(struct crypto_shash *tfm, const u8 *aad,
18 void ieee80211_aes_cmac_key_free(struct crypto_shash *tfm);

12345678910>>...20