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

1234567891011>>

/linux-master/include/crypto/
H A Dkpp.h93 int (*set_secret)(struct crypto_kpp *tfm, const void *buffer,
98 unsigned int (*max_size)(struct crypto_kpp *tfm);
100 int (*init)(struct crypto_kpp *tfm);
101 void (*exit)(struct crypto_kpp *tfm);
118 * crypto_alloc_kpp() - allocate KPP tfm handle
133 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) argument
135 return &tfm->base;
143 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) argument
145 return container_of(tfm, struct crypto_kpp, base);
148 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) argument
153 crypto_kpp_reqsize(struct crypto_kpp *tfm) argument
158 kpp_request_set_tfm(struct kpp_request *req, struct crypto_kpp *tfm) argument
169 crypto_kpp_get_flags(struct crypto_kpp *tfm) argument
174 crypto_kpp_set_flags(struct crypto_kpp *tfm, u32 flags) argument
186 crypto_free_kpp(struct crypto_kpp *tfm) argument
199 kpp_request_alloc(struct crypto_kpp *tfm, gfp_t gfp) argument
329 crypto_kpp_set_secret(struct crypto_kpp *tfm, const void *buffer, unsigned int len) argument
355 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); local
376 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); local
395 crypto_kpp_maxsize(struct crypto_kpp *tfm) argument
[all...]
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/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);
43 int crypto_cipher_setkey(struct crypto_cipher *tfm, argument
46 struct cipher_alg *cia = crypto_cipher_alg(tfm);
47 unsigned long alignmask = crypto_cipher_alignmask(tfm);
53 return setkey_unaligned(tfm, key, keylen);
55 return cia->cia_setkey(crypto_cipher_tfm(tfm), key, keylen);
59 static inline void cipher_crypt_one(struct crypto_cipher *tfm, argument
80 crypto_cipher_encrypt_one(struct crypto_cipher *tfm, u8 *dst, const u8 *src) argument
87 crypto_cipher_decrypt_one(struct crypto_cipher *tfm, u8 *dst, const u8 *src) argument
96 struct crypto_tfm *tfm = crypto_cipher_tfm(cipher); local
[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 Djitterentropy-kcapi.c110 SHASH_DESC_ON_STACK(desc, hash_state_desc->tfm);
115 desc->tfm = hash_state_desc->tfm;
117 if (sizeof(intermediary) != crypto_shash_digestsize(desc->tfm)) {
197 struct crypto_shash *tfm; member in struct:jitterentropy
201 static void jent_kcapi_cleanup(struct crypto_tfm *tfm) argument
203 struct jitterentropy *rng = crypto_tfm_ctx(tfm);
213 if (rng->tfm)
214 crypto_free_shash(rng->tfm);
215 rng->tfm
223 jent_kcapi_init(struct crypto_tfm *tfm) argument
275 jent_kcapi_random(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *rdata, unsigned int dlen) argument
313 jent_kcapi_reset(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) argument
337 struct crypto_shash *tfm; local
[all...]
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 Dshash.c31 int shash_no_setkey(struct crypto_shash *tfm, const u8 *key, argument
38 static void shash_set_needkey(struct crypto_shash *tfm, struct shash_alg *alg) argument
41 crypto_shash_set_flags(tfm, CRYPTO_TFM_NEED_KEY);
44 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, argument
47 struct shash_alg *shash = crypto_shash_alg(tfm);
50 err = shash->setkey(tfm, key, keylen);
52 shash_set_needkey(tfm, shash);
56 crypto_shash_clear_flags(tfm, CRYPTO_TFM_NEED_KEY);
64 struct shash_alg *shash = crypto_shash_alg(desc->tfm);
78 struct shash_alg *shash = crypto_shash_alg(desc->tfm);
102 struct crypto_shash *tfm = desc->tfm; local
131 struct crypto_shash *tfm = desc->tfm; local
151 crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data, unsigned int len, u8 *out) argument
169 struct crypto_shash *tfm = desc->tfm; local
182 struct crypto_shash *tfm = desc->tfm; local
196 crypto_shash_exit_tfm(struct crypto_tfm *tfm) argument
204 crypto_shash_init_tfm(struct crypto_tfm *tfm) argument
317 struct crypto_tfm *tfm = crypto_shash_tfm(hash); local
[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 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);
82 int crypto_sig_maxsize(struct crypto_sig *tfm) argument
84 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
90 int crypto_sig_sign(struct crypto_sig *tfm, argument
94 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
96 .tfm = *ctx,
109 int crypto_sig_verify(struct crypto_sig *tfm, argument
113 struct crypto_akcipher **ctx = crypto_sig_ctx(tfm);
133 crypto_sig_set_pubkey(struct crypto_sig *tfm, const void *key, unsigned int keylen) argument
142 crypto_sig_set_privkey(struct crypto_sig *tfm, const void *key, unsigned int keylen) argument
[all...]
H A Dlskcipher.c21 struct crypto_tfm *tfm)
23 return container_of(tfm, struct crypto_lskcipher, base);
51 static int lskcipher_setkey_unaligned(struct crypto_lskcipher *tfm, argument
54 unsigned long alignmask = crypto_lskcipher_alignmask(tfm);
55 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm);
67 ret = cipher->setkey(tfm, alignbuffer, keylen);
72 int crypto_lskcipher_setkey(struct crypto_lskcipher *tfm, const u8 *key, argument
75 unsigned long alignmask = crypto_lskcipher_alignmask(tfm);
76 struct lskcipher_alg *cipher = crypto_lskcipher_alg(tfm);
82 return lskcipher_setkey_unaligned(tfm, ke
20 __crypto_lskcipher_cast( struct crypto_tfm *tfm) argument
88 crypto_lskcipher_crypt_unaligned( struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, u32 flags)) argument
142 crypto_lskcipher_crypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv, u32 flags)) argument
166 crypto_lskcipher_encrypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv) argument
182 crypto_lskcipher_decrypt(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *iv) argument
198 crypto_lskcipher_crypt_sg(struct skcipher_request *req, int (*crypt)(struct crypto_lskcipher *tfm, const u8 *src, u8 *dst, unsigned len, u8 *ivs, u32 flags)) argument
207 struct crypto_lskcipher *tfm = *ctx; local
259 crypto_lskcipher_exit_tfm(struct crypto_tfm *tfm) argument
267 crypto_lskcipher_init_tfm(struct crypto_tfm *tfm) argument
364 crypto_lskcipher_exit_tfm_sg(struct crypto_tfm *tfm) argument
371 crypto_init_lskcipher_ops_sg(struct crypto_tfm *tfm) argument
490 lskcipher_setkey_simple(struct crypto_lskcipher *tfm, const u8 *key, unsigned int keylen) argument
501 lskcipher_init_tfm_simple(struct crypto_lskcipher *tfm) argument
517 lskcipher_exit_tfm_simple(struct crypto_lskcipher *tfm) argument
[all...]
H A Dapi.c348 static void crypto_exit_ops(struct crypto_tfm *tfm) argument
350 const struct crypto_type *type = tfm->__crt_alg->cra_type;
352 if (type && tfm->exit)
353 tfm->exit(tfm);
392 struct crypto_tfm *tfm; local
396 tfm_size = sizeof(*tfm) + crypto_ctxsize(alg, type, mask);
397 tfm = kzalloc(tfm_size, gfp);
398 if (tfm == NULL)
401 tfm
452 struct crypto_tfm *tfm; local
488 struct crypto_tfm *tfm; local
512 struct crypto_tfm *tfm; local
547 struct crypto_tfm *tfm; local
611 void *tfm; local
651 crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm) argument
[all...]
H A Dcrypto_null.c27 static int null_compress(struct crypto_tfm *tfm, const u8 *src, argument
59 static int null_hash_setkey(struct crypto_shash *tfm, const u8 *key, argument
63 static int null_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, argument
67 static int null_setkey(struct crypto_tfm *tfm, const u8 *key, argument
71 static void null_crypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) argument
155 struct crypto_sync_skcipher *tfm; local
158 tfm = crypto_default_null_skcipher;
160 if (!tfm) {
161 tfm = crypto_alloc_sync_skcipher("ecb(cipher_null)", 0, 0);
162 if (IS_ERR(tfm))
[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/arch/arm64/crypto/
H A Daes-ce-setkey.h3 int ce_aes_setkey(struct crypto_tfm *tfm, const u8 *in_key,
H A Dsm4-ce-cipher-glue.c20 static int sm4_ce_setkey(struct crypto_tfm *tfm, const u8 *key, argument
23 struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
28 static void sm4_ce_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
30 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
41 static void sm4_ce_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) argument
43 const struct sm4_ctx *ctx = crypto_tfm_ctx(tfm);
/linux-master/net/mac80211/
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 Dacompress.h42 int (*init)(struct crypto_acomp *tfm);
43 void (*exit)(struct crypto_acomp *tfm);
61 static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm) argument
63 return tfm->base.__crt_ctx;
72 static inline struct acomp_req *__acomp_request_alloc(struct crypto_acomp *tfm) argument
76 req = kzalloc(sizeof(*req) + crypto_acomp_reqsize(tfm), GFP_KERNEL);
78 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/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...]
H A Daes_cbc.c24 static int p8_aes_cbc_init(struct crypto_skcipher *tfm) argument
26 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
38 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) +
44 static void p8_aes_cbc_exit(struct crypto_skcipher *tfm) argument
46 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
51 static int p8_aes_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, argument
54 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm);
73 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); local
74 const struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(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;
/linux-master/fs/smb/server/
H A Dcrypto_ctx.h45 #define CRYPTO_HMACMD5_TFM(c) ((c)->desc[CRYPTO_SHASH_HMACMD5]->tfm)
47 ((c)->desc[CRYPTO_SHASH_HMACSHA256]->tfm)
48 #define CRYPTO_CMACAES_TFM(c) ((c)->desc[CRYPTO_SHASH_CMACAES]->tfm)
49 #define CRYPTO_SHA256_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA256]->tfm)
50 #define CRYPTO_SHA512_TFM(c) ((c)->desc[CRYPTO_SHASH_SHA512]->tfm)

Completed in 293 milliseconds

1234567891011>>