Lines Matching refs:use_len
384 size_t use_len; in mbedtls_gcm_starts() local
413 use_len = (iv_len < 16) ? iv_len : 16; in mbedtls_gcm_starts()
420 mbedtls_xor(ctx->y, ctx->y, p, use_len); in mbedtls_gcm_starts()
428 iv_len -= use_len; in mbedtls_gcm_starts()
429 p += use_len; in mbedtls_gcm_starts()
471 size_t use_len, offset; in mbedtls_gcm_update_ad() local
490 use_len = 16 - offset; in mbedtls_gcm_update_ad()
491 if (use_len > add_len) { in mbedtls_gcm_update_ad()
492 use_len = add_len; in mbedtls_gcm_update_ad()
495 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, p, use_len); in mbedtls_gcm_update_ad()
497 if (offset + use_len == 16) { in mbedtls_gcm_update_ad()
501 ctx->add_len += use_len; in mbedtls_gcm_update_ad()
502 add_len -= use_len; in mbedtls_gcm_update_ad()
503 p += use_len; in mbedtls_gcm_update_ad()
536 size_t offset, size_t use_len, in gcm_mask() argument
554 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, input, use_len); in gcm_mask()
556 mbedtls_xor(output, ectr + offset, input, use_len); in gcm_mask()
558 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, output, use_len); in gcm_mask()
605 size_t use_len = 16 - offset; in mbedtls_gcm_update() local
606 if (use_len > input_length) { in mbedtls_gcm_update()
607 use_len = input_length; in mbedtls_gcm_update()
610 if ((ret = gcm_mask(ctx, ectr, offset, use_len, p, out_p)) != 0) { in mbedtls_gcm_update()
614 if (offset + use_len == 16) { in mbedtls_gcm_update()
618 ctx->len += use_len; in mbedtls_gcm_update()
619 input_length -= use_len; in mbedtls_gcm_update()
620 p += use_len; in mbedtls_gcm_update()
621 out_p += use_len; in mbedtls_gcm_update()