def _decrypt(self, c): n = self.p * self.q e = self.e phi = (self.p - 1) * (self.q - 1) d = 2753 return mod_exp(c, d, n)
def _encrypt(self, m): p = self.p q = self.q n = p * q e = self.e return mod_exp(m, e, n)