def decrypt(self, params, sk, c): sigma = super(NAL16b, self).decrypt(params, sk, c) c3 = c['c3'] (r1, r2) = self.H(sigma, c3) m = int2Bytes(c3 ^ self.G(sigma)) if(debug): print('\nDecrypt...') print('m => %s' % m) return m
def decodeFromZn(self, element): if type(element) == integer: msg = int2Bytes(element) return msg #return bytes.decode(msg, 'utf8') # convert back to string return None
def decodeFromZn(self, element): if type(element) == integer: msg = int2Bytes(element) return msg return None