Source code for ABEnc
''' Base class for attribute-based encryption
Notes: This class implements an interface for a standard attribute-based encryption scheme.
A public key attribute-based encryption scheme consists of four algorithms:
(setup, keygen, encrypt, decrypt).
'''
from charm.toolbox.schemebase import *
[docs]class ABEnc(SchemeBase):
def __init__(self):
SchemeBase.__init__(self)
SchemeBase._setProperty(self, scheme='ABEnc')
self.baseSecDefs = Enum('IND_AB_CPA', 'IND_AB_CCA', 'sIND_AB_CPA', 'sIND_AB_CCA')
[docs] def setup(self):
raise NotImplementedError
[docs] def keygen(self, pk, mk, object):
raise NotImplementedError
[docs] def encrypt(self, pk, M, object):
raise NotImplementedError
[docs] def decrypt(self, pk, sk, ct):
raise NotImplementedError