SlideShare a Scribd company logo
W A U G Y J Y O I H K Y G L I U G L U K U Y G K
U I F K U L Y U T D K R T D Y U K L O I Y U T Y
A U G Y J Y O I H I H K Y G L I U G L U K U Y G
K U I F K U L Y U T D K A U G W E R G H F D S
O J H U I C R Y P T A N A L Y S I S I G U K Y I T
U D R D T F H B J N K L I H U Y G U Q A Z X D E
D F B A S I C X C I P H E R S J K N L I O U T Y F
K U I F A N D Y A T B I T U M O R E G H F D S T
E R D T Y U B J N L Y U T D K R T D Y U K L M I
J U H Y T Y K U I H L M P U Y T R E R S D T F Y
V G U B N I S E R D T M P U G S L B Y X A G I T
Dictionary
• Cryptography -- the practice and study of
techniquesfor secure communication in the
presence of third parties
• Cryptanalysis -- the study of
analyzinginformation systems in order to
study the hidden aspects of the systems
• Cipher -- an algorithm for
performing encryption or decryption
The Good, the Bad and the Ugly
Encoding
EncryptionHashing
Encoding (the Good)
• A simple (or not) abstraction level
• Commonly used in data storage, data
transmission,etc.
• Examples: ASCII, UTF-8/16/32,Base64, etc.
• More examples: Braille alphabet, Morse code,
Human DNA, etc.
Encoding (the Good)
Encryption (the Bad)
• A reversible way of hiding information.
• Initially used to deliver secret military
messages
• Two kinds of encryptions:
– Symmetric key encryption
– Public key encryption
• Examples: RSA, AES, Blowfish, etc.
Encryption example
• Caesar’s Box
• Not actually known if used by Caesar
Decrypt this
• CLNGS IISOA BYTSD ANTRO CIDGG
IEUOS EEROA RDTNZ ANKFE HMZTS
IITEE ZUONR HHSZ
Hashing (the Ugly)
• A method of giving a unique key (called hash)
to some data.
• The same input will always produce the same
output
• Multiple disparate inputs should not produce
the same output.
• It should not be possible to go from the
output to the input.
• Any modification of a given input should result
in drastic change to the hash (avalanche
effect).
A simple hashing algorithm
StringHashFunction(string, length)
sum ← 0
for (i = 1..length-1)
sum ← sum + string[i] * 31(length - 1 - i)
return sum
Foo : 70822
F0oo : 2135050
Bar : 66547
Additive cipher, the real Caesar cipher
• Initially used by Julius Caesar
• Based on right-shifting (addition) or left-
shifting (subtraction) of letters of the alphabet
A=0, B=1, C=2, …, W=22, X=23, Y=24, Z=25
   
    26mod
26mod
nxxD
nxxE
n
n


Additive example: key 23
Ciphertext: QEFSF SXEFA ABKJB PPXDB
Plaintext : ?
WVUTSRQPONMLK
ZYXWVUTSRQPON
JIHGFEDCBAZYX
MLKJIHGFEDCBA
Affine ciphers
• Very similar to additive ciphers
• Becomes additive cipher when a = 1
• Vulnerable to letter frequency
   
    26mod
26mod
1
bxaxD
baxxE



Letter frequency
Affine cipher: example
• Plaintext:
THIS IS AN EXAMPLE OF AFFINE CIPHER
• Key: a = 7, b = 11
• Ciphertext:
OIPHP HLYNQ LRMKN FULUU PYNZP MINA
Enigma Machine
Enigma Machine Simulator
http://enigmaco.de/enigma/enigma.swf
One-Time Pad: The secure cipher
• Most secure feature: Random encryption key
H E L L O
7 (H) 4 (E) 11 (L) 11 (L) 14 (O)
+ 23 (X) 12 (M) 2 (C) 10 (K) 11 (L)
= 30 16 13 21 25
= 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z)
HELLO → EQNVZ
message;key; key+message; key+message (mod 26)
Modern Cryptography
Symmetric
key
Public key
Symmetric key cryptography
• The same key is used for both encoding and
decoding
• Examples:
– Blowfish - the base of Bcrypt
– SAFER+/++ - used by Bluetooth technology
– IDEA - International Data Encryption Algorithm
Public key cryptography
Small challenge
57 69 74 68 20 67 72 65 61 74 20 70 6F 77 65
72 20 63 6F 6D 65 73 20 67 72 65 61 74 20 72
65 73 70 6F 6E 73 69 62 69 6C 69 74 79 2C 20
68 69 67 68 20 76 6F 6C 74 61 67 65 20 61 6E
64 20 68 69 67 68 20 63 75 72 72 65 6E 74 2E
Decrypt the above message 

