Home
last modified time | relevance | path

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

12345678910>>...20

/openbmc/linux/include/crypto/
H A Dskcipher.h156 (typeof(tfm))1))) \
191 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
217 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
219 return &tfm->base; in crypto_skcipher_tfm()
230 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
251 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
257 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
299 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
322 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
479 return tfm->reqsize; in crypto_skcipher_reqsize()
[all …]
H A Dhash.h309 return &tfm->base; in crypto_ahash_tfm()
320 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
404 return tfm->statesize; in crypto_ahash_statesize()
446 return tfm->reqsize; in crypto_ahash_reqsize()
566 return tfm->init(req); in crypto_ahash_init()
634 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
777 return &tfm->base; in crypto_shash_tfm()
788 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
882 return tfm->descsize; in crypto_shash_descsize()
974 struct crypto_shash *tfm = desc->tfm; in crypto_shash_import() local
[all …]
H A Daead.h162 int (*init)(struct crypto_aead *tfm);
163 void (*exit)(struct crypto_aead *tfm);
206 return &tfm->base; in crypto_aead_tfm()
217 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead()
264 return tfm->authsize; in crypto_aead_authsize()
328 int crypto_aead_setkey(struct crypto_aead *tfm,
345 return __crypto_aead_cast(req->base.tfm); in crypto_aead_reqtfm()
412 return tfm->reqsize; in crypto_aead_reqsize()
424 struct crypto_aead *tfm) in aead_request_set_tfm() argument
426 req->base.tfm = crypto_aead_tfm(tfm); in aead_request_set_tfm()
[all …]
H A Dakcipher.h162 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument
164 return &tfm->base; in crypto_akcipher_tfm()
173 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument
179 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument
186 return tfm->reqsize; in crypto_akcipher_reqsize()
190 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument
192 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm()
210 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher()
222 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument
228 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc()
[all …]
H A Dkpp.h100 int (*init)(struct crypto_kpp *tfm);
101 void (*exit)(struct crypto_kpp *tfm);
135 return &tfm->base; in crypto_kpp_tfm()
155 return tfm->reqsize; in crypto_kpp_reqsize()
159 struct crypto_kpp *tfm) in kpp_request_set_tfm() argument
161 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm()
166 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm()
188 crypto_destroy_tfm(tfm, crypto_kpp_tfm(tfm)); in crypto_free_kpp()
206 kpp_request_set_tfm(req, tfm); in kpp_request_alloc()
332 struct kpp_alg *alg = crypto_kpp_alg(tfm); in crypto_kpp_set_secret()
[all …]
H A Drng.h59 int (*generate)(struct crypto_rng *tfm,
63 void (*set_ent)(struct crypto_rng *tfm, const u8 *data,
115 return &tfm->base; in crypto_rng_tfm()
133 return __crypto_rng_alg(crypto_rng_tfm(tfm)->__crt_alg); in crypto_rng_alg()
142 static inline void crypto_free_rng(struct crypto_rng *tfm) in crypto_free_rng() argument
144 crypto_destroy_tfm(tfm, crypto_rng_tfm(tfm)); in crypto_free_rng()
185 struct rng_alg *alg = crypto_rng_alg(tfm); in crypto_rng_generate()
195 alg->generate(tfm, src, slen, dst, dlen)); in crypto_rng_generate()
212 return crypto_rng_generate(tfm, NULL, 0, rdata, dlen); in crypto_rng_get_bytes()
232 int crypto_rng_reset(struct crypto_rng *tfm, const u8 *seed,
[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 …]
H A Dacompress.h132 return &tfm->base; in crypto_acomp_tfm()
143 return container_of(tfm, struct crypto_acomp, base); in __crypto_acomp_tfm()
147 struct crypto_acomp *tfm) in crypto_comp_alg_common() argument
154 return tfm->reqsize; in crypto_acomp_reqsize()
158 struct crypto_acomp *tfm) in acomp_request_set_tfm() argument
160 req->base.tfm = crypto_acomp_tfm(tfm); in acomp_request_set_tfm()
165 return __crypto_acomp_tfm(req->base.tfm); in crypto_acomp_reqtfm()
177 crypto_destroy_tfm(tfm, crypto_acomp_tfm(tfm)); in crypto_free_acomp()
290 struct crypto_acomp *tfm = crypto_acomp_reqtfm(req); in crypto_acomp_compress() local
293 alg = crypto_comp_alg_common(tfm); in crypto_acomp_compress()
[all …]
H A Dsig.h45 static inline struct crypto_tfm *crypto_sig_tfm(struct crypto_sig *tfm) in crypto_sig_tfm() argument
47 return &tfm->base; in crypto_sig_tfm()
57 static inline void crypto_free_sig(struct crypto_sig *tfm) in crypto_free_sig() argument
59 crypto_destroy_tfm(tfm, crypto_sig_tfm(tfm)); in crypto_free_sig()
72 int crypto_sig_maxsize(struct crypto_sig *tfm);
87 int crypto_sig_sign(struct crypto_sig *tfm,
105 int crypto_sig_verify(struct crypto_sig *tfm,
122 int crypto_sig_set_pubkey(struct crypto_sig *tfm,
138 int crypto_sig_set_privkey(struct crypto_sig *tfm,
/openbmc/linux/include/crypto/internal/
H A Dscompress.h35 void *(*alloc_ctx)(struct crypto_scomp *tfm);
36 void (*free_ctx)(struct crypto_scomp *tfm, void *ctx);
37 int (*compress)(struct crypto_scomp *tfm, const u8 *src,
40 int (*decompress)(struct crypto_scomp *tfm, const u8 *src,
57 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm()
62 return &tfm->base; in crypto_scomp_tfm()
67 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp()
77 return crypto_scomp_alg(tfm)->alloc_ctx(tfm); in crypto_scomp_alloc_ctx()
83 return crypto_scomp_alg(tfm)->free_ctx(tfm, ctx); in crypto_scomp_free_ctx()
90 return crypto_scomp_alg(tfm)->compress(tfm, src, slen, dst, dlen, ctx); in crypto_scomp_compress()
[all …]
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 Ddes.h26 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 …]
/openbmc/linux/include/linux/
H A Dcrypto.h176 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 …]
/openbmc/linux/security/integrity/ima/
H 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()
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 …]
/openbmc/linux/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 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 …]
H A Dshash.c93 struct crypto_shash *tfm = desc->tfm; in shash_update_unaligned() local
123 struct crypto_shash *tfm = desc->tfm; in crypto_shash_update() local
142 struct crypto_shash *tfm = desc->tfm; in shash_final_unaligned() local
170 struct crypto_shash *tfm = desc->tfm; in crypto_shash_final() local
197 struct crypto_shash *tfm = desc->tfm; in crypto_shash_finup() local
230 struct crypto_shash *tfm = desc->tfm; in crypto_shash_digest() local
259 desc->tfm = tfm; in crypto_shash_tfm_digest()
294 desc->tfm = *ctx; in shash_async_init()
348 desc->tfm = *ctx; in shash_async_finup()
382 desc->tfm = *ctx; in shash_async_digest()
[all …]
H A Djitterentropy-kcapi.c104 desc->tfm = hash_state_desc->tfm; in jent_hash_time()
186 struct crypto_shash *tfm; member
202 if (rng->tfm) in jent_kcapi_cleanup()
204 rng->tfm = NULL; in jent_kcapi_cleanup()
235 rng->tfm = hash; in jent_kcapi_init()
244 sdesc->tfm = hash; in jent_kcapi_init()
258 jent_kcapi_cleanup(tfm); in jent_kcapi_init()
330 if (IS_ERR(tfm)) { in jent_mod_init()
332 return PTR_ERR(tfm); in jent_mod_init()
335 desc->tfm = tfm; in jent_mod_init()
[all …]
H A Dapi.c353 tfm->exit(tfm); in crypto_exit_ops()
398 if (tfm == NULL) in __crypto_alloc_tfmgfp()
404 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in __crypto_alloc_tfmgfp()
413 kfree(tfm); in __crypto_alloc_tfmgfp()
417 return tfm; in __crypto_alloc_tfmgfp()
465 if (!IS_ERR(tfm)) in crypto_alloc_base()
466 return tfm; in crypto_alloc_base()
502 tfm->node = node; in crypto_alloc_tfmmem()
526 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm))) in crypto_create_tfm_node()
611 void *tfm; in crypto_alloc_tfm_node() local
[all …]
H A Dahash.c145 ret = tfm->setkey(tfm, alignbuffer, keylen); in ahash_setkey_unaligned()
160 if (tfm->setkey != ahash_nosetkey && in ahash_set_needkey()
174 err = tfm->setkey(tfm, key, keylen); in crypto_ahash_setkey()
177 ahash_set_needkey(tfm); in crypto_ahash_setkey()
200 reqsize = crypto_ahash_reqsize(tfm); in ahash_save_req()
212 ahash_request_set_tfm(subreq, tfm); in ahash_save_req()
407 err = tfm->update(req->priv); in ahash_def_finup()
448 tfm->exit = crypto_ahash_exit_tfm; in crypto_ahash_init_tfm()
551 tfm = crypto_tfm_get(tfm); in crypto_clone_ahash()
552 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 …]
/openbmc/linux/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 …]
/openbmc/linux/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 …]
/openbmc/linux/drivers/crypto/cavium/zip/
H A Dzip_crypto.h60 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,

12345678910>>...20