Searched refs:tfm (Results 26 - 50 of 477) sorted by relevance

1234567891011>>

/linux-master/net/mac80211/
H A Daes_cmac.h14 void ieee80211_aes_cmac(struct crypto_shash *tfm, const u8 *aad,
16 void ieee80211_aes_cmac_256(struct crypto_shash *tfm, const u8 *aad,
18 void ieee80211_aes_cmac_key_free(struct crypto_shash *tfm);
H A Daes_gmac.h17 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce,
19 void ieee80211_aes_gmac_key_free(struct crypto_aead *tfm);
H A Daes_gmac.c17 int ieee80211_aes_gmac(struct crypto_aead *tfm, const u8 *aad, u8 *nonce, argument
23 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm);
59 aead_request_set_tfm(aead_req, tfm);
72 struct crypto_aead *tfm; local
75 tfm = crypto_alloc_aead("gcm(aes)", 0, CRYPTO_ALG_ASYNC);
76 if (IS_ERR(tfm))
77 return tfm;
79 err = crypto_aead_setkey(tfm, key, key_len);
81 err = crypto_aead_setauthsize(tfm, GMAC_MIC_LEN);
83 return tfm;
89 ieee80211_aes_gmac_key_free(struct crypto_aead *tfm) argument
[all...]
H A Daead_api.h13 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
17 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,
21 void aead_key_free(struct crypto_aead *tfm);
/linux-master/include/crypto/internal/
H A Ddes.h17 * @tfm: the crypto algo
26 static inline int crypto_des_verify_key(struct crypto_tfm *tfm, const u8 *key) argument
33 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
80 * @tfm: the crypto algo
91 static inline int crypto_des3_ede_verify_key(struct crypto_tfm *tfm, argument
95 crypto_tfm_get_flags(tfm) &
99 static inline int verify_skcipher_des_key(struct crypto_skcipher *tfm, argument
102 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key);
105 static inline int verify_skcipher_des3_key(struct crypto_skcipher *tfm, argument
108 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), ke
111 verify_aead_des_key(struct crypto_aead *tfm, const u8 *key, int keylen) argument
119 verify_aead_des3_key(struct crypto_aead *tfm, const u8 *key, int keylen) argument
[all...]
H A Dacompress.h41 int (*init)(struct crypto_acomp *tfm);
42 void (*exit)(struct crypto_acomp *tfm);
60 static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm) argument
62 return tfm->base.__crt_ctx;
71 static inline struct acomp_req *__acomp_request_alloc_noprof(struct crypto_acomp *tfm) argument
75 req = kzalloc_noprof(sizeof(*req) + crypto_acomp_reqsize(tfm), GFP_KERNEL);
77 acomp_request_set_tfm(req, tfm);
H A Dgeniv.h24 int aead_init_geniv(struct crypto_aead *tfm);
25 void aead_exit_geniv(struct crypto_aead *tfm);
/linux-master/security/integrity/ima/
H A Dima_crypto.c88 struct crypto_shash *tfm = ima_shash_tfm; local
95 return tfm;
98 if (ima_algo_array[i].tfm && ima_algo_array[i].algo == algo)
99 return ima_algo_array[i].tfm;
101 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0);
102 if (IS_ERR(tfm)) {
103 rc = PTR_ERR(tfm);
107 return tfm;
157 ima_algo_array[i].tfm = ima_shash_tfm;
161 ima_algo_array[i].tfm
209 ima_free_tfm(struct crypto_shash *tfm) argument
287 struct crypto_ahash *tfm = ima_ahash_tfm; local
307 ima_free_atfm(struct crypto_ahash *tfm) argument
324 ima_calc_file_hash_atfm(struct file *file, struct ima_digest_data *hash, struct crypto_ahash *tfm) argument
437 struct crypto_ahash *tfm; local
451 ima_calc_file_hash_tfm(struct file *file, struct ima_digest_data *hash, struct crypto_shash *tfm) argument
504 struct crypto_shash *tfm; local
658 calc_buffer_ahash_atfm(const void *buf, loff_t len, struct ima_digest_data *hash, struct crypto_ahash *tfm) argument
701 struct crypto_ahash *tfm; local
715 calc_buffer_shash_tfm(const void *buf, loff_t size, struct ima_digest_data *hash, struct crypto_shash *tfm) argument
748 struct crypto_shash *tfm; local
795 ima_calc_boot_aggregate_tfm(char *digest, u16 alg_id, struct crypto_shash *tfm) argument
841 struct crypto_shash *tfm; local
[all...]
/linux-master/fs/verity/
H A Dhash_algs.c46 struct crypto_shash *tfm; local
57 if (likely(smp_load_acquire(&alg->tfm) != NULL))
62 if (alg->tfm != NULL)
65 tfm = crypto_alloc_shash(alg->name, 0, 0);
66 if (IS_ERR(tfm)) {
67 if (PTR_ERR(tfm) == -ENOENT) {
76 alg->name, PTR_ERR(tfm));
77 alg = ERR_CAST(tfm);
82 if (WARN_ON_ONCE(alg->digest_size != crypto_shash_digestsize(tfm)))
84 if (WARN_ON_ONCE(alg->block_size != crypto_shash_blocksize(tfm)))
[all...]
/linux-master/crypto/
H A Dcipher.c20 static int setkey_unaligned(struct crypto_cipher *tfm, const u8 *key, argument
23 struct cipher_alg *cia = crypto_cipher_alg(tfm);
24 unsigned long alignmask = crypto_cipher_alignmask(tfm);
36 ret = cia->cia_setkey(crypto_cipher_tfm(tfm), alignbuffer, keylen);
42 int crypto_cipher_setkey(struct crypto_cipher *tfm, argument
45 struct cipher_alg *cia = crypto_cipher_alg(tfm);
46 unsigned long alignmask = crypto_cipher_alignmask(tfm);
52 return setkey_unaligned(tfm, key, keylen);
54 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen);
58 static inline void cipher_crypt_one(struct crypto_cipher *tfm, argument
79 crypto_cipher_encrypt_one(struct crypto_cipher *tfm, u8 *dst, const u8 *src) argument
86 crypto_cipher_decrypt_one(struct crypto_cipher *tfm, u8 *dst, const u8 *src) argument
95 struct crypto_tfm *tfm = crypto_cipher_tfm(cipher); local
[all...]
H A Dsig.c24 static int crypto_sig_init_tfm(struct crypto_tfm *tfm) argument
26 if (tfm->__crt_alg->cra_type != &crypto_sig_type)
27 return crypto_init_akcipher_ops_sig(tfm);
69 int crypto_sig_maxsize(struct crypto_sig *tfm) argument
71 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
77 int crypto_sig_sign(struct crypto_sig *tfm, argument
81 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
83 .tfm = *ctx,
96 int crypto_sig_verify(struct crypto_sig *tfm, argument
100 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
120 crypto_sig_set_pubkey(struct crypto_sig *tfm, const void *key, unsigned int keylen) argument
129 crypto_sig_set_privkey(struct crypto_sig *tfm, const void *key, unsigned int keylen) argument
[all...]
H A Ddes_generic.c19 static int des_setkey(struct crypto_tfm *tfm, const u8 *key, argument
22 struct des_ctx *dctx = crypto_tfm_ctx(tfm);
27 if (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_FORBID_WEAK_KEYS)
37 static void crypto_des_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
39 const struct des_ctx *dctx = crypto_tfm_ctx(tfm);
44 static void crypto_des_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
46 const struct des_ctx *dctx = crypto_tfm_ctx(tfm);
51 static int des3_ede_setkey(struct crypto_tfm *tfm, const u8 *key, argument
54 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm);
59 if (crypto_tfm_get_flags(tfm)
69 crypto_des3_ede_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
77 crypto_des3_ede_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
[all...]
H A Dahash.c31 * For an ahash tfm that is using an shash algorithm (instead of an ahash
32 * algorithm), this returns the underlying shash tfm.
34 static inline struct crypto_shash *ahash_to_shash(struct crypto_ahash *tfm) argument
36 return *(struct crypto_shash **)crypto_ahash_ctx(tfm);
40 struct crypto_ahash *tfm)
44 desc->tfm = ahash_to_shash(tfm);
106 static void crypto_exit_ahash_using_shash(struct crypto_tfm *tfm) argument
108 struct crypto_shash **ctx = crypto_tfm_ctx(tfm);
113 static int crypto_init_ahash_using_shash(struct crypto_tfm *tfm) argument
39 prepare_shash_desc(struct ahash_request *req, struct crypto_ahash *tfm) argument
211 ahash_nosetkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument
217 ahash_set_needkey(struct crypto_ahash *tfm, struct ahash_alg *alg) argument
224 crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) argument
255 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
268 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
330 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
341 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
352 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
363 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
426 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
442 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
452 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); local
462 crypto_ahash_exit_tfm(struct crypto_tfm *tfm) argument
470 crypto_ahash_init_tfm(struct crypto_tfm *tfm) argument
581 struct crypto_tfm *tfm = crypto_ahash_tfm(hash); local
[all...]
H A Djitterentropy-kcapi.c109 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm);
114 desc->tfm = hash_state_desc->tfm;
116 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) {
196 struct crypto_shash *tfm; member in struct:jitterentropy
200 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) argument
202 struct jitterentropy *rng = crypto_tfm_ctx(tfm);
212 if (rng->tfm)
213 crypto_free_shash(rng->tfm);
214 rng->tfm
222 jent_kcapi_init(struct crypto_tfm *tfm) argument
274 jent_kcapi_random(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *rdata, unsigned int dlen) argument
312 jent_kcapi_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) argument
336 struct crypto_shash *tfm; local
[all...]
H A Dskcipher.h15 int crypto_init_lskcipher_ops_sg(struct crypto_tfm *tfm);
H A Dcompress.h17 int crypto_init_scomp_ops_async(struct crypto_tfm *tfm);
H A D842.c31 static void *crypto842_alloc_ctx(struct crypto_scomp *tfm) argument
42 static int crypto842_init(struct crypto_tfm *tfm) argument
44 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm);
53 static void crypto842_free_ctx(struct crypto_scomp *tfm, void *ctx) argument
58 static void crypto842_exit(struct crypto_tfm *tfm) argument
60 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm);
65 static int crypto842_compress(struct crypto_tfm *tfm, argument
69 struct crypto842_ctx *ctx = crypto_tfm_ctx(tfm);
74 static int crypto842_scompress(struct crypto_scomp *tfm, argument
81 static int crypto842_decompress(struct crypto_tfm *tfm, argument
88 crypto842_sdecompress(struct crypto_scomp *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int *dlen, void *ctx) argument
[all...]
H A Daes_ti.c12 static int aesti_set_key(struct crypto_tfm *tfm, const u8 *in_key, argument
15 struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
20 static void aesti_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
22 const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
36 static void aesti_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
38 const struct crypto_aes_ctx *ctx = crypto_tfm_ctx(tfm);
H A Dsm4_generic.c21 * @tfm: The %crypto_tfm that is used in the context.
26 * &sm4_ctx _must_ be the private data embedded in @tfm which is
31 static int sm4_setkey(struct crypto_tfm *tfm, const u8 *in_key, argument
34 struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
41 static void sm4_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
43 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
50 static void sm4_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
52 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
H A Dshash.c19 int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, argument
26 static void shash_set_needkey(struct crypto_shash *tfm, struct shash_alg *alg) argument
29 crypto_shash_set_flags(tfm, CRYPTO_TFM_NEED_KEY);
32 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, argument
35 struct shash_alg *shash = crypto_shash_alg(tfm);
38 err = shash->setkey(tfm, key, keylen);
40 shash_set_needkey(tfm, shash);
44 crypto_shash_clear_flags(tfm, CRYPTO_TFM_NEED_KEY);
52 return crypto_shash_alg(desc->tfm)->update(desc, data, len);
58 return crypto_shash_alg(desc->tfm)
90 struct crypto_shash *tfm = desc->tfm; local
99 crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data, unsigned int len, u8 *out) argument
117 struct crypto_shash *tfm = desc->tfm; local
130 struct crypto_shash *tfm = desc->tfm; local
144 crypto_shash_exit_tfm(struct crypto_tfm *tfm) argument
152 crypto_shash_init_tfm(struct crypto_tfm *tfm) argument
256 struct crypto_tfm *tfm = crypto_shash_tfm(hash); local
[all...]
H A Daead.c23 static int setkey_unaligned(struct crypto_aead *tfm, const u8 *key, argument
26 unsigned long alignmask = crypto_aead_alignmask(tfm);
38 ret = crypto_aead_alg(tfm)->setkey(tfm, alignbuffer, keylen);
43 int crypto_aead_setkey(struct crypto_aead *tfm, argument
46 unsigned long alignmask = crypto_aead_alignmask(tfm);
50 err = setkey_unaligned(tfm, key, keylen);
52 err = crypto_aead_alg(tfm)->setkey(tfm, key, keylen);
55 crypto_aead_set_flags(tfm, CRYPTO_TFM_NEED_KE
64 crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize) argument
108 crypto_aead_exit_tfm(struct crypto_tfm *tfm) argument
116 crypto_aead_init_tfm(struct crypto_tfm *tfm) argument
[all...]
/linux-master/arch/arm64/crypto/
H A Daes-ce-setkey.h3 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key,
/linux-master/arch/powerpc/crypto/
H A Daes.c28 static int p8_aes_init(struct crypto_tfm *tfm) argument
30 const char *alg = crypto_tfm_alg_name(tfm);
32 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm);
45 tfm));
51 static void p8_aes_exit(struct crypto_tfm *tfm) argument
53 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm);
61 static int p8_aes_setkey(struct crypto_tfm *tfm, const u8 *key, argument
65 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm);
81 static void p8_aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
83 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm);
98 p8_aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
[all...]
/linux-master/include/crypto/
H A Dxts.h11 static inline int xts_verify_key(struct crypto_skcipher *tfm, argument
32 if ((fips_enabled || (crypto_skcipher_get_flags(tfm) &
/linux-master/security/apparmor/
H A Dcrypto.c41 desc->tfm = apparmor_tfm;
78 desc->tfm = apparmor_tfm;
104 struct crypto_shash *tfm; local
109 tfm = crypto_alloc_shash("sha256", 0, 0);
110 if (IS_ERR(tfm)) {
111 int error = PTR_ERR(tfm);
115 apparmor_tfm = tfm;

Completed in 394 milliseconds

1234567891011>>