| /linux/include/crypto/ |
| H A D | aead.h | 140 int (*setkey)(struct crypto_aead *tfm, const u8 *key, 142 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); 145 int (*init)(struct crypto_aead *tfm); 146 void (*exit)(struct crypto_aead *tfm); 173 (((struct aead_request *)__##name##_desc)->base.tfm = \ 177 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument 179 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast() 200 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument 202 return &tfm->base; in crypto_aead_tfm() 205 static inline struct crypto_tfm *crypto_sync_aead_tfm(struct crypto_sync_aead *tfm) in crypto_sync_aead_tfm() argument [all …]
|
| H A D | kpp.h | 78 int (*set_secret)(struct crypto_kpp *tfm, const void *buffer, 83 unsigned int (*max_size)(struct crypto_kpp *tfm); 85 int (*init)(struct crypto_kpp *tfm); 86 void (*exit)(struct crypto_kpp *tfm); 114 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) in crypto_kpp_tfm() argument 116 return &tfm->base; in crypto_kpp_tfm() 124 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) in __crypto_kpp_tfm() argument 126 return container_of(tfm, struct crypto_kpp, base); in __crypto_kpp_tfm() 129 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) in crypto_kpp_alg() argument 131 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg() [all …]
|
| H A D | algapi.h | 185 static inline void *crypto_tfm_ctx(struct crypto_tfm *tfm) in crypto_tfm_ctx() argument 187 return tfm->__crt_ctx; in crypto_tfm_ctx() 190 static inline void *crypto_tfm_ctx_align(struct crypto_tfm *tfm, in crypto_tfm_ctx_align() argument 196 return PTR_ALIGN(crypto_tfm_ctx(tfm), align); in crypto_tfm_ctx_align() 209 static inline void *crypto_tfm_ctx_dma(struct crypto_tfm *tfm) in crypto_tfm_ctx_dma() argument 211 return crypto_tfm_ctx_align(tfm, crypto_dma_align()); in crypto_tfm_ctx_dma() 215 struct crypto_tfm *tfm) in crypto_tfm_alg_instance() argument 217 return container_of(tfm->__crt_alg, struct crypto_instance, alg); in crypto_tfm_alg_instance() 273 static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) in crypto_tfm_alg_type() argument 275 return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; in crypto_tfm_alg_type() [all …]
|
| /linux/security/integrity/ima/ |
| H A D | ima_crypto.c | 52 struct crypto_shash *tfm = ima_shash_tfm; 59 return tfm; 62 if (ima_algo_array[i].tfm && ima_algo_array[i].algo == algo) 63 return ima_algo_array[i].tfm; 65 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); 66 if (IS_ERR(tfm)) { 67 rc = PTR_ERR(tfm); 71 return tfm; in ima_init_ima_crypto() 124 ima_algo_array[i].tfm = ima_shash_tfm; in ima_init_crypto() 128 ima_algo_array[i].tfm in ima_init_crypto() 88 struct crypto_shash *tfm = ima_shash_tfm; ima_alloc_tfm() local 209 ima_free_tfm(struct crypto_shash * tfm) ima_free_tfm() argument 287 struct crypto_ahash *tfm = ima_ahash_tfm; ima_alloc_atfm() local 307 ima_free_atfm(struct crypto_ahash * tfm) ima_free_atfm() argument 326 ima_calc_file_hash_atfm(struct file * file,struct ima_digest_data * hash,struct crypto_ahash * tfm) ima_calc_file_hash_atfm() argument 437 struct crypto_ahash *tfm; ima_calc_file_ahash() local 453 ima_calc_file_hash_tfm(struct file * file,struct ima_digest_data * hash,struct crypto_shash * tfm) ima_calc_file_hash_tfm() argument 504 struct crypto_shash *tfm; ima_calc_file_shash() local 660 calc_buffer_ahash_atfm(const void * buf,loff_t len,struct ima_digest_data * hash,struct crypto_ahash * tfm) calc_buffer_ahash_atfm() argument 701 struct crypto_ahash *tfm; calc_buffer_ahash() local 717 calc_buffer_shash_tfm(const void * buf,loff_t size,struct ima_digest_data * hash,struct crypto_shash * tfm) calc_buffer_shash_tfm() argument 748 struct crypto_shash *tfm; calc_buffer_shash() local 796 ima_calc_boot_aggregate_tfm(char * digest,u16 alg_id,struct crypto_shash * tfm) ima_calc_boot_aggregate_tfm() argument 841 struct crypto_shash *tfm; ima_calc_boot_aggregate() local [all...] |
| /linux/net/mac80211/ |
| H A D | aead_api.c | 18 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_encrypt() argument 21 size_t mic_len = crypto_aead_authsize(tfm); in aead_encrypt() 24 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_encrypt() 40 aead_request_set_tfm(aead_req, tfm); in aead_encrypt() 50 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_decrypt() argument 53 size_t mic_len = crypto_aead_authsize(tfm); in aead_decrypt() 56 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_decrypt() 75 aead_request_set_tfm(aead_req, tfm); in aead_decrypt() 89 struct crypto_aead *tfm; in aead_key_setup_encrypt() local 92 tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC); in aead_key_setup_encrypt() [all …]
|
| H A D | aes_gcm.h | 13 static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, in ieee80211_aes_gcm_encrypt() argument 17 return aead_encrypt(tfm, j_0, aad + 2, in ieee80211_aes_gcm_encrypt() 22 static inline int ieee80211_aes_gcm_decrypt(struct crypto_aead *tfm, in ieee80211_aes_gcm_decrypt() argument 26 return aead_decrypt(tfm, j_0, aad + 2, in ieee80211_aes_gcm_decrypt() 38 static inline void ieee80211_aes_gcm_key_free(struct crypto_aead *tfm) in ieee80211_aes_gcm_key_free() argument 40 return aead_key_free(tfm); in ieee80211_aes_gcm_key_free()
|
| /linux/drivers/crypto/allwinner/sun4i-ss/ |
| H A D | sun4i-ss-cipher.c | 17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_opti_poll() local 18 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_opti_poll() 20 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_opti_poll() 38 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_opti_poll() 150 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll_fallback() local 151 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll_fallback() 154 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_cipher_poll_fallback() 178 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll() local 179 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll() 184 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll() [all …]
|
| /linux/include/crypto/internal/ |
| H A D | des.h | 26 static inline int crypto_des_verify_key(struct crypto_tfm *tfm, const u8 *key) in crypto_des_verify_key() argument 33 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS) in crypto_des_verify_key() 91 static inline int crypto_des3_ede_verify_key(struct crypto_tfm *tfm, in crypto_des3_ede_verify_key() argument 95 crypto_tfm_get_flags(tfm) & in crypto_des3_ede_verify_key() 99 static inline int verify_skcipher_des_key(struct crypto_skcipher *tfm, in verify_skcipher_des_key() argument 102 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des_key() 105 static inline int verify_skcipher_des3_key(struct crypto_skcipher *tfm, in verify_skcipher_des3_key() argument 108 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des3_key() 111 static inline int verify_aead_des_key(struct crypto_aead *tfm, const u8 *key, in verify_aead_des_key() argument 116 return crypto_des_verify_key(crypto_aead_tfm(tfm), key); in verify_aead_des_key() [all …]
|
| /linux/samples/tsm-mr/ |
| H A D | tsm_mr_sample.c | 26 struct crypto_shash *tfm; sample_report_refresh() local
|
| /linux/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_keys.c | |
| /linux/include/linux/ |
| H A D | bpf_crypto.h | |
| /linux/drivers/crypto/ |
| H A D | geode-aes.c | 110 static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key, in geode_setkey_cip() argument 113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() 131 (tfm->crt_flags & CRYPTO_TFM_REQ_MASK); in geode_setkey_cip() 136 static int geode_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, in geode_setkey_skcipher() argument 139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() 158 crypto_skcipher_get_flags(tfm) & in geode_setkey_skcipher() 164 geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_encrypt() argument 166 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_encrypt() 179 geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_decrypt() argument 181 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_decrypt() [all …]
|
| /linux/crypto/ |
| H A D | aes.c | 26 static int crypto_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key, in crypto_aes_setkey() argument 29 struct aes_key *key = crypto_tfm_ctx(tfm); in crypto_aes_setkey() 34 static void crypto_aes_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in crypto_aes_encrypt() argument 36 const struct aes_key *key = crypto_tfm_ctx(tfm); in crypto_aes_encrypt() 41 static void crypto_aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in crypto_aes_decrypt() argument 43 const struct aes_key *key = crypto_tfm_ctx(tfm); in crypto_aes_decrypt() 49 #define AES_CMAC_KEY(tfm) ((struct aes_cmac_key *)crypto_shash_ctx(tfm)) argument 52 static int __maybe_unused crypto_aes_cmac_setkey(struct crypto_shash *tfm, in crypto_aes_cmac_setkey() argument 56 return aes_cmac_preparekey(AES_CMAC_KEY(tfm), in_ke in crypto_aes_cmac_setkey() 59 crypto_aes_xcbc_setkey(struct crypto_shash * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_xcbc_setkey() argument 98 AES_CBCMAC_KEY(tfm) global() argument 101 crypto_aes_cbcmac_setkey(struct crypto_shash * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_cbcmac_setkey() argument 213 crypto_aes_skcipher_setkey(struct crypto_skcipher * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_skcipher_setkey() argument 222 crypto_aes_skcipher_setenckey(struct crypto_skcipher * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_skcipher_setenckey() argument 514 crypto_aes_xts_setkey(struct crypto_skcipher * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_xts_setkey() argument 727 crypto_aes_gcm_setkey(struct crypto_aead * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_gcm_setkey() argument 737 crypto_aes_gcm_setauthsize(struct crypto_aead * tfm,unsigned int authsize) crypto_aes_gcm_setauthsize() argument 814 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_gcm_encrypt() local 822 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_gcm_decrypt() local 833 crypto_aes_rfc4106_setkey(struct crypto_aead * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_rfc4106_setkey() argument 850 crypto_aes_rfc4106_setauthsize(struct crypto_aead * tfm,unsigned int authsize) crypto_aes_rfc4106_setauthsize() argument 864 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_rfc4106_encrypt() local 879 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_rfc4106_decrypt() local 894 crypto_aes_ccm_setkey(struct crypto_aead * tfm,const u8 * in_key,unsigned int key_len) crypto_aes_ccm_setkey() argument 904 crypto_aes_ccm_setauthsize(struct crypto_aead * tfm,unsigned int authsize) crypto_aes_ccm_setauthsize() argument 958 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_ccm_encrypt() local 978 struct crypto_aead *tfm = crypto_aead_reqtfm(req); crypto_aes_ccm_decrypt() local [all...] |
| H A D | algif_skcipher.c | 63 struct crypto_skcipher *tfm = pask->private; in skcipher_sendmsg() local 64 unsigned ivsize = crypto_skcipher_ivsize(tfm); in skcipher_sendmsg() 72 struct crypto_skcipher *tfm; in algif_skcipher_export() local 85 tfm = pask->private; in algif_skcipher_export() 87 statesize = crypto_skcipher_statesize(tfm); in algif_skcipher_export() 109 struct crypto_skcipher *tfm = pask->private; in _skcipher_recvmsg() local 110 unsigned int bs = crypto_skcipher_chunksize(tfm); in _skcipher_recvmsg() 124 crypto_skcipher_reqsize(tfm)); in _skcipher_recvmsg() 169 skcipher_request_set_tfm(&areq->cra_u.skcipher_req, tfm); in _skcipher_recvmsg() 176 sock_kzfree_s(sk, ctx->state, crypto_skcipher_statesize(tfm)); in _skcipher_recvmsg() 256 struct crypto_skcipher *tfm; skcipher_check_key() local 360 struct crypto_skcipher *tfm = pask->private; skcipher_sock_destruct() local 374 struct crypto_skcipher *tfm = private; skcipher_accept_parent_nokey() local 403 struct crypto_skcipher *tfm = private; skcipher_accept_parent() local [all...] |
| H A D | essiv.c | 66 static int essiv_skcipher_setkey(struct crypto_skcipher *tfm, in essiv_skcipher_setkey() argument 69 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() 75 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 87 crypto_skcipher_get_flags(tfm) & in essiv_skcipher_setkey() 93 static int essiv_aead_setkey(struct crypto_aead *tfm, const u8 *key, in essiv_aead_setkey() argument 96 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() 103 crypto_aead_set_flags(tctx->u.aead, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 112 desc->tfm = tctx->hash; in essiv_aead_setkey() 120 crypto_cipher_set_flags(tctx->essiv_cipher, crypto_aead_get_flags(tfm) & in essiv_aead_setkey() 126 static int essiv_aead_setauthsize(struct crypto_aead *tfm, in essiv_aead_setauthsize() argument 143 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); essiv_skcipher_crypt() local 185 struct crypto_aead *tfm = crypto_aead_reqtfm(req); essiv_aead_crypt() local 295 essiv_skcipher_init_tfm(struct crypto_skcipher * tfm) essiv_skcipher_init_tfm() argument 320 essiv_aead_init_tfm(struct crypto_aead * tfm) essiv_aead_init_tfm() argument 353 essiv_skcipher_exit_tfm(struct crypto_skcipher * tfm) essiv_skcipher_exit_tfm() argument 362 essiv_aead_exit_tfm(struct crypto_aead * tfm) essiv_aead_exit_tfm() argument [all...] |
| /linux/arch/s390/crypto/ |
| H A D | aes_s390.c | 73 static int setkey_fallback_skcipher(struct crypto_skcipher *tfm, const u8 *key, in setkey_fallback_skcipher() argument 76 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm); in setkey_fallback_skcipher() 81 crypto_skcipher_get_flags(tfm) & in setkey_fallback_skcipher() 99 static int ecb_aes_set_key(struct crypto_skcipher *tfm, const u8 *in_key, in ecb_aes_set_key() argument 102 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm); in ecb_aes_set_key() 113 return setkey_fallback_skcipher(tfm, in_key, key_len); in ecb_aes_set_key() 122 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_aes_crypt() local 123 struct s390_aes_ctx *sctx = crypto_skcipher_ctx(tfm); in ecb_aes_crypt() 152 static int fallback_init_skcipher(struct crypto_skcipher *tfm) in fallback_init_skcipher() argument 154 const char *name = crypto_tfm_alg_name(&tfm->base); in fallback_init_skcipher() [all …]
|
| H A D | paes_s390.c | 354 static int ecb_paes_setkey(struct crypto_skcipher *tfm, const u8 *in_key, in ecb_paes_setkey() argument 357 struct s390_paes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_paes_setkey() 358 bool tested = crypto_skcipher_tested(tfm); in ecb_paes_setkey() 466 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ecb_paes_crypt() local 467 struct s390_paes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_paes_crypt() 469 bool tested = crypto_skcipher_tested(tfm); in ecb_paes_crypt() 528 static int ecb_paes_init(struct crypto_skcipher *tfm) in ecb_paes_init() argument 530 struct s390_paes_ctx *ctx = crypto_skcipher_ctx(tfm); in ecb_paes_init() 535 crypto_skcipher_set_reqsize(tfm, sizeof(struct s390_pecb_req_ctx)); in ecb_paes_init() 540 static void ecb_paes_exit(struct crypto_skcipher *tfm) in ecb_paes_exit() argument [all …]
|
| H A D | hmac_s390.c | 169 static int s390_hmac_sha2_setkey(struct crypto_shash *tfm, in s390_hmac_sha2_setkey() argument 172 struct s390_hmac_ctx *tfm_ctx = crypto_shash_ctx(tfm); in s390_hmac_sha2_setkey() 173 unsigned int ds = crypto_shash_digestsize(tfm); in s390_hmac_sha2_setkey() 174 unsigned int bs = crypto_shash_blocksize(tfm); in s390_hmac_sha2_setkey() 187 struct s390_hmac_ctx *tfm_ctx = crypto_shash_ctx(desc->tfm); in s390_hmac_sha2_init() 189 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_init() 197 switch (crypto_shash_digestsize(desc->tfm)) { in s390_hmac_sha2_init() 221 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_update() 238 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_finup() 247 memcpy(out, ctx->param, crypto_shash_digestsize(desc->tfm)); in s390_hmac_sha2_finup() [all …]
|
| /linux/drivers/crypto/allwinner/sun8i-ss/ |
| H A D | sun8i-ss-hash.c | 95 int sun8i_ss_hash_init_tfm(struct crypto_ahash *tfm) in sun8i_ss_hash_init_tfm() argument 97 struct sun8i_ss_hash_tfm_ctx *op = crypto_ahash_ctx(tfm); in sun8i_ss_hash_init_tfm() 98 struct ahash_alg *alg = crypto_ahash_alg(tfm); in sun8i_ss_hash_init_tfm() 106 op->fallback_tfm = crypto_alloc_ahash(crypto_ahash_alg_name(tfm), 0, in sun8i_ss_hash_init_tfm() 113 crypto_ahash_set_statesize(tfm, in sun8i_ss_hash_init_tfm() 116 crypto_ahash_set_reqsize(tfm, in sun8i_ss_hash_init_tfm() 132 void sun8i_ss_hash_exit_tfm(struct crypto_ahash *tfm) 134 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ss_hash_exit_tfm() 146 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_init() 147 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ss_hash_init() local 133 sun8i_ss_hash_exit_tfm(struct crypto_ahash * tfm) sun8i_ss_hash_exit_tfm() argument 163 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_export() local 177 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_import() local 191 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_final() local 218 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_update() local 233 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_finup() local 261 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_digest_fb() local 347 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_need_fallback() local 396 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_digest() local 481 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); sun8i_ss_hash_run() local [all...] |
| /linux/security/keys/ |
| H A D | dh.c | 69 struct crypto_shash *tfm; in kdf_alloc() local 72 tfm = crypto_alloc_shash(hashname, 0, 0); in kdf_alloc() 73 if (IS_ERR(tfm)) { in kdf_alloc() 75 return PTR_ERR(tfm); in kdf_alloc() 78 if (crypto_shash_digestsize(tfm) == 0) { in kdf_alloc() 79 crypto_free_shash(tfm); in kdf_alloc() 83 *hash = tfm; in kdf_alloc() 134 struct crypto_kpp *tfm; in __keyctl_dh_compute() local 210 tfm = crypto_alloc_kpp("dh", 0, 0); in __keyctl_dh_compute() 211 if (IS_ERR(tfm)) { in __keyctl_dh_compute() [all …]
|
| /linux/drivers/crypto/amlogic/ |
| H A D | amlogic-gxl-cipher.c | 60 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher_do_fallback() local 61 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in meson_cipher_do_fallback() 65 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher_do_fallback() 86 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher() local 87 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in meson_cipher() 90 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher() 107 crypto_tfm_alg_name(areq->base.tfm), in meson_cipher() 109 rctx->op_dir, crypto_skcipher_ivsize(tfm), in meson_cipher() 129 ivsize = crypto_skcipher_ivsize(tfm); in meson_cipher() 291 struct crypto_skcipher *tfm in meson_skdecrypt() 276 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); meson_skdecrypt() local 294 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); meson_skencrypt() local 310 meson_cipher_init(struct crypto_tfm * tfm) meson_cipher_init() argument 336 meson_cipher_exit(struct crypto_tfm * tfm) meson_cipher_exit() argument 344 meson_aes_setkey(struct crypto_skcipher * tfm,const u8 * key,unsigned int keylen) meson_aes_setkey() argument [all...] |
| /linux/drivers/crypto/inside-secure/ |
| H A D | safexcel_hash.c | 620 static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm) in safexcel_ahash_exit_inv() argument 622 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_exit_inv() 637 ahash_request_set_tfm(req, __crypto_ahash_cast(tfm)); in safexcel_ahash_exit_inv() 638 ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_ahash_exit_inv() 916 static int safexcel_ahash_cra_init(struct crypto_tfm *tfm) in safexcel_ahash_cra_init() argument 918 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_cra_init() 920 container_of(__crypto_ahash_alg(tfm->__crt_alg), in safexcel_ahash_cra_init() 928 crypto_ahash_set_reqsize_dma(__crypto_ahash_cast(tfm), in safexcel_ahash_cra_init() 959 static void safexcel_ahash_cra_exit(struct crypto_tfm *tfm) in safexcel_ahash_cra_exit() argument 961 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_cra_exit() 1119 struct crypto_ahash *tfm; __safexcel_hmac_setkey() local 1188 safexcel_hmac_alg_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen,const char * alg,unsigned int state_sz) safexcel_hmac_alg_setkey() argument 1197 safexcel_hmac_sha1_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha1_setkey() argument 1350 safexcel_hmac_sha224_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha224_setkey() argument 1422 safexcel_hmac_sha256_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha256_setkey() argument 1608 safexcel_hmac_sha512_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha512_setkey() argument 1680 safexcel_hmac_sha384_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha384_setkey() argument 1833 safexcel_hmac_md5_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_md5_setkey() argument 1904 safexcel_cbcmac_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int len) safexcel_cbcmac_setkey() argument 1972 safexcel_xcbcmac_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int len) safexcel_xcbcmac_setkey() argument 2006 safexcel_xcbcmac_cra_init(struct crypto_tfm * tfm) safexcel_xcbcmac_cra_init() argument 2015 safexcel_xcbcmac_cra_exit(struct crypto_tfm * tfm) safexcel_xcbcmac_cra_exit() argument 2055 safexcel_cmac_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int len) safexcel_cmac_setkey() argument 2199 safexcel_hmac_sm3_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sm3_setkey() argument 2273 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_sha3_224_init() local 2291 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_fbcheck() local 2328 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_update() local 2338 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_final() local 2348 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_finup() local 2363 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_digest_fallback() local 2383 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_export() local 2393 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); safexcel_sha3_import() local 2402 safexcel_sha3_cra_init(struct crypto_tfm * tfm) safexcel_sha3_cra_init() argument 2426 safexcel_sha3_cra_exit(struct crypto_tfm * tfm) safexcel_sha3_cra_exit() argument 2467 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_sha3_256_init() local 2525 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_sha3_384_init() local 2583 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_sha3_512_init() local 2639 safexcel_hmac_sha3_cra_init(struct crypto_tfm * tfm,const char * alg) safexcel_hmac_sha3_cra_init() argument 2663 safexcel_hmac_sha3_cra_exit(struct crypto_tfm * tfm) safexcel_hmac_sha3_cra_exit() argument 2673 safexcel_hmac_sha3_setkey(struct crypto_ahash * tfm,const u8 * key,unsigned int keylen) safexcel_hmac_sha3_setkey() argument 2733 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_hmac_sha3_224_init() local 2765 safexcel_hmac_sha3_224_cra_init(struct crypto_tfm * tfm) safexcel_hmac_sha3_224_cra_init() argument 2804 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_hmac_sha3_256_init() local 2836 safexcel_hmac_sha3_256_cra_init(struct crypto_tfm * tfm) safexcel_hmac_sha3_256_cra_init() argument 2875 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_hmac_sha3_384_init() local 2907 safexcel_hmac_sha3_384_cra_init(struct crypto_tfm * tfm) safexcel_hmac_sha3_384_cra_init() argument 2946 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); safexcel_hmac_sha3_512_init() local 2978 safexcel_hmac_sha3_512_cra_init(struct crypto_tfm * tfm) safexcel_hmac_sha3_512_cra_init() argument [all...] |
| /linux/drivers/crypto/tegra/ |
| H A D | tegra-se-hash.c | 117 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in tegra_sha_fallback_init() local 118 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm); in tegra_sha_fallback_init() 131 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in tegra_sha_fallback_update() local 132 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm); in tegra_sha_fallback_update() 146 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in tegra_sha_fallback_final() local 147 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm); in tegra_sha_fallback_final() 161 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in tegra_sha_fallback_finup() local 162 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm); in tegra_sha_fallback_finup() 177 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in tegra_sha_fallback_digest() local 178 struct tegra_sha_ctx *ctx = crypto_ahash_ctx(tfm); in tegra_sha_fallback_digest() [all …]
|
| /linux/drivers/crypto/marvell/octeontx/ |
| H A D | otx_cptvf_algs.c | 104 struct crypto_aead *tfm; in validate_hmac_cipher_null() 107 tfm = crypto_aead_reqtfm(req); in validate_hmac_cipher_null() 111 crypto_aead_authsize(tfm))) in validate_hmac_cipher_null() 240 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); in create_ctx_hdr() 241 struct otx_cpt_enc_ctx *ctx = crypto_tfm_ctx(tfm); in create_ctx_hdr() 395 static int otx_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_xts_setkey() 398 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx_cpt_skcipher_xts_setkey() 403 ret = xts_verify_key(tfm, key, keylen); in otx_cpt_skcipher_xts_setkey() 424 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_des_setkey() 427 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_des_setkey() 103 struct crypto_aead *tfm; validate_hmac_cipher_null() local 239 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); create_ctx_hdr() local 394 otx_cpt_skcipher_xts_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen) otx_cpt_skcipher_xts_setkey() argument 423 cpt_des_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen,u8 cipher_type) cpt_des_setkey() argument 439 cpt_aes_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen,u8 cipher_type) cpt_aes_setkey() argument 465 otx_cpt_skcipher_cbc_aes_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen) otx_cpt_skcipher_cbc_aes_setkey() argument 471 otx_cpt_skcipher_ecb_aes_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen) otx_cpt_skcipher_ecb_aes_setkey() argument 477 otx_cpt_skcipher_cbc_des3_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen) otx_cpt_skcipher_cbc_des3_setkey() argument 483 otx_cpt_skcipher_ecb_des3_setkey(struct crypto_skcipher * tfm,const u8 * key,u32 keylen) otx_cpt_skcipher_ecb_des3_setkey() argument 489 otx_cpt_enc_dec_init(struct crypto_skcipher * tfm) otx_cpt_enc_dec_init() argument 506 cpt_aead_init(struct crypto_aead * tfm,u8 cipher_type,u8 mac_type) cpt_aead_init() argument 572 otx_cpt_aead_cbc_aes_sha1_init(struct crypto_aead * tfm) otx_cpt_aead_cbc_aes_sha1_init() argument 577 otx_cpt_aead_cbc_aes_sha256_init(struct crypto_aead * tfm) otx_cpt_aead_cbc_aes_sha256_init() argument 582 otx_cpt_aead_cbc_aes_sha384_init(struct crypto_aead * tfm) otx_cpt_aead_cbc_aes_sha384_init() argument 587 otx_cpt_aead_cbc_aes_sha512_init(struct crypto_aead * tfm) otx_cpt_aead_cbc_aes_sha512_init() argument 592 otx_cpt_aead_ecb_null_sha1_init(struct crypto_aead * tfm) otx_cpt_aead_ecb_null_sha1_init() argument 597 otx_cpt_aead_ecb_null_sha256_init(struct crypto_aead * tfm) otx_cpt_aead_ecb_null_sha256_init() argument 602 otx_cpt_aead_ecb_null_sha384_init(struct crypto_aead * tfm) otx_cpt_aead_ecb_null_sha384_init() argument 607 otx_cpt_aead_ecb_null_sha512_init(struct crypto_aead * tfm) otx_cpt_aead_ecb_null_sha512_init() argument 612 otx_cpt_aead_gcm_aes_init(struct crypto_aead * tfm) otx_cpt_aead_gcm_aes_init() argument 617 otx_cpt_aead_exit(struct crypto_aead * tfm) otx_cpt_aead_exit() argument 631 otx_cpt_aead_set_authsize(struct crypto_aead * tfm,unsigned int authsize) otx_cpt_aead_set_authsize() argument 889 struct crypto_aead *tfm = crypto_aead_reqtfm(req); create_aead_ctx_hdr() local 974 struct crypto_aead *tfm = crypto_aead_reqtfm(req); create_hmac_ctx_hdr() local 1142 struct crypto_aead *tfm = crypto_aead_reqtfm(req); cpt_aead_enc_dec() local [all...] |
| /linux/arch/arm64/crypto/ |
| H A D | sm4-ce-glue.c | 69 static int sm4_setkey(struct crypto_skcipher *tfm, const u8 *key, in sm4_setkey() argument 72 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_setkey() 83 static int sm4_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, in sm4_xts_setkey() argument 86 struct sm4_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_xts_setkey() 92 ret = xts_verify_key(tfm, key, key_len); in sm4_xts_setkey() 135 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_ecb_encrypt() local 136 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_ecb_encrypt() 143 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_ecb_decrypt() local 144 struct sm4_ctx *ctx = crypto_skcipher_ctx(tfm); in sm4_ecb_decrypt() 185 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in sm4_cbc_encrypt() local [all …]
|