Paillier explained in plain terms means understanding the cryptosystem that can add numbers together while they are still encrypted, a design from Pascal Paillier that lets a server compute on data it cannot read. The central question is how anyone can add what they cannot see, and the answer is that Paillier turns addition into multiplication, so the server multiplies ciphertexts and the owner decrypts the sum.
Paillier is a public-key cryptosystem designed by Pascal Paillier and published in 1999. It encrypts numbers under a public key built from two large primes, supports addition of encrypted values, and it is built on the decisional composite residuosity problem, which means its security rests on a hard problem in number theory.
This article makes the case for Paillier, explains what it is, how it works, and where its ideas still earn their keep.
Key takeaways
- Paillier is a public-key cryptosystem published in 1999.
- It is additively homomorphic: ciphertexts can be added.
- It is built on the composite residuosity problem.
- It uses a modulus that is the square of a product of primes.
- It runs in voting, statistics, and private machine learning.
What Paillier is
Paillier is a scheme that lets one party encrypt numbers and another party add them without ever seeing them, passing ciphertexts through multiplications that mirror additions of the plaintexts. One side encrypts a salary, another encrypts a bonus, and the server multiplies the two ciphertexts, and the result decrypts to the total, which means the server learns nothing about either number.
Its signature feature is the homomorphic addition. Most encryption hides data completely, but Paillier preserves one operation, addition, which means a server can total a column of encrypted figures, and that single preserved operation is enough for statistics, voting, and many kinds of private computation.
The design was a reaction to the needs of privacy-preserving computation. By the late 1990s, researchers wanted servers to compute on data they could not read, and Paillier offered a practical way to do it, because adding encrypted numbers turned out to be far easier than multiplying them, and that practicality is why the scheme caught on.
It became one of the best-known homomorphic schemes, and it was implemented in major cryptographic libraries. Reaching those libraries was itself a mark of quality, because library authors only include designs that survived public cryptanalysis, and Paillier has stood in those libraries for more than twenty-five years.
Its most famous property is the name. Paillier is named after Pascal Paillier, the French cryptographer who published it in 1999, and the name has stuck through two decades of study, which is a reminder that cryptographers still enjoy a scheme with a clear author behind it.
Our guide to homomorphic encryption explains the wider idea Paillier belongs to, and our guide to ElGamal explains an earlier public-key design.
How Paillier works
Everything starts with key generation, which produces a public key and a private key from two large primes. The primes are multiplied to make a modulus, and the public key is that modulus together with a generator, while the private key holds the secret factors, which means only the key holder can decrypt, and the server that adds ciphertexts needs no secret at all.
Encryption begins with a random value chosen by the sender. The sender raises the generator to the message, multiplies by the random value raised to the modulus, and takes the result modulo the squared modulus, which means the ciphertext looks like random noise to anyone without the private key, and the same message encrypts differently every time.
The addition is what makes the scheme work as a whole. Multiplying two ciphertexts gives a ciphertext that decrypts to the sum of the two messages, because the exponents add when the bases multiply, and because the random values also multiply, the result stays properly randomised, which means the server can add without ever decrypting.
The multiplication by a constant spreads the effect further. Raising a ciphertext to a known power gives a ciphertext that decrypts to the message times that constant, which means the server can also scale encrypted values, and because scaling needs no secret, a server can compute weighted sums of encrypted data.
Decryption recovers the message by reversing the arithmetic. The receiver uses the private key to strip away the random masking, divides out the modulus, and recovers the original number, which means the holder of the private key sees the result of the server’s work, and nobody else sees anything at all.
The shared result is then used as ordinary data. Both sides treat the decrypted sum as a plain number, which they can publish, store, or feed into further computation, and because the raw inputs were never exposed, the whole process preserves privacy from start to finish.

