Lines Matching refs:tfm

145 	int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
147 int (*init_tfm)(struct crypto_ahash *tfm);
148 void (*exit_tfm)(struct crypto_ahash *tfm);
155 struct crypto_shash *tfm; member
211 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
213 int (*init_tfm)(struct crypto_shash *tfm);
214 void (*exit_tfm)(struct crypto_shash *tfm);
248 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
250 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
270 struct crypto_ahash *crypto_clone_ahash(struct crypto_ahash *tfm);
272 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument
274 return &tfm->base; in crypto_ahash_tfm()
283 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument
285 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
300 static inline const char *crypto_ahash_alg_name(struct crypto_ahash *tfm) in crypto_ahash_alg_name() argument
302 return crypto_tfm_alg_name(crypto_ahash_tfm(tfm)); in crypto_ahash_alg_name()
305 static inline const char *crypto_ahash_driver_name(struct crypto_ahash *tfm) in crypto_ahash_driver_name() argument
307 return crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm)); in crypto_ahash_driver_name()
319 static inline unsigned int crypto_ahash_blocksize(struct crypto_ahash *tfm) in crypto_ahash_blocksize() argument
321 return crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in crypto_ahash_blocksize()
331 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument
333 return __crypto_hash_alg_common(crypto_ahash_tfm(tfm)->__crt_alg); in crypto_hash_alg_common()
346 static inline unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm) in crypto_ahash_digestsize() argument
348 return crypto_hash_alg_common(tfm)->digestsize; in crypto_ahash_digestsize()
361 static inline unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm) in crypto_ahash_statesize() argument
363 return tfm->statesize; in crypto_ahash_statesize()
366 static inline u32 crypto_ahash_get_flags(struct crypto_ahash *tfm) in crypto_ahash_get_flags() argument
368 return crypto_tfm_get_flags(crypto_ahash_tfm(tfm)); in crypto_ahash_get_flags()
371 static inline void crypto_ahash_set_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_set_flags() argument
373 crypto_tfm_set_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_set_flags()
376 static inline void crypto_ahash_clear_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_clear_flags() argument
378 crypto_tfm_clear_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_clear_flags()
394 return __crypto_ahash_cast(req->base.tfm); in crypto_ahash_reqtfm()
403 static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm) in crypto_ahash_reqsize() argument
405 return tfm->reqsize; in crypto_ahash_reqsize()
424 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
542 struct crypto_ahash *tfm) in ahash_request_set_tfm() argument
544 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
560 struct crypto_ahash *tfm, gfp_t gfp) in ahash_request_alloc_noprof() argument
565 crypto_ahash_reqsize(tfm), gfp); in ahash_request_alloc_noprof()
568 ahash_request_set_tfm(req, tfm); in ahash_request_alloc_noprof()
682 struct crypto_shash *crypto_clone_shash(struct crypto_shash *tfm);
686 static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) in crypto_shash_tfm() argument
688 return &tfm->base; in crypto_shash_tfm()
697 static inline void crypto_free_shash(struct crypto_shash *tfm) in crypto_free_shash() argument
699 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
702 static inline const char *crypto_shash_alg_name(struct crypto_shash *tfm) in crypto_shash_alg_name() argument
704 return crypto_tfm_alg_name(crypto_shash_tfm(tfm)); in crypto_shash_alg_name()
707 static inline const char *crypto_shash_driver_name(struct crypto_shash *tfm) in crypto_shash_driver_name() argument
709 return crypto_tfm_alg_driver_name(crypto_shash_tfm(tfm)); in crypto_shash_driver_name()
721 static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) in crypto_shash_blocksize() argument
723 return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); in crypto_shash_blocksize()
731 static inline struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm) in crypto_shash_alg() argument
733 return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg); in crypto_shash_alg()
745 static inline unsigned int crypto_shash_digestsize(struct crypto_shash *tfm) in crypto_shash_digestsize() argument
747 return crypto_shash_alg(tfm)->digestsize; in crypto_shash_digestsize()
750 static inline unsigned int crypto_shash_statesize(struct crypto_shash *tfm) in crypto_shash_statesize() argument
752 return crypto_shash_alg(tfm)->statesize; in crypto_shash_statesize()
755 static inline u32 crypto_shash_get_flags(struct crypto_shash *tfm) in crypto_shash_get_flags() argument
757 return crypto_tfm_get_flags(crypto_shash_tfm(tfm)); in crypto_shash_get_flags()
760 static inline void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_set_flags() argument
762 crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_set_flags()
765 static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_clear_flags() argument
767 crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_clear_flags()
785 static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) in crypto_shash_descsize() argument
787 return tfm->descsize; in crypto_shash_descsize()
808 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,
845 int crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data,
890 struct crypto_shash *tfm = desc->tfm; in crypto_shash_init() local
892 if (crypto_shash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) in crypto_shash_init()
895 return crypto_shash_alg(tfm)->init(desc); in crypto_shash_init()
950 sizeof(*desc) + crypto_shash_descsize(desc->tfm)); in shash_desc_zero()