# Functional Encrypton: multiplying an encrypted vector by huge known matrix through inner product encrypton?

I'm solving a kernel ridge regression through a federated learning way. Equation to solve the kernel ridge regerssion is dot((K+lambdaI)^-1,y). So the aggregator of the problem knows the matrix A=(K+lambdaI)^-1.

But it cannot know the value of the labels y. So my idea was to encrypt the vector of labels y and apply inner product encrypton between the rows of the matrix and the encrypted vector. https://eprint.iacr.org/2015/017.pdf

Could I do the Setup,an Encryption of vector y just once, and then apply the KeyDer(msk,row of matrix) and Decryption for each row of the matrix? Or should I update the setup and encryption part each time?

If the dimension of the matrix is like 10k, or even 50k sometimes, do you think it could work? Otherwise, do you know other encryption technique to solve this problem?

Regards

Yes, one can run multiple KeyDer to generate multiple FE keys.

But there're several issues when you are using FE: Who runs Setup and Enc, and Who runs KeyDer? Do you need the "Functional hiding" property in KeyDer (which means one cannot guess the matrix from the FE key)?

Misuse of FE may not increase security at all. So please elaborate on your use cases.

Thank you! Ok, I clarify your doubts:

In my problem there is the agreggator and there is another party. The agreggator cannot guess vector y, but the party yes, so the last one could setup and Encrypt the vector.

Then the agreggator know the rows of the matrix, so he could apply the KeyDer(msk,row of matrix) and Decryption for each row of the matrix.

Tell me if i'm not correct but if I understood well, the party just need to setup and encrypt vector y once, and then agreggator could run KeyDer(msk,row of matrix) and decryption multiple times (one time for each row of the matrix).

Regards