Lewko-Waters Decentralized Attribute-Based Encryption

Lewko, Allison, and Brent Waters, “Decentralizing Attribute-Based Encryption.”, Appendix D
Published in: Eurocrypt 2011
  • type: encryption (identity-based)
  • setting: bilinear groups (asymmetric)
Authors:Gary Belvin
class dabe_aw11.Dabe(groupObj)[source]

Bases: charm.toolbox.ABEncMultiAuth.ABEncMultiAuth

Decentralized Attribute-Based Encryption by Lewko and Waters

>>> group = PairingGroup('SS512')
>>> dabe = Dabe(group)
>>> public_parameters = dabe.setup()
>>> auth_attrs= ['ONE', 'TWO', 'THREE', 'FOUR'] #setup an authority
>>> (master_secret_key, master_public_key) = dabe.authsetup(public_parameters, auth_attrs)
Setup a user and give him some keys
>>> ID, secret_keys = "bob", {}
>>> usr_attrs = ['THREE', 'ONE', 'TWO']
>>> for i in usr_attrs:  dabe.keygen(public_parameters, master_secret_key, i, ID, secret_keys)
>>> msg = group.random(GT)
>>> policy = '((one or three) and (TWO or FOUR))'
>>> cipher_text = dabe.encrypt(public_parameters, master_public_key, msg, policy)
>>> decrypted_msg = dabe.decrypt(public_parameters, secret_keys, cipher_text)
>>> decrypted_msg == msg
authsetup(GP, attributes)[source]

Authority Setup for a given set of attributes

decrypt(gp, sk, ct)[source]

Decrypt a ciphertext SK is the user’s private key dictionary {attr: { xxx , xxx }}

encrypt(gp, pk, M, policy_str)[source]


group = None

Prime order group

keygen(gp, sk, i, gid, pkey)[source]

Create a key for GID on attribute i belonging to authority sk sk is the private key for the releveant authority i is the attribute to give bob pkey is bob’s private key dictionary, to which the appropriate private key is added


Global Setup