I need to write a RSA code for an assignment, but the final answer never matches up to my starting message. I've checked multiple sites, but I have not found my error. Any thoughts?
p=3
q=7
n=(p)*(q)
t=(p-1)*(q-1)
phi=totient(n)
print(n)
print(t)
print(phi)
o=5
d=(o^-1)%t
print(d)
print(math.gcd(t))
print(math.gcd(o))
m=0
print('original message is', m)
print('the public key is', o,n)
print('the private key is', d,n)
c=(t^o)%n
m=(c^o)%n
m1=0
print('encrypted message is', c)
print('decrypted message is', m)
if (m==m1):
print("Finally!")
else:
print("Not again!!") ```