dabe_aw11¶
Lewko-Waters Decentralized Attribute-Based Encryption
Lewko, Allison, and Brent Waters, “Decentralizing Attribute-Based Encryption.”, Appendix D
Published in: Eurocrypt 2011
Available from: http://eprint.iacr.org/2010/351.pdf
- type: encryption (identity-based)
- setting: bilinear groups (asymmetric)
Authors: | Gary Belvin |
---|---|
Date: | 06/2011 |
-
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 True
-
decrypt
(gp, sk, ct)[source]¶ Decrypt a ciphertext SK is the user’s private key dictionary {attr: { xxx , xxx }}
-
group
= None¶ Prime order group
-