# Modulus Switching in LWE

DevFeed: [Modulus Switching in LWE](<https://devfeed.tech/articles/modulus-switching-in-lwe-40455.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2022/07/16/modulus-switching-in-lwe/>)

Published: 2022-07-16T14:39:56Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [learning-with-errors](<https://devfeed.tech/tags/learning-with-errors.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [modulus-switching](<https://devfeed.tech/tags/modulus-switching.md>), [programming](<https://devfeed.tech/tags/programming.md>)

## AI overview

This tutorial explains modulus switching in Learning With Errors (LWE), a technique used in some fully homomorphic encryption schemes. It introduces an LWE encryption scheme and describes how ciphertexts can be converted to a smaller modulus while addressing the role of error in encryption and decryption.

## Source excerpt

The Learning With Errors problem is the basis of a few cryptosystems, and a foundation for many fully homomorphic encryption (FHE) schemes. In this article I'll describe a technique used in some of these schemes called modulus switching. In brief, an LWE sample is a vector of values in $\mathbb{Z}/q\mathbb{Z}$ for some $q$, and in LWE cryptosystems an LWE sample can be modified so that it hides a secret message $m$.