# zero knowledge proof of a number greater than zero

Is there a way to prove in zero knowledge that an element (h) of a group is less than (or greater than) another element from the group? In other words, can we prove that the difference of elements is less than (or greater than) 0? I have looked at some range proofs that prove a number lies in a certain range. But I just need the less than or greater than proof. Anything using bilinear pairings would be helpful.

PS : I am still a newbie with ZKP. So please bear my ignorance :-)

• Just to clarify, are you comparing integers, or elements of some other ordered group? If it's integers, can we assume some upper bound like 2^32? – Daniel Lubarov Aug 2 at 20:11
• These are elements of G1, G2 or GT of Biliner pairing. – sandeep kiran p Aug 2 at 23:54
• Hi @DanielLubarov. How do we do it for integer based comparison? – sandeep kiran p Aug 4 at 23:47
• There are quite a few variations, but the basic method is to split both operands into a canonical binary encoding, then do a binary comparison as we would in hardware. I wrote up some R1CS-focused notes at the end of github.com/mir-protocol/r1cs-workshop/blob/master/workshop.pdf – Daniel Lubarov Aug 5 at 0:39