Lines Matching refs:tfm
152 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
158 int (*init)(struct crypto_skcipher *tfm);
159 void (*exit)(struct crypto_skcipher *tfm);
203 int (*setkey)(struct crypto_lskcipher *tfm, const u8 *key,
205 int (*encrypt)(struct crypto_lskcipher *tfm, const u8 *src,
207 int (*decrypt)(struct crypto_lskcipher *tfm, const u8 *src,
209 int (*init)(struct crypto_lskcipher *tfm);
210 void (*exit)(struct crypto_lskcipher *tfm);
225 (((struct skcipher_request *)__##name##_desc)->base.tfm = \
260 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
262 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
304 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
306 return &tfm->base; in crypto_skcipher_tfm()
310 struct crypto_lskcipher *tfm) in crypto_lskcipher_tfm() argument
312 return &tfm->base; in crypto_lskcipher_tfm()
316 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_tfm() argument
318 return crypto_skcipher_tfm(&tfm->base); in crypto_sync_skcipher_tfm()
327 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
329 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
332 static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) in crypto_free_sync_skcipher() argument
334 crypto_free_skcipher(&tfm->base); in crypto_free_sync_skcipher()
343 static inline void crypto_free_lskcipher(struct crypto_lskcipher *tfm) in crypto_free_lskcipher() argument
345 crypto_destroy_tfm(tfm, crypto_lskcipher_tfm(tfm)); in crypto_free_lskcipher()
361 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
363 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
367 struct crypto_lskcipher *tfm) in crypto_lskcipher_driver_name() argument
369 return crypto_tfm_alg_driver_name(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_driver_name()
373 struct crypto_skcipher *tfm) in crypto_skcipher_alg_common() argument
375 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg_common()
380 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
382 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
387 struct crypto_lskcipher *tfm) in crypto_lskcipher_alg() argument
389 return container_of(crypto_lskcipher_tfm(tfm)->__crt_alg, in crypto_lskcipher_alg()
402 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
404 return crypto_skcipher_alg_common(tfm)->ivsize; in crypto_skcipher_ivsize()
408 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_ivsize() argument
410 return crypto_skcipher_ivsize(&tfm->base); in crypto_sync_skcipher_ivsize()
423 struct crypto_lskcipher *tfm) in crypto_lskcipher_ivsize() argument
425 return crypto_lskcipher_alg(tfm)->co.ivsize; in crypto_lskcipher_ivsize()
439 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
441 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
455 struct crypto_lskcipher *tfm) in crypto_lskcipher_blocksize() argument
457 return crypto_tfm_alg_blocksize(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_blocksize()
472 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
474 return crypto_skcipher_alg_common(tfm)->chunksize; in crypto_skcipher_chunksize()
489 struct crypto_lskcipher *tfm) in crypto_lskcipher_chunksize() argument
491 return crypto_lskcipher_alg(tfm)->co.chunksize; in crypto_lskcipher_chunksize()
506 struct crypto_skcipher *tfm) in crypto_skcipher_statesize() argument
508 return crypto_skcipher_alg_common(tfm)->statesize; in crypto_skcipher_statesize()
523 struct crypto_lskcipher *tfm) in crypto_lskcipher_statesize() argument
525 return crypto_lskcipher_alg(tfm)->co.statesize; in crypto_lskcipher_statesize()
529 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_blocksize() argument
531 return crypto_skcipher_blocksize(&tfm->base); in crypto_sync_skcipher_blocksize()
535 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
537 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
541 struct crypto_lskcipher *tfm) in crypto_lskcipher_alignmask() argument
543 return crypto_tfm_alg_alignmask(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_alignmask()
546 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
548 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
551 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
554 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
557 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
560 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
564 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_get_flags() argument
566 return crypto_skcipher_get_flags(&tfm->base); in crypto_sync_skcipher_get_flags()
570 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_set_flags() argument
572 crypto_skcipher_set_flags(&tfm->base, flags); in crypto_sync_skcipher_set_flags()
576 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_clear_flags() argument
578 crypto_skcipher_clear_flags(&tfm->base, flags); in crypto_sync_skcipher_clear_flags()
581 static inline u32 crypto_lskcipher_get_flags(struct crypto_lskcipher *tfm) in crypto_lskcipher_get_flags() argument
583 return crypto_tfm_get_flags(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_get_flags()
586 static inline void crypto_lskcipher_set_flags(struct crypto_lskcipher *tfm, in crypto_lskcipher_set_flags() argument
589 crypto_tfm_set_flags(crypto_lskcipher_tfm(tfm), flags); in crypto_lskcipher_set_flags()
592 static inline void crypto_lskcipher_clear_flags(struct crypto_lskcipher *tfm, in crypto_lskcipher_clear_flags() argument
595 crypto_tfm_clear_flags(crypto_lskcipher_tfm(tfm), flags); in crypto_lskcipher_clear_flags()
614 int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
617 static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, in crypto_sync_skcipher_setkey() argument
620 return crypto_skcipher_setkey(&tfm->base, key, keylen); in crypto_sync_skcipher_setkey()
639 int crypto_lskcipher_setkey(struct crypto_lskcipher *tfm,
643 struct crypto_skcipher *tfm) in crypto_skcipher_min_keysize() argument
645 return crypto_skcipher_alg_common(tfm)->min_keysize; in crypto_skcipher_min_keysize()
649 struct crypto_skcipher *tfm) in crypto_skcipher_max_keysize() argument
651 return crypto_skcipher_alg_common(tfm)->max_keysize; in crypto_skcipher_max_keysize()
655 struct crypto_lskcipher *tfm) in crypto_lskcipher_min_keysize() argument
657 return crypto_lskcipher_alg(tfm)->co.min_keysize; in crypto_lskcipher_min_keysize()
661 struct crypto_lskcipher *tfm) in crypto_lskcipher_max_keysize() argument
663 return crypto_lskcipher_alg(tfm)->co.max_keysize; in crypto_lskcipher_max_keysize()
678 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
684 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_sync_skcipher_reqtfm() local
686 return container_of(tfm, struct crypto_sync_skcipher, base); in crypto_sync_skcipher_reqtfm()
764 int crypto_lskcipher_encrypt(struct crypto_lskcipher *tfm, const u8 *src,
784 int crypto_lskcipher_decrypt(struct crypto_lskcipher *tfm, const u8 *src,
804 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
806 return tfm->reqsize; in crypto_skcipher_reqsize()
818 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
820 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
824 struct crypto_sync_skcipher *tfm) in skcipher_request_set_sync_tfm() argument
826 skcipher_request_set_tfm(req, &tfm->base); in skcipher_request_set_sync_tfm()
847 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc_noprof() argument
852 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc_noprof()
855 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc_noprof()
872 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
874 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()