A product of prime numbers and a quadratic non-residue of one of the prime numbers are received as a public key from a first party. The product of prime numbers comprises a first group and the prime numbers respectively comprise a first sub-group and a second sub-group of the first group. Data of the first party is automatically encrypted bit-wise using a computerized device by encrypting first bit values of the data of the first party as quadratic residue and encrypting second bit values of the data of the first party as quadratic non-residue to produce a first intermediate number. The first intermediate number is automatically multiplied by the quadratic non-residue of the public key using the computerized device to complete encryption of the data of the first party. A square root of a value is received from a second party. The second party does not have the quadratic residue and the quadratic non-residue. A single bit of the data of the first party is automatically decrypted for the second party by factoring the product of prime numbers to evaluate whether the single bit has a square root in the first sub-group or the second sub-group based on the square root of the value from the second party.
展开▼