14.07.2013 Views

dissertacao.pdf

dissertacao.pdf

dissertacao.pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The first case refers to algorithms which we say run in time polynomial in<br />

log(N). Such an algorithm is called efficient as its complexity function grows<br />

in a rather controlled way. In opposition, algorithms belonging to the second<br />

case are called inefficient: they quickly become infeasible by any computer or<br />

even network of computers.<br />

When referring to problems, we will call them hard if there is no known<br />

algorithm running in polynomial time that solves it. In opposition, a problem<br />

which can be solved for any input with an algorithm running in polynomial time<br />

is said to be an easy problem.<br />

1.5.3 Modular Arithmetic<br />

Modular Arithmetic is a fundamental basis for cryptography in general and for<br />

RSA in particular. For this reason we present a set of definitions and results<br />

which will enable the reader to fully understand the operations behind RSA. We<br />

will also present some of the most used algorithms within the RSA operations.<br />

We start with the congruence relation:<br />

Definition 6. Let N be a positive integer. We say that two integers a and<br />

b are congruent modulo N if there exists an integer k such that a − b = kN.<br />

We represent this relation with the following notation:<br />

a ∼ = b (mod N) (2)<br />

It should be noted that this is an equivalence relation. After choosing the<br />

modulus N, we get a partition of the integers into N different classes since every<br />

integer a must be congruent modulo N to an integer in the set {0, 1, ..., N − 1}.<br />

When the modulus N is implicit, we define [a] = {b ∈ Z : a ∼ = b (mod N)},<br />

called the equivalence class of a. We introduce two operations with these equiv-<br />

alence classes, simple extensions of the usual addition and multiplication:<br />

Definition 7. (Modular Operations): Given two classes of equivalence [x]<br />

and [y] defined modulo N, we define the operations:<br />

addition: [x] + [y] = [x + y]<br />

multiplication: [x][y] = [xy]<br />

Throughout the text we will stop referring to the equivalence class [x] as [x]<br />

and instead write simply x. The modulus regarding which the equivalence class<br />

is defined will also not be written, rather it will be explicit from its context.<br />

7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!