# Homomorphic Encryption with Addition and Exponentiation

Is there any homomorphic encryption scheme which supports addition and power over cipher text ? Paillier is close but it supports addition and multiplication with a constant.

I am getting an output like this:

1 0 1 0 -1 1


My goal is to make -1 positive by any means. As it will encrypted so I cannot know if it is -1 or 1. This (similar) output is being generated by subtracting binary streams.

For example:

101101 -- A1
111001 --- A2
----------------------------
2 1 2 1 1 0 2 --- A+A2=A3
----------------------------
1 0 1 0 -1 1 ---- A3-1


A1 and A2 bits can be replaced to any other integers. Also, can I perform AND operation in additive mode ? Please note that this question is link to my previous question

Primary Objective: To be able to check any of following

1. How many same bits occurs that is 1ns in A1 and A2 in the same position
2. How many zero bits on the same positions in A1 and A2
3. How many different bit locations in A1 and A2
• Is the plaintext space limited to -1,0,1? Nov 6, 2015 at 14:09
• plain text space is not limited to any value. To achieve my result i can use any values.
– Umer
Nov 6, 2015 at 14:11
• If it were limited to -1,0,1 I could see where squaring the ciphertext would ensure that $-1\to 1$. If it is not limited, as you say, how does exponentiation help you achieve your goal of making the value positive? Nov 6, 2015 at 14:12
• by taking square of each bit result.
– Umer
Nov 6, 2015 at 14:18
• I have a suggestion for you, as it seems like you aren't getting anywhere with your questions. You have some problem you are trying to solve and you have some direction on a solution (i.e., use homomorphic encryption). You are asking us about a problem with the possible solution, and that is going nowhere. I suggest you better explain the problem you are trying to solve. That context would be very helpful. Nov 6, 2015 at 14:24

(In most generality..) you're looking for fully homomorphic encryption (FHE), which supports homomorphic addition and homomorphic multiplication. To compute a plaintext's exponentiation, you would run the repeating squaring algorithm (using homomorphic multiplication), to generate an (evaluated) homomorphic ciphertext containing the input-plaintext's exponentiation.

Craig Gentry gave the breakthrough construction of FHE in 2009. Since then, there's been a titanic volume of work improving the techniques, and multiple surveys are available by searching online.

An open-source implementation of modern FHE -- the library HElib by Shai Halevi and Victor Shoup -- can be found here: https://github.com/shaih/HElib

• As of practicality of the leading edge two years ago, the introduction of Shai Halevi and Victor Shoup's Bootstrapping for HElib is very telling.
– fgrieu
Apr 7, 2016 at 3:47

This scheme is additively homomorphic and supports one multiplication. So if you multiply the ciphertext with itself you can get a square. I don't know if it helps.

• Thank you. Is there any opensource implementation available for this scheme ?
– Umer
Nov 7, 2015 at 9:40