Apr-26-2022, 09:43 AM
Get the AttributeError: 'list' object has no attribute 'upper'
Return this line the keywords 'upper'
Return this line the keywords 'upper'
def keygen(self, gp, sk, i, gid, pkey): h = gp['H'](gid) K = (gp['g'] ** sk[i.upper()]['alpha_i']) * (h ** sk[i.upper()]['y_i']) pkey[i.upper()] = {'k': K} pkey['gid'] = gid if(debug): print("Key gen for %s on %s" % (gid, i)) print("H(GID): '%s'" % h) print("K = g^alpha_i * H(GID) ^ y_i: %s" % K) return None
Error:Traceback (most recent call last):
File "/home/ali/Downloads/MedShare2021-main/test.py", line 9, in <module>
class Dabe(ABEncMultiAuth):
File "/home/ali/Downloads/MedShare2021-main/test.py", line 25, in Dabe
for i in usr_attrs1,usr_attrs2: dabe.keygen(public_parameters, master_secret_key, i, ID, secret_keys)
File "/usr/local/lib/python3.9/dist-packages/Charm_Crypto-0.50-py3.9-linux-x86_64.egg/charm/schemes/abenc/dabe_aw11.py", line 95, in keygen
K = (gp['g'] ** sk[i.upper()]['alpha_i']) * (h ** sk[i.upper()]['y_i'])
AttributeError: 'list' object has no attribute 'upper'
Process finished with exit code 1