I want to encrypt very small integers in the range 0-44
using the Paillier cryptosystem. Is there a way to select p
, q
(g=n+1
anyway) and mostly r
in such a way that I can guarantee that the encrypted values are still 32-bit integers?
Also, I have trouble understanding how to select r
. According to wikipedia, the random $r \in \mathbb Z^{*}_{n} $. How can I implement this in a programming language e.g. Java when I will have to select random values of r
for more than 100,000 such integers?