Lines Matching refs:csbcpb

28 	struct nx_csbcpb *csbcpb = nx_ctx->csbcpb;  in gcm_aes_nx_set_key()  local
35 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in gcm_aes_nx_set_key()
40 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in gcm_aes_nx_set_key()
45 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in gcm_aes_nx_set_key()
53 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_aes_nx_set_key()
54 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key()
174 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gmac() local
181 csbcpb->cpb.hdr.mode = NX_MODE_AES_GMAC; in gmac()
183 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gmac()
192 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, iv, AES_BLOCK_SIZE); in gmac()
208 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gmac()
210 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gmac()
215 csbcpb->cpb.aes_gcm.bit_length_data = 0; in gmac()
216 csbcpb->cpb.aes_gcm.bit_length_aad = 8 * nbytes; in gmac()
223 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gmac()
224 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gmac()
225 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gmac()
226 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gmac()
228 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gmac()
238 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gmac()
247 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_empty() local
258 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in gcm_empty()
259 memcpy(csbcpb->cpb.aes_ecb.key, csbcpb->cpb.aes_gcm.key, in gcm_empty()
260 sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
262 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_empty()
264 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_empty()
292 memcpy(csbcpb->cpb.aes_gcm.out_pat_or_mac, out, in gcm_empty()
296 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_empty()
302 memset(csbcpb->cpb.aes_ecb.key, 0, sizeof(csbcpb->cpb.aes_ecb.key)); in gcm_empty()
313 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_crypt() local
336 csbcpb->cpb.aes_gcm.bit_length_aad = assoclen * 8; in gcm_aes_nx_crypt()
338 rc = nx_gca(nx_ctx, req, csbcpb->cpb.aes_gcm.in_pat_or_aad, in gcm_aes_nx_crypt()
345 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
347 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
349 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in gcm_aes_nx_crypt()
356 csbcpb->cpb.aes_gcm.bit_length_data = nbytes * 8; in gcm_aes_nx_crypt()
360 csbcpb->cpb.aes_gcm.iv_or_cnt); in gcm_aes_nx_crypt()
366 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
368 NX_CPB_FDM(csbcpb) &= ~NX_FDM_INTERMEDIATE; in gcm_aes_nx_crypt()
376 memcpy(rctx->iv, csbcpb->cpb.aes_gcm.out_cnt, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
377 memcpy(csbcpb->cpb.aes_gcm.in_pat_or_aad, in gcm_aes_nx_crypt()
378 csbcpb->cpb.aes_gcm.out_pat_or_mac, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
379 memcpy(csbcpb->cpb.aes_gcm.in_s0, in gcm_aes_nx_crypt()
380 csbcpb->cpb.aes_gcm.out_s0, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
382 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in gcm_aes_nx_crypt()
385 atomic64_add(be32_to_cpu(csbcpb->csb.processed_byte_count), in gcm_aes_nx_crypt()
395 csbcpb->cpb.aes_gcm.out_pat_or_mac, in gcm_aes_nx_crypt()
401 u8 *otag = csbcpb->cpb.aes_gcm.out_pat_or_mac; in gcm_aes_nx_crypt()