abenc_lsw08¶
Allison Lewko, Amit Sahai and Brent Waters (Pairing-based)
From: “Revocation Systems with Very Small Private Keys”, Large Universe Construction
Published in: IEEE S&P 2010
Available from: http://eprint.iacr.org/2008/309.pdf
Notes:
- type: key-policy attribute-based encryption (public key)
- setting: Pairing
Authors: | J Ayo Akinyele |
---|---|
Date: | 12/2010 |
-
class
abenc_lsw08.
KPabe
(groupObj, verbose=False)[source]¶ Bases:
charm.toolbox.ABEnc.ABEnc
>>> from charm.toolbox.pairinggroup import PairingGroup,GT >>> group = PairingGroup('MNT224') >>> kpabe = KPabe(group) >>> (master_public_key, master_key) = kpabe.setup() >>> policy = '(ONE or THREE) and (THREE or TWO)' >>> attributes = [ 'ONE', 'TWO', 'THREE', 'FOUR' ] >>> secret_key = kpabe.keygen(master_public_key, master_key, policy) >>> msg=group.random(GT) >>> cipher_text = kpabe.encrypt(master_public_key, msg, attributes) >>> decrypted_msg = kpabe.decrypt(cipher_text, secret_key) >>> decrypted_msg == msg True