Lines Matching refs:tfm
150 int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
152 int (*init_tfm)(struct crypto_ahash *tfm);
153 void (*exit_tfm)(struct crypto_ahash *tfm);
162 struct crypto_shash *tfm; member
218 int (*setkey)(struct crypto_shash *tfm, const u8 *key,
220 int (*init_tfm)(struct crypto_shash *tfm);
221 void (*exit_tfm)(struct crypto_shash *tfm);
255 static inline struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) in __crypto_ahash_cast() argument
257 return container_of(tfm, struct crypto_ahash, base); in __crypto_ahash_cast()
277 struct crypto_ahash *crypto_clone_ahash(struct crypto_ahash *tfm);
279 static inline struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) in crypto_ahash_tfm() argument
281 return &tfm->base; in crypto_ahash_tfm()
290 static inline void crypto_free_ahash(struct crypto_ahash *tfm) in crypto_free_ahash() argument
292 crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); in crypto_free_ahash()
307 static inline const char *crypto_ahash_alg_name(struct crypto_ahash *tfm) in crypto_ahash_alg_name() argument
309 return crypto_tfm_alg_name(crypto_ahash_tfm(tfm)); in crypto_ahash_alg_name()
312 static inline const char *crypto_ahash_driver_name(struct crypto_ahash *tfm) in crypto_ahash_driver_name() argument
314 return crypto_tfm_alg_driver_name(crypto_ahash_tfm(tfm)); in crypto_ahash_driver_name()
326 static inline unsigned int crypto_ahash_blocksize(struct crypto_ahash *tfm) in crypto_ahash_blocksize() argument
328 return crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); in crypto_ahash_blocksize()
338 struct crypto_ahash *tfm) in crypto_hash_alg_common() argument
340 return __crypto_hash_alg_common(crypto_ahash_tfm(tfm)->__crt_alg); in crypto_hash_alg_common()
353 static inline unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm) in crypto_ahash_digestsize() argument
355 return crypto_hash_alg_common(tfm)->digestsize; in crypto_ahash_digestsize()
368 static inline unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm) in crypto_ahash_statesize() argument
370 return tfm->statesize; in crypto_ahash_statesize()
373 static inline u32 crypto_ahash_get_flags(struct crypto_ahash *tfm) in crypto_ahash_get_flags() argument
375 return crypto_tfm_get_flags(crypto_ahash_tfm(tfm)); in crypto_ahash_get_flags()
378 static inline void crypto_ahash_set_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_set_flags() argument
380 crypto_tfm_set_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_set_flags()
383 static inline void crypto_ahash_clear_flags(struct crypto_ahash *tfm, u32 flags) in crypto_ahash_clear_flags() argument
385 crypto_tfm_clear_flags(crypto_ahash_tfm(tfm), flags); in crypto_ahash_clear_flags()
401 return __crypto_ahash_cast(req->base.tfm); in crypto_ahash_reqtfm()
410 static inline unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm) in crypto_ahash_reqsize() argument
412 return tfm->reqsize; in crypto_ahash_reqsize()
431 int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key,
549 struct crypto_ahash *tfm) in ahash_request_set_tfm() argument
551 req->base.tfm = crypto_ahash_tfm(tfm); in ahash_request_set_tfm()
567 struct crypto_ahash *tfm, gfp_t gfp) in ahash_request_alloc_noprof() argument
572 crypto_ahash_reqsize(tfm), gfp); in ahash_request_alloc_noprof()
575 ahash_request_set_tfm(req, tfm); in ahash_request_alloc_noprof()
718 struct crypto_shash *crypto_clone_shash(struct crypto_shash *tfm);
722 static inline struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) in crypto_shash_tfm() argument
724 return &tfm->base; in crypto_shash_tfm()
733 static inline void crypto_free_shash(struct crypto_shash *tfm) in crypto_free_shash() argument
735 crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); in crypto_free_shash()
738 static inline const char *crypto_shash_alg_name(struct crypto_shash *tfm) in crypto_shash_alg_name() argument
740 return crypto_tfm_alg_name(crypto_shash_tfm(tfm)); in crypto_shash_alg_name()
743 static inline const char *crypto_shash_driver_name(struct crypto_shash *tfm) in crypto_shash_driver_name() argument
745 return crypto_tfm_alg_driver_name(crypto_shash_tfm(tfm)); in crypto_shash_driver_name()
757 static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) in crypto_shash_blocksize() argument
759 return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); in crypto_shash_blocksize()
767 static inline struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm) in crypto_shash_alg() argument
769 return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg); in crypto_shash_alg()
781 static inline unsigned int crypto_shash_digestsize(struct crypto_shash *tfm) in crypto_shash_digestsize() argument
783 return crypto_shash_alg(tfm)->digestsize; in crypto_shash_digestsize()
786 static inline unsigned int crypto_shash_statesize(struct crypto_shash *tfm) in crypto_shash_statesize() argument
788 return crypto_shash_alg(tfm)->statesize; in crypto_shash_statesize()
791 static inline u32 crypto_shash_get_flags(struct crypto_shash *tfm) in crypto_shash_get_flags() argument
793 return crypto_tfm_get_flags(crypto_shash_tfm(tfm)); in crypto_shash_get_flags()
796 static inline void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_set_flags() argument
798 crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_set_flags()
801 static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) in crypto_shash_clear_flags() argument
803 crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags); in crypto_shash_clear_flags()
821 static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm) in crypto_shash_descsize() argument
823 return tfm->descsize; in crypto_shash_descsize()
844 int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key,
881 int crypto_shash_tfm_digest(struct crypto_shash *tfm, const u8 *data,
926 struct crypto_shash *tfm = desc->tfm; in crypto_shash_init() local
928 if (crypto_shash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) in crypto_shash_init()
931 return crypto_shash_alg(tfm)->init(desc); in crypto_shash_init()
986 sizeof(*desc) + crypto_shash_descsize(desc->tfm)); in shash_desc_zero()
994 static inline bool ahash_is_async(struct crypto_ahash *tfm) in ahash_is_async() argument
996 return crypto_tfm_is_async(&tfm->base); in ahash_is_async()