More Related Content

PPTX
Cryptanalysis of the Engima - 44CON 2012
PDF
Applied cryptanalysis - stream ciphers
PPT
TakeDownCon Rocket City: Cryptanalysis by Chuck Easttom
PPTX
Cryptanalysis Lecture
PPT
overview of cryptographic techniques
PPT
Cryptography
PPT
Cipher techniques
PDF
Classic Cryptography
Cryptanalysis of the Engima - 44CON 2012
Applied cryptanalysis - stream ciphers
TakeDownCon Rocket City: Cryptanalysis by Chuck Easttom
Cryptanalysis Lecture
overview of cryptographic techniques
Cryptography
Cipher techniques
Classic Cryptography

Similar to Cryptanalysis - basic ciphers and a bit more (20)

PPT
crypto_1vdgfhhhggggjjgghghghgggghhhhhfhhhhhhjhvcgghcghggg
PPTX
Cryptology
PDF
CyberSecurity_Cryptography and its fundamentals
ODP
CISSP Week 18
PPTX
Cryptography in discrete structure .pptx
DOCX
Cryptography- "A Black Art"
PPTX
Cybersecurity cyberlab3
PPTX
Introduction to cryptography part2-final
PPTX
2 Mathematics of Cryptographyy chapter 2
PDF
classical of cryptography and the security of the newtork
PPTX
Cryptography is the practice of securing communication and information
PPTX
Cryptography
PPTX
Classical$ nn Encryption Techniques.pptx
PPTX
Cryptography-101
PPTX
PPT
CISSP EXAM PREPARATION FOR A PASSED SCORE
PDF
Overview of Cryptography in pantanagr .pdf
KEY
Cryptography for developers
PDF
2 classical cryptosystems
crypto_1vdgfhhhggggjjgghghghgggghhhhhfhhhhhhjhvcgghcghggg
Cryptology
CyberSecurity_Cryptography and its fundamentals
CISSP Week 18
Cryptography in discrete structure .pptx
Cryptography- "A Black Art"
Cybersecurity cyberlab3
Introduction to cryptography part2-final
2 Mathematics of Cryptographyy chapter 2
classical of cryptography and the security of the newtork
Cryptography is the practice of securing communication and information
Cryptography
Classical$ nn Encryption Techniques.pptx
Cryptography-101
CISSP EXAM PREPARATION FOR A PASSED SCORE
Overview of Cryptography in pantanagr .pdf
Cryptography for developers
2 classical cryptosystems
Ad

More from Things Lab (14)

