Module1 - Complete
Module1 - Complete
Basic Cryptography
CYB-232
Module 1: Cryptographic
Security Functions
Spring2021
2020-2021
Focus of This Session
Break
Basic Classical Ciphers
Cryptography
Introduction
To Security Classical Cipher
Drawbacks
Lab Activities
Introduction to Cryptography
Classical Cipher
Lab Activity
measures to deter,
prevent, detect, and
correct security
violations that involve
the transmission of
information
Computer Security
Confidentiality
• Data confidentiality
• Assures that private or confidential information is not made available or disclosed to
unauthorized individuals
• Privacy
• Assures that individuals control or influence what information related to them may be
collected and stored and by whom and to whom that information may be disclosed
Integrity
• Data integrity
• Assures that information and programs are changed only in a specified and authorized
manner
• System integrity
• Assures that a system performs its intended function in an unimpaired manner, free
from deliberate or inadvertent unauthorized manipulation of the system
Availability
• Assures that systems work promptly and service is not denied to authorized
users
OSI Security Architecture
Security attack
Any action that compromises the security of
information owned by an organization
Security mechanism
A process (or a device incorporating such a process)
that is designed to detect, prevent, or recover from
a security attack
Security service
A processing or communication service that
enhances the security of the data processing
systems and the information transfers of an
organization
Intended to counter security attacks, and they
make use of one or more security mechanisms to
provide the service
Table 1.1
Threats and Attacks (RFC 4949)
Security Attacks
•A means of classifying security
attacks, used both in X.800 and
RFC 4949, is in terms of passive
attacks and active attacks
•A passive attack attempts to
learn or make use of information
from the system but does not
affect system resources
•An active attack attempts to
alter system resources or affect
their operation
Interception
Interruption
Modification
Fabrication
Interception (eavesdropping)
Unauthorized party gains access to service or data
Example:
Wiretapping to capture data into a network and coping of files
Examples:
Destruction of a piece of hardware, cutting of cable and
disabling of a file management system, or using bots for
DDoS attack
Security
Mechanisms
(X.800)
Chapter (#) 23
King Abdulaziz University
Cyber Security Diploma
Cryptanalysis Cryptology
• Techniques used for • The areas of cryptography
deciphering a message and cryptanalysis
without any knowledge of
the enciphering details
What is cryptography?
• kryptos – “hidden”
• grafo – “write”
Private Message
Bob Alice
Eavesdropping
Eve
The Solution
Encryption Decryption
Scrambled Message
Bob Alice
Eavesdropping
Eve
What do we need?
Nonsense
Plaintext Plaintext
Substitution Technique
Plaintext
five red balloons
Key = 3 Encryption
f+3=I
i+3=L
v+3=Y
…
Key = 3 Decryption
I-3=f
L-3=i
Y-3=v
…
Plaintext
a G n B five red balloons
b X o Y
c N p Z
d S q P
Key = e D r H
f A s W f =A Encryption
g F t I i =L
h V
u J
v =R
i L …
v R
j M
w U
k C
x K
l O
y T ALRD HDS XGOOYYBW Ciphertext
m E
z Q
The Monoalphabetic Cipher
• To decrypt we just look up the ciphertext letter in the table and then write
down the matching plaintext letter
• In English (or any language) certain letters are used more often than others
• It would be a good guess that the letters that occur most often in the ciphertext
are actually the most common English letters
Letter Frequency
• given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
Symmetric encryption
Asymmetric encryption
• Used to conceal small blocks of data, such as encryption keys and hash
function values, which are used in digital signatures
Authentication protocols
Brute-Force
Cryptanalysis
of
Caesar Cipher
(This chart can be found on page 75 in the
textbook)
Playfair Cipher
Chapter (#) 59
King Abdulaziz University
Cyber Security Diploma
From Classical to
Modern Cipher
Classical to Modern Cryptography
• Classical cryptography
• Encryption/decryption done by hand
• Modern cryptography
• Computers to encrypt and decrypt
• Same principles, but automation allows ciphers
to become much more complex
The Enigma Machine
• Other than that, the basic principles are the same as classical cryptography
Modern Ciphers
• We design one relatively simple scrambling method (called a round) and repeat it
many times
• Think of each round as a rotor on the Enigma
• One round may be easy to break, but when you put them all together it
becomes very hard
• Follow SPN/Feistel structure in general, but with added twists for security
• U.S. Government recognized the need to have a standardized cipher for secret
documents
• DES was developed by IBM in 1976
• Analysis of DES was the beginning of modern cryptographic research
Breaking DES
• In 2001, the Rijndael cipher was selected to become the Advanced Encryption
Standard
The Problem of Symmetric Key Cryptography
• Problem: How does Bob get the key to Alice when Eve is
eavesdropping?
Lab Activity
CrypTool Features
1. What is CrypTool?
Freeware program with graphical user interface
3. Target group
Core group: Students of computer science, business computing, and mathematics
But also for: computer users, application developers, employees, high school students, etc.
Prerequisite: PC knowledge
CT1 CrypTool v1
CT2 CrypTool v2
JCT JavaCrypTool
The art of trying to decrypt the encrypted messages without the use of the key that was used
to encrypt the messages.
• Brute force attack– this type of attack uses algorithms that try to guess all the possible
logical combinations of the plaintext which are then ciphered and compared against the
original cipher.
• Dictionary attack– this type of attack uses a wordlist in order to find a match of either the
plaintext or key. It is mostly used when trying to crack encrypted passwords.
• Rainbow table attack– this type of attack compares the cipher text against pre-computed
hashes to find matches.
Week 1 - Session 2 – Lab Activity 78
Classical cryptography
• Caesar
• Monoalphabetic substitution
• Ciphertext only:
Vigenère
Caesar ‐ Vigenère -
• Playfair Permutation /
Substitution ‐ Playfair
Transposition (Rail
• Known Plaintext Fence,
Cryptography Scytale, etc.)
column transposition
Attack on classical • Manual :Mono
1
methods alphabetical
Cryptanalysis substitution ‐ Playfair
Supported analysis
methods
Modern • DES,3DES
symmetric • AES
encryption
Feature Cryptography
Asymmetric • RSA
2
encryption • RSA with X.509
Cryptanalysis
• Brute-force
• Digital signature
Cryptography attack on
• Hash function
symmetric
algorithms
3
Cryptanalysis • • Attack on RSA
Attack on RSA signature
• Attack on hash functionsencryption
Available in 6 languages, and it is the most widespread e-learning software of its kind.
• Numerous classic and modern cryptographic algorithms (encryption and decryption, key
generation, secure passwords, authentication, secure protocols, etc.)
• Visualization of several algorithms (Caesar, Enigma, RSA, Diffie-Hellman, digital signatures, AES,
etc.)
CT1: https://www.cryptool.org/en/ct1/downloads
Inner working of digital signatures Examine variants of the RSA algorithm Analysis of the monoalphabetic substitution
cipher
Plain text :
Never underestimate the determination of a kid who is time-rich and cash-poor
Plaintext
Ciphertext
by using the CT1, use the following information in order to find the cipher
Plaintext: The Ethical Hackers-003
Keyword: KEY
Ciphertext ?
by using the CT1, use the following information in order to find the cipher
Plaintext: The difference between stupidity and genius is that genius has its
limits.
5*5 matrix
Ciphertext ?
Chapter (#) 89
Problem 1
In the next slide please find 3 ciphertexts of the same message encrypted using the following 3 classical ciphers
available in CrypTool 1: Caesar (shift cipher with k=3), Vigenere (shift cipher with k=HELLO), and Playfair (shift
cipher with k=PLAY). Do your best to match ciphertexts with a cipher that could have been used to obtain a given
ciphertext. If you are uncertain, you can list several ciphers per each ciphertext.
Find the corresponding plaintext, by trying each cipher with the corresponding key on each ciphertext.
Please note that spaces and punctuation characters have been removed before encryption. The ciphertext has
been divided into blocks of the size of 5 letters.
Ciphertext 1:
ALPCS PWDZA LXSTB NKZZR PRLWZ ZIPXW UKQLW SYCPG FSFLF LRZEH
VWPPH OEEYC DXTXS DMWWF LZPLZ PXMPD HXTPB A
Ciphertext 2:
WKHUH LVVRP HWKLQ JJRRG LQDOO VHHPL QJIDL OXUHV BRXDU HQRWW
RVHHW KDWQR ZWLPH ZLOOU HYHDO LWEHS DWLHQ W
Ciphertext 3:
ON KW DK XY TQ KF ON KH FZ CT QC KH YA YQ FW FK KH CG LK PV WK XF UP EW
GK QO OQ RF GR KP ZT RU QN KF VK YV AQ DW KE DQ ZG CA BR KD TZ
Chapter (#) 91
Building:-------
Room:
Contact:-----------
Email address:
[email protected]
Chapter (#) 92