Lines Matching refs:tfm

56 	int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
126 int (*setkey)(struct crypto_skcipher *tfm, const u8 *key,
130 int (*init)(struct crypto_skcipher *tfm);
131 void (*exit)(struct crypto_skcipher *tfm);
142 #define SKCIPHER_REQUEST_ON_STACK(name, tfm) \ argument
144 crypto_skcipher_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \
178 struct crypto_tfm *tfm) in __crypto_skcipher_cast() argument
180 return container_of(tfm, struct crypto_skcipher, base); in __crypto_skcipher_cast()
201 struct crypto_skcipher *tfm) in crypto_skcipher_tfm() argument
203 return &tfm->base; in crypto_skcipher_tfm()
210 static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) in crypto_free_skcipher() argument
212 crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); in crypto_free_skcipher()
245 struct crypto_skcipher *tfm) in crypto_skcipher_driver_name() argument
247 return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); in crypto_skcipher_driver_name()
251 struct crypto_skcipher *tfm) in crypto_skcipher_alg() argument
253 return container_of(crypto_skcipher_tfm(tfm)->__crt_alg, in crypto_skcipher_alg()
278 static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) in crypto_skcipher_ivsize() argument
280 return tfm->ivsize; in crypto_skcipher_ivsize()
321 struct crypto_skcipher *tfm) in crypto_skcipher_chunksize() argument
323 return crypto_skcipher_alg_chunksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_chunksize()
338 struct crypto_skcipher *tfm) in crypto_skcipher_walksize() argument
340 return crypto_skcipher_alg_walksize(crypto_skcipher_alg(tfm)); in crypto_skcipher_walksize()
354 struct crypto_skcipher *tfm) in crypto_skcipher_blocksize() argument
356 return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); in crypto_skcipher_blocksize()
360 struct crypto_skcipher *tfm) in crypto_skcipher_alignmask() argument
362 return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); in crypto_skcipher_alignmask()
365 static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) in crypto_skcipher_get_flags() argument
367 return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); in crypto_skcipher_get_flags()
370 static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, in crypto_skcipher_set_flags() argument
373 crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_set_flags()
376 static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, in crypto_skcipher_clear_flags() argument
379 crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); in crypto_skcipher_clear_flags()
398 static inline int crypto_skcipher_setkey(struct crypto_skcipher *tfm, in crypto_skcipher_setkey() argument
401 return tfm->setkey(tfm, key, keylen); in crypto_skcipher_setkey()
405 struct crypto_skcipher *tfm) in crypto_skcipher_default_keysize() argument
407 return tfm->keysize; in crypto_skcipher_default_keysize()
422 return __crypto_skcipher_cast(req->base.tfm); in crypto_skcipher_reqtfm()
438 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_encrypt() local
440 if (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) in crypto_skcipher_encrypt()
443 return tfm->encrypt(req); in crypto_skcipher_encrypt()
459 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in crypto_skcipher_decrypt() local
461 if (crypto_skcipher_get_flags(tfm) & CRYPTO_TFM_NEED_KEY) in crypto_skcipher_decrypt()
464 return tfm->decrypt(req); in crypto_skcipher_decrypt()
484 static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) in crypto_skcipher_reqsize() argument
486 return tfm->reqsize; in crypto_skcipher_reqsize()
498 struct crypto_skcipher *tfm) in skcipher_request_set_tfm() argument
500 req->base.tfm = crypto_skcipher_tfm(tfm); in skcipher_request_set_tfm()
521 struct crypto_skcipher *tfm, gfp_t gfp) in skcipher_request_alloc() argument
526 crypto_skcipher_reqsize(tfm), gfp); in skcipher_request_alloc()
529 skcipher_request_set_tfm(req, tfm); in skcipher_request_alloc()
545 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in skcipher_request_zero() local
547 memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); in skcipher_request_zero()