dissertacao.pdf
dissertacao.pdf
dissertacao.pdf
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Definition 8. Given an integer N > 0, the modular ring ZN is the set:<br />
ZN = {[0], [1], ..., [N − 1]} (3)<br />
(which will also be defined as ZN = {0, 1, ..., N − 1})<br />
along with the modular operations defined above. The division operation is<br />
an extension of the multiplication operation: to divide the equivalence class x<br />
by the equivalence class y, we multiply x by the inverse of y (mod N), according<br />
to the next definition.<br />
In the ring ZN we can easily define inverses, which will be necessary to create<br />
RSA keys:<br />
Definition 9. Let a be an element of the modular ring ZN. The inverse of<br />
a modulo N is the integer x satisfying:<br />
which we will refer to as a −1 (mod N).<br />
ax ∼ = 1 (mod N) (4)<br />
It is important to note that a −1 (mod N) exists if and only if (a, N) = 1.<br />
When this is the case, the Extended Euclidean Algorithm (explained in the next<br />
section) will provide us with the values x, y such that ax + yN = 1. From the<br />
last equation we get:<br />
ax ∼ = 1 (mod N) ⇔ ax − 1 = kN ⇔ ax − kN = 1 (5)<br />
We know a and N so x, the inverse of a, is given by the Extended Euclidean<br />
Algorithm (along with the value of k , which can be discarded). If (a, N) = 1<br />
then there are no integer solutions x, k for this equation, and therefore there is<br />
no inverse of a modulo N. However, if given a modulus N and an integer a,<br />
we find out that a does not have an inverse modulo N, then we can compute a<br />
factor of N by simply computing (a, N).<br />
8