Symmetric Encryption
the universal technique for providing
confidentiality for transmitted or stored
data
also referred to as conventional
encryption or single-key encryption
two requirements for secure use:
need a strong encryption algorithm
sender and receiver must have obtained
copies of the secret key in a secure
fashion and must keep the key secure
Friends and enemies: Alice, Bob,
Trudy
well-known in network security world
Bob, Alice want to communicate “securely”
Eve (or Trudy, intruder) may intercept,
delete, add messages
Alice Bob
channel data, control
messages
data secure secure data
sender receiver
Eve
7-3
The language of cryptography
Alice’s Bob’s
K encryptio K decryptio
A
n Bn
key key
plaintext encryption ciphertext decryption plaintext
algorithm algorithm
symmetric key crypto: sender, receiver keys identical
public-key crypto: encryption key public, decryption
key secret (private)
Network Security 7-4
Classical Cryptography
Transposition Cipher
Substitution Cipher
Simple substitution cipher (Caesar cipher)
Vigenere cipher
One-time pad
Network Security 7-6
Fair Use Notice
The material used in this presentation i.e.,
pictures/graphs/text, etc. is solely intended for
educational/teaching purpose, offered free of cost to
the students for use under special circumstances of
Online Education and may include copyrighted material
- the use of which may not have been specifically
authorised by Copyright Owners. It’s application
constitutes Fair Use of any such copyrighted material as
provided in globally accepted law of many countries.
The contents of presentations are intended only for the
attendees of the class being conducted by the
Transposition Cipher: rail fence
Write plaintext in two rows
Generate ciphertext in column order
Example: “HELLOWORLD”
HLOOL
ELWRD
ciphertext: HLOOLELWRD
Problem: does not affect the frequency
of individual symbols
Network Security 7-8
Transposition Cipher: rail fence
Write plaintext in two rows
Generate ciphertext in column order
Example: “HELLOWORLD”
HLOOL
ELWRD
ciphertext: HLOOLELWRD
Problem: does not affect the frequency
of individual symbols
Network Security 7-9
Substitution Ciphers
One popular
Each letter is substitution
uniquely “cipher” for some
replaced by Internet posts is
another. ROT13.
There are 26!
possible
substitution
ciphers for
English
language.
Public domain image from http://en.wikipedia.org/wiki/File:ROT13.png
Cryptography 10 10/26/2024
Frequency Analysis
Letters in a natural language, like English,
are not uniformly distributed.
Knowledge of letter frequencies, including
pairs and triples can be used in cryptologic
attacks against substitution ciphers.
Cryptography 11 10/26/2024
Distribution of Letters in
English
Frequency analysis
Network Security 7-12
Simple substitution cipher
substituting one thing for another
Simplest one: monoalphabetic cipher:
substitute one letter for another (Caesar
Cipher)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHI J KLM NOPQRSTUVWXYZABC
Example: encrypt “I attack”
Network Security 7-13
Vigenere Cipher
Idea: Uses Caesar's cipher with various
different shifts, in order to hide the
distribution of the letters.
A key defines the shift used in each letter
in the text
A key word is repeated as many times as
required to become the same length
Plain text: I a t t a c k
Key: 2342342 (key is “234”)
Cipher text: K d x v d g m
Network Security 7-14
Substitution Cipher
Polyalphabetic Caesar Cipher
• Developed by Blaise de Vigenere
– Also called Vigenere cipher
• Uses a sequence of monoalpabetic ciphers in
tandem
–e.g. C1, C2, C2, C1, C2
Plain Text A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
C1(k=6) FGH I JKLMNOPQRSTUVWXYZABCDE
C2(k=20) TUVWXYZABCDEFGH I JKLMNOPQRS
• Example
Message: Encrypted
Cipher: Message:
Bob, I love you. Monoalphabetic Ghu, n etox dhz.
Alice Cipher tenvj
Key
Problem of Vigenere
Cipher
Vigenere is easy to break (Kasiski, 1863):
Assume we know the length of the key. We can
organize the ciphertext in rows with the same
length of the key. Then, every column can be
seen as encrypted using Caesar's cipher.
The length of the key can be found using
several methods:
1. If short, try 1, 2, 3, . . . .
2. Find repeated strings in the ciphertext. Their
distance is expected to be a multiple of the length.
Compute the gcd of (most) distances.
3. Use the index of coincidence.
IN THE GAME I LEARNT THE RULES OF THE GAME, BUT THE GAME WAS A DIFFERENT GAME OF ALL THE GAMES.
Rule 123
JP WIG JBOH J NHBTQU VKF TXMGV PH WJH HCPF DXU VKF IDNG ZBU D EKIGGUFPW HCPF QI BNO UJH HBPFU
---------------- 27----------------------------------------
7-16
Block Ciphers in
Practice
Data Encryption Standard (DES)
Developed by IBM and adopted by NIST in 1977
64-bit blocks and 56-bit keys, One parity bit for each of the 8 bytes
thus it reduces to 56 bits
Small key space makes exhaustive search attack feasible since late
90s
Triple DES (3DES)
Nested application of DES with three different keys KA, KB, and KC
Effective key length is 168 bits, making exhaustive search attacks
unfeasible
C = EKC(DKB(EKA(P))); P = DKA(EKB(DKC(C)))
Equivalent to DES when KA=KB=KC (backward compatible)
Advanced Encryption Standard (AES)
Selected by NIST in 2001 through open international competition and
public discussion
128-bit blocks and several possible key lengths: 128, 192 and 256 bits
Exhaustive search attack not currently
19 possible 10/26/2024
Data Encryption Standard
(DES)
the most widely used encryption scheme
• FIPS(Federal Information Processing
Standard) PUB 46
• referred to as the Data Encryption
Algorithm (DEA)
• uses 64 bit plaintext block and 56 bit key
to produce a 64 bit ciphertext block
strength concerns:
• concerns about algorithm
• DES is the most studied encryption
algorithm in existence
• use of 56-bit key
• Electronic Frontier Foundation (EFF)
announced in July 1998 that it had
broken a DES encryption