The Student Room Group

Inverse of a number

In congruences, I have a number 'a', which is co prime with another number 'n'. I factorized 'n' into primes and have worked out phi of 'n'.

The question is to do with RSA.

The question is to workout the decoding element x, and in brackets it's written, i.e a^(-1) mod phi(n).

So does that mean that I need to workout the inverse of a and that will give me the decoding element x?

If so, how do I do this?
(edited 13 years ago)
Reply 1
The inverse of aa mod ϕ(n)\phi (n) is the unique integer xx satisfying ax1ax \equiv 1 mod ϕ(n)\phi (n)

To find xx, write the above congruence as a linear equation and use Euclid's Algorithm.
(edited 13 years ago)
Original post by Dragon
The inverse of aa mod ϕ(n)\phi (n) is the unique integer xx satisfying ax1ax \equiv 1 mod ϕ(n)\phi (n)

To find xx, write the above congruence as a linear equation and use Euclid's Algorithm.


By linear equation, do you mean writing it like ax + by = 1

Where a is just a and b is phi(n)?
Reply 3
Yep.

Quick Reply

Latest