abenc_bsw07

Ciphertext-Policy Attribute-Based Encryption (BSW07)

Authors: John Bethencourt, Brent Waters

Title: “Ciphertext-Policy Attribute-Based Encryption”
Published in: IEEE Symposium on Security and Privacy, 2007
Notes: Original CP-ABE construction

Scheme Properties

  • Type: ciphertext-policy attribute-based encryption (public key)

  • Setting: Pairing groups

  • Assumption: Generic group model

Implementation

Authors:
  1. Ayo Akinyele

Date:

04/2011

class abenc_bsw07.CPabe_BSW07(groupObj)[source]

Bases: 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()
encrypt()
keygen()
setup()
abenc_bsw07.main()[source]