Lines Matching refs:ivlen
38 int ivlen; /* IV length */ member
162 # define BLOCK_CIPHER_generic(nid,keylen,blocksize,ivlen,nmode,mode,MODE,flags) \ argument
164 nid##_##keylen##_##nmode,blocksize,keylen/8,ivlen, \
240 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aria_gcm_init_key()
247 CRYPTO_gcm128_setiv(&gctx->gcm, iv, gctx->ivlen); in aria_gcm_init_key()
249 memcpy(gctx->iv, iv, gctx->ivlen); in aria_gcm_init_key()
264 gctx->ivlen = EVP_CIPHER_get_iv_length(c->cipher); in aria_gcm_ctrl()
272 *(int *)ptr = gctx->ivlen; in aria_gcm_ctrl()
279 if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) { in aria_gcm_ctrl()
285 gctx->ivlen = arg; in aria_gcm_ctrl()
305 memcpy(gctx->iv, ptr, gctx->ivlen); in aria_gcm_ctrl()
313 if ((arg < 4) || (gctx->ivlen - arg) < 8) in aria_gcm_ctrl()
318 && RAND_bytes(gctx->iv + arg, gctx->ivlen - arg) <= 0) in aria_gcm_ctrl()
326 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aria_gcm_ctrl()
327 if (arg <= 0 || arg > gctx->ivlen) in aria_gcm_ctrl()
328 arg = gctx->ivlen; in aria_gcm_ctrl()
329 memcpy(ptr, gctx->iv + gctx->ivlen - arg, arg); in aria_gcm_ctrl()
334 ctr64_inc(gctx->iv + gctx->ivlen - 8); in aria_gcm_ctrl()
342 memcpy(gctx->iv + gctx->ivlen - arg, ptr, arg); in aria_gcm_ctrl()
343 CRYPTO_gcm128_setiv(&gctx->gcm, gctx->iv, gctx->ivlen); in aria_gcm_ctrl()
385 if ((gctx_out->iv = OPENSSL_malloc(gctx->ivlen)) == NULL) in aria_gcm_ctrl()
387 memcpy(gctx_out->iv, gctx->iv, gctx->ivlen); in aria_gcm_ctrl()