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);
220 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
224 (typeof(tfm))1))) \
259 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
261 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
303 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
305 return &tfm->base; in crypto_skcipher_tfm()
309 struct crypto_lskcipher *tfm) in crypto_lskcipher_tfm() argument
311 return &tfm->base; in crypto_lskcipher_tfm()
320 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
322 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
325 static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) in crypto_free_sync_skcipher() argument
327 crypto_free_skcipher(&tfm->base); in crypto_free_sync_skcipher()
336 static inline void crypto_free_lskcipher(struct crypto_lskcipher *tfm) in crypto_free_lskcipher() argument
338 crypto_destroy_tfm(tfm, crypto_lskcipher_tfm(tfm)); in crypto_free_lskcipher()
354 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
356 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
360 struct crypto_lskcipher *tfm) in crypto_lskcipher_driver_name() argument
362 return crypto_tfm_alg_driver_name(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_driver_name()
366 struct crypto_skcipher *tfm) in crypto_skcipher_alg_common() argument
368 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg_common()
373 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
375 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
380 struct crypto_lskcipher *tfm) in crypto_lskcipher_alg() argument
382 return container_of(crypto_lskcipher_tfm(tfm)->__crt_alg, in crypto_lskcipher_alg()
395 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
397 return crypto_skcipher_alg_common(tfm)->ivsize; in crypto_skcipher_ivsize()
401 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_ivsize() argument
403 return crypto_skcipher_ivsize(&tfm->base); in crypto_sync_skcipher_ivsize()
416 struct crypto_lskcipher *tfm) in crypto_lskcipher_ivsize() argument
418 return crypto_lskcipher_alg(tfm)->co.ivsize; in crypto_lskcipher_ivsize()
432 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
434 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
448 struct crypto_lskcipher *tfm) in crypto_lskcipher_blocksize() argument
450 return crypto_tfm_alg_blocksize(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_blocksize()
465 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
467 return crypto_skcipher_alg_common(tfm)->chunksize; in crypto_skcipher_chunksize()
482 struct crypto_lskcipher *tfm) in crypto_lskcipher_chunksize() argument
484 return crypto_lskcipher_alg(tfm)->co.chunksize; in crypto_lskcipher_chunksize()
499 struct crypto_skcipher *tfm) in crypto_skcipher_statesize() argument
501 return crypto_skcipher_alg_common(tfm)->statesize; in crypto_skcipher_statesize()
516 struct crypto_lskcipher *tfm) in crypto_lskcipher_statesize() argument
518 return crypto_lskcipher_alg(tfm)->co.statesize; in crypto_lskcipher_statesize()
522 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_blocksize() argument
524 return crypto_skcipher_blocksize(&tfm->base); in crypto_sync_skcipher_blocksize()
528 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
530 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
534 struct crypto_lskcipher *tfm) in crypto_lskcipher_alignmask() argument
536 return crypto_tfm_alg_alignmask(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_alignmask()
539 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
541 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
544 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
547 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
550 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
553 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
557 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_get_flags() argument
559 return crypto_skcipher_get_flags(&tfm->base); in crypto_sync_skcipher_get_flags()
563 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_set_flags() argument
565 crypto_skcipher_set_flags(&tfm->base, flags); in crypto_sync_skcipher_set_flags()
569 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_clear_flags() argument
571 crypto_skcipher_clear_flags(&tfm->base, flags); in crypto_sync_skcipher_clear_flags()
574 static inline u32 crypto_lskcipher_get_flags(struct crypto_lskcipher *tfm) in crypto_lskcipher_get_flags() argument
576 return crypto_tfm_get_flags(crypto_lskcipher_tfm(tfm)); in crypto_lskcipher_get_flags()
579 static inline void crypto_lskcipher_set_flags(struct crypto_lskcipher *tfm, in crypto_lskcipher_set_flags() argument
582 crypto_tfm_set_flags(crypto_lskcipher_tfm(tfm), flags); in crypto_lskcipher_set_flags()
585 static inline void crypto_lskcipher_clear_flags(struct crypto_lskcipher *tfm, in crypto_lskcipher_clear_flags() argument
588 crypto_tfm_clear_flags(crypto_lskcipher_tfm(tfm), flags); in crypto_lskcipher_clear_flags()
607 int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
610 static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, in crypto_sync_skcipher_setkey() argument
613 return crypto_skcipher_setkey(&tfm->base, key, keylen); in crypto_sync_skcipher_setkey()
632 int crypto_lskcipher_setkey(struct crypto_lskcipher *tfm,
636 struct crypto_skcipher *tfm) in crypto_skcipher_min_keysize() argument
638 return crypto_skcipher_alg_common(tfm)->min_keysize; in crypto_skcipher_min_keysize()
642 struct crypto_skcipher *tfm) in crypto_skcipher_max_keysize() argument
644 return crypto_skcipher_alg_common(tfm)->max_keysize; in crypto_skcipher_max_keysize()
648 struct crypto_lskcipher *tfm) in crypto_lskcipher_min_keysize() argument
650 return crypto_lskcipher_alg(tfm)->co.min_keysize; in crypto_lskcipher_min_keysize()
654 struct crypto_lskcipher *tfm) in crypto_lskcipher_max_keysize() argument
656 return crypto_lskcipher_alg(tfm)->co.max_keysize; in crypto_lskcipher_max_keysize()
671 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
677 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_sync_skcipher_reqtfm() local
679 return container_of(tfm, struct crypto_sync_skcipher, base); in crypto_sync_skcipher_reqtfm()
757 int crypto_lskcipher_encrypt(struct crypto_lskcipher *tfm, const u8 *src,
777 int crypto_lskcipher_decrypt(struct crypto_lskcipher *tfm, const u8 *src,
797 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
799 return tfm->reqsize; in crypto_skcipher_reqsize()
811 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
813 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
817 struct crypto_sync_skcipher *tfm) in skcipher_request_set_sync_tfm() argument
819 skcipher_request_set_tfm(req, &tfm->base); in skcipher_request_set_sync_tfm()
840 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc_noprof() argument
845 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc_noprof()
848 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc_noprof()
865 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
867 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()