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));
220 static inline const char *crypto_aead_driver_name(struct crypto_aead *tfm)
222 return crypto_tfm_alg_driver_name(crypto_aead_tfm(tfm));
225 static inline struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm)
227 return container_of(crypto_aead_tfm(tfm)->__crt_alg,
238 * @tfm: cipher handle
245 static inline unsigned int crypto_aead_ivsize(struct crypto_aead *tfm)
247 return crypto_aead_alg_ivsize(crypto_aead_alg(tfm));
252 * @tfm: cipher handle
262 static inline unsigned int crypto_aead_authsize(struct crypto_aead *tfm)
264 return tfm->authsize;
279 * @tfm: cipher handle
287 static inline unsigned int crypto_aead_blocksize(struct crypto_aead *tfm)
289 return crypto_tfm_alg_blocksize(crypto_aead_tfm(tfm));
292 static inline unsigned int crypto_aead_alignmask(struct crypto_aead *tfm)
294 return crypto_tfm_alg_alignmask(crypto_aead_tfm(tfm));
297 static inline u32 crypto_aead_get_flags(struct crypto_aead *tfm)
299 return crypto_tfm_get_flags(crypto_aead_tfm(tfm));
302 static inline void crypto_aead_set_flags(struct crypto_aead *tfm, u32 flags)
304 crypto_tfm_set_flags(crypto_aead_tfm(tfm), flags);
307 static inline void crypto_aead_clear_flags(struct crypto_aead *tfm, u32 flags)
309 crypto_tfm_clear_flags(crypto_aead_tfm(tfm), flags);
314 * @tfm: cipher handle
328 int crypto_aead_setkey(struct crypto_aead *tfm,
333 * @tfm: cipher handle
341 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
345 return __crypto_aead_cast(req->base.tfm);
406 * @tfm: cipher handle
410 static inline unsigned int crypto_aead_reqsize(struct crypto_aead *tfm)
412 return tfm->reqsize;
418 * @tfm: cipher handle that shall be added to the request handle
424 struct crypto_aead *tfm)
426 req->base.tfm = crypto_aead_tfm(tfm);
431 * @tfm: cipher handle to be registered with the request
440 static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,
445 req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp);
448 aead_request_set_tfm(req, tfm);