/linux-6.3-rc2/include/crypto/ |
A D | skcipher.h | 134 (typeof(tfm))1))) \ 169 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument 195 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument 197 return &tfm->base; in crypto_skcipher_tfm() 208 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher() 229 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument 235 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument 277 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument 300 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument 457 return tfm->reqsize; in crypto_skcipher_reqsize() [all …]
|
A D | hash.h | 151 struct crypto_shash *tfm; member 278 return &tfm->base; in crypto_ahash_tfm() 289 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash() 415 return tfm->reqsize; in crypto_ahash_reqsize() 535 return tfm->init(req); in crypto_ahash_init() 584 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm() 725 return &tfm->base; in crypto_shash_tfm() 736 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash() 830 return tfm->descsize; in crypto_shash_descsize() 922 struct crypto_shash *tfm = desc->tfm; in crypto_shash_import() local [all …]
|
A D | akcipher.h | 135 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument 137 return &tfm->base; in crypto_akcipher_tfm() 146 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument 152 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument 159 return tfm->reqsize; in crypto_akcipher_reqsize() 163 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument 165 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm() 183 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher() 195 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument 201 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc() [all …]
|
A D | aead.h | 144 int (*init)(struct crypto_aead *tfm); 145 void (*exit)(struct crypto_aead *tfm); 184 return &tfm->base; in crypto_aead_tfm() 195 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead() 242 return tfm->authsize; in crypto_aead_authsize() 306 int crypto_aead_setkey(struct crypto_aead *tfm, 323 return __crypto_aead_cast(req->base.tfm); in crypto_aead_reqtfm() 390 return tfm->reqsize; in crypto_aead_reqsize() 402 struct crypto_aead *tfm) in aead_request_set_tfm() argument 404 req->base.tfm = crypto_aead_tfm(tfm); in aead_request_set_tfm() [all …]
|
A D | kpp.h | 81 int (*init)(struct crypto_kpp *tfm); 82 void (*exit)(struct crypto_kpp *tfm); 112 return &tfm->base; in crypto_kpp_tfm() 132 return tfm->reqsize; in crypto_kpp_reqsize() 136 struct crypto_kpp *tfm) in kpp_request_set_tfm() argument 138 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm() 143 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm() 165 crypto_destroy_tfm(tfm, crypto_kpp_tfm(tfm)); in crypto_free_kpp() 183 kpp_request_set_tfm(req, tfm); in kpp_request_alloc() 294 ret = alg->set_secret(tfm, buffer, len); in crypto_kpp_set_secret() [all …]
|
A D | rng.h | 42 int (*generate)(struct crypto_rng *tfm, 46 void (*set_ent)(struct crypto_rng *tfm, const u8 *data, 94 return &tfm->base; in crypto_rng_tfm() 107 return container_of(crypto_rng_tfm(tfm)->__crt_alg, in crypto_rng_alg() 117 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument 119 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng() 140 struct crypto_alg *alg = tfm->base.__crt_alg; in crypto_rng_generate() 144 ret = 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 | acompress.h | 81 int (*init)(struct crypto_acomp *tfm); 82 void (*exit)(struct crypto_acomp *tfm); 131 return &tfm->base; in crypto_acomp_tfm() 151 return tfm->reqsize; in crypto_acomp_reqsize() 155 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument 157 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm() 162 return __crypto_acomp_tfm(req->base.tfm); in crypto_acomp_reqtfm() 174 crypto_destroy_tfm(tfm, crypto_acomp_tfm(tfm)); in crypto_free_acomp() 265 struct crypto_alg *alg = tfm->base.__crt_alg; in crypto_acomp_compress() 270 ret = tfm->compress(req); in crypto_acomp_compress() [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 …]
|
/linux-6.3-rc2/include/crypto/internal/ |
A D | scompress.h | 30 void *(*alloc_ctx)(struct crypto_scomp *tfm); 31 void (*free_ctx)(struct crypto_scomp *tfm, void *ctx); 32 int (*compress)(struct crypto_scomp *tfm, const u8 *src, 48 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm() 53 return &tfm->base; in crypto_scomp_tfm() 58 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp() 68 return crypto_scomp_alg(tfm)->alloc_ctx(tfm); in crypto_scomp_alloc_ctx() 74 return crypto_scomp_alg(tfm)->free_ctx(tfm, ctx); in crypto_scomp_free_ctx() 81 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress() 89 return crypto_scomp_alg(tfm)->decompress(tfm, src, slen, dst, dlen, in crypto_scomp_decompress() [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 …]
|
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-6.3-rc2/security/integrity/ima/ |
A D | ima_crypto.c | 100 return tfm; in ima_alloc_tfm() 107 if (IS_ERR(tfm)) { in ima_alloc_tfm() 112 return tfm; in ima_alloc_tfm() 222 if (ima_algo_array[i].tfm == tfm) in ima_free_tfm() 309 return tfm; in ima_alloc_atfm() 446 if (IS_ERR(tfm)) in ima_calc_file_ahash() 465 shash->tfm = tfm; in ima_calc_file_hash_tfm() 513 if (IS_ERR(tfm)) in ima_calc_file_shash() 592 shash->tfm = ima_algo_array[tfm_idx].tfm; in ima_calc_field_array_hash_tfm() 728 shash->tfm = tfm; in calc_buffer_shash_tfm() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | crypto.h | 192 struct crypto_tfm *tfm; member 664 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm() 674 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name() 684 return tfm->__crt_alg->cra_priority; in crypto_tfm_alg_priority() 704 return tfm->crt_flags; in crypto_tfm_get_flags() 709 tfm->crt_flags |= flags; in crypto_tfm_set_flags() 714 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags() 719 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local 720 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment() 725 return (struct crypto_comp *)tfm; in __crypto_comp_cast() [all …]
|
/linux-6.3-rc2/crypto/ |
A D | shash.c | 84 struct crypto_shash *tfm = desc->tfm; in shash_update_unaligned() local 114 struct crypto_shash *tfm = desc->tfm; in crypto_shash_update() local 127 struct crypto_shash *tfm = desc->tfm; in shash_final_unaligned() local 155 struct crypto_shash *tfm = desc->tfm; in crypto_shash_final() local 176 struct crypto_shash *tfm = desc->tfm; in crypto_shash_finup() local 197 struct crypto_shash *tfm = desc->tfm; in crypto_shash_digest() local 217 desc->tfm = tfm; in crypto_shash_tfm_digest() 252 desc->tfm = *ctx; in shash_async_init() 306 desc->tfm = *ctx; in shash_async_finup() 340 desc->tfm = *ctx; in shash_async_digest() [all …]
|
A D | cfb.c | 44 struct crypto_skcipher *tfm) in crypto_cfb_final() argument 59 struct crypto_skcipher *tfm) in crypto_cfb_encrypt_segment() argument 68 crypto_cfb_encrypt_one(tfm, iv, dst); in crypto_cfb_encrypt_segment() 82 struct crypto_skcipher *tfm) in crypto_cfb_encrypt_inplace() argument 91 crypto_cfb_encrypt_one(tfm, iv, tmp); in crypto_cfb_encrypt_inplace() 121 crypto_cfb_final(&walk, tfm); in crypto_cfb_encrypt() 129 struct crypto_skcipher *tfm) in crypto_cfb_decrypt_segment() argument 138 crypto_cfb_encrypt_one(tfm, iv, dst); in crypto_cfb_decrypt_segment() 152 struct crypto_skcipher *tfm) in crypto_cfb_decrypt_inplace() argument 171 struct crypto_skcipher *tfm) in crypto_cfb_decrypt_blocks() argument [all …]
|
A D | cipher.c | 23 struct cipher_alg *cia = crypto_cipher_alg(tfm); in setkey_unaligned() 24 unsigned long alignmask = crypto_cipher_alignmask(tfm); in setkey_unaligned() 43 int crypto_cipher_setkey(struct crypto_cipher *tfm, in crypto_cipher_setkey() argument 46 struct cipher_alg *cia = crypto_cipher_alg(tfm); in crypto_cipher_setkey() 53 return setkey_unaligned(tfm, key, keylen); in crypto_cipher_setkey() 63 struct cipher_alg *cia = crypto_cipher_alg(tfm); in cipher_crypt_one() 68 unsigned int bs = crypto_cipher_blocksize(tfm); in cipher_crypt_one() 73 fn(crypto_cipher_tfm(tfm), tmp, tmp); in cipher_crypt_one() 76 fn(crypto_cipher_tfm(tfm), dst, src); in cipher_crypt_one() 83 cipher_crypt_one(tfm, dst, src, true); in crypto_cipher_encrypt_one() [all …]
|
A D | cryptd.c | 528 desc->tfm = child; in cryptd_hash_init() 604 desc->tfm = child; in cryptd_hash_digest() 630 desc->tfm = ctx->child; in cryptd_hash_import() 765 crypto_free_aead(tfm); in cryptd_aead_crypt() 945 if (IS_ERR(tfm)) in cryptd_alloc_skcipher() 946 return ERR_CAST(tfm); in cryptd_alloc_skcipher() 996 if (IS_ERR(tfm)) in cryptd_alloc_ahash() 997 return ERR_CAST(tfm); in cryptd_alloc_ahash() 1053 if (IS_ERR(tfm)) in cryptd_alloc_aead() 1054 return ERR_CAST(tfm); in cryptd_alloc_aead() [all …]
|
A D | api.c | 362 tfm->exit(tfm); in crypto_exit_ops() 407 if (tfm == NULL) in __crypto_alloc_tfm() 416 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in __crypto_alloc_tfm() 426 kfree(tfm); in __crypto_alloc_tfm() 430 return tfm; in __crypto_alloc_tfm() 471 if (!IS_ERR(tfm)) in crypto_alloc_base() 472 return tfm; in crypto_alloc_base() 509 tfm->node = node; in crypto_create_tfm_node() 515 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in crypto_create_tfm_node() 575 void *tfm; in crypto_alloc_tfm_node() local [all …]
|
A D | simd.c | 119 alg = crypto_skcipher_alg(tfm); in simd_skcipher_init() 144 struct crypto_skcipher *tfm; in simd_skcipher_create_compat() local 151 if (IS_ERR(tfm)) in simd_skcipher_create_compat() 152 return ERR_CAST(tfm); in simd_skcipher_create_compat() 199 crypto_free_skcipher(tfm); in simd_skcipher_create_compat() 367 alg = crypto_aead_alg(tfm); in simd_aead_init() 391 struct crypto_aead *tfm; in simd_aead_create_compat() local 398 if (IS_ERR(tfm)) in simd_aead_create_compat() 399 return ERR_CAST(tfm); in simd_aead_create_compat() 401 ialg = crypto_aead_alg(tfm); in simd_aead_create_compat() [all …]
|
/linux-6.3-rc2/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-6.3-rc2/drivers/crypto/inside-secure/ |
A D | safexcel_cipher.c | 1742 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init() 1778 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init() 1814 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init() 1850 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init() 1886 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init() 2632 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init() 2643 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit() 2727 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init() 2963 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init() 2998 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit() [all …]
|
/linux-6.3-rc2/drivers/crypto/cavium/zip/ |
A D | zip_crypto.h | 60 int zip_alloc_comp_ctx_deflate(struct crypto_tfm *tfm); 61 int zip_alloc_comp_ctx_lzs(struct crypto_tfm *tfm); 62 void zip_free_comp_ctx(struct crypto_tfm *tfm); 63 int zip_comp_compress(struct crypto_tfm *tfm, 66 int zip_comp_decompress(struct crypto_tfm *tfm, 70 void *zip_alloc_scomp_ctx_deflate(struct crypto_scomp *tfm); 71 void *zip_alloc_scomp_ctx_lzs(struct crypto_scomp *tfm); 72 void zip_free_scomp_ctx(struct crypto_scomp *tfm, void *zip_ctx); 73 int zip_scomp_compress(struct crypto_scomp *tfm, 76 int zip_scomp_decompress(struct crypto_scomp *tfm,
|
/linux-6.3-rc2/drivers/crypto/allwinner/sun4i-ss/ |
A D | sun4i-ss-cipher.c | 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() 184 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll() 534 int sun4i_ss_cipher_init(struct crypto_tfm *tfm) in sun4i_ss_cipher_init() argument 536 struct sun4i_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun4i_ss_cipher_init() 538 const char *name = crypto_tfm_alg_name(tfm); in sun4i_ss_cipher_init() 568 void sun4i_ss_cipher_exit(struct crypto_tfm *tfm) in sun4i_ss_cipher_exit() argument 570 struct sun4i_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun4i_ss_cipher_exit() 613 err = verify_skcipher_des_key(tfm, key); in sun4i_ss_des_setkey() [all …]
|
/linux-6.3-rc2/crypto/asymmetric_keys/ |
A D | public_key.c | 166 if (IS_ERR(tfm)) in software_key_query() 167 return PTR_ERR(tfm); in software_key_query() 251 if (IS_ERR(tfm)) in software_key_eds_op() 252 return PTR_ERR(tfm); in software_key_eds_op() 319 struct crypto_shash *tfm; in cert_sig_digest_update() local 337 if (IS_ERR(tfm)) in cert_sig_digest_update() 338 return PTR_ERR(tfm); in cert_sig_digest_update() 347 desc->tfm = tfm; in cert_sig_digest_update() 362 crypto_free_shash(tfm); in cert_sig_digest_update() 415 if (IS_ERR(tfm)) in public_key_verify_signature() [all …]
|