| /linux/include/crypto/ |
| A D | skcipher.h | 259 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument 303 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument 305 return &tfm->base; in crypto_skcipher_tfm() 311 return &tfm->base; in crypto_lskcipher_tfm() 322 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher() 338 crypto_destroy_tfm(tfm, crypto_lskcipher_tfm(tfm)); in crypto_free_lskcipher() 354 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument 366 struct crypto_skcipher *tfm) in crypto_skcipher_alg_common() argument 373 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument 799 return tfm->reqsize; in crypto_skcipher_reqsize() [all …]
|
| A D | hash.h | 155 struct crypto_shash *tfm; member 274 return &tfm->base; in crypto_ahash_tfm() 285 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash() 331 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument 363 return tfm->statesize; in crypto_ahash_statesize() 405 return tfm->reqsize; in crypto_ahash_reqsize() 544 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm() 688 return &tfm->base; in crypto_shash_tfm() 699 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash() 787 return tfm->descsize; in crypto_shash_descsize() [all …]
|
| A D | akcipher.h | 137 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument 139 return &tfm->base; in crypto_akcipher_tfm() 148 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument 154 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument 161 return tfm->reqsize; in crypto_akcipher_reqsize() 165 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument 167 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm() 185 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher() 197 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument 203 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc() [all …]
|
| A D | aead.h | 145 int (*init)(struct crypto_aead *tfm); 146 void (*exit)(struct crypto_aead *tfm); 185 return &tfm->base; in crypto_aead_tfm() 196 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead() 255 return tfm->authsize; in crypto_aead_authsize() 319 int crypto_aead_setkey(struct crypto_aead *tfm, 336 return __crypto_aead_cast(req->base.tfm); in crypto_aead_reqtfm() 403 return tfm->reqsize; in crypto_aead_reqsize() 415 struct crypto_aead *tfm) in aead_request_set_tfm() argument 417 req->base.tfm = crypto_aead_tfm(tfm); in aead_request_set_tfm() [all …]
|
| A D | kpp.h | 85 int (*init)(struct crypto_kpp *tfm); 86 void (*exit)(struct crypto_kpp *tfm); 116 return &tfm->base; in crypto_kpp_tfm() 136 return tfm->reqsize; in crypto_kpp_reqsize() 140 struct crypto_kpp *tfm) in kpp_request_set_tfm() argument 142 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm() 147 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm() 169 crypto_destroy_tfm(tfm, crypto_kpp_tfm(tfm)); in crypto_free_kpp() 187 kpp_request_set_tfm(req, tfm); in kpp_request_alloc() 293 return crypto_kpp_alg(tfm)->set_secret(tfm, buffer, len); in crypto_kpp_set_secret() [all …]
|
| A D | rng.h | 44 int (*generate)(struct crypto_rng *tfm, 48 void (*set_ent)(struct crypto_rng *tfm, const u8 *data, 96 return &tfm->base; in crypto_rng_tfm() 114 return __crypto_rng_alg(crypto_rng_tfm(tfm)->__crt_alg); in crypto_rng_alg() 123 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument 125 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng() 142 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument 146 return crypto_rng_alg(tfm)->generate(tfm, src, slen, dst, dlen); in crypto_rng_generate() 163 return crypto_rng_generate(tfm, NULL, 0, rdata, dlen); in crypto_rng_get_bytes() 183 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed, [all …]
|
| A D | cryptd.h | 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() 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() 66 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm); 68 bool cryptd_aead_queued(struct cryptd_aead *tfm); [all …]
|
| A D | acompress.h | 108 return &tfm->base; in crypto_acomp_tfm() 119 return container_of(tfm, struct crypto_acomp, base); in __crypto_acomp_tfm() 123 struct crypto_acomp *tfm) in crypto_comp_alg_common() argument 130 return tfm->reqsize; in crypto_acomp_reqsize() 134 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument 136 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm() 139 static inline bool acomp_is_async(struct crypto_acomp *tfm) in acomp_is_async() argument 141 return crypto_comp_alg_common(tfm)->base.cra_flags & in acomp_is_async() 147 return __crypto_acomp_tfm(req->base.tfm); in crypto_acomp_reqtfm() 157 static inline void crypto_free_acomp(struct crypto_acomp *tfm) in crypto_free_acomp() argument [all …]
|
| /linux/include/crypto/internal/ |
| A D | scompress.h | 34 void *(*alloc_ctx)(struct crypto_scomp *tfm); 35 void (*free_ctx)(struct crypto_scomp *tfm, void *ctx); 36 int (*compress)(struct crypto_scomp *tfm, const u8 *src, 39 int (*decompress)(struct crypto_scomp *tfm, const u8 *src, 56 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm() 61 return &tfm->base; in crypto_scomp_tfm() 66 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp() 76 return crypto_scomp_alg(tfm)->alloc_ctx(tfm); in crypto_scomp_alloc_ctx() 82 return crypto_scomp_alg(tfm)->free_ctx(tfm, ctx); in crypto_scomp_free_ctx() 89 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress() [all …]
|
| A D | cipher.h | 39 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast() 68 return &tfm->base; in crypto_cipher_tfm() 77 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher() 111 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize() 116 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask() 121 return crypto_tfm_get_flags(crypto_cipher_tfm(tfm)); in crypto_cipher_get_flags() 127 crypto_tfm_set_flags(crypto_cipher_tfm(tfm), flags); in crypto_cipher_set_flags() 133 crypto_tfm_clear_flags(crypto_cipher_tfm(tfm), flags); in crypto_cipher_clear_flags() 152 int crypto_cipher_setkey(struct crypto_cipher *tfm, 164 void crypto_cipher_encrypt_one(struct crypto_cipher *tfm, [all …]
|
| /linux/include/linux/ |
| A D | crypto.h | 174 struct crypto_tfm *tfm; member 429 void (*exit)(struct crypto_tfm *tfm); 449 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm() 457 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name() 477 return tfm->crt_flags; in crypto_tfm_get_flags() 482 tfm->crt_flags |= flags; in crypto_tfm_set_flags() 487 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags() 492 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local 493 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment() 498 return (struct crypto_comp *)tfm; in __crypto_comp_cast() [all …]
|
| /linux/security/integrity/ima/ |
| A D | ima_crypto.c | 95 return tfm; in ima_alloc_tfm() 102 if (IS_ERR(tfm)) { in ima_alloc_tfm() 107 return tfm; in ima_alloc_tfm() 217 if (ima_algo_array[i].tfm == tfm) in ima_free_tfm() 304 return tfm; in ima_alloc_atfm() 441 if (IS_ERR(tfm)) in ima_calc_file_ahash() 460 shash->tfm = tfm; in ima_calc_file_hash_tfm() 508 if (IS_ERR(tfm)) in ima_calc_file_shash() 587 shash->tfm = ima_algo_array[tfm_idx].tfm; in ima_calc_field_array_hash_tfm() 723 shash->tfm = tfm; in calc_buffer_shash_tfm() [all …]
|
| /linux/crypto/ |
| A D | cipher.c | 23 struct cipher_alg *cia = crypto_cipher_alg(tfm); in setkey_unaligned() 45 struct cipher_alg *cia = crypto_cipher_alg(tfm); in crypto_cipher_setkey() 52 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey() 62 struct cipher_alg *cia = crypto_cipher_alg(tfm); in cipher_crypt_one() 67 unsigned int bs = crypto_cipher_blocksize(tfm); in cipher_crypt_one() 72 fn(crypto_cipher_tfm(tfm), tmp, tmp); in cipher_crypt_one() 75 fn(crypto_cipher_tfm(tfm), dst, src); in cipher_crypt_one() 82 cipher_crypt_one(tfm, dst, src, true); in crypto_cipher_encrypt_one() 89 cipher_crypt_one(tfm, dst, src, false); in crypto_cipher_decrypt_one() 96 struct crypto_alg *alg = tfm->__crt_alg; in crypto_clone_cipher() [all …]
|
| A D | ahash.c | 44 desc->tfm = ahash_to_shash(tfm); in prepare_shash_desc() 233 crypto_ahash_set_flags(tfm, in crypto_ahash_setkey() 257 if (likely(tfm->using_shash)) in crypto_ahash_init() 332 if (likely(tfm->using_shash)) in crypto_ahash_update() 343 if (likely(tfm->using_shash)) in crypto_ahash_final() 354 if (likely(tfm->using_shash)) in crypto_ahash_finup() 365 if (likely(tfm->using_shash)) in crypto_ahash_digest() 444 if (likely(tfm->using_shash)) in crypto_ahash_export() 587 tfm = crypto_tfm_get(tfm); in crypto_clone_ahash() 588 if (IS_ERR(tfm)) in crypto_clone_ahash() [all …]
|
| A D | shash.c | 38 err = shash->setkey(tfm, key, keylen); in crypto_shash_setkey() 40 shash_set_needkey(tfm, shash); in crypto_shash_setkey() 90 struct crypto_shash *tfm = desc->tfm; in crypto_shash_digest() local 102 SHASH_DESC_ON_STACK(desc, tfm); in crypto_shash_tfm_digest() 105 desc->tfm = tfm; in crypto_shash_tfm_digest() 117 struct crypto_shash *tfm = desc->tfm; in crypto_shash_export() local 130 struct crypto_shash *tfm = desc->tfm; in crypto_shash_import() local 163 tfm->exit = crypto_shash_exit_tfm; in crypto_shash_init_tfm() 262 tfm = crypto_tfm_get(tfm); in crypto_clone_shash() 263 if (IS_ERR(tfm)) in crypto_clone_shash() [all …]
|
| A D | jitterentropy-kcapi.c | 114 desc->tfm = hash_state_desc->tfm; in jent_hash_time() 196 struct crypto_shash *tfm; member 212 if (rng->tfm) in jent_kcapi_cleanup() 214 rng->tfm = NULL; in jent_kcapi_cleanup() 245 rng->tfm = hash; in jent_kcapi_init() 254 sdesc->tfm = hash; in jent_kcapi_init() 270 jent_kcapi_cleanup(tfm); in jent_kcapi_init() 342 if (IS_ERR(tfm)) { in jent_mod_init() 344 return PTR_ERR(tfm); in jent_mod_init() 347 desc->tfm = tfm; in jent_mod_init() [all …]
|
| A D | bpf_crypto_skcipher.c | 13 static void bpf_crypto_lskcipher_free_tfm(void *tfm) in bpf_crypto_lskcipher_free_tfm() argument 15 crypto_free_lskcipher(tfm); in bpf_crypto_lskcipher_free_tfm() 25 return crypto_lskcipher_setkey(tfm, key, keylen); in bpf_crypto_lskcipher_setkey() 28 static u32 bpf_crypto_lskcipher_get_flags(void *tfm) in bpf_crypto_lskcipher_get_flags() argument 30 return crypto_lskcipher_get_flags(tfm); in bpf_crypto_lskcipher_get_flags() 33 static unsigned int bpf_crypto_lskcipher_ivsize(void *tfm) in bpf_crypto_lskcipher_ivsize() argument 35 return crypto_lskcipher_ivsize(tfm); in bpf_crypto_lskcipher_ivsize() 38 static unsigned int bpf_crypto_lskcipher_statesize(void *tfm) in bpf_crypto_lskcipher_statesize() argument 40 return crypto_lskcipher_statesize(tfm); in bpf_crypto_lskcipher_statesize() 46 return crypto_lskcipher_encrypt(tfm, src, dst, len, siv); in bpf_crypto_lskcipher_encrypt() [all …]
|
| A D | api.c | 370 tfm->exit(tfm); in crypto_exit_ops() 415 if (tfm == NULL) in __crypto_alloc_tfmgfp() 421 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in __crypto_alloc_tfmgfp() 430 kfree(tfm); in __crypto_alloc_tfmgfp() 434 return tfm; in __crypto_alloc_tfmgfp() 482 if (!IS_ERR(tfm)) in crypto_alloc_base() 483 return tfm; in crypto_alloc_base() 519 tfm->node = node; in crypto_alloc_tfmmem() 543 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in crypto_create_tfm_node() 628 void *tfm; in crypto_alloc_tfm_node() local [all …]
|
| A D | cryptd.c | 543 desc->tfm = child; in cryptd_hash_init() 619 desc->tfm = child; in cryptd_hash_digest() 645 desc->tfm = ctx->child; in cryptd_hash_import() 781 crypto_free_aead(tfm); in cryptd_aead_crypt() 961 if (IS_ERR(tfm)) in cryptd_alloc_skcipher() 962 return ERR_CAST(tfm); in cryptd_alloc_skcipher() 1012 if (IS_ERR(tfm)) in cryptd_alloc_ahash() 1013 return ERR_CAST(tfm); in cryptd_alloc_ahash() 1069 if (IS_ERR(tfm)) in cryptd_alloc_aead() 1070 return ERR_CAST(tfm); in cryptd_alloc_aead() [all …]
|
| A D | lskcipher.c | 21 struct crypto_tfm *tfm) in __crypto_lskcipher_cast() argument 48 ret = cipher->setkey(tfm, alignbuffer, keylen); in lskcipher_setkey_unaligned() 65 return cipher->setkey(tfm, key, keylen); in crypto_lskcipher_setkey() 75 unsigned ivsize = crypto_lskcipher_ivsize(tfm); in crypto_lskcipher_crypt_unaligned() 76 unsigned bs = crypto_lskcipher_blocksize(tfm); in crypto_lskcipher_crypt_unaligned() 77 unsigned cs = crypto_lskcipher_chunksize(tfm); in crypto_lskcipher_crypt_unaligned() 125 int (*crypt)(struct crypto_lskcipher *tfm, in crypto_lskcipher_crypt() argument 167 struct crypto_lskcipher *tfm = *ctx; in crypto_lskcipher_crypt_sg() local 173 ivsize = crypto_lskcipher_ivsize(tfm); in crypto_lskcipher_crypt_sg() 309 struct crypto_alg *calg = tfm->__crt_alg; in crypto_init_lskcipher_ops_sg() [all …]
|
| A D | sig.c | 24 static int crypto_sig_init_tfm(struct crypto_tfm *tfm) in crypto_sig_init_tfm() argument 26 if (tfm->__crt_alg->cra_type != &crypto_sig_type) in crypto_sig_init_tfm() 27 return crypto_init_akcipher_ops_sig(tfm); in crypto_sig_init_tfm() 69 int crypto_sig_maxsize(struct crypto_sig *tfm) in crypto_sig_maxsize() argument 71 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm); in crypto_sig_maxsize() 77 int crypto_sig_sign(struct crypto_sig *tfm, in crypto_sig_sign() argument 83 .tfm = *ctx, in crypto_sig_sign() 96 int crypto_sig_verify(struct crypto_sig *tfm, in crypto_sig_verify() argument 102 .tfm = *ctx, in crypto_sig_verify() 120 int crypto_sig_set_pubkey(struct crypto_sig *tfm, in crypto_sig_set_pubkey() argument [all …]
|
| /linux/net/mac80211/ |
| A D | aes_cmac.c | 28 SHASH_DESC_ON_STACK(desc, tfm); in ieee80211_aes_cmac() 32 desc->tfm = tfm; in ieee80211_aes_cmac() 52 SHASH_DESC_ON_STACK(desc, tfm); in ieee80211_aes_cmac_256() 55 desc->tfm = tfm; in ieee80211_aes_cmac_256() 74 struct crypto_shash *tfm; in ieee80211_aes_cmac_key_setup() local 76 tfm = crypto_alloc_shash("cmac(aes)", 0, 0); in ieee80211_aes_cmac_key_setup() 77 if (!IS_ERR(tfm)) { in ieee80211_aes_cmac_key_setup() 78 int err = crypto_shash_setkey(tfm, key, key_len); in ieee80211_aes_cmac_key_setup() 81 crypto_free_shash(tfm); in ieee80211_aes_cmac_key_setup() 86 return tfm; in ieee80211_aes_cmac_key_setup() [all …]
|
| A D | aead_api.c | 21 size_t mic_len = crypto_aead_authsize(tfm); in aead_encrypt() 40 aead_request_set_tfm(aead_req, tfm); in aead_encrypt() 53 size_t mic_len = crypto_aead_authsize(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 93 if (IS_ERR(tfm)) in aead_key_setup_encrypt() 94 return tfm; in aead_key_setup_encrypt() 103 return tfm; in aead_key_setup_encrypt() 106 crypto_free_aead(tfm); in aead_key_setup_encrypt() 110 void aead_key_free(struct crypto_aead *tfm) in aead_key_free() argument [all …]
|
| /linux/fs/verity/ |
| A D | hash_algs.c | 46 struct crypto_shash *tfm; in fsverity_get_hash_alg() local 62 if (alg->tfm != NULL) in fsverity_get_hash_alg() 66 if (IS_ERR(tfm)) { in fsverity_get_hash_alg() 67 if (PTR_ERR(tfm) == -ENOENT) { in fsverity_get_hash_alg() 76 alg->name, PTR_ERR(tfm)); in fsverity_get_hash_alg() 77 alg = ERR_CAST(tfm); in fsverity_get_hash_alg() 91 smp_store_release(&alg->tfm, tfm); in fsverity_get_hash_alg() 95 crypto_free_shash(tfm); in fsverity_get_hash_alg() 115 SHASH_DESC_ON_STACK(desc, alg->tfm); in fsverity_prepare_hash_state() 120 desc->tfm = alg->tfm; in fsverity_prepare_hash_state() [all …]
|
| /linux/drivers/crypto/inside-secure/ |
| A D | safexcel_cipher.c | 1669 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init() 1705 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init() 1741 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init() 1777 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init() 1813 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init() 2559 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init() 2570 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit() 2654 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init() 2890 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init() 2925 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit() [all …]
|