Lines Matching refs: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,
139 memcpy(b0, iv, 16);
156 static int generate_pat(u8 *iv,
172 memset(iv + 15 - iv[0], 0, iv[0] + 1);
211 rc = generate_b0(iv, assoclen, authsize, nbytes, b0);
330 u8 *iv,
351 rc = generate_pat(iv, req, nx_ctx, authsize, nbytes, assoclen,
370 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src,
384 memcpy(iv, csbcpb->cpb.aes_ccm.out_ctr, AES_BLOCK_SIZE);
408 u8 *iv,
421 rc = generate_pat(iv, req, nx_ctx, authsize, nbytes, assoclen,
439 rc = nx_build_sg_lists(nx_ctx, iv, req->dst, req->src,
453 memcpy(iv, csbcpb->cpb.aes_ccm.out_ctr, AES_BLOCK_SIZE);
484 u8 *iv = rctx->iv;
486 iv[0] = 3;
487 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
488 memcpy(iv + 4, req->iv, 8);
490 return ccm_nx_encrypt(req, iv, req->assoclen - 8);
497 rc = crypto_ccm_check_iv(req->iv);
501 return ccm_nx_encrypt(req, req->iv, req->assoclen);
508 u8 *iv = rctx->iv;
510 iv[0] = 3;
511 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3);
512 memcpy(iv + 4, req->iv, 8);
514 return ccm_nx_decrypt(req, iv, req->assoclen - 8);
521 rc = crypto_ccm_check_iv(req->iv);
525 return ccm_nx_decrypt(req, req->iv, req->assoclen);