Sitemap
Press enter or click to view image in full size

Member-only story

Processing Floating Point Values for Paillier Homomorphic Addition and RSA Homomorphic Multiplication

3 min readDec 27, 2024

--

With Partially Homomorphic Encryption (PHE), we can have RSA, ElGamal, Exponential ElGamal, Elliptic Curve ElGamal, Paillier, Damgard-Jurik, Okamoto–Uchiyama, Benaloh, Naccache–Stern, and Goldwasser–Micali. Overall, RSA and ElGamal are multiplicative homomorphic, and Paillier and Naccache-Stern are additive homomorphic:

Press enter or click to view image in full size

These methods will work well with integer values, but we have to modify them if we use floating-point values. For this, we create fraction values, and which scale the floating point values into integers.

For this, we have a precision of five decimal places. Thus an addition of:

13.43 + 5.32

can become:

13.43000 + 5.32000

Now, we need to convert these to integer values with a scalar value (10^x). We would then get:

1343000 x 10⁵ + 532000 x 10⁵

This would be become:

(1343000 + 532000) x 10⁵

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.