# Comparison in Multi-party Computation without bit decomposition

There are MPC comparison protocols which can securely compute $$(a<^?0):=\begin{cases}1,\text{ if }a<0\\ 0,\text{ otherwise}\end{cases}$$, where $$a$$ is an element of a prime-order field (of course one needs a notion of what $$"<"$$ even means in this case). But to my knowledge, all of them use some kind of bit decomposition protocol which outputs shared bits $$[a_0],[a_1],\ldots,[a_k]$$ on input $$\textstyle \left[\sum^k_{i=0}a_i2^i\right]$$. Does anyone know of such a comparison protocol which does not require bit decomposition?

• Are you interested only in the setting of more than two parties, or are you also looking for solutions in the 2-party setting? Commented Mar 12 at 20:46
• I'm curious about both. Commented Mar 13 at 21:06

In the two-party setting, there are fast protocols for securely comparing two shared integers that do not go through bit decomposition. For example:

If you want to optimize online communication (but are ok with paying more communication in an input-independent preprocessing phase), then the best approaches rely on function secret sharing, see here and the improvements in here.

If you want low end-to-end communication, then I think this protocol used to be state-of-the-art (disclaimer: I'm the author, and this area evolves, there might be better protocols out there). After a quick Google search, my best bet is that there might be faster protocols (less rounds and communication) in this more recent paper, but I did not read it in full details (I still checked that they don't go through shared bit decomposition).

• There have been some new results, Professor. For FSS, SIGMA requires 1 eval of DPF for G^{out}={0,1},while the improved one in your answer requires 1 eval of DCF for larger output domain. For the second category, CrypTFlow2 uses a GSV07 style tree structure (KKOT for equa & comp in leaves, OT for bit comp in nodes) and requires logl rounds and comm slightly larger than λl. More recent work like this paper generates ROT with silent OT for better comm.
– rzxh
Commented May 9 at 20:19

Bit decomposition is sufficient, but not necessary, for comparison. In general, the comparison $$a is equivalent to $$0, which corresponds to extracting the most significant bit of $$x=b-a$$. There are many ways of extracting such bit without extracting all of them. See for example:

• Does this work because the MSB encodes the sign of $b-a$? Commented Mar 12 at 19:35
• Yes, correct. The MSB (in two-complement representation) is $1$ if $b-a$ is negative, and $0$ otherwise. Commented Mar 12 at 21:25