abenc_yct14

Xuanxia Yao, Zhi Chen, Ye Tian

From: A lightweight attribute-based encryption scheme for the Internet of things
Published in: Future Generation Computer Systems
Notes:
  • type: key-policy attribute-based encryption (public key)
  • setting: No Pairing
Authors:artjomb
Date:10/2014
class abenc_yct14.EKPabe(groupObj, verbose=False)[source]

Bases: charm.toolbox.ABEnc.ABEnc

>>> from charm.toolbox.pairinggroup import PairingGroup,GT
>>> group = PairingGroup('MNT224')
>>> kpabe = EKPabe(group)
>>> attributes = [ 'ONE', 'TWO', 'THREE', 'FOUR' ]
>>> (master_public_key, master_key) = kpabe.setup(attributes)
>>> policy = '(ONE or THREE) and (THREE or TWO)'
>>> secret_key = kpabe.keygen(master_public_key, master_key, policy)
>>> msg = b"Some Random Message"
>>> cipher_text = kpabe.encrypt(master_public_key, msg, attributes)
>>> decrypted_msg = kpabe.decrypt(cipher_text, secret_key)
>>> decrypted_msg == msg
True
decrypt(C, D)[source]
encrypt(pk, M, attr_list)[source]
keygen(pk, mk, policy_str)[source]
setup(attributes)[source]
abenc_yct14.benchmark()[source]
abenc_yct14.main()[source]