Home
last modified time | relevance | path

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

12

/include/crypto/
Dskcipher.h105 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
109 int (*init)(struct crypto_skcipher *tfm);
110 void (*exit)(struct crypto_skcipher *tfm);
126 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
130 (typeof(tfm))1))) \
165 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
167 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
191 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
193 return &tfm->base; in crypto_skcipher_tfm()
202 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
[all …]
Dhash.h142 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
144 int (*init_tfm)(struct crypto_ahash *tfm);
145 void (*exit_tfm)(struct crypto_ahash *tfm);
151 struct crypto_shash *tfm; member
209 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
211 int (*init_tfm)(struct crypto_shash *tfm);
212 void (*exit_tfm)(struct crypto_shash *tfm);
232 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
254 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
256 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
[all …]
Daead.h137 int (*setkey)(struct crypto_aead *tfm, const u8 *key,
139 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
142 int (*init)(struct crypto_aead *tfm);
143 void (*exit)(struct crypto_aead *tfm);
159 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument
161 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast()
180 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument
182 return &tfm->base; in crypto_aead_tfm()
191 static inline void crypto_free_aead(struct crypto_aead *tfm) in crypto_free_aead() argument
193 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead()
[all …]
Dakcipher.h97 int (*set_pub_key)(struct crypto_akcipher *tfm, const void *key,
99 int (*set_priv_key)(struct crypto_akcipher *tfm, const void *key,
101 unsigned int (*max_size)(struct crypto_akcipher *tfm);
102 int (*init)(struct crypto_akcipher *tfm);
103 void (*exit)(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
147 return container_of(tfm, struct crypto_akcipher, base); in __crypto_akcipher_tfm()
151 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument
[all …]
Dkpp.h72 int (*set_secret)(struct crypto_kpp *tfm, const void *buffer,
77 unsigned int (*max_size)(struct crypto_kpp *tfm);
79 int (*init)(struct crypto_kpp *tfm);
80 void (*exit)(struct crypto_kpp *tfm);
107 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) in crypto_kpp_tfm() argument
109 return &tfm->base; in crypto_kpp_tfm()
117 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) in __crypto_kpp_tfm() argument
119 return container_of(tfm, struct crypto_kpp, base); in __crypto_kpp_tfm()
122 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) in crypto_kpp_alg() argument
124 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg()
[all …]
Drng.h42 int (*generate)(struct crypto_rng *tfm,
45 int (*seed)(struct crypto_rng *tfm, const u8 *seed, unsigned int slen);
46 void (*set_ent)(struct crypto_rng *tfm, const u8 *data,
92 static inline struct crypto_tfm *crypto_rng_tfm(struct crypto_rng *tfm) in crypto_rng_tfm() argument
94 return &tfm->base; in crypto_rng_tfm()
105 static inline struct rng_alg *crypto_rng_alg(struct crypto_rng *tfm) in crypto_rng_alg() argument
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()
136 static inline int crypto_rng_generate(struct crypto_rng *tfm, in crypto_rng_generate() argument
[all …]
Dcryptd.h28 struct crypto_skcipher *cryptd_skcipher_child(struct cryptd_skcipher *tfm);
30 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()
46 struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm);
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()
[all …]
Dacompress.h80 int (*init)(struct crypto_acomp *tfm);
81 void (*exit)(struct crypto_acomp *tfm);
128 static inline struct crypto_tfm *crypto_acomp_tfm(struct crypto_acomp *tfm) in crypto_acomp_tfm() argument
130 return &tfm->base; in crypto_acomp_tfm()
138 static inline struct crypto_acomp *__crypto_acomp_tfm(struct crypto_tfm *tfm) in __crypto_acomp_tfm() argument
140 return container_of(tfm, struct crypto_acomp, base); in __crypto_acomp_tfm()
143 static inline struct acomp_alg *crypto_acomp_alg(struct crypto_acomp *tfm) in crypto_acomp_alg() argument
145 return __crypto_acomp_alg(crypto_acomp_tfm(tfm)->__crt_alg); in crypto_acomp_alg()
148 static inline unsigned int crypto_acomp_reqsize(struct crypto_acomp *tfm) in crypto_acomp_reqsize() argument
150 return tfm->reqsize; in crypto_acomp_reqsize()
[all …]
Dxts.h11 static inline int xts_check_key(struct crypto_tfm *tfm, in xts_check_key() argument
28 static inline int xts_verify_key(struct crypto_skcipher *tfm, in xts_verify_key() argument
39 if ((fips_enabled || (crypto_skcipher_get_flags(tfm) & in xts_verify_key()
Dctr.h24 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_ctr_encrypt_walk() local
25 int blocksize = crypto_skcipher_chunksize(tfm); in crypto_ctr_encrypt_walk()
50 fn(tfm, walk.iv, buf); in crypto_ctr_encrypt_walk()
Dalgapi.h34 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
35 int (*init_tfm)(struct crypto_tfm *tfm);
183 static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm) in crypto_tfm_ctx_aligned() argument
185 return PTR_ALIGN(crypto_tfm_ctx(tfm), in crypto_tfm_ctx_aligned()
186 crypto_tfm_alg_alignmask(tfm) + 1); in crypto_tfm_ctx_aligned()
190 struct crypto_tfm *tfm) in crypto_tfm_alg_instance() argument
192 return container_of(tfm->__crt_alg, struct crypto_instance, alg); in crypto_tfm_alg_instance()
/include/crypto/internal/
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,
34 int (*decompress)(struct crypto_scomp *tfm, const u8 *src,
45 static inline struct crypto_scomp *__crypto_scomp_tfm(struct crypto_tfm *tfm) in __crypto_scomp_tfm() argument
47 return container_of(tfm, struct crypto_scomp, base); in __crypto_scomp_tfm()
50 static inline struct crypto_tfm *crypto_scomp_tfm(struct crypto_scomp *tfm) in crypto_scomp_tfm() argument
52 return &tfm->base; in crypto_scomp_tfm()
55 static inline void crypto_free_scomp(struct crypto_scomp *tfm) in crypto_free_scomp() argument
57 crypto_destroy_tfm(tfm, crypto_scomp_tfm(tfm)); in crypto_free_scomp()
[all …]
Dcipher.h37 static inline struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) in __crypto_cipher_cast() argument
39 return (struct crypto_cipher *)tfm; in __crypto_cipher_cast()
66 static inline struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) in crypto_cipher_tfm() argument
68 return &tfm->base; in crypto_cipher_tfm()
75 static inline void crypto_free_cipher(struct crypto_cipher *tfm) in crypto_free_cipher() argument
77 crypto_free_tfm(crypto_cipher_tfm(tfm)); in crypto_free_cipher()
109 static inline unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) in crypto_cipher_blocksize() argument
111 return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); in crypto_cipher_blocksize()
114 static inline unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) in crypto_cipher_alignmask() argument
116 return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); in crypto_cipher_alignmask()
[all …]
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 …]
Dacompress.h21 static inline void *acomp_tfm_ctx(struct crypto_acomp *tfm) in acomp_tfm_ctx() argument
23 return tfm->base.__crt_ctx; in acomp_tfm_ctx()
32 static inline const char *acomp_alg_name(struct crypto_acomp *tfm) in acomp_alg_name() argument
34 return crypto_acomp_tfm(tfm)->__crt_alg->cra_name; in acomp_alg_name()
37 static inline struct acomp_req *__acomp_request_alloc(struct crypto_acomp *tfm) in __acomp_request_alloc() argument
41 req = kzalloc(sizeof(*req) + crypto_acomp_reqsize(tfm), GFP_KERNEL); in __acomp_request_alloc()
43 acomp_request_set_tfm(req, tfm); in __acomp_request_alloc()
Dchacha.h15 static inline int chacha_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha_setkey() argument
18 struct chacha_ctx *ctx = crypto_skcipher_ctx(tfm); in chacha_setkey()
31 static inline int chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha20_setkey() argument
34 return chacha_setkey(tfm, key, keysize, 20); in chacha20_setkey()
37 static inline int chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key, in chacha12_setkey() argument
40 return chacha_setkey(tfm, key, keysize, 12); in chacha12_setkey()
Drng.h29 static inline void *crypto_rng_ctx(struct crypto_rng *tfm) in crypto_rng_ctx() argument
31 return crypto_tfm_ctx(&tfm->base); in crypto_rng_ctx()
34 static inline void crypto_rng_set_entropy(struct crypto_rng *tfm, in crypto_rng_set_entropy() argument
37 crypto_rng_alg(tfm)->set_ent(tfm, data, len); in crypto_rng_set_entropy()
Dkpp.h27 static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm) in kpp_tfm_ctx() argument
29 return tfm->base.__crt_ctx; in kpp_tfm_ctx()
37 static inline const char *kpp_alg_name(struct crypto_kpp *tfm) in kpp_alg_name() argument
39 return crypto_kpp_tfm(tfm)->__crt_alg->cra_name; in kpp_alg_name()
Dhash.h130 int crypto_init_shash_ops_async(struct crypto_tfm *tfm);
132 static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) in crypto_ahash_ctx() argument
134 return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); in crypto_ahash_ctx()
143 static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, in crypto_ahash_set_reqsize() argument
146 tfm->reqsize = reqsize; in crypto_ahash_set_reqsize()
200 static inline void *crypto_shash_ctx(struct crypto_shash *tfm) in crypto_shash_ctx() argument
202 return crypto_tfm_ctx(&tfm->base); in crypto_shash_ctx()
234 static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm) in crypto_shash_ctx_aligned() argument
236 return crypto_tfm_ctx_aligned(&tfm->base); in crypto_shash_ctx_aligned()
239 static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm) in __crypto_shash_cast() argument
[all …]
Dgeniv.h24 int aead_init_geniv(struct crypto_aead *tfm);
25 void aead_exit_geniv(struct crypto_aead *tfm);
Dakcipher.h42 static inline void *akcipher_tfm_ctx(struct crypto_akcipher *tfm) in akcipher_tfm_ctx() argument
44 return tfm->base.__crt_ctx; in akcipher_tfm_ctx()
53 static inline const char *akcipher_alg_name(struct crypto_akcipher *tfm) in akcipher_alg_name() argument
55 return crypto_akcipher_tfm(tfm)->__crt_alg->cra_name; in akcipher_alg_name()
Dskcipher.h149 static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) in crypto_skcipher_ctx() argument
151 return crypto_tfm_ctx(&tfm->base); in crypto_skcipher_ctx()
194 struct crypto_skcipher *tfm) in crypto_skcipher_walksize() argument
196 return crypto_skcipher_alg_walksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_walksize()
204 skcipher_cipher_simple(struct crypto_skcipher *tfm) in skcipher_cipher_simple() argument
206 struct skcipher_ctx_simple *ctx = crypto_skcipher_ctx(tfm); in skcipher_cipher_simple()
Dblake2b.h72 static inline int crypto_blake2b_setkey(struct crypto_shash *tfm, in crypto_blake2b_setkey() argument
75 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2b_setkey()
88 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_init()
90 unsigned int outlen = crypto_shash_digestsize(desc->tfm); in crypto_blake2b_init()
Daead.h37 static inline void *crypto_aead_ctx(struct crypto_aead *tfm) in crypto_aead_ctx() argument
39 return crypto_tfm_ctx(&tfm->base); in crypto_aead_ctx()
158 static inline unsigned int crypto_aead_chunksize(struct crypto_aead *tfm) in crypto_aead_chunksize() argument
160 return crypto_aead_alg_chunksize(crypto_aead_alg(tfm)); in crypto_aead_chunksize()
/include/linux/
Dcrypto.h184 struct crypto_tfm *tfm; member
246 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
248 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
249 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
264 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
266 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
492 int (*cra_init)(struct crypto_tfm *tfm);
493 void (*cra_exit)(struct crypto_tfm *tfm);
641 void (*exit)(struct crypto_tfm *tfm);
657 void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm);
[all …]

12