ElGamal is a scheme, that can be applied to any kind of group structure. The only requirement is that DDH has to be hard (e.g. not (Zp,+)(\mathbb{Z}_p,+)(Zp,+)).
若基于multiplicative groups (Zp∗,⋅)(\mathbb{Z}_p^*,\cdot)(Zp∗,⋅)来实现EIGamal encryption,则需要larger groups, due to attacks like index calculus。【Index Calculus攻击是一种企图解决DLP(离散对数问题)的方法。简单来说,算法把目标值写成在因子基数上的元素幂的乘积,对数已知的元素,然后利用对数定律提取目标值。】
若使用elliptic curves来实现EIGamal encryption,则可以使用smaller groups,因为在elliptic curves不存在index calculus攻击问题。【但是Elliptic curves with pairings are not suitable to be used, because in that case the DDH problem is not hard. Therefore, you can not design protocols with efficiently computable pairings.】
One property of ElGamal is, that it is (semi-)homomorphic w.r.t. the group operation. If you see that as an unwelcome property, you can also call that malleable. If you consider this property useful or a security risk, depends on your point of view and your actual goal.
1.1 基于multiplicative groups (Zp∗,⋅)(\mathbb{Z}_p^*,\cdot)(Zp∗,⋅)的EIGamal encryption实现
根据ppt Efficient Zero-Knowledge Argument for Correctness of a Shuffle 有:
根据上图公式可知,基于multiplicative groups (Zp∗,⋅)(\mathbb{Z}_p^*,\cdot)(Zp∗,⋅)的EIGamal encryption实现具有乘法同态性。
参照Neal Koblitz 1987年论文 《Elliptic Curve Cryptosystems》,其有一种实现方式为将m映射为曲线方程式中的xxx坐标,相应的yyy坐标可根据曲线方程式直接计算。【这种方式构建的EIGamal encryption不具有同态性。(Projecting the point to the x coordinate does not give you a homomorphism.)】
借助1.1EIGamal标准实现中的exponential思路,将消息mmm映射a point MMM on the curve (using an injective efficiently invertible encoding),M=m⋅PM=m\cdot PM=m⋅P,其中PPP为generator, mmm为an integer in the order of the group。【基于这种思路构建的EIGamal encryption具有加法同态性。】
2. Pairing encryption
可参见博客 加法/乘法同态加密算法及在zk-SNARK中的应用 和 An Introduction to Pairing-Based Cryptography学习笔记。
pairing具有乘法同态性。
参考资料: [1] ppt Efficient Zero-Knowledge Argument for Correctness of a Shuffle [2] https://crypto.stackexchange.com/questions/14437/elgamal-with-elliptic-curves-i [3] https://crypto.stackexchange.com/questions/9987/elgamal-with-elliptic-curves/9990#9990 [4] https://www.ams.org/journals/mcom/1987-48-177/S0025-5718-1987-0866109-5/ [5] 博客 第三十六个知识点:Index Calculus算法 [6] Neal Koblitz 1987年论文 《Elliptic Curve Cryptosystems》