Lines Matching full:iv

169 static int gmac(struct aead_request *req, const u8 *iv, unsigned int assoclen)  in gmac()  argument
191 /* Copy IV */ in gmac()
192 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, iv, AES_BLOCK_SIZE); in gmac()
242 static int gcm_empty(struct aead_request *req, const u8 *iv, int enc) in gcm_empty() argument
254 * zeros, and set the input IV value to be the same as the GMAC IV in gcm_empty()
268 /* Encrypt the counter/IV */ in gcm_empty()
269 in_sg = nx_build_sg_list(nx_ctx->in_sg, (u8 *) iv, in gcm_empty()
322 *(u32 *)&rctx->iv[NX_GCM_CTR_OFFSET] = 1; in gcm_aes_nx_crypt()
326 rc = gcm_empty(req, rctx->iv, enc); in gcm_aes_nx_crypt()
328 rc = gmac(req, rctx->iv, assoclen); in gcm_aes_nx_crypt()
357 rc = nx_build_sg_lists(nx_ctx, rctx->iv, req->dst, in gcm_aes_nx_crypt()
376 memcpy(rctx->iv, csbcpb->cpb.aes_gcm.out_cnt, AES_BLOCK_SIZE); in gcm_aes_nx_crypt()
419 char *iv = rctx->iv; in gcm_aes_nx_encrypt() local
421 memcpy(iv, req->iv, GCM_AES_IV_SIZE); in gcm_aes_nx_encrypt()
429 char *iv = rctx->iv; in gcm_aes_nx_decrypt() local
431 memcpy(iv, req->iv, GCM_AES_IV_SIZE); in gcm_aes_nx_decrypt()
441 char *iv = rctx->iv; in gcm4106_aes_nx_encrypt() local
444 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_encrypt()
445 memcpy(iv + NX_GCM4106_NONCE_LEN, req->iv, 8); in gcm4106_aes_nx_encrypt()
458 char *iv = rctx->iv; in gcm4106_aes_nx_decrypt() local
461 memcpy(iv, nonce, NX_GCM4106_NONCE_LEN); in gcm4106_aes_nx_decrypt()
462 memcpy(iv + NX_GCM4106_NONCE_LEN, req->iv, 8); in gcm4106_aes_nx_decrypt()