Bootstrap
  E.E.A. .com
It doesn't have to be difficult if someone just explains it right.

Calculator

For the Euclidean Algorithm, Extended Euclidean Algorithm and multiplicative inverse.

Before you use this calculator

If you're used to a different notation, the output of the calculator might confuse you at first.
Even though this is basically the same as the notation you expect. If that happens, don't panic.
Just make sure to have a look the following pages first and then it will all make sense:


Input

Algorithm

Choose which algorithm you would like to use.

Numbers

Enter the input numbers. Note that you need to enter n before b.
E.g. if you want to know the multiplicative inverse of 26 mod 11, then use n=11 and b=26.

n=
b=


Output

This is the calculation for finding the multiplicative inverse of 338641 mod 599 using the Extended Euclidean Algorithm:
nbqr t1t2t3
5993386410599010
338641599565206101
599206218701-2
2061871191-23
18719916-23-29
1916133-2932
16351-2932-189
313032-189599
Answer

So t = -189. Now we still have to apply mod n to that number:
-189 mod 599 ≡ 410
So the multiplicative inverse of 338641 modulo 599 is 410.

Verification

Let i be the answer we just found, so i=410. We also have b=338641 and n=599.
If our answer is correct, then i × b (mod n) ≡ 1 (mod n).
Let's see if that's indeed the case.
i × b (mod n) ≡
410 × 338641 (mod 599) ≡
138842810 (mod 599) ≡
1 (mod 599)