Lines Matching defs:iv
123 static inline int crypto_ccm_check_iv(const u8 *iv)
126 if (1 > iv[0] || iv[0] > 7)
133 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize,
138 memcpy(b0, iv, 16);
153 static int generate_pat(u8 *iv,
169 memset(iv + 15 - iv[0], 0, iv[0] + 1);
208 rc = generate_b0(iv, assoclen, authsize, nbytes, b0);
327 u8 *iv,
348 rc = generate_pat(iv, req, nx_ctx, authsize, nbytes, assoclen,
367 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src,
381 memcpy(iv, csbcpb->cpb.aes_ccm.out_ctr, AES_BLOCK_SIZE);
405 u8 *iv,
418 rc = generate_pat(iv, req, nx_ctx, authsize, nbytes, assoclen,
436 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src,
450 memcpy(iv, csbcpb->cpb.aes_ccm.out_ctr, AES_BLOCK_SIZE);
481 u8 *iv = rctx->iv;
483 iv[0] = 3;
484 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
485 memcpy(iv + 4, req->iv, 8);
487 return ccm_nx_encrypt(req, iv, req->assoclen - 8);
494 rc = crypto_ccm_check_iv(req->iv);
498 return ccm_nx_encrypt(req, req->iv, req->assoclen);
505 u8 *iv = rctx->iv;
507 iv[0] = 3;
508 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
509 memcpy(iv + 4, req->iv, 8);
511 return ccm_nx_decrypt(req, iv, req->assoclen - 8);
518 rc = crypto_ccm_check_iv(req->iv);
522 return ccm_nx_decrypt(req, req->iv, req->assoclen);