← Cryptography guide

K048 / Asymmetric encryption, signatures and key exchange

Paillier

Paillier cryptosystem · Survey date 2026-12-05

A probabilistic asymmetric public-key encryption scheme proposed by Pascal Paillier in 1999.

CRYPTOGRAPHY LAB / K048

Cryptography Lab · Paillier

Run real computations and inspect intermediate states step by step.

Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.

Scope: Toy educational example

Paillier (toy p=7,q=11)

See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.

Open lab →

Definition and overview
A probabilistic asymmetric public-key encryption scheme proposed by Pascal Paillier in 1999. Source document ↗
Classification and reversibility
Asymmetric public-key encryption decryptable by private-key holder. Source document ↗
Key or secret requirements
Public/private pair described as public (n,g), private (n,ϕ(n),µ). Source document ↗
Operating principle and structure
Uses n=pq, g=n+1 and random r; computes c=g^m·r^n modulo n². Source document ↗
Key size, block size and parameters
Key size is modulus n bit length; python-paillier default 3072 bits. Source document ↗
Security strength and recommendation
At least 3072-bit modulus recommended for 128-bit symmetric-equivalent security. Source document ↗
Known attacks and vulnerabilities
Improper modulus validation or implementation defects have led to key-recovery and MPC wallet attacks. Source document ↗
Standards and certification
Intel Paillier Cryptosystem Library is cited as having certified ISO compliance. Source document ↗
Typical uses
Cloud/partially homomorphic computation on ciphertext without private key. Source document ↗
Implementations, libraries and tools
Python phe/paillier, Intel library and TNO implementation. Source document ↗
Decryption or decoding
Private-key holder decrypts using library decrypt API. Source document ↗
Advantages
Supports homomorphic addition and scalar multiplication; decrypted results correspond to plaintext operations. Source document ↗
Limitations and cautions
RSA-like key generation pitfalls and base selection require care. Source document ↗
Distinguishing encryption, encoding and hashing
Paillier is keyed asymmetric encryption requiring decryption, not encoding/hash. Source document ↗

Practical examples

Examples are illustrative; they are not execution-tested implementations or operational recommendations.

Example

Encrypt plaintext integers publicly, perform ciphertext addition or scalar multiplication, then decrypt privately to recover plaintext operation result. No real keys/secrets in examples.

Procedure

Generate key pair and retain private key; encode plaintext as integer/fixed-point; encrypt publicly; compute homomorphically on ciphertext; decrypt privately and decode if needed. Encoding is representation conversion, encryption is keyed confidentiality.

Scenario

Cloud ciphertext sums or MPC threshold-signature components needing computation without secret key. Separate final decryption authority for key holders.

Pitfalls and alternatives

Distinguish encoding/hash; validate key size, randomness and modulus biprime/factor properties. Use vetted libraries and avoid unmaintained implementations.

References