Lines Matching refs:tfm

157 	int (*setkey)(struct crypto_aead *tfm, const u8 *key,
159 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
162 int (*init)(struct crypto_aead *tfm);
163 void (*exit)(struct crypto_aead *tfm);
183 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm)
185 return container_of(tfm, struct crypto_aead, base);
204 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm)
206 return &tfm->base;
211 * @tfm: cipher handle to be freed
213 * If @tfm is a NULL or error pointer, this function does nothing.
215 static inline void crypto_free_aead(struct crypto_aead *tfm)
217 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm));
232 static inline const char *crypto_aead_driver_name(struct crypto_aead *tfm)
234 return crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm));
237 static inline struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm)
239 return container_of(crypto_aead_tfm(tfm)->__crt_alg,
250 * @tfm: cipher handle
257 static inline unsigned int crypto_aead_ivsize(struct crypto_aead *tfm)
259 return crypto_aead_alg_ivsize(crypto_aead_alg(tfm));
264 * @tfm: cipher handle
274 static inline unsigned int crypto_aead_authsize(struct crypto_aead *tfm)
276 return tfm->authsize;
291 * @tfm: cipher handle
299 static inline unsigned int crypto_aead_blocksize(struct crypto_aead *tfm)
301 return crypto_tfm_alg_blocksize(crypto_aead_tfm(tfm));
304 static inline unsigned int crypto_aead_alignmask(struct crypto_aead *tfm)
306 return crypto_tfm_alg_alignmask(crypto_aead_tfm(tfm));
309 static inline u32 crypto_aead_get_flags(struct crypto_aead *tfm)
311 return crypto_tfm_get_flags(crypto_aead_tfm(tfm));
314 static inline void crypto_aead_set_flags(struct crypto_aead *tfm, u32 flags)
316 crypto_tfm_set_flags(crypto_aead_tfm(tfm), flags);
319 static inline void crypto_aead_clear_flags(struct crypto_aead *tfm, u32 flags)
321 crypto_tfm_clear_flags(crypto_aead_tfm(tfm), flags);
326 * @tfm: cipher handle
340 int crypto_aead_setkey(struct crypto_aead *tfm,
345 * @tfm: cipher handle
353 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
357 return __crypto_aead_cast(req->base.tfm);
418 * @tfm: cipher handle
422 static inline unsigned int crypto_aead_reqsize(struct crypto_aead *tfm)
424 return tfm->reqsize;
430 * @tfm: cipher handle that shall be added to the request handle
436 struct crypto_aead *tfm)
438 req->base.tfm = crypto_aead_tfm(tfm);
443 * @tfm: cipher handle to be registered with the request
452 static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,
457 req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp);
460 aead_request_set_tfm(req, tfm);