Lines Matching refs:iv
139 static inline int crypto_ccm_check_iv(const u8 *iv) in crypto_ccm_check_iv() argument
142 if (1 > iv[0] || iv[0] > 7) in crypto_ccm_check_iv()
149 static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize, in generate_b0() argument
155 memcpy(b0, iv, 16); in generate_b0()
172 static int generate_pat(u8 *iv, in generate_pat() argument
187 memset(iv + 15 - iv[0], 0, iv[0] + 1); in generate_pat()
241 rc = generate_b0(iv, req->assoclen, authsize, nbytes, b0); in generate_pat()
360 u8 *iv = nx_ctx->priv.ccm.iv; in ccm4309_aes_nx_encrypt() local
362 iv[0] = 3; in ccm4309_aes_nx_encrypt()
363 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); in ccm4309_aes_nx_encrypt()
364 memcpy(iv + 4, req->iv, 8); in ccm4309_aes_nx_encrypt()
366 desc.info = iv; in ccm4309_aes_nx_encrypt()
377 desc.info = req->iv; in ccm_aes_nx_encrypt()
391 u8 *iv = nx_ctx->priv.ccm.iv; in ccm4309_aes_nx_decrypt() local
393 iv[0] = 3; in ccm4309_aes_nx_decrypt()
394 memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); in ccm4309_aes_nx_decrypt()
395 memcpy(iv + 4, req->iv, 8); in ccm4309_aes_nx_decrypt()
397 desc.info = iv; in ccm4309_aes_nx_decrypt()
408 desc.info = req->iv; in ccm_aes_nx_decrypt()