Lines Matching refs:tfm
105 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
109 int (*init)(struct crypto_skcipher *tfm);
110 void (*exit)(struct crypto_skcipher *tfm);
126 #define SYNC_SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
130 (typeof(tfm))1))) \
165 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
167 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
191 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
193 return &tfm->base; in crypto_skcipher_tfm()
202 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
204 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
207 static inline void crypto_free_sync_skcipher(struct crypto_sync_skcipher *tfm) in crypto_free_sync_skcipher() argument
209 crypto_free_skcipher(&tfm->base); in crypto_free_sync_skcipher()
225 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
227 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
231 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
233 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
251 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
253 return crypto_skcipher_alg(tfm)->ivsize; in crypto_skcipher_ivsize()
257 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_ivsize() argument
259 return crypto_skcipher_ivsize(&tfm->base); in crypto_sync_skcipher_ivsize()
273 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
275 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
296 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
298 return crypto_skcipher_alg_chunksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_chunksize()
302 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_blocksize() argument
304 return crypto_skcipher_blocksize(&tfm->base); in crypto_sync_skcipher_blocksize()
308 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
310 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
313 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
315 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
318 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
321 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
324 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
327 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
331 struct crypto_sync_skcipher *tfm) in crypto_sync_skcipher_get_flags() argument
333 return crypto_skcipher_get_flags(&tfm->base); in crypto_sync_skcipher_get_flags()
337 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_set_flags() argument
339 crypto_skcipher_set_flags(&tfm->base, flags); in crypto_sync_skcipher_set_flags()
343 struct crypto_sync_skcipher *tfm, u32 flags) in crypto_sync_skcipher_clear_flags() argument
345 crypto_skcipher_clear_flags(&tfm->base, flags); in crypto_sync_skcipher_clear_flags()
364 int crypto_skcipher_setkey(struct crypto_skcipher *tfm,
367 static inline int crypto_sync_skcipher_setkey(struct crypto_sync_skcipher *tfm, in crypto_sync_skcipher_setkey() argument
370 return crypto_skcipher_setkey(&tfm->base, key, keylen); in crypto_sync_skcipher_setkey()
374 struct crypto_skcipher *tfm) in crypto_skcipher_min_keysize() argument
376 return crypto_skcipher_alg(tfm)->min_keysize; in crypto_skcipher_min_keysize()
380 struct crypto_skcipher *tfm) in crypto_skcipher_max_keysize() argument
382 return crypto_skcipher_alg(tfm)->max_keysize; in crypto_skcipher_max_keysize()
397 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
403 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_sync_skcipher_reqtfm() local
405 return container_of(tfm, struct crypto_sync_skcipher, base); in crypto_sync_skcipher_reqtfm()
451 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
453 return tfm->reqsize; in crypto_skcipher_reqsize()
465 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
467 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
471 struct crypto_sync_skcipher *tfm) in skcipher_request_set_sync_tfm() argument
473 skcipher_request_set_tfm(req, &tfm->base); in skcipher_request_set_sync_tfm()
494 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc() argument
499 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc()
502 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()
518 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
520 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()