Lines Matching defs:iv
81 int iv_set; /* Set if an iv is set */
83 unsigned char *iv; /* Temporary IV store */
100 const unsigned char iv[16]);
109 int iv_set; /* Set if an iv is set */
144 const AES_KEY *key2, const unsigned char iv[16]);
147 const AES_KEY *key2, const unsigned char iv[16]);
157 const unsigned char iv[16]);
160 const unsigned char iv[16]);
224 const unsigned char iv[16]);
230 const unsigned char iv[16]);
267 const unsigned char *iv, int enc)
301 aesni_cbc_encrypt(in, out, len, ctx->cipher_data, ctx->iv, ctx->encrypt);
340 const unsigned char *iv, int enc)
343 if (!iv && !key)
350 * If we have an iv can set it directly, otherwise use saved IV.
352 if (iv == NULL && gctx->iv_set)
353 iv = gctx->iv;
354 if (iv) {
355 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
362 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
364 memcpy(gctx->iv, iv, gctx->ivlen);
376 const unsigned char *iv, int enc)
379 if (!iv && !key)
401 if (iv) {
403 memcpy(ctx->iv, iv, 16);
414 const unsigned char *iv, int enc)
417 if (!iv && !key)
427 if (iv) {
428 memcpy(ctx->iv, iv, 15 - cctx->L);
547 const unsigned char *iv, int enc)
646 const unsigned char *iv, int enc)
649 if (!iv && !key)
670 * If we have an iv can set it directly, otherwise use saved IV.
672 if (iv == NULL && gctx->iv_set)
673 iv = gctx->iv;
674 if (iv) {
675 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
682 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
684 memcpy(gctx->iv, iv, gctx->ivlen);
696 const unsigned char *iv, int enc)
699 if (!iv && !key)
751 if (iv) {
753 memcpy(ctx->iv, iv, 16);
764 const unsigned char *iv, int enc)
767 if (!iv && !key)
796 if (iv) {
797 memcpy(ctx->iv, iv, 15 - cctx->L);
921 const unsigned char *iv, int enc)
1023 (*dat->stream.cbc) (in, out, len, &dat->ks, ctx->iv, ctx->encrypt);
1025 CRYPTO_cbc128_encrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
1027 CRYPTO_cbc128_decrypt(in, out, len, &dat->ks, ctx->iv, dat->block);
1054 ctx->iv, &ctx->num, dat->block);
1064 ctx->iv, &ctx->num, ctx->encrypt, dat->block);
1074 ctx->iv, &ctx->num, ctx->encrypt, dat->block);
1085 ctx->iv, &ctx->num, ctx->encrypt, dat->block);
1091 ctx->iv, &ctx->num, ctx->encrypt, dat->block);
1096 ctx->iv, &ctx->num, ctx->encrypt, dat->block);
1109 ctx->iv, ctx->buf, &num, dat->stream.ctr);
1112 ctx->iv, ctx->buf, &num, dat->block);
1125 if (gctx->iv != c->iv)
1126 OPENSSL_free(gctx->iv);
1154 gctx->iv = c->iv;
1165 if (gctx->iv != c->iv)
1166 OPENSSL_free(gctx->iv);
1167 gctx->iv = OPENSSL_malloc(arg);
1168 if (!gctx->iv)
1190 memcpy(gctx->iv, ptr, gctx->ivlen);
1201 memcpy(gctx->iv, ptr, arg);
1202 if (c->encrypt && RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0)
1210 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen);
1213 memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg);
1218 ctr64_inc(gctx->iv + gctx->ivlen - 8);
1225 memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg);
1226 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen);
1258 if (gctx->iv == c->iv)
1259 gctx_out->iv = out->iv;
1261 gctx_out->iv = OPENSSL_malloc(gctx->ivlen);
1262 if (!gctx_out->iv)
1264 memcpy(gctx_out->iv, gctx->iv, gctx->ivlen);
1276 const unsigned char *iv, int enc)
1279 if (!iv && !key)
1327 * If we have an iv can set it directly, otherwise use saved IV.
1329 if (iv == NULL && gctx->iv_set)
1330 iv = gctx->iv;
1331 if (iv) {
1332 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
1339 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen);
1341 memcpy(gctx->iv, iv, gctx->ivlen);
1639 const unsigned char *iv, int enc)
1642 if (!iv && !key)
1715 if (iv) {
1717 memcpy(ctx->iv, iv, 16);
1733 xctx->xts.key1, xctx->xts.key2, ctx->iv);
1734 else if (CRYPTO_xts128_encrypt(&xctx->xts, ctx->iv, in, out, len,
1813 const unsigned char *iv, int enc)
1816 if (!iv && !key)
1847 if (iv) {
1848 memcpy(ctx->iv, iv, 15 - cctx->L);
1866 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
1882 if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))