I was wondering if there is a built in function to carry out multiplication of an encrypted m dimensional vector with a plain m times n matrix in OpenFHE? If that is not the case, is there an algorithm I can implement myself?
I am using the CKKS scheme by the way, and a lot of implementations I found were about quadratic matrices, which is not what I need.

Currently, there is no supported homomorphic matrix-vector multiplication in OpenFHE that is exposed to the end user. We are planning to release a library for homomorphic matrix arithmetic (including matrix-vector multiplication) in the near future.

If you want to implement this functionality yourself, check out this paper, in particular, Section 4.3 on â€śMatrix-Vector Multiplicationâ€ť. For a visual illustration of this algorithm check out Figure 6 in this paper.

Related to this, an OpenFHE user released an implementation of vector-matrix multiplication in OpenFHE in this post which could be useful to you. Note that we did not use this implementation and it is not part of OpenFHE, use it at your own discretion.

Unfortunately, OpenFHE still does not support vector-matrix multiplication as an out-of-the-box API. However, you can achieve that by performing element-wise operations on vectors and matrices. OpenFHE includes functions for some common vector operations such as:

EvalInnerProduct

EvalSum

EvalSumCols

EvalSumRows

These can be helpful to implement your vector-matrix multiplication.
P.S. The code for the above functions can be found here.