# Is it possible to have batching enabled with BFV with N=1024 and Security of 128 bits

**URL:** <https://openfhe.discourse.group/t/is-it-possible-to-have-batching-enabled-with-bfv-with-n-1024-and-security-of-128-bits/2135>\
**Category:** Library Questions\
**Created:** [August 8, 2025, 4:07pm UTC](https://openfhe.discourse.group/t/is-it-possible-to-have-batching-enabled-with-bfv-with-n-1024-and-security-of-128-bits/2135 "2025-08-08T16:07:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [August 12, 2025, 6:58pm UTC](https://openfhe.discourse.group/t/is-it-possible-to-have-batching-enabled-with-bfv-with-n-1024-and-security-of-128-bits/2135/2 "2025-08-12T18:58:19Z")

</div>

Please check [Automaticly find a good Plaintext Modulus](https://openfhe.discourse.group/t/automaticly-find-a-good-plaintext-modulus/312) At a high level, the procedure for finding a plaintext modulus that is compatible with batching is explained on Slide 15 of the FHE integer arithmetic webinar at [Homomorphic Encryption for OpenFHE Users – OpenFHE.org](https://openfhe.org/portfolio-item/homomorphic-encryption-for-palisade-users-3/)

But this is needed only if you want to support component-wise multiplications (what batched encoding typically refers to). In the case of additions only, a different encoding can be used that does not have the constraint you mentioned. For example, p=2 would be allowed. In this case, you would use `MakeCoefPackedPlaintext` instead of `MakePackedPlaintext` when encoding the input vectors. See [Template Class CryptoContextImpl — OpenFHE documentation](https://openfhe-development.readthedocs.io/en/latest/api/classlbcrypto_1_1CryptoContextImpl.html?highlight=makecoefpackedplaintext#_CPPv4NK8lbcrypto17CryptoContextImpl23MakeCoefPackedPlaintextERKNSt6vectorI7int64_tEE6size_t8uint32_t) for more details (or search for code examples/unit tests in the library).

---

_[View the full topic](https://openfhe.discourse.group/t/is-it-possible-to-have-batching-enabled-with-bfv-with-n-1024-and-security-of-128-bits/2135)._
