RSA Calculator

Encrypt plaintext $ M $ with public key $ (e, n) $ or decrypt ciphertext $ C $ with private key $ (d, n) $ using the RSA algorithm of the form:

$ C \equiv M^e \; (\textsf{mod } n) $

$ M \equiv C^d \; (\textsf{mod } n) $

Where $ 0 \; \le C < n $ and $ 0 \; \le M < n $

$ R \equiv $ $ (\textsf{mod } $ $ ) $