Closed RockyZhangHKU closed 3 years ago
Hi @RockyZhangHKU , did you manage to resolve the issue? Same problem occur in cgw15.py
Hi @scmanjarrez , maybe you can try like
attr_list = ['1', '2', '3']
@RockyZhangHKU 您好,我测试waters11 方案也遇到了同样的问题,后来这个问题您解决了吗?
@RockyZhangHKU 您好,我测试waters11 方案也遇到了同样的问题,后来这个问题您解决了吗? 没有解决,我后来毕业后就不研究ABE这个方向了,祝你好运~
Hi, Shashank, I meet this error when I test waters11 scheme as follows, do u meet this kind of error before?
root@ubuntu:/home/osborn/FAME# python3 main.py
setup Time: 495.1
keygen Time: 62.5
Traceback (most recent call last):
File "main.py", line 84, in <module>
main()
File "main.py", line 58, in main
ctxt = cpabe.encrypt(pk, msg, policy_str)
File "/home/osborn/FAME/waters11.py", line 110, in encrypt
c_attr = (pk['g1_a'] ** sum) / (pk['h'][int(attr_stripped)] ** r_attr)
ValueError: invalid literal for int() with base 10: 'FOUR'
The attribute list and policy which I set in
main.py
are as followsattr_list = ['ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'TEN']
policy_str = '(ONE and THREE and (TWO OR FOUR) and FIVE and SIX and SEVEN and EIGHT and NINE and TEN)'
So the error should be related to the ciphertext generation during encryption. But I don't understand what's the function of the
attr_stripped = self.util.strip_index(attr)
, I test the output ofattr_stripped
should be a string, but it will error when converting to int, can you give me some reminding about this?