Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction
Last lecture we looked at secret key encryption We will now look at public key encryption Before describing this method, well introduce some elementary concepts in number theory (which is the study of the natural nos 1, 2, 3, ) A natural number p other than 1 is prime if its only positive divisors are 1 and p Thus the primes are 2, 3, 5, 7, 11, 13, 17, 19, Two natural nos are coprime (or relatively prime) if they have no common factor other than 1 i.e. if no number other than 1 divides into both nos Thus 4 & 7 are coprime, but 9 & 12 are not 1
Modulo Arithmetic
If a and m are natural nos, the expression a mod m means the remainder when a is divided by m Thus 3 mod 2 = 1, 5 mod 7 = 5, 20 mod 4 = 0, 20 mod 7 = 6, 55 mod 20 = 15, etc a mod m is read as a modulo m An important property of modulo arithmetic is: (a b) mod m = [(a mod m) (b mod m)] mod m This can be used to evaluate c mod m, if c is a large number that can be factored into a b
2
(Diagram from Foundations of Computer Science by Behrouz A. Forouzan, Brooks/Cole, 2003, p. 309)
7