Modulus switching is a cryptographic operation that transforms a ciphertext from a larger modulus $q$ to a smaller modulus $q'$ while preserving the encrypted plaintext. By scaling both the ciphertext and the embedded noise by the ratio $q'/q$, the absolute magnitude of the noise is reduced proportionally. This effectively resets the noise floor, enabling additional homomorphic multiplications before decryption becomes impossible.
Glossary
Modulus Switching

What is Modulus Switching?
Modulus switching is a lightweight noise management technique in leveled homomorphic encryption that scales down the ciphertext modulus to proportionally reduce absolute noise, extending the noise budget without executing a costly bootstrapping operation.
Crucially, modulus switching is far less computationally expensive than bootstrapping, making it the primary noise management tool in leveled fully homomorphic encryption schemes like BGV and BFV. However, each switch consumes a level of the fixed multiplicative depth, permanently reducing the modulus and the total computation capacity. It is often paired with relinearization after multiplication to maintain ciphertext size efficiency.
Key Characteristics of Modulus Switching
Modulus switching is a lightweight noise management technique that scales down the ciphertext modulus to proportionally reduce absolute noise, effectively extending the noise budget without executing a full bootstrapping operation.
Proportional Noise Reduction
The core mechanism of modulus switching relies on scaling invariance. By switching from a larger modulus ( q ) to a smaller modulus ( q' ), the absolute magnitude of the inherent cryptographic noise is reduced by approximately the factor ( q'/q ). This is mathematically equivalent to rounding the ciphertext to a lower precision, which truncates the least significant bits where the noise resides, thereby resetting the noise budget without decrypting the data.
Bootstrapping Alternative
Unlike bootstrapping, which homomorphically evaluates the decryption circuit to refresh noise, modulus switching is a purely algebraic operation. It is significantly less computationally intensive, often requiring only simple modular arithmetic. However, it comes with a strict limitation: it permanently reduces the ciphertext modulus, which decreases the total computational capacity remaining. It is typically used in leveled homomorphic encryption schemes to manage noise after every multiplication gate.
Role in Leveled FHE
In Leveled Fully Homomorphic Encryption, the circuit depth must be known in advance. Modulus switching is the primary tool for navigating this depth. The scheme initializes with a chain of moduli ( q_0 > q_1 > ... > q_L ). After each multiplicative layer, a modulus switch moves the ciphertext down the chain, reducing the noise to a baseline level. This allows the evaluation of circuits with a predetermined multiplicative depth without the massive overhead of bootstrapping.
Relationship with Rescaling in CKKS
In the CKKS scheme, which handles approximate arithmetic, the modulus switching operation is called rescaling. It serves a dual purpose: it manages noise and divides the ciphertext by a scaling factor ( \Delta ) to maintain a stable scale. After a multiplication of two scaled ciphertexts (scale ( \Delta^2 )), rescaling divides by ( \Delta ) and reduces the modulus, effectively truncating the noisy lower bits and keeping the plaintext precision consistent throughout the computation.
Interaction with Relinearization
Modulus switching is often paired with relinearization after a homomorphic multiplication. Multiplication increases both the noise and the ciphertext size (from 2 to 3 ring elements). Relinearization first reduces the size back to 2 elements using a key-switching procedure. Modulus switching then reduces the noise of this compact ciphertext. Performing modulus switching before relinearization is technically possible but generally avoided as it complicates the key-switching key generation.
Security and Modulus Chain
The security of lattice-based schemes relies on the hardness of Ring-LWE at a specific modulus-to-noise ratio. As modulus switching reduces the modulus ( q ), the ratio changes. If the modulus becomes too small relative to the noise floor, the scheme becomes insecure. Therefore, the modulus chain must be carefully parameterized to ensure that even the smallest modulus ( q_L ) maintains the required security level, typically 128-bit or higher, against known lattice reduction attacks.
Frequently Asked Questions
Clear answers to common questions about modulus switching, a foundational noise management technique in lattice-based homomorphic encryption that extends the computational capacity of ciphertexts without the heavy cost of bootstrapping.
Modulus switching is a noise management technique in lattice-based homomorphic encryption that scales down both the ciphertext and its embedded noise by switching to a smaller modulus, effectively reducing the absolute magnitude of the noise and extending the noise budget. The operation works by taking a ciphertext defined modulo a large integer Q and rescaling it to a smaller modulus q (where q < Q). Mathematically, the ciphertext coefficients are multiplied by q/Q and rounded to the nearest integer. Because the noise component scales proportionally with the modulus, the noise magnitude decreases linearly, while the encrypted message is preserved modulo the new modulus. This technique is essential in schemes like BFV and BGV, where it is used after multiplication operations to control noise growth and maintain correct decryption without executing a costly bootstrapping procedure.
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 critical noise management technique in leveled homomorphic encryption. Explore the related concepts that define the noise budget, the schemes that rely on it, and the alternative operations used to enable deep encrypted computations.
Noise Budget
The finite amount of cryptographic noise a ciphertext can tolerate before decryption fails. Each homomorphic multiplication consumes a significant portion of this budget. Modulus switching is a primary technique for extending the budget by scaling down the ciphertext modulus, which proportionally reduces the absolute noise without a full bootstrapping operation.
Bootstrapping
A computationally intensive procedure that homomorphically evaluates the decryption circuit to reset a ciphertext's noise budget to a fixed level. Unlike modulus switching, which only provides a linear reduction in noise, bootstrapping enables unlimited computation in fully homomorphic encryption. It is often used as a last resort after the modulus has been switched down to its minimum.
Rescaling
The CKKS scheme-specific operation that is functionally equivalent to modulus switching. After a multiplication, rescaling divides the ciphertext by a scaling factor to maintain a stable scale and truncate the least significant bits. This simultaneously manages the noise and prevents the plaintext scale from growing exponentially, enabling approximate fixed-point arithmetic.
Leveled Fully Homomorphic Encryption
A variant of homomorphic encryption designed to evaluate circuits of a predetermined multiplicative depth without bootstrapping. In this scheme, the modulus chain is set up with a finite number of primes. Each multiplication requires a modulus switching step to drop one prime, reducing the level until the computation is complete. The depth must be known in advance.
Relinearization
A key-switching technique that reduces the size of a ciphertext after a homomorphic multiplication. While modulus switching manages the noise magnitude, relinearization manages the ciphertext dimensions, preventing quadratic growth in size. Both operations are typically applied sequentially after a multiplication to keep the ciphertext compact and stable.
Lattice-Based Cryptography
The post-quantum cryptographic paradigm that provides the mathematical foundation for the noise-based hardness assumptions used in homomorphic encryption. Modulus switching relies on the properties of Ring Learning With Errors (RLWE) lattices, where scaling down the modulus effectively reduces the relative magnitude of the error term embedded in the lattice points.

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