Exemplo n.º 1
0
 def __init__(self, groupObj):
     IBEnc.__init__(self)
     IBEnc.setProperty(self, secdef='IND_ID_CPA', assumption='DBDH', secmodel='Standard')
     #, other={'id':ZR}
     #message_space=[GT, 'KEM']
     global group, hashObj
     group = groupObj
     hashObj = hashlib.new('sha1') 
Exemplo n.º 2
0
 def __init__(self, groupObj):
     IBEnc.__init__(self)
     IBEnc.setProperty(self,
                       secdef='IND_sID_CPA',
                       assumption='DBDH',
                       message_space=[GT, 'KEM'],
                       secmodel='ROM',
                       other={'id': ZR})
     global group
     group = groupObj
    def __init__(self, scheme, group):
        IBEnc.__init__(self)
        self.group = group
        self.ibe_good = False
        # validate that we have the appropriate object
        
        if IBEnc.checkProperty(self, scheme, {'scheme':self.baseSchemeTypes.IBEnc, 
                                        'secdef':self.baseSecDefs.sIND_ID_CPA, 
                                        'id':ZR}):
            self.ibenc = scheme
            # change our property as well
            IBEnc.setProperty(self, secdef='IND_ID_CPA', other={'id':str}, secmodel='ROM')
            # check message space?
            self.ibe_good = True

        if not self.ibe_good:
            assert False, "ibe object does not satisfy requirements."
Exemplo n.º 4
0
    def __init__(self, scheme, group):
        IBEnc.__init__(self)
        self.group = group
        self.ibe_good = False
        # validate that we have the appropriate object

        if IBEnc.checkProperty(
                self, scheme, {
                    'scheme': self.baseSchemeTypes.IBEnc,
                    'secdef': self.baseSecDefs.sIND_ID_CPA,
                    'id': ZR
                }):
            self.ibenc = scheme
            # change our property as well
            IBEnc.setProperty(self,
                              secdef='IND_ID_CPA',
                              other={'id': str},
                              secmodel='ROM')
            # check message space?
            self.ibe_good = True

        if not self.ibe_good:
            assert False, "ibe object does not satisfy requirements."
Exemplo n.º 5
0
 def __init__(self, groupObj):
     IBEnc.__init__(self)
     IBEnc.setProperty(self, secdef='IND_sID_CPA', assumption='DBDH', 
                       message_space=[GT, 'KEM'], secmodel='ROM', other={'id':ZR})
     global group
     group = groupObj
Exemplo n.º 6
0
 def __init__(self, groupObj):
     IBEnc.__init__(self)
     global group,h,ZN
     group = groupObj
     h = Hash('sha1', group)
     ZN = -1
Exemplo n.º 7
0
 def __init__(self, groupObj):
     IBEnc.__init__(self)
     global group,h,ZN
     group = groupObj
     h = Hash('sha1', group.Pairing)
     ZN = -1