Home
last modified time | relevance | path

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

12

/include/crypto/
Dskcipher.h38 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
112 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
116 int (*init)(struct crypto_skcipher *tfm);
117 void (*exit)(struct crypto_skcipher *tfm);
133 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
137 (typeof(tfm))1))) \
172 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
174 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
198 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
200 return &tfm->base; in crypto_skcipher_tfm()
[all …]
Daead.h131 int (*setkey)(struct crypto_aead *tfm, const u8 *key,
133 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
136 int (*init)(struct crypto_aead *tfm);
137 void (*exit)(struct crypto_aead *tfm);
153 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) in __crypto_aead_cast() argument
155 return container_of(tfm, struct crypto_aead, base); in __crypto_aead_cast()
174 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) in crypto_aead_tfm() argument
176 return &tfm->base; in crypto_aead_tfm()
185 static inline void crypto_free_aead(struct crypto_aead *tfm) in crypto_free_aead() argument
187 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm)); in crypto_free_aead()
[all …]
Dhash.h136 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
143 struct crypto_shash *tfm; member
190 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
211 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
233 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
235 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
255 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument
257 return &tfm->base; in crypto_ahash_tfm()
266 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument
268 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
[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);
110 static inline struct crypto_tfm *crypto_acomp_tfm(struct crypto_acomp *tfm) in crypto_acomp_tfm() argument
112 return &tfm->base; in crypto_acomp_tfm()
120 static inline struct crypto_acomp *__crypto_acomp_tfm(struct crypto_tfm *tfm) in __crypto_acomp_tfm() argument
122 return container_of(tfm, struct crypto_acomp, base); in __crypto_acomp_tfm()
125 static inline struct acomp_alg *crypto_acomp_alg(struct crypto_acomp *tfm) in crypto_acomp_alg() argument
127 return __crypto_acomp_alg(crypto_acomp_tfm(tfm)->__crt_alg); in crypto_acomp_alg()
130 static inline unsigned int crypto_acomp_reqsize(struct crypto_acomp *tfm) in crypto_acomp_reqsize() argument
132 return tfm->reqsize; in crypto_acomp_reqsize()
[all …]
Dcbc.h16 struct skcipher_walk *walk, struct crypto_skcipher *tfm, in crypto_cbc_encrypt_segment() argument
19 unsigned int bsize = crypto_skcipher_blocksize(tfm); in crypto_cbc_encrypt_segment()
27 fn(tfm, iv, dst); in crypto_cbc_encrypt_segment()
38 struct skcipher_walk *walk, struct crypto_skcipher *tfm, in crypto_cbc_encrypt_inplace() argument
41 unsigned int bsize = crypto_skcipher_blocksize(tfm); in crypto_cbc_encrypt_inplace()
48 fn(tfm, src, src); in crypto_cbc_encrypt_inplace()
63 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_cbc_encrypt_walk() local
71 err = crypto_cbc_encrypt_inplace(&walk, tfm, fn); in crypto_cbc_encrypt_walk()
73 err = crypto_cbc_encrypt_segment(&walk, tfm, fn); in crypto_cbc_encrypt_walk()
81 struct skcipher_walk *walk, struct crypto_skcipher *tfm, in crypto_cbc_decrypt_segment() argument
[all …]
Dxts.h11 static inline int xts_check_key(struct crypto_tfm *tfm, in xts_check_key() argument
14 u32 *flags = &tfm->crt_flags; in xts_check_key()
35 static inline int xts_verify_key(struct crypto_skcipher *tfm, in xts_verify_key() argument
43 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN); in xts_verify_key()
48 if ((fips_enabled || (crypto_skcipher_get_flags(tfm) & in xts_verify_key()
51 crypto_skcipher_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in xts_verify_key()
Dalgapi.h34 int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask);
35 int (*init_tfm)(struct crypto_tfm *tfm);
247 struct crypto_aead *tfm,
256 static inline void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm) in crypto_tfm_ctx_aligned() argument
258 return PTR_ALIGN(crypto_tfm_ctx(tfm), in crypto_tfm_ctx_aligned()
259 crypto_tfm_alg_alignmask(tfm) + 1); in crypto_tfm_ctx_aligned()
263 struct crypto_tfm *tfm) in crypto_tfm_alg_instance() argument
265 return container_of(tfm->__crt_alg, struct crypto_instance, alg); in crypto_tfm_alg_instance()
274 struct crypto_ablkcipher *tfm) in crypto_ablkcipher_alg() argument
276 return &crypto_ablkcipher_tfm(tfm)->__crt_alg->cra_ablkcipher; in crypto_ablkcipher_alg()
[all …]
Dsm4.h23 int crypto_sm4_set_key(struct crypto_tfm *tfm, const u8 *in_key,
28 void crypto_sm4_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in);
29 void crypto_sm4_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in);
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()
Dchacha.h46 int crypto_chacha20_setkey(struct crypto_skcipher *tfm, const u8 *key,
48 int crypto_chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key,
/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 …]
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()
40 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in crypto_des_verify_key()
95 static inline int crypto_des3_ede_verify_key(struct crypto_tfm *tfm, in crypto_des3_ede_verify_key() argument
101 crypto_tfm_get_flags(tfm) & in crypto_des3_ede_verify_key()
104 crypto_tfm_set_flags(tfm, CRYPTO_TFM_RES_WEAK_KEY); in crypto_des3_ede_verify_key()
108 static inline int verify_skcipher_des_key(struct crypto_skcipher *tfm, in verify_skcipher_des_key() argument
111 return crypto_des_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des_key()
114 static inline int verify_skcipher_des3_key(struct crypto_skcipher *tfm, in verify_skcipher_des3_key() argument
117 return crypto_des3_ede_verify_key(crypto_skcipher_tfm(tfm), key); in verify_skcipher_des3_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()
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.h21 static inline void *kpp_tfm_ctx(struct crypto_kpp *tfm) in kpp_tfm_ctx() argument
23 return tfm->base.__crt_ctx; in kpp_tfm_ctx()
31 static inline const char *kpp_alg_name(struct crypto_kpp *tfm) in kpp_alg_name() argument
33 return crypto_kpp_tfm(tfm)->__crt_alg->cra_name; in kpp_alg_name()
Dhash.h118 int crypto_init_shash_ops_async(struct crypto_tfm *tfm);
120 static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm) in crypto_ahash_ctx() argument
122 return crypto_tfm_ctx(crypto_ahash_tfm(tfm)); in crypto_ahash_ctx()
131 static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm, in crypto_ahash_set_reqsize() argument
134 tfm->reqsize = reqsize; in crypto_ahash_set_reqsize()
193 static inline void *crypto_shash_ctx(struct crypto_shash *tfm) in crypto_shash_ctx() argument
195 return crypto_tfm_ctx(&tfm->base); in crypto_shash_ctx()
229 static inline void *crypto_shash_ctx_aligned(struct crypto_shash *tfm) in crypto_shash_ctx_aligned() argument
231 return crypto_tfm_ctx_aligned(&tfm->base); in crypto_shash_ctx_aligned()
234 static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm) in __crypto_shash_cast() argument
[all …]
Dgeniv.h25 int aead_init_geniv(struct crypto_aead *tfm);
26 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.h167 static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) in crypto_skcipher_ctx() argument
169 return crypto_tfm_ctx(&tfm->base); in crypto_skcipher_ctx()
233 struct crypto_skcipher *tfm) in crypto_skcipher_walksize() argument
235 return crypto_skcipher_alg_walksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_walksize()
243 skcipher_cipher_simple(struct crypto_skcipher *tfm) in skcipher_cipher_simple() argument
245 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()
/include/linux/
Dcrypto.h161 struct crypto_tfm *tfm; member
180 struct crypto_blkcipher *tfm; member
233 int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key,
255 int (*setkey)(struct crypto_tfm *tfm, const u8 *key,
319 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
321 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
322 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
337 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
339 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
574 int (*cra_init)(struct crypto_tfm *tfm);
[all …]

12