B FOR 204 Lecture Notes - Lecture 7: Plaintext, Secure Communication, Public-Key Cryptography
Math Stuff
Co-Prime
ā¢ Two numbers x and y are said to be co-primes -
ā¢ IF and only IF the only positive number that divides them both is 1.
ā¢ All prime numbers by definition are coprime in pairs.
o E.g. 2, 3, 5, 7, 11, 13, 17
ā¢ But non-prime numbers can also be coprime
o E.g. 14 and 15
o 14 = 7 * 2 * 1
o 15 = 3 * 5 * 1
o No multiples in common except 1
Modulo
ā¢ The modulo operation finds the remainder after division of one number by
another
ā¢ Also called modulus
ā¢ If dividend is x and divisor is n, remainder is y, then modulo operation is
represented as:
y = x modulo n = y
y = x mod n
ā¢ e.g. 15 mod 7 = 1, because 15-7*2 =1
Modulo ā 10 minutes exercise
31 (mod 19) =
32 (mod 19) =
33 (mod 19) =
34 (mod 19) =
35 (mod 19) =
36 (mod 19) =
37 (mod 19) =
Modulo Exercise Answers
31 (mod 19) = 3
32 (mod 19) = 9 (mod 19) = 9
33 (mod 19) = 27 (mod 19) = 8
34 (mod 19) = 32 * 32 (mod 19) = 9 * 9 (mod 19) = 5
35 (mod 19) = 32 * 32 * 3 (mod 19) = 9 * 9 * 3 (mod 19) = 15
36 (mod 19) = 32 * 32 * 32 (mod 19) = 9 * 9 * 9 (mod 19) = 7
Discrete Logarithm ā Primitive Root
ā¢ The primitive roots are defined only for prime numbers.
ā¢ A primitive root r of a prime number p is a number whose powers generate all the
numbers from 1 to p-1.
ā¢ It is written mathematically as
r mod p, r2 mod p, r3 mod p, ā¦ā¦, rp-1 mod p
are distinct and consist of integers from 1 through p in some permutation.
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
Co-prime: two numbers x and y are said to be co-primes , all prime numbers by definition are coprime in pairs. If and only if the only positive number that divides them both is 1: e. g. 2, 3, 5, 7, 11, 13, 17: but non-prime numbers can also be coprime, e. g. 14 and 15: 14 = 7 * 2 * 1, 15 = 3 * 5 * 1, no multiples in common except 1. Modulo another: also called modulus, the modulo operation finds the remainder after division of one number by. If dividend is x and divisor is n, remainder is y, then modulo operation is represented as: y = x modulo n = y y = x mod n: e. g. 15 mod 7 = 1, because 15-7*2 =1. 36 (mod 19) = 32 * 32 * 32 (mod 19) = 9 * 9 * 9 (mod 19) = 7.