introduction to cryptography
DESCRIPTION
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?TRANSCRIPT
![Page 1: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/1.jpg)
Introduction to Cryptography
by Petre POPESCU
![Page 2: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/2.jpg)
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)
![Page 3: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/3.jpg)
Modern Cryptography
a branch of mathematics and
computer science
![Page 4: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/4.jpg)
Modern Cryptography
2 main branches
1. Private Key Cryptography2. Public Key Cryptography
![Page 5: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/5.jpg)
Private Key Cryptography
The same key is used for both encryption and decryption
![Page 6: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/6.jpg)
Private Key Cryptography
Examples:- DES- AES- Caesar Cipher- Blowfish
![Page 7: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/7.jpg)
Caesar Cipher
Named after Julius Caesar, who used it in his private and military
correspondence.
![Page 8: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/8.jpg)
Caesar Cipher
It is a substitution cipher
Each letter is replaced by another letter depending on a "shift" value
![Page 9: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/9.jpg)
Caesar Cipher
![Page 10: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/10.jpg)
Cracking Caesar Cipher
(assuming we know Caesar Cipher is used)
1. Brute Force Attack2. Word-pattern and letter distribution
attack
![Page 11: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/11.jpg)
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.
![Page 12: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/12.jpg)
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.
![Page 13: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/13.jpg)
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.
![Page 14: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/14.jpg)
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
![Page 15: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/15.jpg)
Public Key Cryptography
Two keys are needed:- one for encrypting the message- one for decrypting the message
![Page 16: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/16.jpg)
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
![Page 17: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/17.jpg)
Public Key Cryptography
Examples:- RSA- YAK- Various elliptic curve techniques
![Page 18: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/18.jpg)
RSA
Created by: Ron RivestAdi ShamirLeonard Adleman
Is based on the presumed difficulty of factoring large integers.
![Page 19: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/19.jpg)
RSA - Generating the two keys
(1) Choose two distinct prime numbers:p and q
p and q should have high bit-lengthp and q should be chosen at random
![Page 20: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/20.jpg)
RSA - Generating the two keys
(2) Computen = pq
n is the "modulus" for both the public and private keys
![Page 21: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/21.jpg)
RSA - Generating the two keys
(3) Computeφ(n) = φ(p)φ(q) = (p − 1)(q − 1)
![Page 22: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/22.jpg)
RSA - Generating the two keys
(4) Choose e such that 1 < e < φ(n)
andgcd(e, φ(n))
TIP: e and φ(n) are coprime
![Page 23: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/23.jpg)
RSA - Generating the two keys
"e" is the Public Key Exponent
![Page 24: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/24.jpg)
RSA - Generating the two keys
(5) Compute d whered−1 ≡ e (mod φ(n))
ord is the multiplicative inverse of
e (modulo φ(n))
![Page 25: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/25.jpg)
RSA - Generating the two keys
To calculate dsolve for d given
d*e ≡ 1 (mod φ(n))
![Page 26: Introduction to Cryptography](https://reader033.vdocument.in/reader033/viewer/2022051817/547d2525b4af9fb74b8b4a93/html5/thumbnails/26.jpg)
RSA - Generating the two keys
Public Key: e and nPrivate Key: d and n
d, p, q and φ(n) must be kept secret