Lines Matching refs:nx_ctx
26 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in ctr_aes_nx_set_key() local
27 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_set_key()
29 nx_ctx_init(nx_ctx, HCOP_FC_AES); in ctr_aes_nx_set_key()
34 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in ctr_aes_nx_set_key()
38 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in ctr_aes_nx_set_key()
42 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in ctr_aes_nx_set_key()
58 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in ctr3686_aes_nx_set_key() local
63 memcpy(nx_ctx->priv.ctr.nonce, in ctr3686_aes_nx_set_key()
75 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in ctr_aes_nx_crypt() local
76 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_crypt()
81 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in ctr_aes_nx_crypt()
86 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src, in ctr_aes_nx_crypt()
92 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in ctr_aes_nx_crypt()
97 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in ctr_aes_nx_crypt()
104 atomic_inc(&(nx_ctx->stats->aes_ops)); in ctr_aes_nx_crypt()
106 &(nx_ctx->stats->aes_bytes)); in ctr_aes_nx_crypt()
111 spin_unlock_irqrestore(&nx_ctx->lock, irq_flags); in ctr_aes_nx_crypt()
118 struct nx_crypto_ctx *nx_ctx = crypto_skcipher_ctx(tfm); in ctr3686_aes_nx_crypt() local
121 memcpy(iv, nx_ctx->priv.ctr.nonce, CTR_RFC3686_NONCE_SIZE); in ctr3686_aes_nx_crypt()