热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

EIGamalencryptionVSPairingencryption

1.EIGamalencryptionElGamalisascheme,thatcanbeappliedtoanykindofgroupstructure.Theonlyrequ

1. EIGamal encryption

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实现具有乘法同态性。


1.2 基于ECC的EIGamal encryption实现

基于ECC的EIGamal encryption实现为:
在这里插入图片描述

相比于1.1的实现,多增加了第一步映射和最后一步逆运算内容:


  • 基于公共已知的函数fff先将待加密的消息mmm映射成elliptic curve EEE上的一个point PmP_mPm
  • 基于PmP_mPm进行加密成相应的密文(C,D)(C,D)(C,D)
  • 从密文(C,D)(C,D)(C,D)中可解密出相应的PmP_mPm
  • 基于fff进行逆运算f−1(Pm)f^{-1}(P_m)f1(Pm)获得原始的消息mmm

其中用于消息映射的公共已知函数fff应可逆,fff函数的选择可有:


  • 参照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=mP,其中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》


推荐阅读
author-avatar
张丽君2502934023
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有