Home
last modified time | relevance | path

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

12345678910>>...18

/linux/include/crypto/
A Dhash.h151 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()
723 return &tfm->base; in crypto_shash_tfm()
734 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
828 return tfm->descsize; in crypto_shash_descsize()
920 struct crypto_shash *tfm = desc->tfm; in crypto_shash_import() local
[all …]
A Dskcipher.h130 (typeof(tfm))1))) \
165 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
191 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
193 return &tfm->base; in crypto_skcipher_tfm()
204 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
225 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
231 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
273 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
296 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
453 return tfm->reqsize; in crypto_skcipher_reqsize()
[all …]
A Dakcipher.h102 int (*init)(struct crypto_akcipher *tfm);
134 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument
136 return &tfm->base; in crypto_akcipher_tfm()
145 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument
151 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument
162 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument
164 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm()
182 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher()
194 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument
200 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc()
[all …]
A Daead.h142 int (*init)(struct crypto_aead *tfm);
143 void (*exit)(struct crypto_aead *tfm);
182 return &tfm->base; in crypto_aead_tfm()
193 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead()
240 return tfm->authsize; in crypto_aead_authsize()
304 int crypto_aead_setkey(struct crypto_aead *tfm,
321 return __crypto_aead_cast(req->base.tfm); in crypto_aead_reqtfm()
388 return tfm->reqsize; in crypto_aead_reqsize()
400 struct crypto_aead *tfm) in aead_request_set_tfm() argument
402 req->base.tfm = crypto_aead_tfm(tfm); in aead_request_set_tfm()
[all …]
A Dkpp.h79 int (*init)(struct crypto_kpp *tfm);
80 void (*exit)(struct crypto_kpp *tfm);
109 return &tfm->base; in crypto_kpp_tfm()
129 return crypto_kpp_alg(tfm)->reqsize; in crypto_kpp_reqsize()
133 struct crypto_kpp *tfm) in kpp_request_set_tfm() argument
135 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm()
140 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm()
162 crypto_destroy_tfm(tfm, crypto_kpp_tfm(tfm)); in crypto_free_kpp()
180 kpp_request_set_tfm(req, tfm); in kpp_request_alloc()
291 ret = alg->set_secret(tfm, buffer, len); in crypto_kpp_set_secret()
[all …]
A Drng.h42 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 Dacompress.h80 int (*init)(struct crypto_acomp *tfm);
81 void (*exit)(struct crypto_acomp *tfm);
130 return &tfm->base; in crypto_acomp_tfm()
150 return tfm->reqsize; in crypto_acomp_reqsize()
154 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument
156 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm()
161 return __crypto_acomp_tfm(req->base.tfm); in crypto_acomp_reqtfm()
173 crypto_destroy_tfm(tfm, crypto_acomp_tfm(tfm)); in crypto_free_acomp()
264 struct crypto_alg *alg = tfm->base.__crt_alg; in crypto_acomp_compress()
269 ret = tfm->compress(req); in crypto_acomp_compress()
[all …]
A Dcryptd.h30 bool cryptd_skcipher_queued(struct cryptd_skcipher *tfm);
31 void cryptd_free_skcipher(struct cryptd_skcipher *tfm);
38 struct crypto_ahash *tfm) in __cryptd_ahash_cast() argument
40 return (struct cryptd_ahash *)tfm; in __cryptd_ahash_cast()
49 bool cryptd_ahash_queued(struct cryptd_ahash *tfm);
50 void cryptd_free_ahash(struct cryptd_ahash *tfm);
57 struct crypto_aead *tfm) in __cryptd_aead_cast() argument
59 return (struct cryptd_aead *)tfm; in __cryptd_aead_cast()
65 struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm);
67 bool cryptd_aead_queued(struct cryptd_aead *tfm);
[all …]
/linux/security/integrity/ima/
A Dima_crypto.c100 return tfm; in ima_alloc_tfm()
107 if (IS_ERR(tfm)) { in ima_alloc_tfm()
112 return tfm; in ima_alloc_tfm()
221 if (ima_algo_array[i].tfm == tfm) in ima_free_tfm()
308 return tfm; in ima_alloc_atfm()
445 if (IS_ERR(tfm)) in ima_calc_file_ahash()
464 shash->tfm = tfm; in ima_calc_file_hash_tfm()
512 if (IS_ERR(tfm)) in ima_calc_file_shash()
591 shash->tfm = ima_algo_array[tfm_idx].tfm; in ima_calc_field_array_hash_tfm()
727 shash->tfm = tfm; in calc_buffer_shash_tfm()
[all …]
/linux/include/crypto/internal/
A Dscompress.h29 void *(*alloc_ctx)(struct crypto_scomp *tfm);
30 void (*free_ctx)(struct crypto_scomp *tfm, void *ctx);
31 int (*compress)(struct crypto_scomp *tfm, const u8 *src,
47 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm()
52 return &tfm->base; in crypto_scomp_tfm()
57 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp()
67 return crypto_scomp_alg(tfm)->alloc_ctx(tfm); in crypto_scomp_alloc_ctx()
73 return crypto_scomp_alg(tfm)->free_ctx(tfm, ctx); in crypto_scomp_free_ctx()
80 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress()
88 return crypto_scomp_alg(tfm)->decompress(tfm, src, slen, dst, dlen, in crypto_scomp_decompress()
[all …]
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 …]
/linux/include/linux/
A Dcrypto.h183 struct crypto_tfm *tfm; member
655 return crypto_destroy_tfm(tfm, tfm); in crypto_free_tfm()
665 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name()
695 return tfm->crt_flags; in crypto_tfm_get_flags()
700 tfm->crt_flags |= flags; in crypto_tfm_set_flags()
705 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags()
710 return tfm->__crt_ctx; in crypto_tfm_ctx()
715 struct crypto_tfm *tfm; in crypto_tfm_ctx_alignment() local
716 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment()
721 return (struct crypto_comp *)tfm; in __crypto_comp_cast()
[all …]
/linux/crypto/
A Dshash.c94 struct crypto_shash *tfm = desc->tfm; in shash_update_unaligned() local
124 struct crypto_shash *tfm = desc->tfm; in crypto_shash_update() local
137 struct crypto_shash *tfm = desc->tfm; in shash_final_unaligned() local
165 struct crypto_shash *tfm = desc->tfm; in crypto_shash_final() local
186 struct crypto_shash *tfm = desc->tfm; in crypto_shash_finup() local
207 struct crypto_shash *tfm = desc->tfm; in crypto_shash_digest() local
227 desc->tfm = tfm; in crypto_shash_tfm_digest()
262 desc->tfm = *ctx; in shash_async_init()
316 desc->tfm = *ctx; in shash_async_finup()
350 desc->tfm = *ctx; in shash_async_digest()
[all …]
A Dcfb.c44 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 Dcryptd.c489 crypto_free_ahash(tfm); in cryptd_hash_complete()
503 desc->tfm = child; in cryptd_hash_init()
594 desc->tfm = child; in cryptd_hash_digest()
622 desc->tfm = ctx->child; in cryptd_hash_import()
743 crypto_free_aead(tfm); in cryptd_aead_crypt()
916 if (IS_ERR(tfm)) in cryptd_alloc_skcipher()
917 return ERR_CAST(tfm); in cryptd_alloc_skcipher()
967 if (IS_ERR(tfm)) in cryptd_alloc_ahash()
968 return ERR_CAST(tfm); in cryptd_alloc_ahash()
1024 if (IS_ERR(tfm)) in cryptd_alloc_aead()
[all …]
A Dcipher.c23 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 Dapi.c348 tfm->exit(tfm); in crypto_exit_ops()
393 if (tfm == NULL) in __crypto_alloc_tfm()
402 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in __crypto_alloc_tfm()
412 kfree(tfm); in __crypto_alloc_tfm()
416 return tfm; in __crypto_alloc_tfm()
457 if (!IS_ERR(tfm)) in crypto_alloc_base()
458 return tfm; in crypto_alloc_base()
495 tfm->node = node; in crypto_create_tfm_node()
501 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in crypto_create_tfm_node()
561 void *tfm; in crypto_alloc_tfm_node() local
[all …]
A Dsimd.c119 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/net/mac80211/
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 …]
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/drivers/crypto/inside-secure/
A Dsafexcel_cipher.c1726 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init()
1762 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init()
1798 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init()
1834 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init()
1870 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init()
2623 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init()
2638 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit()
2722 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init()
2958 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init()
2993 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit()
[all …]
/linux/crypto/asymmetric_keys/
A Dpublic_key.c123 if (IS_ERR(tfm)) in software_key_query()
124 return PTR_ERR(tfm); in software_key_query()
189 if (IS_ERR(tfm)) in software_key_eds_op()
190 return PTR_ERR(tfm); in software_key_eds_op()
257 struct crypto_shash *tfm; in cert_sig_digest_update() local
271 if (IS_ERR(tfm)) in cert_sig_digest_update()
272 return PTR_ERR(tfm); in cert_sig_digest_update()
281 desc->tfm = tfm; in cert_sig_digest_update()
296 crypto_free_shash(tfm); in cert_sig_digest_update()
335 if (IS_ERR(tfm)) in public_key_verify_signature()
[all …]
/linux/drivers/crypto/allwinner/sun4i-ss/
A Dsun4i-ss-cipher.c18 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()
39 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_opti_poll()
187 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll()
540 int sun4i_ss_cipher_init(struct crypto_tfm *tfm) in sun4i_ss_cipher_init() argument
542 struct sun4i_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun4i_ss_cipher_init()
544 const char *name = crypto_tfm_alg_name(tfm); in sun4i_ss_cipher_init()
574 void sun4i_ss_cipher_exit(struct crypto_tfm *tfm) in sun4i_ss_cipher_exit() argument
576 struct sun4i_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun4i_ss_cipher_exit()
619 err = verify_skcipher_des_key(tfm, key); in sun4i_ss_des_setkey()
[all …]
/linux/drivers/crypto/rockchip/
A Drk3288_crypto_skcipher.c34 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_aes_setkey() local
35 struct rk_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in rk_aes_setkey()
78 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_ecb_encrypt()
88 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_ecb_decrypt()
98 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_cbc_encrypt()
108 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_cbc_decrypt()
118 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_des_ecb_encrypt()
205 block = crypto_tfm_alg_blocksize(tfm); in rk_ablk_hw_init()
250 u32 ivsize = crypto_skcipher_ivsize(tfm); in rk_set_data_start()
298 u32 ivsize = crypto_skcipher_ivsize(tfm); in rk_iv_copyback()
[all …]
/linux/fs/ksmbd/
A Dcrypto_ctx.c34 crypto_free_shash(shash->tfm); in free_shash()
41 struct crypto_aead *tfm = NULL; in alloc_aead() local
45 tfm = crypto_alloc_aead("gcm(aes)", 0, 0); in alloc_aead()
48 tfm = crypto_alloc_aead("ccm(aes)", 0, 0); in alloc_aead()
55 if (IS_ERR(tfm)) { in alloc_aead()
60 return tfm; in alloc_aead()
65 struct crypto_shash *tfm = NULL; in alloc_shash_desc() local
79 tfm = crypto_alloc_shash("sha256", 0, 0); in alloc_shash_desc()
88 if (IS_ERR(tfm)) in alloc_shash_desc()
94 crypto_free_shash(tfm); in alloc_shash_desc()
[all …]

Completed in 68 milliseconds

12345678910>>...18