Cryptography
By:
Dr. Mohammad Shoab
Week 9 & 10
Prime Numbers
Example of Prime Number
3 is a prime number because 3 can be divided by only two number’s i.e. 1 and 3 itself.
3/1 = 3
3/3 = 1
In the same way, 2, 5, 7, 11, 13, 17 are prime numbers.
2
Cryptography
Department of Computer Science
Composite Numbers
Example of Composite Number
12 is a composite number because it can be divided by 1, 2, 3, 4, 6 and 12. So, the number ‘12’ has 6 factors.
12/1 = 12
12/2 =6
12/3 =4
12/4 =3
12/6 =2
12/12 = 1
3
Cryptography
Department of Computer Science
Modular Arithmetic
4
Cryptography
Department of Computer Science
Modular Arithmetic
CS555
5
where the first term is the quotient and the second the remainder.
Cryptography
Department of Computer Science
Modular Arithmetic
CS555
6
For example,
Cryptography
Department of Computer Science
Modular Arithmetic
CS555
7
that is, "a is congruent to b modulo m"
Cryptography
Department of Computer Science
Modular Arithmetic
8
Cryptography
Department of Computer Science
Modular Arithmetic
9
Cryptography
Department of Computer Science
Modular Arithmetic
10
a + b = b + a
(a + b) + c = a + (b + c)
and
a(b + c) = (ab) + (ac)
and
(b + c)a = (ba) + (ca)
Cryptography
Department of Computer Science
Modular Arithmetic
CS555
11
Cryptography
Department of Computer Science
Modular Arithmetic
CS555
12
Cryptography
Department of Computer Science
Vanilla Key Exchange (Diffie-Hellman)
CS555
13
Cryptography
Department of Computer Science
Diffie-Hellman
CS555
14
Cryptography
Department of Computer Science
CS555
15
Example
Cryptography
Department of Computer Science
Computational Diffie–Hellman Assumption
�
CS555
16
Cryptography
Department of Computer Science
Cont…
CS555
17
Cryptography
Department of Computer Science
The End
18
Cryptography
Department of Computer Science
Exercise
Q1. Explain prime numbers.
Q2. Explain composite numbers.
Q3. What is modular arithmetic?
Q4. What is vanilla key exchange?
Q5. Explain Diff-Hellman with example.
Q6. What is Computational Diffie–Hellman Assumption?
19
Cryptography
Department of Computer Science
Q7. A prime number is the one which has exactly
Q8. Modular arithmetic is a system of arithmetic for integers, which considers the.
Q9. We can also add and subtract congruent elements without losing.
Cryptography
Department of Computer Science
Q10. We can perform modular exponentiation without generating huge.
Q11. The Diffie-Hellman key exchange was the first widely used method of safely developing and exchanging keys over an.
Q12. The CDH assumption involves the problem of computing the discrete logarithm in.
Cryptography
Department of Computer Science