@staticmethod
    def enc(pub, m):
        """ Produce a ciphertext, from a public key and message """
        if isinstance(m, int):
            m = Bn(m)

        o = pub.group.order()
        k = o.random()
        g = pub.group.generator()
        a = k * g
        b = k * pub + _n_table[o % (o + m)] # m * g
        return Ct(pub, a, b, k, m)
dataset/ETHPy150Open gdanezis/petlib/examples/tormedian.py/Ct.enc/swapped operands of `%`