- Published on
COMP2700 - Week 7 - Introduction to Cryptography
Table of Contents
Symmetric Cryptography
- Also known as private-key, single-key, secret-key cryptography
Problem: If Alice and Bob would like to communicate via an unsecure channel, then a third party, should not be able to understand the communications
Encrypted and decrypted with respective functions
-
is the plaintext
-
is the ciphertext
-
is the key
-
Set of all keys
-
Encryption equation ->
-
Decryption equation ->
Note that encryption and decryption are inverse operations if the same key is used on both sides and must be transmitted via a secure channel between Alice and Bob. System is secure iff attacker doesn't learn the key .
Note: Problem of secure communication reduced to secure transmission and storage of key
Cryptanalysis
Why do we need Cryptanalysis
- No unconditional mathematical proof of security for any practical cipher
Kerckhoff's Principle
A cryptosystem should be secure even if the attacker knows all details about the system, with the exception of the secret key.
Attacking Cryptosystems
- Classical Attacks
- Mathematical Analysis
- Brute-force Attack
- Implementation Attack -> Extract key through reverse engineering or power measurement
- Social Engineering -> Trick user into giving up password
Brute-force attack
- Requires at least 1 plaintext-ciphertext pair
- Check all possible keys until condition is fulfilled
Substitution Cipher
- Encrypt letters rather than bits
- Replace each plaintext letter by another letter
Brute-force
-
Try all possible permutations until an intelligent plaintext appears
-
Possible keys ->
Frequency Analysis
Frequency of letters can give away/break sub-ciphers
Example
Modular Arithmetic
Cryptosystems based on sets of numbers
- Discrete -> Sets with integers are partially useful
- i.e. no floating point numbers, integers only
- Finite -> If we only compute with a finitely many numbers
Definition Let be integers and . We write
if is divisible by
- is called the modulus
- is called the remainder