Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 25 of 457) sorted by relevance

12345678910>>...19

/linux-6.15/include/crypto/
H A Dskcipher.h260 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
304 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
306 return &tfm->base; in crypto_skcipher_tfm()
312 return &tfm->base; in crypto_lskcipher_tfm()
329 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
345 crypto_destroy_tfm(tfm, crypto_lskcipher_tfm(tfm)); in crypto_free_lskcipher()
361 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
373 struct crypto_skcipher *tfm) in crypto_skcipher_alg_common() argument
380 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
806 return tfm->reqsize; in crypto_skcipher_reqsize()
[all …]
H A Dsig.h54 int (*sign)(struct crypto_sig *tfm,
57 int (*verify)(struct crypto_sig *tfm,
60 int (*set_pub_key)(struct crypto_sig *tfm,
62 int (*set_priv_key)(struct crypto_sig *tfm,
67 int (*init)(struct crypto_sig *tfm);
68 void (*exit)(struct crypto_sig *tfm);
98 return &tfm->base; in crypto_sig_tfm()
125 crypto_destroy_tfm(tfm, crypto_sig_tfm(tfm)); in crypto_free_sig()
142 return alg->key_size(tfm); in crypto_sig_keysize()
159 return alg->digest_size(tfm); in crypto_sig_digestsize()
[all …]
H A Dhash.h162 struct crypto_shash *tfm; member
281 return &tfm->base; in crypto_ahash_tfm()
292 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
338 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument
370 return tfm->statesize; in crypto_ahash_statesize()
412 return tfm->reqsize; in crypto_ahash_reqsize()
551 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
724 return &tfm->base; in crypto_shash_tfm()
735 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
823 return tfm->descsize; in crypto_shash_descsize()
[all …]
H A Daead.h145 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 …]
H A Dakcipher.h123 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument
125 return &tfm->base; in crypto_akcipher_tfm()
134 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument
140 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument
147 return tfm->reqsize; in crypto_akcipher_reqsize()
151 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument
153 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm()
171 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher()
183 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument
189 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc()
[all …]
H A Dkpp.h85 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 …]
H A Drng.h44 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 …]
H A Dacompress.h45 #define ACOMP_REQUEST_ALLOC(name, tfm, gfp) \ argument
188 return &tfm->base; in crypto_acomp_tfm()
203 struct crypto_acomp *tfm) in crypto_comp_alg_common() argument
210 return tfm->reqsize; in crypto_acomp_reqsize()
214 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument
216 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm()
227 return __crypto_acomp_tfm(req->base.tfm); in crypto_acomp_reqtfm()
239 crypto_destroy_tfm(tfm, crypto_acomp_tfm(tfm)); in crypto_free_acomp()
281 acomp_request_set_tfm(req, tfm); in acomp_request_alloc_extra_noprof()
286 tfm, ##__VA_ARGS__)
[all …]
H A Dcryptd.h31 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.15/security/integrity/ima/
H A Dima_crypto.c95 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-6.15/include/linux/
H A Dcrypto.h179 struct crypto_tfm *tfm; member
413 void (*exit)(struct crypto_tfm *tfm);
429 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm()
437 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name()
447 return tfm->__crt_alg->cra_blocksize; in crypto_tfm_alg_blocksize()
452 return tfm->__crt_alg->cra_alignmask; in crypto_tfm_alg_alignmask()
457 return tfm->crt_flags; in crypto_tfm_get_flags()
462 tfm->crt_flags |= flags; in crypto_tfm_set_flags()
467 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags()
472 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local
[all …]
/linux-6.15/include/crypto/internal/
H A Dcipher.h39 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 …]
H A Dscompress.h35 int (*compress)(struct crypto_scomp *tfm, const u8 *src,
38 int (*decompress)(struct crypto_scomp *tfm, const u8 *src,
55 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm()
60 return &tfm->base; in crypto_scomp_tfm()
63 static inline void crypto_free_scomp(struct crypto_scomp *tfm) in crypto_free_scomp() argument
65 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp()
70 return __crypto_scomp_alg(crypto_scomp_tfm(tfm)->__crt_alg); in crypto_scomp_alg()
73 static inline int crypto_scomp_compress(struct crypto_scomp *tfm, in crypto_scomp_compress() argument
77 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress()
80 static inline int crypto_scomp_decompress(struct crypto_scomp *tfm, in crypto_scomp_decompress() argument
[all …]
/linux-6.15/crypto/
H A Dcipher.c23 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 …]
H A Dshash.c38 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 …]
H A Djitterentropy-kcapi.c114 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 …]
H A Dbpf_crypto_skcipher.c13 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 …]
H A Dahash.c163 desc->tfm = ahash_to_shash(tfm); in prepare_shash_desc()
369 struct crypto_ahash *tfm; in ahash_reqchain_finish() local
561 if (!ahash_is_async(tfm)) in ahash_save_req()
582 struct crypto_ahash *tfm; in ahash_restore_req() local
585 if (!ahash_is_async(tfm)) in ahash_restore_req()
649 struct crypto_ahash *tfm; in ahash_def_digest_finish() local
655 if (ahash_is_async(tfm)) in ahash_def_digest_finish()
747 if (ahash_is_async(tfm)) in ahash_def_finup_finish1()
943 tfm = crypto_tfm_get(tfm); in crypto_clone_ahash()
944 if (IS_ERR(tfm)) in crypto_clone_ahash()
[all …]
H A Dcryptd.c543 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 …]
H A Dlskcipher.c21 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 …]
H A Dskcipher.c291 alg = crypto_skcipher_alg(tfm); in skcipher_walk_virt()
342 walk->stride = crypto_aead_chunksize(tfm); in skcipher_walk_aead_common()
343 walk->ivsize = crypto_aead_ivsize(tfm); in skcipher_walk_aead_common()
410 crypto_skcipher_get_flags(tfm) & in crypto_skcipher_setkey()
422 err = cipher->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
426 skcipher_set_needkey(tfm); in crypto_skcipher_setkey()
469 crypto_skcipher_statesize(tfm)); in crypto_lskcipher_export()
482 crypto_skcipher_statesize(tfm)); in crypto_lskcipher_import()
644 struct crypto_skcipher *tfm; in crypto_alloc_sync_skcipher() local
656 if (!IS_ERR(tfm) && WARN_ON(crypto_skcipher_reqsize(tfm) > in crypto_alloc_sync_skcipher()
[all …]
H A Dapi.c367 tfm->exit(tfm); in crypto_exit_ops()
408 if (tfm == NULL) in __crypto_alloc_tfmgfp()
414 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in __crypto_alloc_tfmgfp()
423 kfree(tfm); in __crypto_alloc_tfmgfp()
427 return tfm; in __crypto_alloc_tfmgfp()
475 if (!IS_ERR(tfm)) in crypto_alloc_base()
476 return tfm; in crypto_alloc_base()
512 tfm->node = node; in crypto_alloc_tfmmem()
536 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in crypto_create_tfm_node()
621 void *tfm; in crypto_alloc_tfm_node() local
[all …]
/linux-6.15/net/mac80211/
H A Daes_cmac.c28 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 …]
H A Daead_api.c21 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.15/fs/verity/
H A Dhash_algs.c46 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 …]

12345678910>>...19