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 123675 mod 997 using the Extended Euclidean Algorithm:
nbqr t1t2t3
9971236750997010
12367599712447101
99747211001-21
4710471-2185
10713-2185-106
732185-106297
3130-106297-997
Answer

So t = 297. Now we still have to apply mod n to that number:
297 mod 997 ≡ 297
So the multiplicative inverse of 123675 modulo 997 is 297.

Verification

Let i be the answer we just found, so i=297. We also have b=123675 and n=997.
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) ≡
297 × 123675 (mod 997) ≡
36731475 (mod 997) ≡
1 (mod 997)