PPT
3D Printer Workshop - From your idea to a real object
ODP
Things lab - Intro fritzing
ODP
Things lab - introduction to programming
PDF
Real world Webapp
PDF
Rapid Prototyping
PPT
Website with HTML CSS
PDF
(Not so) big data with Chart.js
PDF
Arduino
PDF
PHP and Databases
PDF
PHP Programming: Intro
PDF
Source Code Management with Git
PDF
Some hours of python
PPTX
An Hour of Arduino and Ardublock
PDF
Databases and MySQL
3D Printer Workshop - From your idea to a real object
Things lab - Intro fritzing
Things lab - introduction to programming
Real world Webapp
Rapid Prototyping
Website with HTML CSS
(Not so) big data with Chart.js
Arduino
PHP and Databases
PHP Programming: Intro
Source Code Management with Git
Some hours of python
An Hour of Arduino and Ardublock
Databases and MySQL
Ad

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
KodekX | Application Modernization Development
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
KodekX | Application Modernization Development
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Cryptanalysis - basic ciphers and a bit more

  • 1. W A U G Y J Y O I H K Y G L I U G L U K U Y G K U I F K U L Y U T D K R T D Y U K L O I Y U T Y A U G Y J Y O I H I H K Y G L I U G L U K U Y G K U I F K U L Y U T D K A U G W E R G H F D S O J H U I C R Y P T A N A L Y S I S I G U K Y I T U D R D T F H B J N K L I H U Y G U Q A Z X D E D F B A S I C X C I P H E R S J K N L I O U T Y F K U I F A N D Y A T B I T U M O R E G H F D S T E R D T Y U B J N L Y U T D K R T D Y U K L M I J U H Y T Y K U I H L M P U Y T R E R S D T F Y V G U B N I S E R D T M P U G S L B Y X A G I T
  • 2. Dictionary • Cryptography -- the practice and study of techniquesfor secure communication in the presence of third parties • Cryptanalysis -- the study of analyzinginformation systems in order to study the hidden aspects of the systems • Cipher -- an algorithm for performing encryption or decryption
  • 3. The Good, the Bad and the Ugly Encoding EncryptionHashing
  • 4. Encoding (the Good) • A simple (or not) abstraction level • Commonly used in data storage, data transmission,etc. • Examples: ASCII, UTF-8/16/32,Base64, etc. • More examples: Braille alphabet, Morse code, Human DNA, etc.
  • 6. Encryption (the Bad) • A reversible way of hiding information. • Initially used to deliver secret military messages • Two kinds of encryptions: – Symmetric key encryption – Public key encryption • Examples: RSA, AES, Blowfish, etc.
  • 7. Encryption example • Caesar’s Box • Not actually known if used by Caesar
  • 8. Decrypt this • CLNGS IISOA BYTSD ANTRO CIDGG IEUOS EEROA RDTNZ ANKFE HMZTS IITEE ZUONR HHSZ
  • 9. Hashing (the Ugly) • A method of giving a unique key (called hash) to some data. • The same input will always produce the same output • Multiple disparate inputs should not produce the same output. • It should not be possible to go from the output to the input. • Any modification of a given input should result in drastic change to the hash (avalanche effect).
  • 10. A simple hashing algorithm StringHashFunction(string, length) sum ← 0 for (i = 1..length-1) sum ← sum + string[i] * 31(length - 1 - i) return sum Foo : 70822 F0oo : 2135050 Bar : 66547
  • 11. Additive cipher, the real Caesar cipher • Initially used by Julius Caesar • Based on right-shifting (addition) or left- shifting (subtraction) of letters of the alphabet A=0, B=1, C=2, …, W=22, X=23, Y=24, Z=25         26mod 26mod nxxD nxxE n n  
  • 12. Additive example: key 23 Ciphertext: QEFSF SXEFA ABKJB PPXDB Plaintext : ? WVUTSRQPONMLK ZYXWVUTSRQPON JIHGFEDCBAZYX MLKJIHGFEDCBA
  • 13. Affine ciphers • Very similar to additive ciphers • Becomes additive cipher when a = 1 • Vulnerable to letter frequency         26mod 26mod 1 bxaxD baxxE   
  • 15. Affine cipher: example • Plaintext: THIS IS AN EXAMPLE OF AFFINE CIPHER • Key: a = 7, b = 11 • Ciphertext: OIPHP HLYNQ LRMKN FULUU PYNZP MINA
  • 18. One-Time Pad: The secure cipher • Most secure feature: Random encryption key H E L L O 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) + 23 (X) 12 (M) 2 (C) 10 (K) 11 (L) = 30 16 13 21 25 = 4 (E) 16 (Q) 13 (N) 21 (V) 25 (Z) HELLO → EQNVZ message;key; key+message; key+message (mod 26)
  • 20. Symmetric key cryptography • The same key is used for both encoding and decoding • Examples: – Blowfish - the base of Bcrypt – SAFER+/++ - used by Bluetooth technology – IDEA - International Data Encryption Algorithm
  • 22. Small challenge 57 69 74 68 20 67 72 65 61 74 20 70 6F 77 65 72 20 63 6F 6D 65 73 20 67 72 65 61 74 20 72 65 73 70 6F 6E 73 69 62 69 6C 69 74 79 2C 20 68 69 67 68 20 76 6F 6C 74 61 67 65 20 61 6E 64 20 68 69 67 68 20 63 75 72 72 65 6E 74 2E Decrypt the above message 