# Proving that two points on elliptic curve are within range

Is it possible to prove that a point on an elliptic curve falls within a given range of another point, without revealing the distance between them. For example:

Let's say $$X$$ and $$Y$$ are two points on an elliptic curve such that $$X = x \cdot G$$ and $$Y = y \cdot G$$, where $$G$$ is the generator. The proover knows values of $$x$$ and $$y$$, and wants to prove to the verifier that $$|x - y| < z$$, where $$z$$ is some value supplied by the verifier.

Another option: prove that $$\frac{x}{y} < z$$, where $$z$$ can be a relatively small number (e.g. 2).

Is either of these possible?

The proof showing that, given $$G$$ and $$x \cdot G$$ and a range $$[A,B]$$, $$x$$ is in the range $$[A,B]$$ is known as the range proof. In your case, we can convert your statement as the range proof as, given $$G$$ and $$H = xG - yG$$, showing $$x-y$$ is in the range $$[-z,z]$$.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 20, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}