Chapter 3 Cryptography
Chapter 3 Cryptography
Cryptography
Abdulhafith 04/05/2025
Contents
1. Basic cryptographic terms
2. Historical background
3. Cipher Techniques
1. Transposition Cipher
2. Substitution Cipher
4. Conventional encryption algorithms
5. Cryptanalysis
6. Cryptographic Systems
1. Symmetric key cryptography
1. DES
2. 3DES
Abdulhafith 04/05/2025
Startup
Abdulhafith 04/05/2025
Introduction
Cryptography Comes from the Greek kryptós which means ‘hidden’ and gráphein, ‘to
write’) is the study of designing the techniques of cryptosystem
It is the science and study of secret writing (practice and study of hiding information)
It is the art and science of making a cryptosystem that is capable of providing information
security.
Security depends on the secrecy of the key, not the secrecy of the
algorithm
Abdulhafith 04/05/2025
Description
Abdulhafith 04/05/2025
Cont.
Cryptographic systems are characterized along three dimensions
block cipher
Abdulhafith 04/05/2025
Stream cipher
Transposition Cipher
The Transposition Cipher Technique is an encryption method
used to encrypt a message or information.
This encryption method is done by playing with the position of
letters of the plain text.
The positions of the characters present in the plaintext are
rearranged or shifted to form the ciphertext.
Abdulhafith 04/05/2025
Example Rail fence Technique
The Rail Fence Cipher is a type of transposition cipher that
rearranges the plaintext by writing it in a zigzag pattern along a
set number of rails (rows) and then reading the ciphertext row by
row. It is one of the simplest forms of transposition ciphers.
Abdulhafith 04/05/2025
Columnar Transposition Cipher
Columnar Transposition involves writing the plaintext out in rows,
and then reading the ciphertext off in columns one by one.
Abdulhafith 04/05/2025
Substitution cipher
A Substitution cipher is a cryptographic method that
replaces characters in a plaintext with other characters or
symbols according to a fixed system or key.
Unlike transposition ciphers (which rearrange characters),
substitution ciphers alter the identity of the characters
while preserving their order.
Abdulhafith 04/05/2025
ROT13 Ceasar Cipher example
Abdulhafith 04/05/2025
Conventional Encryption algorithms
Conventional encryption algorithms, also known as symmetric-key algorithms,
These algorithms are widely used for their efficiency and speed compared to
asymmetric encryption.
Symmetric Encryption:
Abdulhafith 04/05/2025
Types of Cryptanalysis Attacks
Brute-Force Attack Method: Tries every possible key until the correct one is
found.
Modern encryption algorithms like AES-256 are resistant due to large key sizes.
Method: The attacker intercepts and alters communication between two parties without
their knowledge.
Abdulhafith 04/05/2025
Example: Downgrade attacks on TLS to force weak encryption.
Cryptographic systems (DES)
The Data Encryption Standard (DES) is a symmetric-key block cipher published by the
National Institute of Standards and Technology (NIST).
DES has an effective key length of 56 bits, since 8 of the 64 bits of the key are not used by
the encryption algorithm (function as check bits only)
Feistel cipher : splitting data into halves and applying a round function.
Abdulhafith 04/05/2025
How it works
Abdulhafith 04/05/2025
Initial permutation
Abdulhafith 04/05/2025
Round function
The round function (also called the F-function) is a critical component of the
Data Encryption Standard (DES). It is applied in each of the 16 rounds of DES's
Feistel network structure.
Inputs:
Output:
A 32-bit result that is XORed with the left half of the data block.
Abdulhafith 04/05/2025
Each round follows these steps:
1. Expansion (E-Box): The 32-bit right half is expanded to 48 bits using a fixed table.
2. Key Mixing: The expanded right half is XORed with a 48-bit subkey (one per
round).
5. XOR with Left Half: The result is XORed with the left half.
6. Swap: The left and right halves are swapped, except in the last round
Abdulhafith 04/05/2025
Tripple DES (3DES)
3DES operates on 64-bit blocks of data using a 168-bit key (three 56-
bit keys).
There are two main versions of
3DES:3-Key 3DES (Most Secure) Uses three different 56-bit keys (K1,
K2, K3).
Mathematically:
C=EK3(DK2(EK1(P))) Where:
• P = Plaintext
• C = Ciphertext
Abdulhafith 04/05/2025
Decryption Process
Decryption is the reverse of encryption:
Mathematically:
P=DK1(EK2(DK3(C)))
Abdulhafith 04/05/2025
Advantages / Disadvantages
Advantages of 3DES
Disadvantages of 3DES
Abdulhafith 04/05/2025
AES
Abdulhafith 04/05/2025