Tag Info

New answers tagged


Regardless whether input is small, $n$ must be large enough to avoid factorization. Next, $r$ must be sampled from a large space to avoid decryption by trial-and-error. Some crypto and big-numbers library (bouncycastle, openssl, crypto..) might be handy to implement such an algorithm. It would be safe to choose an implementation rather than write it from ...


Let's review the encryption process for Paillier: Let $m$ be a message to be encrypted where $m\in\mathbb{Z}_n$ (in your case $m\in\{0,1\}$) Select random $r$ where $r\in\mathbb{Z}_n^*$ Compute ciphertext as: $c=g^m\cdot r^n\bmod{n^2}$ It is that random value $r$ that makes it so that encrypting values drawn from a small plaintext space does not have ...


No, there are no security compromises; the Pallier system remains secure. Both messages are in the supported message space and as Paillier encryption provides IND-CPA security you are safe when doing this.


Paillier is not order preserving, so in your algorithm $x_1+y_1$ IF and ONLY IF $x_1+y_1 <= x_2+y_2 \dots$ simply does not work. You can't do the $\leq$ comparison. Whether you have the same $r$ or not does not really matter, if we look at the encryption: $E(m)= g^m r^n$ mod $n^2$ You could try to achieve that by fixing $r^n$ such that the product with ...

Top 50 recent answers are included