Lines Matching refs:tfm

72 	int (*set_secret)(struct crypto_kpp *tfm, const void *buffer,
77 unsigned int (*max_size)(struct crypto_kpp *tfm);
79 int (*init)(struct crypto_kpp *tfm);
80 void (*exit)(struct crypto_kpp *tfm);
107 static inline struct crypto_tfm *crypto_kpp_tfm(struct crypto_kpp *tfm) in crypto_kpp_tfm() argument
109 return &tfm->base; in crypto_kpp_tfm()
117 static inline struct crypto_kpp *__crypto_kpp_tfm(struct crypto_tfm *tfm) in __crypto_kpp_tfm() argument
119 return container_of(tfm, struct crypto_kpp, base); in __crypto_kpp_tfm()
122 static inline struct kpp_alg *crypto_kpp_alg(struct crypto_kpp *tfm) in crypto_kpp_alg() argument
124 return __crypto_kpp_alg(crypto_kpp_tfm(tfm)->__crt_alg); in crypto_kpp_alg()
127 static inline unsigned int crypto_kpp_reqsize(struct crypto_kpp *tfm) in crypto_kpp_reqsize() argument
129 return crypto_kpp_alg(tfm)->reqsize; in crypto_kpp_reqsize()
133 struct crypto_kpp *tfm) in kpp_request_set_tfm() argument
135 req->base.tfm = crypto_kpp_tfm(tfm); in kpp_request_set_tfm()
140 return __crypto_kpp_tfm(req->base.tfm); in crypto_kpp_reqtfm()
143 static inline u32 crypto_kpp_get_flags(struct crypto_kpp *tfm) in crypto_kpp_get_flags() argument
145 return crypto_tfm_get_flags(crypto_kpp_tfm(tfm)); in crypto_kpp_get_flags()
148 static inline void crypto_kpp_set_flags(struct crypto_kpp *tfm, u32 flags) in crypto_kpp_set_flags() argument
150 crypto_tfm_set_flags(crypto_kpp_tfm(tfm), flags); in crypto_kpp_set_flags()
160 static inline void crypto_free_kpp(struct crypto_kpp *tfm) in crypto_free_kpp() argument
162 crypto_destroy_tfm(tfm, crypto_kpp_tfm(tfm)); in crypto_free_kpp()
173 static inline struct kpp_request *kpp_request_alloc(struct crypto_kpp *tfm, in kpp_request_alloc() argument
178 req = kmalloc(sizeof(*req) + crypto_kpp_reqsize(tfm), gfp); in kpp_request_alloc()
180 kpp_request_set_tfm(req, tfm); in kpp_request_alloc()
283 static inline int crypto_kpp_set_secret(struct crypto_kpp *tfm, in crypto_kpp_set_secret() argument
286 struct kpp_alg *alg = crypto_kpp_alg(tfm); in crypto_kpp_set_secret()
287 struct crypto_alg *calg = tfm->base.__crt_alg; in crypto_kpp_set_secret()
291 ret = alg->set_secret(tfm, buffer, len); in crypto_kpp_set_secret()
311 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); in crypto_kpp_generate_public_key() local
312 struct kpp_alg *alg = crypto_kpp_alg(tfm); in crypto_kpp_generate_public_key()
313 struct crypto_alg *calg = tfm->base.__crt_alg; in crypto_kpp_generate_public_key()
334 struct crypto_kpp *tfm = crypto_kpp_reqtfm(req); in crypto_kpp_compute_shared_secret() local
335 struct kpp_alg *alg = crypto_kpp_alg(tfm); in crypto_kpp_compute_shared_secret()
336 struct crypto_alg *calg = tfm->base.__crt_alg; in crypto_kpp_compute_shared_secret()
355 static inline unsigned int crypto_kpp_maxsize(struct crypto_kpp *tfm) in crypto_kpp_maxsize() argument
357 struct kpp_alg *alg = crypto_kpp_alg(tfm); in crypto_kpp_maxsize()
359 return alg->max_size(tfm); in crypto_kpp_maxsize()