The Plaintext Modulus in OpenFHE

Prof Bill Buchanan OBE FRSE
6 min readJul 28, 2024

The dream of near perfect data security is on the way, and at its core is the use of lattice based cryptography. This will bring new methods of public key encryption, and which are quantum robust. Examples of this are Kyber (for Key Exchange and Public Key Encryption) and Dilithium (for digital signatures). But, the rise of lattice-based cryptography will bring great opportunities for homomorphic encryption (HE). With this, we can process with encrypted values, such as:

Enc(a) * Enc(b) = Enc(a*b)

The three main methods that are proposed are BFV [1,2], BGV [3] and CKKS [4]. With BFV and BGV, we can perform homomorphic encryption with integer values. Within OpenFHE, we have a cryptocontext, and which defines the size of the ring that we use. Overall, we have a plaintext modulus, and which will define the number of bits that are processed within the plaintext. If we process the ciphertext text, and use more than the bits set, we will overflow the result.

For this, we need to look at two core parameters:

  • Plaintext modulus (p): This defines a prime number for the coefficients.
  • Polynomial modulus (m): This defines the degree of the irreducible polynomial x^m+1. For example, if m is 5, we have an irreducible polynomial of x⁵+1.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.