Source code for PREnc
''' Base class for Proxy Re-Encryption
Notes: This class implements an interface for a standard proxy re-encryption scheme.
A proxy re-encryption scheme consists of six algorithms:
(setup, keygen, encrypt, decrypt, rekeygen, re_encrypt).
'''
from charm.toolbox.schemebase import *
[docs]class PREnc(SchemeBase):
def __init__(self):
SchemeBase.__init__(self)
SchemeBase._setProperty(self, scheme='PREnc')
#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, params):
raise NotImplementedError
[docs] def encrypt(self, params, pk, M):
raise NotImplementedError
[docs] def decrypt(self, params, sk, ct):
raise NotImplementedError
[docs] def rekeygen(self, params, pk_a, sk_a, pk_b, sk_b):
raise NotImplementedError
[docs] def re_encrypt(self, params, rk, c_a):
raise NotImplementedError