Lines Matching refs:tfm

253 static inline struct n2_ahash_alg *n2_ahash_alg(struct crypto_tfm *tfm)  in n2_ahash_alg()  argument
255 struct crypto_alg *alg = tfm->__crt_alg; in n2_ahash_alg()
268 static inline struct n2_hmac_alg *n2_hmac_alg(struct crypto_tfm *tfm) in n2_hmac_alg() argument
270 struct crypto_alg *alg = tfm->__crt_alg; in n2_hmac_alg()
306 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_init() local
307 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_init()
318 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_update() local
319 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_update()
332 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_final() local
333 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_final()
345 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hash_async_finup() local
346 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hash_async_finup()
357 static int n2_hash_cra_init(struct crypto_tfm *tfm) in n2_hash_cra_init() argument
359 const char *fallback_driver_name = crypto_tfm_alg_name(tfm); in n2_hash_cra_init()
360 struct crypto_ahash *ahash = __crypto_ahash_cast(tfm); in n2_hash_cra_init()
384 static void n2_hash_cra_exit(struct crypto_tfm *tfm) in n2_hash_cra_exit() argument
386 struct crypto_ahash *ahash = __crypto_ahash_cast(tfm); in n2_hash_cra_exit()
392 static int n2_hmac_cra_init(struct crypto_tfm *tfm) in n2_hmac_cra_init() argument
394 const char *fallback_driver_name = crypto_tfm_alg_name(tfm); in n2_hmac_cra_init()
395 struct crypto_ahash *ahash = __crypto_ahash_cast(tfm); in n2_hmac_cra_init()
397 struct n2_hmac_alg *n2alg = n2_hmac_alg(tfm); in n2_hmac_cra_init()
433 static void n2_hmac_cra_exit(struct crypto_tfm *tfm) in n2_hmac_cra_exit() argument
435 struct crypto_ahash *ahash = __crypto_ahash_cast(tfm); in n2_hmac_cra_exit()
442 static int n2_hmac_async_setkey(struct crypto_ahash *tfm, const u8 *key, in n2_hmac_async_setkey() argument
445 struct n2_hmac_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hmac_async_setkey()
456 shash->tfm = child_shash; in n2_hmac_async_setkey()
457 shash->flags = crypto_ahash_get_flags(tfm) & in n2_hmac_async_setkey()
511 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_do_async_digest() local
524 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_do_async_digest()
597 struct n2_ahash_alg *n2alg = n2_ahash_alg(req->base.tfm); in n2_hash_async_digest()
615 struct n2_hmac_alg *n2alg = n2_hmac_alg(req->base.tfm); in n2_hmac_async_digest()
617 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in n2_hmac_async_digest() local
618 struct n2_hmac_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hmac_async_digest()
625 struct n2_hash_ctx *ctx = crypto_ahash_ctx(tfm); in n2_hmac_async_digest()
703 static inline struct n2_cipher_alg *n2_cipher_alg(struct crypto_tfm *tfm) in n2_cipher_alg() argument
705 struct crypto_alg *alg = tfm->__crt_alg; in n2_cipher_alg()
717 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_aes_setkey() local
718 struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm); in n2_aes_setkey()
719 struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm); in n2_aes_setkey()
746 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_des_setkey() local
747 struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm); in n2_des_setkey()
748 struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm); in n2_des_setkey()
760 if (err == 0 && (tfm->crt_flags & CRYPTO_TFM_REQ_WEAK_KEY)) { in n2_des_setkey()
761 tfm->crt_flags |= CRYPTO_TFM_RES_WEAK_KEY; in n2_des_setkey()
773 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_3des_setkey() local
774 struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm); in n2_3des_setkey()
775 struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm); in n2_3des_setkey()
791 struct crypto_tfm *tfm = crypto_ablkcipher_tfm(cipher); in n2_arc4_setkey() local
792 struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm); in n2_arc4_setkey()
793 struct n2_cipher_alg *n2alg = n2_cipher_alg(tfm); in n2_arc4_setkey()
826 static int __n2_crypt_chunk(struct crypto_tfm *tfm, struct n2_crypto_chunk *cp, in __n2_crypt_chunk() argument
829 struct n2_cipher_context *ctx = crypto_tfm_ctx(tfm); in __n2_crypt_chunk()
974 struct crypto_tfm *tfm = req->base.tfm; in n2_do_ecb() local
991 err = __n2_crypt_chunk(tfm, c, qp, encrypt); in n2_do_ecb()
1026 struct crypto_tfm *tfm = req->base.tfm; in n2_do_chaining() local
1050 err = __n2_crypt_chunk(tfm, c, qp, true); in n2_do_chaining()
1080 err = __n2_crypt_chunk(tfm, c, qp, false); in n2_do_chaining()
1382 static int n2_cipher_cra_init(struct crypto_tfm *tfm) in n2_cipher_cra_init() argument
1384 tfm->crt_ablkcipher.reqsize = sizeof(struct n2_request_context); in n2_cipher_cra_init()