Lines Matching refs:sw_cipher

174 	struct crypto_ablkcipher	*sw_cipher;  member
184 struct crypto_aead *sw_cipher; member
456 crypto_aead_clear_flags(ctx->sw_cipher, CRYPTO_TFM_REQ_MASK); in spacc_aead_setkey()
457 crypto_aead_set_flags(ctx->sw_cipher, crypto_aead_get_flags(tfm) & in spacc_aead_setkey()
459 err = crypto_aead_setkey(ctx->sw_cipher, key, keylen); in spacc_aead_setkey()
461 crypto_aead_set_flags(tfm, crypto_aead_get_flags(ctx->sw_cipher) & in spacc_aead_setkey()
493 return crypto_aead_setauthsize(ctx->sw_cipher, authsize); in spacc_aead_setauthsize()
528 aead_request_set_tfm(subreq, ctx->sw_cipher); in spacc_aead_do_fallback()
695 ctx->sw_cipher = crypto_alloc_aead(alg->base.cra_name, 0, in spacc_aead_cra_init()
697 if (IS_ERR(ctx->sw_cipher)) in spacc_aead_cra_init()
698 return PTR_ERR(ctx->sw_cipher); in spacc_aead_cra_init()
706 crypto_aead_reqsize(ctx->sw_cipher))); in spacc_aead_cra_init()
719 crypto_free_aead(ctx->sw_cipher); in spacc_aead_cra_exit()
772 ctx->sw_cipher) { in spacc_aes_setkey()
777 ctx->sw_cipher->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in spacc_aes_setkey()
778 ctx->sw_cipher->base.crt_flags |= in spacc_aes_setkey()
781 err = crypto_ablkcipher_setkey(ctx->sw_cipher, key, len); in spacc_aes_setkey()
785 !ctx->sw_cipher) in spacc_aes_setkey()
792 if (err && ctx->sw_cipher) { in spacc_aes_setkey()
795 ctx->sw_cipher->base.crt_flags & CRYPTO_TFM_RES_MASK; in spacc_aes_setkey()
895 if (!ctx->sw_cipher) in spacc_ablk_do_fallback()
903 ablkcipher_request_set_tfm(req, ctx->sw_cipher); in spacc_ablk_do_fallback()
998 ctx->sw_cipher = crypto_alloc_ablkcipher(alg->cra_name, 0, in spacc_ablk_cra_init()
1000 if (IS_ERR(ctx->sw_cipher)) { in spacc_ablk_cra_init()
1003 ctx->sw_cipher = NULL; in spacc_ablk_cra_init()
1018 if (ctx->sw_cipher) in spacc_ablk_cra_exit()
1019 crypto_free_ablkcipher(ctx->sw_cipher); in spacc_ablk_cra_exit()
1020 ctx->sw_cipher = NULL; in spacc_ablk_cra_exit()