Lines Matching refs:tfm

105 	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()
200 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
202 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
205 static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) in crypto_free_sync_skcipher() argument
207 crypto_free_skcipher(&tfm->base); in crypto_free_sync_skcipher()
223 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
225 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
229 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
231 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
249 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
251 return crypto_skcipher_alg(tfm)->ivsize; in crypto_skcipher_ivsize()
255 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_ivsize() argument
257 return crypto_skcipher_ivsize(&tfm->base); in crypto_sync_skcipher_ivsize()
271 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
273 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
294 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
296 return crypto_skcipher_alg_chunksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_chunksize()
300 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_blocksize() argument
302 return crypto_skcipher_blocksize(&tfm->base); in crypto_sync_skcipher_blocksize()
306 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
308 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
311 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
313 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
316 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
319 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
322 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
325 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
329 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_get_flags() argument
331 return crypto_skcipher_get_flags(&tfm->base); in crypto_sync_skcipher_get_flags()
335 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_set_flags() argument
337 crypto_skcipher_set_flags(&tfm->base, flags); in crypto_sync_skcipher_set_flags()
341 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_clear_flags() argument
343 crypto_skcipher_clear_flags(&tfm->base, flags); in crypto_sync_skcipher_clear_flags()
362 int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
365 static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, in crypto_sync_skcipher_setkey() argument
368 return crypto_skcipher_setkey(&tfm->base, key, keylen); in crypto_sync_skcipher_setkey()
372 struct crypto_skcipher *tfm) in crypto_skcipher_min_keysize() argument
374 return crypto_skcipher_alg(tfm)->min_keysize; in crypto_skcipher_min_keysize()
378 struct crypto_skcipher *tfm) in crypto_skcipher_max_keysize() argument
380 return crypto_skcipher_alg(tfm)->max_keysize; in crypto_skcipher_max_keysize()
395 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
401 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_sync_skcipher_reqtfm() local
403 return container_of(tfm, struct crypto_sync_skcipher, base); in crypto_sync_skcipher_reqtfm()
449 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
451 return tfm->reqsize; in crypto_skcipher_reqsize()
463 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
465 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
469 struct crypto_sync_skcipher *tfm) in skcipher_request_set_sync_tfm() argument
471 skcipher_request_set_tfm(req, &tfm->base); in skcipher_request_set_sync_tfm()
492 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc() argument
497 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc()
500 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()
516 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
518 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()