Lines Matching refs:tfm

127 	int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
131 int (*init)(struct crypto_skcipher *tfm);
132 void (*exit)(struct crypto_skcipher *tfm);
152 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
156 (typeof(tfm))1))) \
191 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
193 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
217 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
219 return &tfm->base; in crypto_skcipher_tfm()
228 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
230 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
233 static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) in crypto_free_sync_skcipher() argument
235 crypto_free_skcipher(&tfm->base); in crypto_free_sync_skcipher()
251 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
253 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
257 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
259 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
277 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
279 return crypto_skcipher_alg(tfm)->ivsize; in crypto_skcipher_ivsize()
283 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_ivsize() argument
285 return crypto_skcipher_ivsize(&tfm->base); in crypto_sync_skcipher_ivsize()
299 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
301 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
322 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
324 return crypto_skcipher_alg_chunksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_chunksize()
328 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_blocksize() argument
330 return crypto_skcipher_blocksize(&tfm->base); in crypto_sync_skcipher_blocksize()
334 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
336 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
339 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
341 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
344 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
347 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
350 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
353 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
357 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_get_flags() argument
359 return crypto_skcipher_get_flags(&tfm->base); in crypto_sync_skcipher_get_flags()
363 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_set_flags() argument
365 crypto_skcipher_set_flags(&tfm->base, flags); in crypto_sync_skcipher_set_flags()
369 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_clear_flags() argument
371 crypto_skcipher_clear_flags(&tfm->base, flags); in crypto_sync_skcipher_clear_flags()
390 int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
393 static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, in crypto_sync_skcipher_setkey() argument
396 return crypto_skcipher_setkey(&tfm->base, key, keylen); in crypto_sync_skcipher_setkey()
400 struct crypto_skcipher *tfm) in crypto_skcipher_min_keysize() argument
402 return crypto_skcipher_alg(tfm)->min_keysize; in crypto_skcipher_min_keysize()
406 struct crypto_skcipher *tfm) in crypto_skcipher_max_keysize() argument
408 return crypto_skcipher_alg(tfm)->max_keysize; in crypto_skcipher_max_keysize()
423 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
429 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_sync_skcipher_reqtfm() local
431 return container_of(tfm, struct crypto_sync_skcipher, base); in crypto_sync_skcipher_reqtfm()
477 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
479 return tfm->reqsize; in crypto_skcipher_reqsize()
491 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
493 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
497 struct crypto_sync_skcipher *tfm) in skcipher_request_set_sync_tfm() argument
499 skcipher_request_set_tfm(req, &tfm->base); in skcipher_request_set_sync_tfm()
520 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc() argument
525 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc()
528 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()
544 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
546 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()