Patent ID: 10601579

Abstract:
A method for performing a secure comparison between a first secret data and a second secret data, including: receiving, by a processor of a first party,  encrypted bits of the second secret data y from a second party, where  is an integer; computing the Hamming weight h of first secret data x, wherein x has  bits; computing the value of a first comparison bit δA such that δA=0 when h>└/2┘, δA=1 when h<┌/2┐, and δA is randomly selected when h=/2; forming a set of └/2┘ indexes  that includes at least the indexes i where xi=δA; selecting random invertible scalars ri for each i in  and computing c*i=(1+(1−2δA)xi·yi2δ−1·(xj⊕yj))rwherein w denotes the homomorphic encryption of w using a cryptographic key of the second party; selecting random invertible scalars r−1 and computing c*−1=(δA·xj⊕yj)r; transmitting ciphertexts c*i in a random order to the second party.