0% found this document useful (0 votes)
4 views

Module 1 and 3 Cryptography 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Module 1 and 3 Cryptography 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 262

Cryptography

Introduction to Cryptography

What is • branch of mathematics that deals with the


transformation of
Cryptograph • data.
• Encryption and Decryption
y? • Protecting data from unauthorized access

Types of • Symmetric Cryptography (Same key for encryption


and decryption)
Cryptograph • Asymmetric Cryptography (Different keys for
encryption and decryption)
y
CIA TRAID

CIA stands for :


•Confidentiality
•Integrity
•Availability
Symmetric and Asymmetric
Cryptography

Symmetric Asymmetric
Cryptography Cryptography
: :

Example:
Key word: AES Example: Key word: RSA
SSL/TLS for
(Advanced Online (Rivest-
web security
Encryption banking Shamir-
(e.g., Google,
Standard) transactions Adleman)
Amazon)
History of Encryption

Ancient Encryption Methods:

• Key word: Caesar Cipher, Atbash Cipher


• Example: Julius Caesar's military messages

Evolution of Encryption:

• Key word: Vigenère Cipher, Enigma Machine


• Example: Enigma during WWII, Alan Turing's
team
Cryptography-
Basics
Classical Ciphers

Caesar Cipher: Atbash Cipher:


Key words: Shift by positions, Key words: Reversed alphabet
simple substitution substitution
Example: "HELLO" → "KHOOR" (Shift Example: "ATTACK" → "ZGGZXP"
3) Weakness: Frequency analysis
Weakness: Limited key space,
brute-force attack
Caesar
Cipher
Algorithm
Example – Caesar Cipher
Strengths and Weaknesses of Caesar
Cipher

Strengths:

• Simple to understand and implement.


• Historically important.

Weaknesses:

• Vulnerable to frequency analysis.


• Only 25 possible shifts (easily brute-forced).
Real-World Uses of
Caesar Cipher

Applicatio Historically used by


Julius Caesar in Educational tool for

ns of military
communications.
teaching cryptography.

Caesar Modern-Day Uses:


Basic puzzles and fun
challenges.

Cipher Obfuscation in simple


applications.
Caesar Cipher in
Cryptanalysis
• How to Break Caesar Cipher
Methods of Breaking:
• Brute Force Attack – try all possible shifts.
• Frequency Analysis – analyze common
letters and patterns.
• Modern Implications: Easily breakable due to
limited keyspace.
Vernam Cipher
• The Vernam cipher, also known as the one-time pad
when implemented with a truly random key, is a
cryptographic method that ensures complete secrecy of
communication.
• This technique involves bitwise operations (specifically,
the XOR operation) to encrypt and decrypt plaintext
using a key that is as long as the plaintext.
VERNAM CIPHER
Rail Fence- Transposition
technique
Random and Pseudorandom
Numbers

Key Characteristics of Random


Numbers:
• Unpredictability
• True randomness
Source:
• Derived from physical phenomena
XOR: The result is 1 only if the bits are different; if both bits are the same, the
result is 0.
 Example: 1101 XOR 1001=01001101 XOR 1001=0100
Binary Operations and Their Role in
Cryptography
 Binary math uses three operations AND, OR, and
XOR.
 Binary Operations:
 AND: This operation compares two binary digits
(bits) and returns a 1 only if both bits are 1.
 Example:
1101 AND 1001=10011101 AND 1001=100
1
 OR: This operation returns a 1 if at least one of
the compared bits is 1.
 Example:
1101 OR 1001=11011101 OR 1001=1101
Contemporary Encryption Algorithms

Advanced Elliptic Curve


Encryption RSA: Cryptography
Standard (AES): (ECC):
• Key word: • Key word: • Key word:
Symmetric Asymmetric Efficient
encryption, encryption, encryption,
government use digital security smaller key
• Example: AES in • Example: sizes
online services SSL/TLS for • Example: Mobile
and messaging secure web devices, IoT
apps communication encryption
s
Multi-Alphabet
Substitution

• Vigenère Cipher:
• Key words:
Keyword-based
multiple Caesar
shifts
• Example: "HELLO" →
"RIJVS" (Keyword:
"KEY")
• Weakness:
Vulnerable to
frequency analysis
Real-World Applications of Cryptography

Encrypted
Online Banking Messaging Blockchain and
and E- Apps Cryptocurrency
commerce: (WhatsApp, :
Signal):
• Key word: AES • Key word: End- • Key word: ECC
for data to-end for digital
encryption encryption signatures
• Example: (AES, RSA) • Example:
Securing • Example: Bitcoin
transactions Protecting transactions
and login personal
credentials communicatio
ns
Cryptography Evolution:

• From simple substitution ciphers to modern


encryption algorithms (AES, RSA, ECC)

Importance in Modern Security:

• Encryption is essential for securing


