Lines Matching refs:tfm

137 	int (*setkey)(struct crypto_aead *tfm, const u8 *key,
139 int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize);
142 int (*init)(struct crypto_aead *tfm);
143 void (*exit)(struct crypto_aead *tfm);
159 static inline struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm)
161 return container_of(tfm, struct crypto_aead, base);
180 static inline struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm)
182 return &tfm->base;
187 * @tfm: cipher handle to be freed
189 * If @tfm is a NULL or error pointer, this function does nothing.
191 static inline void crypto_free_aead(struct crypto_aead *tfm)
193 crypto_destroy_tfm(tfm, crypto_aead_tfm(tfm));
196 static inline struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm)
198 return container_of(crypto_aead_tfm(tfm)->__crt_alg,
209 * @tfm: cipher handle
216 static inline unsigned int crypto_aead_ivsize(struct crypto_aead *tfm)
218 return crypto_aead_alg_ivsize(crypto_aead_alg(tfm));
223 * @tfm: cipher handle
233 static inline unsigned int crypto_aead_authsize(struct crypto_aead *tfm)
235 return tfm->authsize;
250 * @tfm: cipher handle
258 static inline unsigned int crypto_aead_blocksize(struct crypto_aead *tfm)
260 return crypto_tfm_alg_blocksize(crypto_aead_tfm(tfm));
263 static inline unsigned int crypto_aead_alignmask(struct crypto_aead *tfm)
265 return crypto_tfm_alg_alignmask(crypto_aead_tfm(tfm));
268 static inline u32 crypto_aead_get_flags(struct crypto_aead *tfm)
270 return crypto_tfm_get_flags(crypto_aead_tfm(tfm));
273 static inline void crypto_aead_set_flags(struct crypto_aead *tfm, u32 flags)
275 crypto_tfm_set_flags(crypto_aead_tfm(tfm), flags);
278 static inline void crypto_aead_clear_flags(struct crypto_aead *tfm, u32 flags)
280 crypto_tfm_clear_flags(crypto_aead_tfm(tfm), flags);
285 * @tfm: cipher handle
299 int crypto_aead_setkey(struct crypto_aead *tfm,
304 * @tfm: cipher handle
312 int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize);
316 return __crypto_aead_cast(req->base.tfm);
377 * @tfm: cipher handle
381 static inline unsigned int crypto_aead_reqsize(struct crypto_aead *tfm)
383 return tfm->reqsize;
389 * @tfm: cipher handle that shall be added to the request handle
395 struct crypto_aead *tfm)
397 req->base.tfm = crypto_aead_tfm(tfm);
402 * @tfm: cipher handle to be registered with the request
411 static inline struct aead_request *aead_request_alloc(struct crypto_aead *tfm,
416 req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp);
419 aead_request_set_tfm(req, tfm);