| /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 | rng.h | 44 int (*generate)(struct crypto_rng *tfm, 47 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen); 48 void (*set_ent)(struct crypto_rng *tfm, const u8 *data, 94 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument 96 return &tfm->base; in crypto_rng_tfm() 110 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument 112 return __crypto_rng_alg(crypto_rng_tfm(tfm)->__crt_alg); in crypto_rng_alg() 121 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument 123 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng() 140 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument [all …]
|
| H A D | cryptd.h | 29 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm); 31 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm); 32 void cryptd_free_skcipher(struct cryptd_skcipher *tfm); 39 struct crypto_ahash *tfm) in __cryptd_ahash_cast() argument 41 return (struct cryptd_ahash *)tfm; in __cryptd_ahash_cast() 47 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm); 50 bool cryptd_ahash_queued(struct cryptd_ahash *tfm); 51 void cryptd_free_ahash(struct cryptd_ahash *tfm); 58 struct crypto_aead *tfm) in __cryptd_aead_cast() argument 60 return (struct cryptd_aead *)tfm; in __cryptd_aead_cast() [all …]
|
| /linux/security/integrity/ima/ |
| H A D | ima_crypto.c | 88 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local 95 return tfm; in ima_alloc_tfm() 98 if (ima_algo_array[i].tfm && ima_algo_array[i].algo == algo) in ima_alloc_tfm() 99 return ima_algo_array[i].tfm; in ima_alloc_tfm() 101 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm() 102 if (IS_ERR(tfm)) { in ima_alloc_tfm() 103 rc = PTR_ERR(tfm); in ima_alloc_tfm() 107 return tfm; in ima_alloc_tfm() 157 ima_algo_array[i].tfm = ima_shash_tfm; in ima_init_crypto() 161 ima_algo_array[i].tfm = ima_alloc_tfm(algo); in ima_init_crypto() [all …]
|
| /linux/crypto/ |
| H A D | ahash.c | 34 static inline bool crypto_ahash_block_only(struct crypto_ahash *tfm) in crypto_ahash_block_only() argument 36 return crypto_ahash_alg(tfm)->halg.base.cra_flags & in crypto_ahash_block_only() 40 static inline bool crypto_ahash_final_nonzero(struct crypto_ahash *tfm) in crypto_ahash_final_nonzero() argument 42 return crypto_ahash_alg(tfm)->halg.base.cra_flags & in crypto_ahash_final_nonzero() 46 static inline bool crypto_ahash_need_fallback(struct crypto_ahash *tfm) in crypto_ahash_need_fallback() argument 48 return crypto_ahash_alg(tfm)->halg.base.cra_flags & in crypto_ahash_need_fallback() 157 static inline struct crypto_shash *ahash_to_shash(struct crypto_ahash *tfm) in ahash_to_shash() argument 159 return *(struct crypto_shash **)crypto_ahash_ctx(tfm); in ahash_to_shash() 163 struct crypto_ahash *tfm) in prepare_shash_desc() argument 167 desc->tfm = ahash_to_shash(tfm); in prepare_shash_desc() [all …]
|
| H A D | cipher.c | 20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, in setkey_unaligned() argument 23 struct cipher_alg *cia = crypto_cipher_alg(tfm); in setkey_unaligned() 24 unsigned long alignmask = crypto_cipher_alignmask(tfm); in setkey_unaligned() 36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen); in setkey_unaligned() 42 int crypto_cipher_setkey(struct crypto_cipher *tfm, in crypto_cipher_setkey() argument 45 struct cipher_alg *cia = crypto_cipher_alg(tfm); in crypto_cipher_setkey() 46 unsigned long alignmask = crypto_cipher_alignmask(tfm); in crypto_cipher_setkey() 52 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey() 54 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen); in crypto_cipher_setkey() 58 static inline void cipher_crypt_one(struct crypto_cipher *tfm, in cipher_crypt_one() argument [all …]
|
| H A D | jitterentropy-kcapi.c | 109 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm); in jent_hash_time() 114 desc->tfm = hash_state_desc->tfm; in jent_hash_time() 116 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) { in jent_hash_time() 198 struct crypto_shash *tfm; member 202 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) in jent_kcapi_cleanup() argument 204 struct jitterentropy *rng = crypto_tfm_ctx(tfm); in jent_kcapi_cleanup() 214 if (rng->tfm) in jent_kcapi_cleanup() 215 crypto_free_shash(rng->tfm); in jent_kcapi_cleanup() 216 rng->tfm = NULL; in jent_kcapi_cleanup() 224 static int jent_kcapi_init(struct crypto_tfm *tfm) in jent_kcapi_init() argument [all …]
|
| H A D | skcipher.c | 286 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_walk_virt() local 291 alg = crypto_skcipher_alg(tfm); in skcipher_walk_virt() 308 walk->blocksize = crypto_skcipher_blocksize(tfm); in skcipher_walk_virt() 309 walk->ivsize = crypto_skcipher_ivsize(tfm); in skcipher_walk_virt() 310 walk->alignmask = crypto_skcipher_alignmask(tfm); in skcipher_walk_virt() 325 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in skcipher_walk_aead_common() local 341 walk->blocksize = crypto_aead_blocksize(tfm); in skcipher_walk_aead_common() 342 walk->stride = crypto_aead_chunksize(tfm); in skcipher_walk_aead_common() 343 walk->ivsize = crypto_aead_ivsize(tfm); in skcipher_walk_aead_common() 344 walk->alignmask = crypto_aead_alignmask(tfm); in skcipher_walk_aead_common() [all …]
|
| H A D | aead.c | 24 static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key, in setkey_unaligned() argument 27 unsigned long alignmask = crypto_aead_alignmask(tfm); in setkey_unaligned() 39 ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen); in setkey_unaligned() 44 int crypto_aead_setkey(struct crypto_aead *tfm, in crypto_aead_setkey() argument 47 unsigned long alignmask = crypto_aead_alignmask(tfm); in crypto_aead_setkey() 51 err = setkey_unaligned(tfm, key, keylen); in crypto_aead_setkey() 53 err = crypto_aead_alg(tfm)->setkey(tfm, key, keylen); in crypto_aead_setkey() 56 crypto_aead_set_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 60 crypto_aead_clear_flags(tfm, CRYPTO_TFM_NEED_KEY); in crypto_aead_setkey() 65 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) in crypto_aead_setauthsize() argument [all …]
|
| H A D | simd.c | 50 static int simd_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, in simd_skcipher_setkey() argument 53 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_setkey() 57 crypto_skcipher_set_flags(child, crypto_skcipher_get_flags(tfm) & in simd_skcipher_setkey() 64 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_encrypt() local 65 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_encrypt() 85 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in simd_skcipher_decrypt() local 86 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_decrypt() 104 static void simd_skcipher_exit(struct crypto_skcipher *tfm) in simd_skcipher_exit() argument 106 struct simd_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm); in simd_skcipher_exit() 111 static int simd_skcipher_init(struct crypto_skcipher *tfm) in simd_skcipher_init() argument [all …]
|
| /linux/include/crypto/internal/ |
| H A D | cipher.h | 37 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) in __crypto_cipher_cast() argument 39 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast() 66 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) in crypto_cipher_tfm() argument 68 return &tfm->base; in crypto_cipher_tfm() 75 static inline void crypto_free_cipher(struct crypto_cipher *tfm) in crypto_free_cipher() argument 77 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher() 109 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) in crypto_cipher_blocksize() argument 111 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize() 114 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) in crypto_cipher_alignmask() argument 116 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask() [all …]
|
| 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/net/mac80211/ |
| H A D | aes_cmac.c | 23 int ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad, 28 SHASH_DESC_ON_STACK(desc, tfm); in ieee80211_aes_cmac() 32 desc->tfm = tfm; in ieee80211_aes_cmac() 66 struct crypto_shash *tfm; in ieee80211_aes_cmac_256() 68 tfm = crypto_alloc_shash("cmac(aes)", 0, 0); in ieee80211_aes_cmac_256() 69 if (!IS_ERR(tfm)) { in ieee80211_aes_cmac_256() 70 int err = crypto_shash_setkey(tfm, key, key_len); 73 crypto_free_shash(tfm); in ieee80211_aes_cmac_key_setup() 78 return tfm; in ieee80211_aes_cmac_key_setup() 25 ieee80211_aes_cmac(struct crypto_shash * tfm,const u8 * aad,const u8 * data,size_t data_len,u8 * mic) ieee80211_aes_cmac() argument 49 ieee80211_aes_cmac_256(struct crypto_shash * tfm,const u8 * aad,const u8 * data,size_t data_len,u8 * mic) ieee80211_aes_cmac_256() argument 74 struct crypto_shash *tfm; ieee80211_aes_cmac_key_setup() local 89 ieee80211_aes_cmac_key_free(struct crypto_shash * tfm) ieee80211_aes_cmac_key_free() argument [all...] |
| 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_gmac.c | 17 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, in ieee80211_aes_gmac() argument 23 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in ieee80211_aes_gmac() 61 aead_request_set_tfm(aead_req, tfm); in ieee80211_aes_gmac() 74 struct crypto_aead *tfm; in ieee80211_aes_gmac_key_setup() 77 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC); in ieee80211_aes_gmac_key_setup() 78 if (IS_ERR(tfm)) in ieee80211_aes_gmac_key_setup() 79 return tfm; in ieee80211_aes_gmac_key_setup() 81 err = crypto_aead_setkey(tfm, key, key_len); in ieee80211_aes_gmac_key_setup() 83 err = crypto_aead_setauthsize(tfm, IEEE80211_GMAC_MIC_LEN); in ieee80211_aes_gmac_key_setup() 85 return tfm; in ieee80211_aes_gmac_key_setup() 72 struct crypto_aead *tfm; ieee80211_aes_gmac_key_setup() local 89 ieee80211_aes_gmac_key_free(struct crypto_aead * tfm) ieee80211_aes_gmac_key_free() argument [all...] |
| /linux/drivers/crypto/inside-secure/ |
| H A D | safexcel_cipher.c | 374 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aes_setkey() local 375 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_setkey() 405 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_setkey() local 406 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_setkey() 682 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_send_req() 923 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_handle_inv_result() 1004 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_handle_result() local 1015 req->cryptlen + crypto_aead_authsize(tfm), in safexcel_aead_handle_result() 1025 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_send_inv() 1043 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_skcipher_send() [all …]
|
| /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/net/bluetooth/ |
| H A D | selftest.c | 141 static int __init test_ecdh_sample(struct crypto_kpp *tfm, const u8 priv_a[32], in test_ecdh_sample() argument 155 ret = set_ecdh_privkey(tfm, priv_a); in test_ecdh_sample() 159 ret = compute_ecdh_secret(tfm, pub_b, dhkey_a); in test_ecdh_sample() 168 ret = set_ecdh_privkey(tfm, priv_b); in test_ecdh_sample() 172 ret = compute_ecdh_secret(tfm, pub_a, dhkey_b); in test_ecdh_sample() 201 struct crypto_kpp *tfm; in test_ecdh() local 208 tfm = crypto_alloc_kpp("ecdh-nist-p256", 0, 0); in test_ecdh() 209 if (IS_ERR(tfm)) { in test_ecdh() 211 err = PTR_ERR(tfm); in test_ecdh() 215 err = test_ecdh_sample(tfm, priv_a_1, priv_b_1, pub_a_1, pub_b_1, in test_ecdh() [all …]
|
| /linux/samples/tsm-mr/ |
| H A D | tsm_mr_sample.c | 26 struct crypto_shash *tfm; in sample_report_refresh() local 29 tfm = crypto_alloc_shash(hash_algo_name[HASH_ALGO_SHA512], 0, 0); in sample_report_refresh() 30 if (IS_ERR(tfm)) { in sample_report_refresh() 31 pr_err("crypto_alloc_shash failed: %ld\n", PTR_ERR(tfm)); in sample_report_refresh() 32 return PTR_ERR(tfm); in sample_report_refresh() 35 rc = crypto_shash_tfm_digest(tfm, (u8 *)&sample_report, in sample_report_refresh() 39 crypto_free_shash(tfm); in sample_report_refresh() 52 desc->tfm = crypto_alloc_shash(hash_algo_name[mr->mr_hash], 0, 0); in sample_report_extend_mr() 53 if (IS_ERR(desc->tfm)) { in sample_report_extend_mr() 54 pr_err("crypto_alloc_shash failed: %ld\n", PTR_ERR(desc->tfm)); in sample_report_extend_mr() [all …]
|
| /linux/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_keys.c | 305 krb5_cmac_Ki(struct crypto_shash *tfm, const struct xdr_netobj *constant, in krb5_cmac_Ki() argument 309 SHASH_DESC_ON_STACK(desc, tfm); in krb5_cmac_Ki() 314 desc->tfm = tfm; in krb5_cmac_Ki() 377 struct crypto_shash *tfm; in krb5_kdf_feedback_cmac() local 386 tfm = crypto_alloc_shash(gk5e->cksum_name, 0, 0); in krb5_kdf_feedback_cmac() 387 if (IS_ERR(tfm)) { in krb5_kdf_feedback_cmac() 388 ret = PTR_ERR(tfm); in krb5_kdf_feedback_cmac() 391 ret = crypto_shash_setkey(tfm, inkey->data, inkey->len); in krb5_kdf_feedback_cmac() 395 blocksize = crypto_shash_digestsize(tfm); in krb5_kdf_feedback_cmac() 412 ret = krb5_cmac_Ki(tfm, constant, outkey->len, count, &step); in krb5_kdf_feedback_cmac() [all …]
|
| /linux/include/linux/ |
| H A D | bpf_crypto.h | 8 void (*free_tfm)(void *tfm); 10 int (*setkey)(void *tfm, const u8 *key, unsigned int keylen); 11 int (*setauthsize)(void *tfm, unsigned int authsize); 12 int (*encrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv); 13 int (*decrypt)(void *tfm, const u8 *src, u8 *dst, unsigned int len, u8 *iv); 14 unsigned int (*ivsize)(void *tfm); 15 unsigned int (*statesize)(void *tfm); 16 u32 (*get_flags)(void *tfm);
|
| /linux/drivers/nvme/common/ |
| H A D | auth.c | 277 shash->tfm = key_tfm; in nvme_auth_transform_key() 310 struct crypto_shash *tfm; in nvme_auth_hash_skey() local 319 tfm = crypto_alloc_shash(digest_name, 0, 0); in nvme_auth_hash_skey() 320 if (IS_ERR(tfm)) in nvme_auth_hash_skey() 323 ret = crypto_shash_tfm_digest(tfm, skey, skey_len, hkey); in nvme_auth_hash_skey() 328 crypto_free_shash(tfm); in nvme_auth_hash_skey() 335 struct crypto_shash *tfm; in nvme_auth_augmented_challenge() local 357 tfm = crypto_alloc_shash(hmac_name, 0, 0); in nvme_auth_augmented_challenge() 358 if (IS_ERR(tfm)) { in nvme_auth_augmented_challenge() 359 ret = PTR_ERR(tfm); in nvme_auth_augmented_challenge() [all …]
|
| /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/drivers/crypto/gemini/ |
| H A D | sl3516-ce-cipher.c | 27 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_need_fallback() local 28 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_need_fallback() 105 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher_fallback() local 106 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher_fallback() 108 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher_fallback() 129 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher() local 130 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher() 133 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher() 146 crypto_tfm_alg_name(areq->base.tfm), in sl3516_ce_cipher() 148 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sl3516_ce_cipher() [all …]
|