Lines Matching refs:u
36 ctx->u.aes.type = CCP_AES_TYPE_128; in ccp_aes_gcm_setkey()
39 ctx->u.aes.type = CCP_AES_TYPE_192; in ccp_aes_gcm_setkey()
42 ctx->u.aes.type = CCP_AES_TYPE_256; in ccp_aes_gcm_setkey()
48 ctx->u.aes.mode = CCP_AES_MODE_GCM; in ccp_aes_gcm_setkey()
49 ctx->u.aes.key_len = key_len; in ccp_aes_gcm_setkey()
51 memcpy(ctx->u.aes.key, key, key_len); in ccp_aes_gcm_setkey()
52 sg_init_one(&ctx->u.aes.key_sg, ctx->u.aes.key, key_len); in ccp_aes_gcm_setkey()
86 if (!ctx->u.aes.key_len) in ccp_aes_gcm_crypt()
89 if (ctx->u.aes.mode != CCP_AES_MODE_GCM) in ccp_aes_gcm_crypt()
119 rctx->cmd.u.aes.authsize = crypto_aead_authsize(tfm); in ccp_aes_gcm_crypt()
120 rctx->cmd.u.aes.type = ctx->u.aes.type; in ccp_aes_gcm_crypt()
121 rctx->cmd.u.aes.mode = ctx->u.aes.mode; in ccp_aes_gcm_crypt()
122 rctx->cmd.u.aes.action = encrypt; in ccp_aes_gcm_crypt()
123 rctx->cmd.u.aes.key = &ctx->u.aes.key_sg; in ccp_aes_gcm_crypt()
124 rctx->cmd.u.aes.key_len = ctx->u.aes.key_len; in ccp_aes_gcm_crypt()
125 rctx->cmd.u.aes.iv = iv_sg; in ccp_aes_gcm_crypt()
126 rctx->cmd.u.aes.iv_len = iv_len; in ccp_aes_gcm_crypt()
127 rctx->cmd.u.aes.src = req->src; in ccp_aes_gcm_crypt()
128 rctx->cmd.u.aes.src_len = req->cryptlen; in ccp_aes_gcm_crypt()
129 rctx->cmd.u.aes.aad_len = req->assoclen; in ccp_aes_gcm_crypt()
132 rctx->cmd.u.aes.dst = req->dst; in ccp_aes_gcm_crypt()
154 ctx->u.aes.key_len = 0; in ccp_aes_gcm_cra_init()