Lines Matching refs:ivlen
91 int ivlen; /* IV length */ member
483 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aes_gcm_init_key()
490 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aes_gcm_init_key()
492 memcpy(gctx->iv, iv, gctx->ivlen); in aes_gcm_init_key()
530 gctx->ivlen = c->cipher->iv_len; in aes_gcm_ctrl()
542 if (arg > EVP_MAX_IV_LENGTH && arg > gctx->ivlen) { in aes_gcm_ctrl()
551 gctx->ivlen = arg; in aes_gcm_ctrl()
572 memcpy(gctx->iv, ptr, gctx->ivlen); in aes_gcm_ctrl()
578 if (arg < 4 || (gctx->ivlen - arg) < 8) { in aes_gcm_ctrl()
584 if (c->encrypt && !RAND_bytes(gctx->iv + arg, gctx->ivlen - arg)) { in aes_gcm_ctrl()
594 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
595 if (arg <= 0 || arg > gctx->ivlen) { in aes_gcm_ctrl()
596 arg = gctx->ivlen; in aes_gcm_ctrl()
598 memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg); in aes_gcm_ctrl()
602 ctr64_inc(gctx->iv + gctx->ivlen - 8); in aes_gcm_ctrl()
610 memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg); in aes_gcm_ctrl()
611 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
621 gctx_out->iv = OPENSSL_malloc(gctx->ivlen); in aes_gcm_ctrl()
625 memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); in aes_gcm_ctrl()
898 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aesni_gcm_init_key()
905 CRYPTO_gcm128_setiv(&gctx->gcm, &gctx->ks.ks, iv, gctx->ivlen); in aesni_gcm_init_key()
907 memcpy(gctx->iv, iv, gctx->ivlen); in aesni_gcm_init_key()