server aid secure equality test
How about hashes?


$P_i$ choose random numbers $R_i$ that they exchange through $S$.
They calculate $H_i = H(R_1|R_2|m_i)$ that they give $S$.
If $H_1 = H_2$, then $S$ can be reasonably sure $m_1=m_2$.


Assuming $H$ is a strong cryptographic hash function and $R_i$ are long enough to avoid collisions (e.g. 256 bits), the worst the server can do is a brute force attack to find $m_i$. Giving an incorrect $R_i$ will only cause the equality check to fail.