# How to calculate big exponents (with modular division involved)?

I found the following equation online when working with cryptography.

1702^2732 x 2083^2526 = 704 mod 3119

Now I'd like to understand the math behind:

• how do we calculate exponentiation with number that high?
• how did we get this mod part?

From the article, it looks like the calculation has been done by hand, with no computer involved.