K069 / Advanced and next-generation cryptography
Homomorphic encryption
An encryption scheme that allows computation on data while it remains encrypted.
CRYPTOGRAPHY LAB / K069
Cryptography Lab · Homomorphic encryption
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.
Additive homomorphic encryption (toy Paillier; NOT FHE)
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- An encryption scheme that allows computation on data while it remains encrypted. Source document ↗
- Classification and reversibility
- Reversible encryption decryptable with secret key. Source document ↗
- Key or secret requirements
- Requires key set including secret and public keys. Source document ↗
- Operating principle and structure
- Performs homomorphic addition/multiplication etc. on ciphertext. Source document ↗
- Key size, block size and parameters
- TFHE uses plaintext/ciphertext moduli and parameters such as ∆=q/p. Source document ↗
- Security strength and recommendation
- 128/192/256-bit levels are de facto community standards. Source document ↗
- Known attacks and vulnerabilities
- Fault-injection attacks reported. Source document ↗
- Standards and certification
- No ISO/IEC- or NIST-certified FHE security levels yet. Source document ↗
- Typical uses
- Outsource computation on encrypted inputs to untrusted servers, e.g. ML inference. Source document ↗
- Implementations, libraries and tools
- TenSEAL (Microsoft SEAL-based) and other libraries. Source document ↗
- Decryption or decoding
- Decrypt resulting ciphertext after computation. Source document ↗
- Advantages
- Computing party cannot access original data. Source document ↗
- Limitations and cautions
- Partial HE may be faster/simpler than FHE; performance and size overhead. Source document ↗
- Distinguishing encryption, encoding and hashing
- Encryption enabling ciphertext computation, unlike encoding/hash. Source document ↗
Practical examples
Example
User encrypts data and sends to server, which computes homomorphically without decrypting and returns encrypted result. User decrypts with secret key; e.g. encrypted vector addition yields plaintext sum.
Procedure
FHE: key generation, plaintext encoding/slot packing, encryption, ciphertext computation, decryption, decoding. Encoding is usually keyless representation conversion; secret/public/evaluation keys enable confidentiality and homomorphic computation; hashes cannot be reversed.
Scenario
External cloud medical/financial analysis or ML inference on encrypted inputs. Client encrypts/decrypts, server computes only with evaluation key. Check regulatory, performance and standard requirements in pilot.
Pitfalls and alternatives
Do not replace Base64/URL encoding or SHA with FHE. Noise, parameters and performance constrain computations; select BFV/CKKS/TFHE, library, key management and security review. For simple confidentiality use AEAD, integrity signatures/hashes, search/comparison consider PIR/MPC.
References
- A High-Level Technical Overview of Fully Homomorphic Encryption || Math ∩ Programming ↗
- Quickstart - The DESILO FHE Library ↗
- Key generation, encryption, and decryption ↗
- fhe - Rust ↗
- Fully Homomorphic Encryption: A Mathematical Introduction ↗
- How Fully Homomorphic Encryption Would Break: The Seams Above the Lattice ↗
- GlitchFHE: Attacking Fully Homomorphic Encryption Using Fault Injection ↗
- Fully Homomorphic Encryption from Scratch ↗
- TenSEAL ↗
- The Beginner’s Textbookfor Fully Homomorphic Encryption ↗
- Can Homomorphic Encryption be Practical? ↗