# What is the purpose of Block classes?

**URL:** <https://openfhe.discourse.group/t/what-is-the-purpose-of-block-classes/2330>\
**Category:** OpenFHE-NumPy\
**Tags:** questions\
**Created:** [June 10, 2026, 10:07pm UTC](https://openfhe.discourse.group/t/what-is-the-purpose-of-block-classes/2330 "2026-06-10T22:07:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbui](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nbui](https://openfhe.discourse.group/u/nbui)\
**Post date:** [June 10, 2026, 10:07pm UTC](https://openfhe.discourse.group/t/what-is-the-purpose-of-block-classes/2330/1 "2026-06-10T22:07:54Z")

</div>

I see that there are `BlockCTArray, BlockPTArray, BlockFHETensor` classes in the Git repo. The classes don’t seem to have an implementation. I was wondering if what the purpose of these classes will be?

I’m working on a project that uses a series of large matrix multiplications. Since `CTArray` requires the number of elements in a matrix to be less than or equal to `slot_count`, I would have to increase slot count to at least the largest matrix dimension squared. With a matrix of size `1024x768`, I would need `slot_count=2^20`. This would use up an extraordinary amount of memory.

I’ve been working on ways to split up matrices into smaller ciphertexts to avoid needing such a high slot count. If this is the intended direction for the Block classes, I’d be happy to contribute.

---

<div class="post-metadata">

**Author:** ![yuki](https://avatars.discourse-cdn.com/v4/letter/y/8edcca/32.png) [@yuki](https://openfhe.discourse.group/u/yuki)\
**Post date:** [June 25, 2026, 10:47am UTC](https://openfhe.discourse.group/t/what-is-the-purpose-of-block-classes/2330/2 "2026-06-25T10:47:42Z")

</div>

We use these classes to implement support for large matrix arithmetic. Given a fixed ring dimension, if a matrix requires more slots than a ciphertext can provide, the large matrix arithmetic backend automatically packs it into smaller ciphertext blocks. This enables users to work with large matrices without increasing the ring dimension.

We will release this version soon, and we would be happy to receive your feedback once it is available.

---

<div class="post-metadata">

**Author:** ![nbui](https://avatars.discourse-cdn.com/v4/letter/n/b2d939/32.png) [@nbui](https://openfhe.discourse.group/u/nbui)\
**Post date:** [June 25, 2026, 10:18pm UTC](https://openfhe.discourse.group/t/what-is-the-purpose-of-block-classes/2330/3 "2026-06-25T22:18:46Z")

</div>

I briefly looked at the dev branch. It looks like these blocks are for large 2D matrices only. Is there any intention to support higher dimension tensors in the future?
