def dec(pub, priv, ciphertext):
    _, m = pub
    d, = priv
    cipher = Bn.from_binary(ciphertext)
    assert 1 < cipher < m
    plain = pow(cipher, d, m)
    return plain.binary()
encodes session dict as a string
dataset/ETHPy150Open gdanezis/petlib/examples/toyrsa.py/dec--crossover with--dataset/ETHPy150Open wecatch/app-turbo/turbo/session.py/Store.encode