abenc_bsw07¶
John Bethencourt, Brent Waters (Pairing-based)
From: “Ciphertext-Policy Attribute-Based Encryption”.
Published in: 2007
Available from:
Notes:
Security Assumption:
type: ciphertext-policy attribute-based encryption (public key)
setting: Pairing
Authors: | J Ayo Akinyele |
---|---|
Date: | 04/2011 |
-
class
abenc_bsw07.
CPabe_BSW07
(groupObj)[source]¶ Bases:
charm.toolbox.ABEnc.ABEnc
>>> from charm.toolbox.pairinggroup import PairingGroup,ZR,G1,G2,GT,pair >>> group = PairingGroup('SS512') >>> cpabe = CPabe_BSW07(group) >>> msg = group.random(GT) >>> attributes = ['ONE', 'TWO', 'THREE'] >>> access_policy = '((four or three) and (three or one))' >>> (master_public_key, master_key) = cpabe.setup() >>> secret_key = cpabe.keygen(master_public_key, master_key, attributes) >>> cipher_text = cpabe.encrypt(master_public_key, msg, access_policy) >>> decrypted_msg = cpabe.decrypt(master_public_key, secret_key, cipher_text) >>> msg == decrypted_msg True
-
decrypt
(*args)¶
-
encrypt
(*args)¶
-
keygen
(*args)¶
-
setup
(*args)¶
-