# Newbie question - Integers bigger than 60-bit

**URL:** <https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176>\
**Category:** Library Questions\
**Created:** [April 7, 2024, 1:47pm UTC](https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176 "2024-04-07T13:47:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dar954826](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dar954826](https://openfhe.discourse.group/u/Dar954826)\
**Post date:** [April 7, 2024, 1:47pm UTC](https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176/1 "2024-04-07T13:47:56Z")

</div>

I’m new to this library and I would like to use OpenFHE to evaluate a polynomial using Horner’s method, the problem I have is that both the coefficient of the polynomial and the value that I want to evaluate are at least 256 bits long. This evaluation is done over integers in modulo 2^256 (but I would be ok to use any 256 bit number as modulo) so I would like to use BFV but it only seems to support numbers with at most 60 bits. Is there a way to perform such a computation?

---

<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:** [April 8, 2024, 11:44pm UTC](https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176/2 "2024-04-08T23:44:57Z")

</div>

As 256-bit numbers, are you referring to the plaintext or ciphertext space? The plaintext space is typically limited to 32-bit moduli, but the modulus can be extended at the application level using the Chinese Remainder Theorem (there are some examples in the Discourse forum for this that I can point to if needed). The ciphertext space can be large, e.g., 2000 bits or more.

---

<div class="post-metadata">

**Author:** ![Dar954826](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@Dar954826](https://openfhe.discourse.group/u/Dar954826)\
**Post date:** [April 9, 2024, 5:44pm UTC](https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176/3 "2024-04-09T17:44:02Z")

</div>

the polynomial coeffiecients and the values that I want to to evaluate are 256 bits in plaintext and I want to encrypt them and evaluate them. In particular I would like to check if given a polynomial P and a value x, I want to know if x is a root of the polynomial. A way to find it is to evaluate P(x) and check if it is equal to 0. I had found something that seemed useful in [here](https://github.com/microsoft/APSI?tab=readme-ov-file#large-items), but it didn’t seem to be implemented in the final version after the optimizations.

---

<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:** [April 10, 2024, 1:58am UTC](https://openfhe.discourse.group/t/newbie-question-integers-bigger-than-60-bit/1176/4 "2024-04-10T01:58:43Z")

</div>

The example you mentioned works with much smaller plaintext moduli. They don’t have to be 256-bit. A 256-bit number can be split into smaller digits, e.g., using the plaintext modulus of 2^{16}+1, and multiple slots/digits, e.g…, 16 in this case, can be used to represent one 256-bit number. How these slots are used (and whether they are placed in separate ciphertexts if a batch of numbers is processed) can be application-dependent.
