示例#1
0
 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, 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.")
示例#3
0
 def __init__(self, padding=SAEPEncryptionPadding(), redundancy=InMessageRedundancy(), params=None):
     Rabin.__init__(self)
     PKEnc.__init__(self)
     self.paddingscheme = padding 
     self.redundancyscheme = redundancy
示例#4
0
 def __init__(self, groupObj):
     PKEnc.__init__(self)
     global group
     group = groupObj
示例#5
0
 def __init__(self, padding=OAEPEncryptionPadding(), params=None):
     RSA.__init__(self)
     PKEnc.__init__(self)
     self.paddingscheme = padding
示例#6
0
 def __init__(self, padding=OAEPEncryptionPadding(), redundancy=InMessageRedundancy(), params=None):
     Rabin.__init__(self)
     PKEnc.__init__(self)
     self.paddingscheme = padding 
     self.redundancyscheme = redundancy
示例#7
0
 def __init__(self, padding=OAEPEncryptionPadding(), params=None):
     RSA.__init__(self)
     PKEnc.__init__(self)
     self.paddingscheme = padding
示例#8
0
 def __init__(self, group_type=int, builtin_cv=410):
     PKEnc.__init__(self)
     global _type
     _type = group_type
     self.paramgen(_type, builtin_cv)
 def __init__(self):
     PKEnc.__init__(self)
示例#10
0
 def __init__(self, group_type=int, builtin_cv=410):
     PKEnc.__init__(self)
     global _type
     _type = group_type
     self.paramgen(_type, builtin_cv)