Lines Matching refs:tfm

56 	int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
69 #define SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
71 crypto_skcipher_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \
97 struct skcipher_givcrypt_request *req, struct crypto_ablkcipher *tfm) in skcipher_givcrypt_set_tfm() argument
99 req->creq.base.tfm = crypto_ablkcipher_tfm(tfm); in skcipher_givcrypt_set_tfm()
110 struct crypto_ablkcipher *tfm, gfp_t gfp) in skcipher_givcrypt_alloc() argument
115 crypto_ablkcipher_reqsize(tfm), gfp); in skcipher_givcrypt_alloc()
118 skcipher_givcrypt_set_tfm(req, tfm); in skcipher_givcrypt_alloc()
181 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
183 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
204 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
206 return &tfm->base; in crypto_skcipher_tfm()
213 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
215 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
244 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
246 return tfm->ivsize; in crypto_skcipher_ivsize()
260 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
262 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
266 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
268 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
271 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
273 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
276 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
279 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
282 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
285 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
304 static inline int crypto_skcipher_setkey(struct crypto_skcipher *tfm, in crypto_skcipher_setkey() argument
307 return tfm->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
310 static inline bool crypto_skcipher_has_setkey(struct crypto_skcipher *tfm) in crypto_skcipher_has_setkey() argument
312 return tfm->has_setkey; in crypto_skcipher_has_setkey()
327 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
343 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_encrypt() local
345 return tfm->encrypt(req); in crypto_skcipher_encrypt()
361 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_decrypt() local
363 return tfm->decrypt(req); in crypto_skcipher_decrypt()
383 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
385 return tfm->reqsize; in crypto_skcipher_reqsize()
397 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
399 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
421 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc() argument
426 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc()
429 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()