Lines Matching refs:tfm

122 	int (*set_pub_key)(struct crypto_akcipher *tfm, const void *key,
124 int (*set_priv_key)(struct crypto_akcipher *tfm, const void *key,
126 unsigned int (*max_size)(struct crypto_akcipher *tfm);
127 int (*init)(struct crypto_akcipher *tfm);
128 void (*exit)(struct crypto_akcipher *tfm);
162 struct crypto_akcipher *tfm) in crypto_akcipher_tfm() argument
164 return &tfm->base; in crypto_akcipher_tfm()
173 struct crypto_tfm *tfm) in __crypto_akcipher_tfm() argument
175 return container_of(tfm, struct crypto_akcipher, base); in __crypto_akcipher_tfm()
179 struct crypto_akcipher *tfm) in crypto_akcipher_alg() argument
181 return __crypto_akcipher_alg(crypto_akcipher_tfm(tfm)->__crt_alg); in crypto_akcipher_alg()
184 static inline unsigned int crypto_akcipher_reqsize(struct crypto_akcipher *tfm) in crypto_akcipher_reqsize() argument
186 return tfm->reqsize; in crypto_akcipher_reqsize()
190 struct crypto_akcipher *tfm) in akcipher_request_set_tfm() argument
192 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm()
198 return __crypto_akcipher_tfm(req->base.tfm); in crypto_akcipher_reqtfm()
208 static inline void crypto_free_akcipher(struct crypto_akcipher *tfm) in crypto_free_akcipher() argument
210 crypto_destroy_tfm(tfm, crypto_akcipher_tfm(tfm)); in crypto_free_akcipher()
222 struct crypto_akcipher *tfm, gfp_t gfp) in akcipher_request_alloc() argument
226 req = kmalloc(sizeof(*req) + crypto_akcipher_reqsize(tfm), gfp); in akcipher_request_alloc()
228 akcipher_request_set_tfm(req, tfm); in akcipher_request_alloc()
298 static inline unsigned int crypto_akcipher_maxsize(struct crypto_akcipher *tfm) in crypto_akcipher_maxsize() argument
300 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_maxsize()
302 return alg->max_size(tfm); in crypto_akcipher_maxsize()
338 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in crypto_akcipher_encrypt() local
339 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_encrypt()
363 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in crypto_akcipher_decrypt() local
364 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_decrypt()
390 int crypto_akcipher_sync_encrypt(struct crypto_akcipher *tfm,
408 int crypto_akcipher_sync_decrypt(struct crypto_akcipher *tfm,
424 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in crypto_akcipher_sign() local
425 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_sign()
449 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in crypto_akcipher_verify() local
450 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_verify()
471 static inline int crypto_akcipher_set_pub_key(struct crypto_akcipher *tfm, in crypto_akcipher_set_pub_key() argument
475 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_set_pub_key()
477 return alg->set_pub_key(tfm, key, keylen); in crypto_akcipher_set_pub_key()
493 static inline int crypto_akcipher_set_priv_key(struct crypto_akcipher *tfm, in crypto_akcipher_set_priv_key() argument
497 struct akcipher_alg *alg = crypto_akcipher_alg(tfm); in crypto_akcipher_set_priv_key()
499 return alg->set_priv_key(tfm, key, keylen); in crypto_akcipher_set_priv_key()