Comparing Paillier with other encryption schemes
Paillier is one of several public-key schemes in use today, and each was built with a different emphasis. RSA is the classical scheme for encryption and signatures, ElGamal is the classical scheme built on discrete logarithms, and Paillier is the one that adds encrypted numbers, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | Paillier | RSA | ElGamal |
|---|---|---|---|
| Problem | Composite residuosity | Factoring | Discrete logarithm |
| Homomorphic | Additive | Multiplicative | Multiplicative |
| Key size | Large | Large | Large |
| Speed | Slow | Fast | Moderate |
| Best for | Private totals | General use | Signatures |
The practical result is that Paillier is the right choice for private totals, RSA suits general use everywhere else, and ElGamal fits signatures instead.
Where Paillier is used
Research uses it as a case study in homomorphic design. Cryptographers still cite Paillier when they discuss how much can be computed on encrypted data, because it is the clearest example of additive homomorphism in a practical scheme, and that lesson shapes how new schemes are judged today.
Teaching uses it to show how public-key cryptography works. Paillier is clean enough to explain in a lecture and well documented enough to implement in an afternoon, which makes it a favourite example in cryptography courses that cover homomorphic encryption and the design ideas that shaped it.
Benchmarks use it to measure homomorphic schemes. When someone builds a new library or a new piece of hardware, Paillier is one of the designs they test, because its large moduli exercise different parts of a processor than other schemes do, and a platform that runs Paillier well is likely to run most public-key schemes well.
Voting systems use it to count ballots in private. Electronic voting schemes encrypt each vote with Paillier, add the ciphertexts together, and decrypt only the total, which means no single ballot is ever revealed, and that privacy is now standard practice for serious electronic voting research.
Machine learning uses it to train models on private data. Hospitals and banks now experiment with Paillier to add encrypted gradients without pooling their records, which means the technique is moving from research papers into products, and that move is still accelerating.
Strengths and limits
The greatest strength of Paillier is its homomorphic addition. A scheme that lets a server total encrypted numbers gives collaborators a tool that no ordinary encryption can match, and that ability is real, proven in the mathematics of the scheme and confirmed by the deployments that rely on it.
It is also a strength that the design is simple to understand. A scheme built from a modulus, a generator, and a random value is easy to implement, easy to analyse, and easy to test, and that simplicity is worth more than cleverness in a field where hidden complexity usually means hidden flaws.
The limits are real, though, and the biggest is size and speed. Paillier ciphertexts are much larger than the messages they carry, and the arithmetic is slow, which means a system that values speed or bandwidth will usually choose a lighter scheme, and Paillier stays where privacy matters more than performance.
Paillier checklist
- Use Paillier when you must add numbers without seeing them.
- Remember it supports addition, not general multiplication.
- Study its modulus to understand the residuosity problem.
- Compare it with RSA to see the homomorphic trade-off.
- Note its large ciphertexts when planning bandwidth.
- Test against published test vectors before trusting any implementation.
- Keep private keys random and protect them as carefully as with any key.
- Use a proper key size, never a toy modulus.
- Choose a fully homomorphic scheme when you need more than addition.
Frequently asked questions
What is Paillier in simple terms?
It is a public-key cryptosystem that lets a server add encrypted numbers together, so the total can be decrypted without any single number ever being revealed.
Why is it called Paillier?
After Pascal Paillier, the French cryptographer who published it in 1999 in a paper on cryptosystems based on composite degree residuosity classes.
How is Paillier different from RSA?
Both are public-key schemes based on factoring-style problems, but Paillier supports addition of encrypted values, while RSA supports multiplication of encrypted values.
Is Paillier still secure?
Yes, no practical attack against it has been published, and its security rests on a well-studied number-theory problem, though like all classical schemes it would fall to a large quantum computer.
Where is Paillier used?
In electronic voting research, privacy-preserving statistics, and collaborative machine learning, wherever totals must be computed without revealing individual inputs.
When should I use Paillier?
When you need to add encrypted numbers, when you build a private vote count, or when you want a homomorphic scheme simple enough to implement correctly.
The bottom line
Paillier explained in one line is this: the cryptosystem that adds in secret, a 1999 design that lets servers total numbers they cannot read.
It is proof that encryption can compute, and the reason it still matters is that every privacy-preserving system designed since has been judged partly by the lesson Paillier taught.
This article is general information about how Paillier works, not advice about choosing encryption for a particular device or system.







