Lec 3
Lec 3
Email: mohammad.noman@ucp.edu.pk
Information Security 1
Basic Terminologies
Lecture 3
Muhammad Noman
Email: mohammad.noman@ucp.edu.pk
Information Security 2
Introduction to Cryptography
Key Concepts:
• Plaintext: Original message before encryption.
• Example: "HELLO"
• Ciphertext: Coded message after encryption.
• Example: "URYYB" (using Caesar Cipher with key = 13)
• Cipher: Algorithm for transforming plaintext into
ciphertext.
• Example: Caesar Cipher shifts each letter by a certain number.
Muhammad Noman
(Lecturer FOIT) 3
(University of Central Punjab)
Key and Encryption/Decryption
Muhammad Noman
(Lecturer FOIT) 4
(University of Central Punjab)
Cryptography vs Cryptanalysis
Muhammad Noman
(Lecturer FOIT) 5
(University of Central Punjab)
What is Social Engineering?
Social Engineering is the act of manipulating people into
revealing confidential information or performing actions
that could lead to security breaches. It takes advantage of
human psychology rather than technical vulnerabilities.
OR
Muhammad Noman
(Lecturer FOIT) 6
(University of Central Punjab)
What is Social Engineering?
Example:
Scenario: A hacker calls an employee, pretending to be from
the company's IT department. They claim there's an urgent
issue and ask the employee to reset their password. The
employee follows the instructions and shares their new
password over the phone.
Muhammad Noman
(Lecturer FOIT) 7
(University of Central Punjab)
Types of Social Engineering Attacks:
Muhammad Noman
(Lecturer FOIT) 8
(University of Central Punjab)
How to Prevent It:
• Be cautious of unsolicited requests for information.
• Verify the identity of anyone asking for sensitive
information.
• Don’t share passwords or personal information without
confirmation.
Muhammad Noman
(Lecturer FOIT) 9
(University of Central Punjab)
CODE & DECODE
• An original message is known as the plaintext, while the coded message is called the
cipher text. The process of converting from plaintext to cipher text is known as
enciphering or encryption.
• Restoring the plaintext from the cipher text is deciphering or decryption.
• The many schemes used for encryption constitute the area of study known as
cryptography.
• Techniques used for deciphering a message without any knowledge of the enciphering
details fall into the area of cryptanalysis.
• Cryptanalysis is what the layperson calls “breaking the code.”
• The areas of cryptography and cryptanalysis together are called cryptology.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Symmetric Cipher Model
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Symmetric Cipher Model
A symmetric encryption scheme has five ingredients
Plaintext: This is the original, understandable message or
data that you start with before any processing.
Encryption Algorithm: This algorithm takes the plaintext
and performs a series of changes and substitutions to make it
unreadable.
Secret Key: This is an additional input that goes into the
encryption process. It's a separate value from the plaintext
and the algorithm itself. The algorithm uses this key to
determine how it will change the plaintext. Using different
keys will result in different scrambled outputs even if the
original message is the same.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Symmetric Cipher Model
Ciphertext: This is the jumbled, unreadable version of the
original message that comes out after encryption. It looks like
random data and doesn't make sense on its own. The specific
key used during encryption will produce a unique ciphertext
for the same message.
Decryption Algorithm: This process is essentially the
encryption algorithm in reverse. It takes the scrambled
ciphertext and the secret key, and turns it back into the
original readable message (plaintext).
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
ATTACKS
• The main objective of attacking an encryption system is to
recover the key.
• Two Approaches for attacking a conventional encryption
scheme:
CRYPTANALYSIS:
• Rely on the nature of the algorithm
• knowledge of the general characteristics of the plaintext
• plaintext–ciphertext pairs
BRUTE-FORCE ATTACK:
• Attacker tries every possible key on a piece of ciphertext
until plaintext is obtained.
• Half of all possible keys must be tried to achieve success.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Types of Cryptanalysis
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Types of Cryptanalysis
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Brute Force Attack
How It Works:
• The attacker generates every possible combination of
letters, numbers, and symbols until the right key is found.
• Example: In a Caesar Cipher, an attacker could try all
possible shifts (from 1 to 25) to decrypt the ciphertext.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Brute Force Attack
Example:
• Password Cracking:
• If the password is a simple combination of 4 digits, the
brute force attacker tries all combinations from "0000"
to "9999".
• If the correct password is "4679", the attacker
eventually finds it after checking 4679 combinations.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Brute Force Attack
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Types of Brute Force Attack
Simple Brute Force Attacks: Trying all possible combinations
of passwords until the correct one is found.
Dictionary Attacks: Using a pre-defined list of words (like a
dictionary) to guess the password.
Hybrid Brute Force Attacks: Combining dictionary attacks
with random variations (e.g., adding numbers or symbols).
Reverse Brute Force Attacks: Using a known password to
find matching usernames or accounts.
Credential Stuffing: Using stolen usernames and passwords
from one service to try and access other services.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Brute Force Attack
Countermeasures:
1. Use Strong Passwords: Include a mix of uppercase,
lowercase, symbols, and numbers.
2. Increase Key Length: Larger key sizes in encryption (e.g.,
AES-256) make brute-force attacks practically impossible
due to time constraints.
3. Implement Lockout Mechanisms: After several incorrect
attempts, lock the system to prevent further attacks.
Muhammad Noman
(Lecturer FOIT)
(University of Central Punjab)
Questions
Information Security 22