Lines Matching refs:csbcpb
39 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_set_key() local
46 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in gcm_aes_nx_set_key()
51 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in gcm_aes_nx_set_key()
56 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in gcm_aes_nx_set_key()
64 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_aes_nx_set_key()
65 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key()
186 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gmac() local
193 csbcpb->cpb.hdr.mode = NX_MODE_AES_GMAC; in gmac()
195 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gmac()
204 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, desc->info, AES_BLOCK_SIZE); in gmac()
220 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gmac()
222 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gmac()
227 csbcpb->cpb.aes_gcm.bit_length_data = 0; in gmac()
228 csbcpb->cpb.aes_gcm.bit_length_aad = 8 * nbytes; in gmac()
235 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gmac()
236 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gmac()
237 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gmac()
238 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gmac()
240 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gmac()
250 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gmac()
260 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_empty() local
271 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in gcm_empty()
272 memcpy(csbcpb->cpb.aes_ecb.key, csbcpb->cpb.aes_gcm.key, in gcm_empty()
273 sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
275 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_empty()
277 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_empty()
305 memcpy(csbcpb->cpb.aes_gcm.out_pat_or_mac, out, in gcm_empty()
309 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_empty()
315 memset(csbcpb->cpb.aes_ecb.key, 0, sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
326 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_crypt() local
351 csbcpb->cpb.aes_gcm.bit_length_aad = assoclen * 8; in gcm_aes_nx_crypt()
353 rc = nx_gca(nx_ctx, req, csbcpb->cpb.aes_gcm.in_pat_or_aad, in gcm_aes_nx_crypt()
360 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
362 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
364 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
371 csbcpb->cpb.aes_gcm.bit_length_data = nbytes * 8; in gcm_aes_nx_crypt()
375 csbcpb->cpb.aes_gcm.iv_or_cnt); in gcm_aes_nx_crypt()
381 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
383 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
391 memcpy(desc.info, csbcpb->cpb.aes_gcm.out_cnt, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
392 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gcm_aes_nx_crypt()
393 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
394 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gcm_aes_nx_crypt()
395 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
397 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
400 atomic64_add(csbcpb->csb.processed_byte_count, in gcm_aes_nx_crypt()
410 csbcpb->cpb.aes_gcm.out_pat_or_mac, in gcm_aes_nx_crypt()
416 u8 *otag = csbcpb->cpb.aes_gcm.out_pat_or_mac; in gcm_aes_nx_crypt()