communications, protecting personal data,
and ensuring privacy.
Symmetric Encryption Overview
• Symmetric encryption, also known as single-key
encryption, is a method where the same key is used
for both encryption and decryption of data.
• This makes it essential to securely share the key
between communicating parties.
• Symmetric encryption is still widely used today for its
efficiency, particularly for large volumes of data.
• Two of the most widely used symmetric ciphers are DES
(Data Encryption Standard) and AES (Advanced
Encryption Standard).
• This model is widely applied in secure communication
systems like banking (ATM PIN encryption), file
storage (AES), and network security (VPNs).
• However, secure key distribution is a major challenge in
symmetric encryption systems.
One-Time Pad (OTP)
• The One-Time Pad (OTP) is a cryptographic system
that offers perfect secrecy, meaning it is
mathematically unbreakable if implemented correctly.

• It is an improvement of the Vernam cipher, introduced


by Joseph Mauborgne, where a truly random key is
used once and is as long as the plaintext.
Steganography
Introduction to Block Ciphers
Electronic Code Book (ECB)
Electronic Code Book (ECB)

Process: Independent block encryption

Parallel encryption
Advantages:
Simple implementation

Prone to cryptanalysis
Disadvantages: Identical blocks produce identical
ciphertext

Example: Small data encryption (e.g., database entries)


Cipher
Block
Chaini
ng
Cipher Block
Chaining (CBC)

• Process: XOR with previous ciphertext block


• Initialization Vector (IV): Randomized input for the first block
• Advantages:
• Better security than ECB
• Suitable for large data
• Disadvantages:
• Cannot parallelize encryption
• Error propagation
• Example: SSL/TLS encryption for web security
Cipher Feedback Mode (CFB)
Cipher Feedback
Mode (CFB)

•Process: XOR with previous ciphertext (bit/byte level)


•Advantages:
•Resistant to cryptanalysis
•Suitable for bit/byte encryption
•Disadvantages:
•No parallel encryption
•Error propagation
•Example: IPsec, secure network protocols
Output Feedback Mode
Output Feedback Mode
(OFB)

• Process: Feeds encrypted output, not ciphertext


• Advantages:
• Error resistance
• Secure for noisy channels
• Disadvantages:
• Vulnerable to message stream modification
• Example: Satellite communication
Counter Mode (CTR)
Counter Mode (CTR)
• Process: Uses counter for each block
• Advantages:
• Parallel encryption possible
• No chaining, less error-prone
• Disadvantages:
• Synchronization required
• Example: VPN, WPA2, BitLocker
Applications of Block
Ciphers
Data Encryption: Secure sensitive
information
File/Disk Encryption: Protect
files/disks from unauthorized access
(e.g., BitLocker)
Virtual Private Networks (VPN):
Secure internet communication
SSL/TLS: Protect web traffic (e.g.,
HTTPS)
Digital Signatures: Verify document
authenticity
Summary of Block Cipher Modes

ECB: SIMPLE, WEAK CBC: SECURE, NOT CFB: BIT-LEVEL OFB: ERROR- CTR: FAST,
AGAINST ATTACKS PARALLELIZABLE ENCRYPTION, ERROR- RESISTANT, REQUIRES
PRONE VULNERABLE TO SYNCHRONIZATION
MODIFICATION
Stream Cipher and Block Cipher
Data Encryption Standard
Initial and Final Permutation
Round Function
Expansion Permutation Box
The S-box rule is illustrated below
Straight Permutation − The 32 bit output of S-boxes is then subjected to the straight
shown in the following illustration:
Key Generation
Simplicity and Speed

Symmetric Encryption
Advantages
Widespread Adoption
of DES
Foundation for Future
Algorithms
Well-Studied and Analyzed
Short Key Length (Vulnerable to Brute-
Force Attacks)

Small Block Size

Disadvantag
Outdated
es of DES
Vulnerable to Differential and Linear
Cryptanalysis

Single Key Dependency


Banking and Financial Transactions
Government and Military
Communications
Applications Secure Network Communications

of DES Cryptography Teaching

Triple DES (3DES)

Legacy Systems
Advanced Encryption Standard
(AES)
• AES is a symmetric encryption algorithm widely used for
securing sensitive data. It is a block cipher that
operates on fixed-size blocks of data (128 bits) using
keys of size 128, 192, or 256 bits.

• AES is known for its speed and security and is used in


various applications, including secure communications
and data storage.
Advanced Encryption Standard
Structure of the State Table
• In the Advanced Encryption Standard (AES), the
State Table (or State Array) is a fundamental data
structure used throughout the encryption and
decryption processes.
• It represents the input plaintext or intermediate data in
a 4x4 matrix format, with each element being a byte (8
bits).
• The State Table undergoes transformations during each
round of the AES algorithm.
AES ENCRYPTION AND DECRYPTION
Advantages Security
of AES
Speed

Flexibility

Widely Adopted
Parallel
Processing
Disadvantage Key
s of AES Management

Fixed Block

Vulnerability to
Side-Channel
Attacks
RSA ALGORITHM
Perform encryption for the plain text 20 using RSA
Algorithm with the values p=5, q=11, 13 as the public key
Security of
RSA

• The security of RSA depends on


the difficulty of factoring the
large number nnn, which is the
product of two large prime
numbers ppp and qqq.
• As of now, factoring large
numbers (with hundreds or
thousands of digits) is
computationally infeasible,
providing the basis for RSA's
security.

You might also like