3

In ECC, the proof showing that given $G$, $x$ and $y$ is in the range $[-z,z]$ is known as the range proof.

Related to: Proving that two points on elliptic curve are within range

So, if: $$H=xG−yG$$ it is possible to prove that $x−y$ is in the range $[−z,z]$.

Could you explain how to apply this theory? Do you have a reference, please?

Is z fixed by the method or is it configurable?

1 Answers1

1

Proving that $-z\leq x-y\leq z$ given $C=xG-yG=(x-y)G$ is the same as proving that $0\leq a<n$ where $a=z + x - y$ and $n=2z+1$ given $C'= aG = C + zG$.

$C'$ can be considered a Pedersen commitment of the form $aG+bH$, except that there is no blinding factor $b$ set.

To prove that $C'$ is a Pedersen commitment to a value $a$ less than $n$, first you need to generate a number of components, a selection of which together can sum to any natural number less than $n$, but cannot sum to any value equalling or exceeding $n$. See this answer for a method.

Then you create a Pedersen commitment for each of those components, and demonstrate that the Pedersen commitment $C'$ is constructed as the addition of some selection of those component Pedersen commitments. To see how, see this answer.

knaccc
  • 4,880
  • 1
  • 18
  • 33