Charm-crypto lib中GT上加减元素时出现系统错误

问题描述 投票:0回答:1

代码如下:

from charm.toolbox.pairinggroup import PairingGroup, ZR, G1, G2, GT, pair
groupObj = PairingGroup('MNT224') 
gt = groupObj.random(GT)
g2 = groupObj.random(GT)
result = gt -g2

环境: Linux ubuntu22.04, 魅力地穴 0.5, 蟒蛇3.10, libgmp5.1, openssl1.0, ide是vscode。

错误信息如下:

Traceback (most recent call last):
  File "/home/x/ex/scheme.py", line 284, in <module>
    main()
  File "/home/x/ex/scheme.py", line 252, in main
    gt - g2
SystemError: error return without exception set
security openssl cryptography gmp charm
1个回答
0
投票

PBC图书馆手册:GT群目前被实现为有限域的子群,因此GT只能使用乘法运算。(来自:https://crypto.stanford.edu/pbc/manual/ch04s04.html

所以,Charm 也无法支持这个操作。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.