You are on page 1of 21

L2 Encryption & Decryption

 Basic encryption
 Substitution
 Permutation
 Secure encryption
 Symmetric (secret key)
 Asymmetric (public key)
Terminology and background
 Encryption or  Plaintext (P)
encode/encipher  Ciphertext (C)
 Decryption or  key (K); C=E(K,P)
decode/decipher  Symmetric
 Cryptosystem P=D(K,E(K,P))
 Cryptographer – authorized  Asymmetric
 Cryptanalyst - unauthorized P=D(Kd,E(Ke,P))
 Cryptology  Representation of
characters
Terminology and background
(continued)
 Cryptanalyst’s goals:  He works with:

 Break a single  Encrypted message


message  Known algorithms
 Recognize patterns  Intercepted plaintext
(break algorithm)  Mathematical tools
 Find general  Properties of langua
weaknesses  Computers
 Ingenuity and luck
Monoalphabetic ciphers
(Substitution)
 Caesar cipher
 Permutation – with or without key
 Cryptanalysis – frequency distribution
Polyalphabetic ciphers (Substitution)
 Used to flatten frequency distribution
 Vigenere Tableaux
 Cryptanalysis by finding number of alp.
 Kasiski Method
 Index of coincidence
Polyalphabetic Ciphers
Substitution (continued)
 The ‘perfect’ substitution ciphers
 One-time pad
 Long random number sequences (random
generator can be cracked)
 The Vernam cipher (sum mod26)
 The binary Vernam cipher (ex-OR)
 Long sequences from books
 Dual message entrapment
Transpositions (Permutations)
 Columnar transpositions
 Space&delay cause length restrictions
 Diagrams and triagrams (patterns)
 Cryptanalysis by diagram analysis
 Double transposition algorithm
 Cryptanalysis by functional relationship
Stream and block ciphers
 Stream advantages:  Block advantages:
 Speed of transformation  Diffusion
 Low error propagation  Immunity insertations &
modifications
 Stream disadvant.:  Block disadvant.:
 Low diffusion  Slow encryption
 Malicious insertations &  Error propagation
modifications possible
Properties of ’good’ ciphers
 Shannon Characteristics
 The amount of secrecy determinates amount of
labour
 Keys and algorithms should be free from
restrictions/complexity
 Implementation should be simple
 Errors should not propagate
 Size of ciphertext shouldn’t be longer than
plaintext
 Confusion and diffusion
Cryptanalysis summary
 Five cryptanalytic attacks:
 Ciphertext-only attack
 Known-plaintext attack
 Probable-plaintext attack
 Chosen-plaintext attack
 Chosen-ciphertext attack
Cryptanalysis summary (cont)
 Cryptanalytic tools:
 Frequency distribution
 Index of coincidence
 Searching for repeated patterns
 Study of probable letters
 Diagram, trigram study
Secure encryption systems
 Secret key systems (symmetric)
 Data Encryption Standard (DES)
 Key Escrow and Clipper
 Advanced Encryption Standard
 Public key systems (asymmetric)
 RSA encryption
Complexity
 Previous methods are for:
 Short messages
 Short period of time
 Weak interceptors
 Not for:
 National security
 Bank transfers
 Principle of Easiest Work
 Brute force attack: all n! permutations
Data Encryption Standard (DES)
 Released by NBS in 1976, based on ‘Lucifer’
 Combination of substitution and transposition
 16 iterations with 56-bit key (64)
 Based on diffusion and confusion (Shannon)
 Supported then adopted by NSA
 Can be broken (in 22 hours, parallel attack)
 Key length dilemma, new algorithm to be AES
Key escrow and Clipper
 Secret algorithm, implemented in hardware
 Different names: Capstone (at first), Skipjack
(algorithm), MOSAIC (program), Fortezza
(chip), Tessera (device)
 Idea: key separated to different agencies
 Similar to DES, but 32 rounds with 80bit key
 LEAF (low enforcement agents key) added
 Doesn’t depend on algorithm secrecy
Advanced Encryption Standard
 Invented in Belgium, as “Rijndael”
 Accepted as AES by NIST in year 2000
 Variable block size: 128, 196, 256 bits
 Variable key size: 128, 196, 256 bits
 If there is machine to crack DES in 1sec
It would take 149 trillion years for AES!
Public key systems
 1976. Diffie and Hellman
 Two keys: public and private
 Asymmetric system
P=D(Kpriv,E(Kpub,P))
P=D(Kpub,E(Kpriv,P))
 Requires less keys then symmetric
RSA Encryption
 1978. By Rivest-Shamir-Adelman
 Difficulty of determinating prime factors
 C=(P^e)mod n ; P=((P^e)^d)mod n
 Choosing keys:
p,q large primes; n=p*q (512bits,200dig)
e, large relative prime to (q-1)*(p-1)
then, d from: e*d=1 mod (q-1)*(p-1)
Secret key v.s. Public key systems
 Advantages:
 Symmetry
 Authentication
 Disadvantages:
 Frequent key changes (stolen, guessed, bought)
 Distribution (trough different channels)
 Number of keys rapidly increases with spreading
 Weaker algorithms than in public key systems
Attacks on ‘secure’ systems
 Secret key encryption:
 Brute force attack
 Differential cryptanalysis
 Parallel attack
 Public key encryption:
 Brute force attack
 Mathematical(factoring)
 Timing attack
 Small private key / small plaintext (1/3 n length)

You might also like