Multi-Scheme Support
Simulate Paillier (additive HE), BFV (leveled FHE with multiplication), and ElGamal HE. Each scheme demonstrates different homomorphic properties and trade-offs.
Encrypt integers, perform secure arithmetic on ciphertexts, and decrypt results — without ever exposing your raw data. Simulate Paillier and BFV homomorphic schemes right in your browser.
Select a scheme, generate keys, encrypt your integers, run operations on ciphertext, then decrypt to verify. All computation is local — 100% browser-based.
Explore the full spectrum of homomorphic encryption concepts with this interactive, browser-based simulator.
Simulate Paillier (additive HE), BFV (leveled FHE with multiplication), and ElGamal HE. Each scheme demonstrates different homomorphic properties and trade-offs.
Perform addition, subtraction, scalar multiplication, and ciphertext multiplication directly on encrypted data — and verify the decrypted result matches plaintext computation.
Generate fresh public/private key pairs with configurable key sizes (128–1024 bits). Watch the cryptographic parameters populate in real time using browser-native BigInt.
Enable verbose mode to trace each mathematical step — key generation, encryption, homomorphic operation, and decryption — with full intermediate values shown.
See the homomorphic encryption data flow visualized: plaintext → encrypt → operate on ciphertext → decrypt → verified plaintext result.
Copy or download ciphertext A, ciphertext B, computed ciphertext, decrypted result, and the full step log — all as plain text files for your records or study.
Five steps from key generation to verified result — all without the server ever seeing your plaintext data.
Choose a scheme and key size. The tool generates a public key (used to encrypt) and a private key (used to decrypt). Keys are based on prime factorization and modular arithmetic.
Your two integers A and B are independently encrypted with the public key. The resulting ciphertexts appear as large, random-looking numbers — mathematically unlinkable to the originals without the private key.
The selected operation (add, sub, scalar multiply) is applied directly to the ciphertexts using the algebraic properties of the scheme — no decryption needed at this stage.
The result ciphertext is decrypted with the private key. The decrypted value is verified against the expected plaintext result, confirming the homomorphic property holds.
Homomorphic encryption (HE) is one of the most powerful and transformative ideas in modern cryptography. At its core, homomorphic encryption allows computations to be performed directly on encrypted data — known as ciphertexts — without requiring the data to be decrypted first. The decrypted result of a homomorphic computation matches exactly what you would get by performing the same operation on the original unencrypted values, a mathematical property called homomorphism.
The concept of a homomorphic algorithm rests on the algebraic notion of structure preservation. In group or ring theory, a homomorphism is a function that maps elements between algebraic structures while preserving their relationships. Homomorphic encryption extends this idea into the domain of cryptographic security: the encryption function acts as a homomorphism between the plaintext space and the ciphertext space.
There are three major tiers of homomorphic encryption. Partially Homomorphic Encryption (PHE) supports only one type of operation — either addition or multiplication — over an unlimited number of evaluations. The Paillier cryptosystem, introduced in 1999, is the most widely referenced additive HE scheme. Somewhat Homomorphic Encryption (SHE) supports both operations but for a limited depth of computation before noise accumulates. Fully Homomorphic Encryption (FHE), first constructed by Craig Gentry in 2009, supports arbitrary computation on ciphertexts with a bootstrapping mechanism to refresh the noise level.
Practical FHE schemes include BFV (Brakerski–Fan–Vercauteren), CKKS (Cheon-Kim-Kim-Song, suitable for approximate arithmetic over real numbers), BGV (Brakerski–Gentry–Vaikuntanathan), and TFHE (Torus FHE for fast Boolean circuits). These schemes are implemented in production-grade libraries such as Microsoft SEAL, IBM HElib, and OpenFHE, finding real-world application in privacy-preserving machine learning, secure multi-party computation, and federated data analysis on medical records.
Homomorphic cryptography use cases span nearly every industry. In healthcare, hospitals can run diagnostic algorithms on encrypted patient data without exposing personal health records. In finance, banks can calculate aggregate statistics across encrypted transaction databases while remaining GDPR-compliant. In cloud computing, homomorphic encryption enables clients to outsource computation to untrusted servers — the server computes on ciphertext and returns an encrypted answer it cannot itself interpret.
Despite its promise, homomorphic encryption carries performance trade-offs. FHE operations are typically thousands of times slower than their plaintext equivalents, and ciphertext sizes are significantly larger than plaintexts. Research in hardware acceleration, optimized polynomial arithmetic, and SIMD batching continues to reduce this gap, making practical deployment increasingly viable. Tools like this simulator help developers, students, and security researchers intuitively understand homomorphic encryption examples and how the homomorphic property behaves across different arithmetic operations — all without writing a single line of library code.
Everything you need to know about homomorphic encryption and this tool.
Explore our full suite of free online cryptography tools and the latest AI-powered utilities — all in your browser.