# Is there a limit to plaintext size?

**URL:** https://openfhe.discourse.group/t/is-there-a-limit-to-plaintext-size/329
**Category:** Library Questions
**Created:** [January 31, 2023, 4:54pm UTC](https://openfhe.discourse.group/t/is-there-a-limit-to-plaintext-size/329 "2023-01-31T16:54:33Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)
#### Post date: [February 1, 2023, 2:09am UTC](https://openfhe.discourse.group/t/is-there-a-limit-to-plaintext-size/329/4 "2023-02-01T02:09:18Z")

</div>

Theoretically, the maximum number of slots one BFV ciphertext may contain is equal to the underlying ring dimension N. Do print N in your main program after initializing the `cryptocontext`. You can use the line below to print the ring dimension:

`std::cout << "N: " << cryptoContext->GetRingDimension() << "\n";`

You can increase N by increasing the multiplicative depth via `parameters.SetMultiplicativeDepth(depth);`. Or you can break down your input data into multiple vectors of size less than or equal to N and use multiple ciphertexts instead.

Note that increasing N unnecessarily may degrade the performance as this will amplify low-level FHE data structures and induce more complex computations.

Also, note that to get the maximum number of slots in BFV, your plaintext modulus should be a prime integer that satisfies the following condition:  
1 \equiv t \mod 2N

---

_[View the full topic](https://openfhe.discourse.group/t/is-there-a-limit-to-plaintext-size/329)._
