Check if $a<b$ in a trustless scenario Let's say Alice has access only to a value $a$ and Bob has access to both $a$ and $b$. I need Alice to be able to check whether $a&lt;b$ holds, like a relaxed version of the Yao's Millionaire Problem, given that one of them knows both values. The challenge is that the comparison result cannot be trusted if done by Bob, as he may be biased.

Therefore, I thought of two approaches for this problem:


Check whether Bob was honest in his evaluation of $a&lt;b$, maybe by
using ZK-proof; or
Somehow enable Alice to do the comparison
herself without exposing $b$, so that:
$$a &lt; enc_{pk}(b) \iff a&lt;b $$


Which one do you think it would be better to tackle and how?



EDIT: You can assume that both $a$ and $b$ are well defined by a commitment scheme before the evaluation is done.
This is a common misunderstanding of zero knowledge. In order to prove something in zero knowledge (in fact, in order to prove anything in a way that is non-trivial), there must a well defined statement. See https://crypto.stackexchange.com/a/60633/25354 for an explanation of this.

Note that in your context, it is always true that there exists some $b$ such that $a&lt;b$ (over the integers). Thus, without having some commitment or encryption of $b$ before the proof starts, this is trivially always true.