Modulus switching is a noise management technique that transforms a ciphertext defined modulo a large integer q into a ciphertext modulo a smaller integer q', proportionally scaling down both the message and the accumulated noise budget error. This operation reduces the absolute magnitude of the noise term without requiring knowledge of the secret decryption key, functioning as a lightweight alternative to the computationally expensive bootstrapping procedure.
Glossary
Modulus Switching

What is Modulus Switching?
A foundational noise control technique in leveled homomorphic encryption that scales a ciphertext to a smaller modulus, proportionally reducing the absolute noise magnitude to enable deeper computation.
By iteratively switching to smaller moduli after each multiplication-heavy layer, modulus switching maintains the invariant that noise grows linearly with circuit depth rather than exponentially. This technique is fundamental to leveled fully homomorphic encryption schemes like BGV and BFV, where the initial modulus is chosen to accommodate a predetermined multiplicative depth, and each switch consumes one 'level' of the modulus chain until the ciphertext can no longer be operated on.
Key Characteristics of Modulus Switching
Modulus switching is a fundamental noise control operation in leveled homomorphic encryption that scales down a ciphertext to a smaller modulus, proportionally reducing the absolute noise magnitude without requiring access to the secret key.
Core Mechanism: Scaling Down Noise
Modulus switching transforms a ciphertext defined modulo a large integer Q into an equivalent ciphertext modulo a smaller integer q. The operation works by multiplying the ciphertext by the ratio q/Q and applying a rounding step. Crucially, the absolute magnitude of the embedded noise is scaled down by approximately the same factor, while the noise-to-modulus ratio remains roughly constant. This provides a controlled method for resetting the noise budget after multiplicative operations, enabling deeper circuits without bootstrapping.
- Input: Ciphertext modulo Q with noise magnitude E
- Output: Ciphertext modulo q with noise magnitude ≈ E · (q/Q)
- Key property: No secret key required—this is a public operation
Role in Leveled FHE Schemes
In leveled fully homomorphic encryption schemes like BGV and BFV, modulus switching is the primary noise management tool that enables multi-level arithmetic circuits. Each multiplicative level consumes part of the noise budget; modulus switching is applied after multiplication to reduce noise back to a manageable level. The modulus chain is a precomputed sequence of decreasing moduli Q₀ > Q₁ > ... > Qₗ, where each switch moves down one rung. This eliminates the need for expensive bootstrapping until the entire chain is exhausted.
- BGV: Uses modulus switching after every multiplication
- BFV: Can defer switching via scale-invariant techniques
- Depth limit: Determined by the length of the modulus chain
Distinction from Rescaling in CKKS
While modulus switching and rescaling in the CKKS scheme are mathematically similar, they serve different conceptual purposes. Modulus switching in exact-arithmetic schemes (BGV/BFV) is purely a noise management operation. In CKKS, rescaling additionally divides the encrypted message by a scale factor Δ to maintain a stable fixed-point representation after multiplication. This dual role means CKKS rescaling simultaneously manages noise and controls the encoding scale.
- BGV/BFV modulus switching: Noise reduction only
- CKKS rescaling: Noise reduction + scale stabilization
- Both: Reduce modulus size and consume one level of the chain
Modulus Switching vs. Bootstrapping vs. Rescaling
A comparison of three distinct cryptographic operations used to manage noise growth in lattice-based homomorphic encryption schemes, enabling deeper computation on ciphertexts.
| Feature | Modulus Switching | Bootstrapping | Rescaling |
|---|---|---|---|
Primary Purpose | Reduces ciphertext size and absolute noise to enable continued computation | Refreshes exhausted noise budget to enable unlimited computation depth | Maintains stable scale factor and manages noise after multiplication |
Scheme Association | BGV, BFV | TFHE, FHEW, CKKS (Leveled FHE) | CKKS |
Requires Secret Key | |||
Operation Type | Modulus reduction (scalar division) | Homomorphic evaluation of decryption circuit | Division by scale factor Δ |
Noise Reduction Mechanism | Scales down both modulus and noise proportionally | Resets noise to a fixed baseline level | Truncates least significant bits containing noise |
Computational Cost | Low | High | Low |
Enables Unlimited Depth | |||
Preserves Exact Plaintext | Yes (exact integer arithmetic) | Yes (with sufficient precision) | No (approximate fixed-point arithmetic) |
Frequently Asked Questions
Clear, technical answers to the most common questions about modulus switching, its role in noise management for lattice-based cryptography, and its application in homomorphic encryption schemes.
Modulus switching is a noise management technique in lattice-based cryptography that transforms a ciphertext defined modulo a large integer Q into a ciphertext defined modulo a smaller integer q, proportionally reducing the absolute magnitude of the embedded noise. The operation works by scaling the ciphertext components by the ratio q/Q and rounding to the nearest integers. Critically, this is a keyless operation—it does not require access to the secret key. The primary mechanism relies on the fact that the noise term e in a ciphertext [c0 + c1*s]_Q = m + e is scaled down alongside the message, effectively resetting the noise budget without decryption. This technique is foundational to leveled fully homomorphic encryption schemes like BGV and BFV, where it enables the evaluation of deep arithmetic circuits by controlling noise growth after each multiplication.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Modulus switching is a core noise management primitive in leveled homomorphic encryption. The following concepts define the cryptographic ecosystem in which it operates.
Noise Budget
The finite capacity for error accumulation within a ciphertext. Each homomorphic operation, particularly multiplication, consumes this budget. When the noise magnitude exceeds a critical threshold relative to the ciphertext modulus, decryption fails. Modulus switching is the primary technique for proactively managing this budget by scaling down both the ciphertext and its embedded noise.
Rescaling
In the CKKS scheme, rescaling is the specific instantiation of modulus switching. After a multiplication, the ciphertext scale factor grows quadratically. Rescaling divides the ciphertext by a fixed scale factor and truncates the modulus chain by one level, maintaining a stable scale and reducing noise. It is functionally identical to modulus switching but tightly coupled with CKKS's fixed-point arithmetic.
Leveled Fully Homomorphic Encryption
A variant of FHE that supports computation up to a predetermined multiplicative depth without bootstrapping. The circuit depth must be known before encryption. Each multiplication consumes one level from the modulus chain. Modulus switching is the mechanism that drops a level after each multiplication, making it the fundamental operation that defines leveled HE execution.
Bootstrapping
A cryptographic technique that refreshes a ciphertext by homomorphically evaluating the decryption circuit, resetting the noise budget to enable unlimited computation depth. While modulus switching manages noise within a fixed circuit depth, bootstrapping is required when the modulus chain is exhausted. The two techniques are complementary: modulus switching for leveled efficiency, bootstrapping for unbounded computation.
Ring Learning With Errors (RLWE)
The lattice-based hardness assumption operating over polynomial rings that underpins the security of modern HE schemes. Ciphertexts in RLWE-based schemes contain a noise term sampled from an error distribution. Modulus switching exploits the mathematical structure of RLWE to scale down the ciphertext modulus while preserving the ratio of noise to modulus, effectively reducing absolute noise magnitude without secret key knowledge.
Key Switching
A cryptographic operation that transforms a ciphertext encrypted under one secret key into a ciphertext encrypting the same message under a different key. Modulus switching is a key-free operation—it requires no evaluation keys—while key switching requires public switching keys. Both are used together in HE multiplication: modulus switching manages noise, while relinearization (a form of key switching) reduces ciphertext size.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us