A short introduction to cryptography. What is public and private key cryptography? What is a Caesar Cipher and how do we decrypt it? How does RSA work?
2. What is cryptography?
"the art of hiding information"
OR
"the practice and study of techniques for secure
communication in the presence of third parties"
(wikipedia)
10. Cracking Caesar Cipher
(assuming we know Caesar Cipher is used)
1. Brute Force Attack
2. Word-pattern and letter distribution
attack
11. Brute Force Attack
Since the number of possible shifts is
limited, it is feasible to try each shift
and discard the results that are not
human readable.
12. Word-pattern and letter distribution attack
Step 1:
Find the average distribution of letter
in that language.
This can be done with ease by
analyzing long texts.
13. Word-pattern and letter distribution attack
Step 2:
A Caesar Cipher usually "shifts" this
distribution by the shift used for
encryption.
An error margin is permitted, so now
multiple possibilities are generated.
14. Word-pattern and letter distribution attack
Step 3:
Decrypt the text using the possible
shifts that were found in step 2.
Use word-pattern analysis (and
possibly a dictionary of words) to
discover the correct variant
15. Public Key Cryptography
Two keys are needed:
- one for encrypting the message
- one for decrypting the message
16. Public Key Cryptography
Key's properties
- neither keys can perform both
operations
- the two keys are mathematically
paired
- public key - used for encryption
- private key - used for decryption
19. RSA - Generating the two keys
(1) Choose two distinct prime numbers:
p and q
p and q should have high bit-length
p and q should be chosen at random
20. RSA - Generating the two keys
(2) Compute
n = pq
n is the "modulus" for both the public
and private keys
21. RSA - Generating the two keys
(3) Compute
φ(n) = φ(p)φ(q) = (p − 1)(q − 1)
22. RSA - Generating the two keys
(4) Choose e such that
1 < e < φ(n)
and
gcd(e, φ(n))
TIP: e and φ(n) are coprime