Can we determine the number of plaintext slots?

According to openFHE documentation, the example " simple-integers-serial-bgvrns.cpp" shows how to use BGV homomorphic encryption with SIMD packing. But as I know we can generate \ell plaintext slots where \ell=n/d with d being the order of the plaintext modulus q modulo m and n=m/2 for power-of-two $m$s. However, openFHE requires (q-1)/m to be an integer which makes the order of q modulo m equal to 1 for every possible m and q. Thus the number of plaintext slots is always \ell=n, and it is not possible to chose different variations of slot numbers, am I correct?

Hi @RDLab ,

Yes, OpenFHE currently supports only linear packing (the number of slots is equal to the ring dimension). Other plaintext algebras are not currently supported for BGV out of the box.

It is possible to embed extension fields into OpenFHE (using lower-level lattice code) but this feature is not readily available.

Also, subrings of \mathbb{Z}(X)/(X^N+1), i.e., \mathbb{Z}(X)/(X^n+1), where n < N can be supported in the code by cloning vectors of size n up to N, which corresponds to sparse packing. Note that sparse packing is natively supported by the CKKS implementation in OpenFHE (no cloning needs to be done by the user).