Is there a built in method to perform vector - matrix multiplication?

Hi all,

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.

Thanks in advance!

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.

Thanks a lot, that was really helpful!