I am using Integer Vector Homomorphic Encryption for the encryption lib.

I have to multiply a learning rate of 0.01 (i.e. between 0 and 1) by the encrypted data (vector) but it is not integer. I had wanted to multiply by 1/10 instead. Is it possible? because it is know that HE scheme doesn't support division. Is the any way out?

  • $\begingroup$ What is the name of the scheme you are using? Would you have some link to that lib? $\endgroup$ Mar 23, 2016 at 20:16
  • $\begingroup$ As the question is currently written, it’s more about “using a specific library” (which is rather off-topic here) than it is about cryptography as defined in our help center. You might want to edit your question to make it a bit more on-topic… removing the reference to the library and reformulating your question in a more general way (meaning: asking about “Homomorphic Encryption for Integer Vectors” instead of the “Integer Vector Homomorphic Encryption lib”) should void the problem. $\endgroup$
    – e-sushi
    Mar 24, 2016 at 3:01

1 Answer 1


There are several ways...

If the message space of your scheme is $\mathbb{Z}_t$, then you can

  1. Multiply all the plaintexts by $10^k$ before encrypting them and instead of multiply those vectors by a learning rating between $0$ and $1$, multiply them by an integer learning rate between $0$ and $10^k$.

  2. Remove the divisions and track the changes introduced by this remotion. For instance, instead of evaluate $x = \frac{c_0 + c_1}{10}$, do $y = c_0 + c_1$ and keep in mind that $y = 10x$ so you can find the right answer after decrypting. Take a look to the section 3.2 (Division-Free Integer Algorithms for Classification) of this paper...

But if the message space of the scheme you are using is (let's say) more robust, like a polynomial ring, then you can encode double values into plaintexts, which enables you to encode the learning rate, then encrypt it and finally multiply by the vector of ciphertexts.

That answer may be helpful to you.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.