def __init__(self, pkenc, key_len=16, mode=AES): PKEnc.__init__(self) # check that pkenc satisfies properties of a pkenc scheme if hasattr(pkenc, 'keygen') and hasattr(pkenc, 'encrypt') and hasattr(pkenc, 'decrypt'): self.pkenc = pkenc self.key_len = key_len # 128-bit session key by default self.alg = mode if debug: print("PKEnc satisfied.")
def __init__(self, padding=SAEPEncryptionPadding(), redundancy=InMessageRedundancy(), params=None): Rabin.__init__(self) PKEnc.__init__(self) self.paddingscheme = padding self.redundancyscheme = redundancy
def __init__(self, groupObj, p=0, q=0): PKEnc.__init__(self) global group global lt global lk lt=lk=160 group = groupObj group.p, group.q, group.r = p, q, 2
def __init__(self, par, p=0): ''' initializes an ElGamal object with the number of parameters and the pairing group ''' PKEnc.__init__(self) global group self.params = par group = PairingGroup('BN254')
def __init__(self, pkenc, key_len=16, mode=AES): PKEnc.__init__(self) # check that pkenc satisfies properties of a pkenc scheme if hasattr(pkenc, 'keygen') and hasattr(pkenc, 'encrypt') and hasattr( pkenc, 'decrypt'): self.pkenc = pkenc self.key_len = key_len # 128-bit session key by default self.alg = mode if debug: print("PKEnc satisfied.")
def __init__(self, groupObj): PKEnc.__init__(self) global group group = groupObj
def __init__(self, groupObj, p=0, q=0): PKEnc.__init__(self) global group group = groupObj if group.groupSetting() == 'integer': group.p, group.q, group.r = p, q, 2
def __init__(self, padding=OAEPEncryptionPadding(), params=None): RSA.__init__(self) PKEnc.__init__(self) self.paddingscheme = padding
def __init__(self, groupObj, p=0, q=0): PKEnc.__init__(self) global group group = groupObj group.p, group.q, group.r = p, q, 2
def __init__(self): PKEnc.__init__(self) self.k = None
def __init__(self, groupObj): PKEnc.__init__(self) global group group = groupObj self.isbyte = True self.pp = self.setup()
def __init__(self): PKEnc.__init__(self) self.group = RSAGroup()