Lines Matching refs:csbcpb

40 	struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;  in gcm_aes_nx_set_key()  local
47 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in gcm_aes_nx_set_key()
52 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in gcm_aes_nx_set_key()
57 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in gcm_aes_nx_set_key()
65 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_aes_nx_set_key()
66 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key()
197 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gmac() local
204 csbcpb->cpb.hdr.mode = NX_MODE_AES_GMAC; in gmac()
206 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gmac()
215 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, desc->info, AES_BLOCK_SIZE); in gmac()
231 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gmac()
233 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gmac()
238 csbcpb->cpb.aes_gcm.bit_length_data = 0; in gmac()
239 csbcpb->cpb.aes_gcm.bit_length_aad = 8 * nbytes; in gmac()
246 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gmac()
247 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gmac()
248 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gmac()
249 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gmac()
251 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gmac()
261 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gmac()
270 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_empty() local
281 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in gcm_empty()
282 memcpy(csbcpb->cpb.aes_ecb.key, csbcpb->cpb.aes_gcm.key, in gcm_empty()
283 sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
285 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_empty()
287 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_empty()
315 memcpy(csbcpb->cpb.aes_gcm.out_pat_or_mac, out, in gcm_empty()
319 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_empty()
325 memset(csbcpb->cpb.aes_ecb.key, 0, sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
334 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_crypt() local
359 csbcpb->cpb.aes_gcm.bit_length_aad = req->assoclen * 8; in gcm_aes_nx_crypt()
361 rc = nx_gca(nx_ctx, req, csbcpb->cpb.aes_gcm.in_pat_or_aad); in gcm_aes_nx_crypt()
367 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
369 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
371 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
378 csbcpb->cpb.aes_gcm.bit_length_data = nbytes * 8; in gcm_aes_nx_crypt()
382 csbcpb->cpb.aes_gcm.iv_or_cnt); in gcm_aes_nx_crypt()
388 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
390 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
398 memcpy(desc.info, csbcpb->cpb.aes_gcm.out_cnt, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
399 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gcm_aes_nx_crypt()
400 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
401 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gcm_aes_nx_crypt()
402 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
404 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
407 atomic64_add(csbcpb->csb.processed_byte_count, in gcm_aes_nx_crypt()
416 scatterwalk_map_and_copy(csbcpb->cpb.aes_gcm.out_pat_or_mac, in gcm_aes_nx_crypt()
422 u8 *otag = csbcpb->cpb.aes_gcm.out_pat_or_mac; in gcm_aes_nx_crypt()