Definition
It is possible to perform all the computation on encrypted data- no need for encryption, so you can handle the data safely. Only arithmetic operations are allowed on this encrypted data. It is possible because the encryption scheme has special mathematical properties (number-theoretic problems, etc.) allowing for manipulation without altering the results after decryption. It is only possible through using a private key. Types of homomorphic encryption:
– PHE (partially) – only one operation can be performed, an infinite number of times (only addition and multiplication)
– SHE (somewhat) – both operations are allowed (addition and multiplication), a limited number of times
– FHE (fully) – both operations are allowed (addition and multiplication) for an infinite number of times; arbitrary computations are also supported. – high-cost efficiency
Despite only mathematical operations being available, HE can be applied to categorical data too. However, it can limit the operations that can be performed (first, data has to be transformed to numerical values), and the results might not be meaningful if the wrong method is applied. HE is mainly used for secure storage and computation but is sensitive to observing behavior (it is noted where data was sent, where was collected etc, so some information might be inferred, without seeing its exact content). Another limitation is that it is computationally expensive: performing any operations on encrypted data is more difficult than the original entries.
Interactions with other methods
Often used as an encryption method for SMPC or blockchain. If used alone, to add extra layer of privacy, DP noise can be added before decrypting the results of HE. If we do not intend to decrypt our results, TEE can be used for the computation so no one can view what is happening with the data in the process. In that case, decryption is performed only after data is sent back to the authorized center. It can also be used in many other methods as an extra layer of privacy.
Use cases
HE can be used in many cases. It is commonly applied in cloud computing, for example in industries such as healthcare, education, and law. Microsoft utilized this method in their product ElectionGuard to secure voting results.
Packages
Pyfhel – supports mathematical operations on encrypted data.
Example of pyfhel client-server interaction: https://pyfhel.readthedocs.io/en/latest/_autoexamples/Demo_5_CS_Client.html#sphx-glr-autoexamples-demo-5-cs-client-py
Python-Paillier – used for partially homomorphic encryption only. It performs addition, while multiplication is possible only with a non-encrypted scalar. It can be more computationally effective but has more limited usage. Sometimes might also result in information leakage.
Paillier manual: https://python-paillier.readthedocs.io/en/develop