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

Intro Cryptography

The document provides an overview of cryptography, detailing definitions, types of ciphers, and encryption schemes. It explains the differences between various substitution ciphers, including monoalphabetic, polyalphabetic, homophonic, and polygraphic ciphers, along with their security measures. Additionally, it includes practical examples of encoding and decoding messages using the Caesar cipher.

Uploaded by

shubhamraj100802
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Intro Cryptography

The document provides an overview of cryptography, detailing definitions, types of ciphers, and encryption schemes. It explains the differences between various substitution ciphers, including monoalphabetic, polyalphabetic, homophonic, and polygraphic ciphers, along with their security measures. Additionally, it includes practical examples of encoding and decoding messages using the Caesar cipher.

Uploaded by

shubhamraj100802
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Cryptography

Model for Network Security


Definitions
Plaintext Ciphertext Enciphering/
• An original message • The coded message
encryption
• The process of converting
from plaintext to
ciphertext

Deciphering/ Cryptography Cryptographic


decryption • The area of study of the system/cipher
• Restoring the plaintext many schemes used for • A scheme
from the ciphertext encryption

Cryptanalysis Cryptology
• Techniques used for • The areas of cryptography
deciphering a message and cryptanalysis
without any knowledge of
the enciphering details
Cryptographic Systems
• Characterized along three independent dimensions:

The type of operations


The number of keys The way in which the
used for transforming
used plaintext is processed
plaintext to ciphertext

Substitution Symmetric, single-


key, secret-key,
Block cipher
conventional
encryption

Transposition

Asymmetric, two-
key, or public-key Stream cipher
Product encryption
Encryption Scheme Security

• Unconditionally secure
• No matter how much time an opponent has, it is
impossible for him or her to decrypt the
ciphertext simply because the required
information is not there
• Computationally secure
• The cost of breaking the cipher exceeds the
value of the encrypted information
• The time required to break the cipher exceeds
the useful lifetime of the information
Substitution Technique

• Is one in which the letters of plaintext are


replaced by other letters or by numbers or
symbols
• If the plaintext is viewed as a sequence of bits,
then substitution involves replacing plaintext bit
patterns with ciphertext bit patterns
Substitution Ciphers
1. Monoalphabetic Substitution Ciphers
2. Polyalphabetic Substitution Ciphers
3. Homophonic Substitution Cipher
4. Polygraphic Substitution Ciphers
5. Special Substitution Ciphers
Monoalphabetic
Substitution Ciphers
• Simple Substitution Cipher:
• Each letter of the plaintext is replaced by a corresponding letter in the ciphertext
alphabet.
• Example: A → Q, B → W, etc.
• Caesar Cipher:
• A shift cipher where each letter is shifted by a fixed number of places in the alphabet.
• Example: Shift by 3: A → D, B → E.
• Atbash Cipher:
• A cipher where the alphabet is reversed.
• Example: A ↔ Z, B ↔ Y, etc.
• Affine Cipher:
• A mathematical cipher that uses the formula E(x)=(ax+b)mod m, where a and b are
keys.
• Keyword Cipher:
• A substitution cipher based on a keyword, where repeated letters in the keyword are
removed, and the remaining alphabet is appended.
• Example: Keyword "SECRET": S, E, C, R, T, A, B, D, F, etc.
Polyalphabetic
Substitution Ciphers
• Use multiple substitution alphabets to reduce the predictability of
ciphertext.
• Vigenère Cipher:
• Encrypts text using a repeating keyword to shift each letter by a varying
amount.
• Beaufort Cipher:
• Similar to the Vigenère cipher but with a different encryption
mechanism.
• Autokey Cipher:
• Similar to the Vigenère cipher but uses the plaintext itself as part of the
key.
• Playfair Cipher:
• Encrypts digraphs (pairs of letters) using a 5x5 grid generated from a
keyword
Homophonic
Substitution Cipher
• Maps each plaintext letter to multiple possible
ciphertext symbols to obscure frequency analysis.
• Example:
• A → 12, 45, or 78
• B → 34, 56, or 89
Polygraphic
Substitution Ciphers
• Substitutes blocks of letters rather than single
letters.
• Hill Cipher:
• Uses linear algebra and matrix multiplication to encrypt
blocks of letters.
• Playfair Cipher:
• Encrypts digraphs using a 5x5 grid.
• Bifid Cipher:
• Combines Polybius square and transposition.
Special Substitution
Ciphers
• Pigpen Cipher:
• Uses a geometric symbol system instead of letters.
• Bacon's Cipher:
• Represents each letter of the plaintext as a unique
binary code.
• Polybius Square:
• Encodes letters as two numbers representing their row
and column in a grid.
Summary of Key
Differences
• Monoalphabetic Ciphers: Use one substitution rule
for the entire message.
• Polyalphabetic Ciphers: Use multiple substitution
rules for better security.
• Homophonic Ciphers: Assign multiple ciphertext
symbols to each plaintext symbol.
• Polygraphic Ciphers: Work on groups of letters
rather than individual ones.
MonoAlphabatic
substitution cipher
Caesar Cipher
• Simplest and earliest known use of a substitution
cipher
• Used by Julius Caesar
• Involves replacing each letter of the alphabet with
the letter standing three places further down the
alphabet
• Alphabet is wrapped around so that the letter
following Z is A
plain: meet me after the toga party
cipher: PHHW PH DIWHU WKH WRJD SDUWB
Caesar Cipher Algorithm
• Can define transformation as:
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
• Mathematically give each letter a number
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

• Algorithm can be expressed as:


c = E(3, p) = (p + 3) mod (26)

• A shift may be of any amount, so that the general Caesar


algorithm is:
C = E(k , p ) = (p + k ) mod 26
• Where k takes on a value in the range 1 to 25; the decryption
algorithm is simply:
p = D(k , C ) = (C - k ) mod 26
Ex caser cipher –
encryption
Task 1: Encode the following messages using a shift of 3
1.HELLO
2.CLASS
3.SECRET
Task 2: Encode the following messages using a shift of 5
4.WORLD
5.CIPHER
6.SECURITY
Ex caser cipher –
encryption
•Task 1: Encode the following messages using a shift of 3

1. HELLO → KHOOR
2. CLASS → FODVV
3. SECRET → VHFUHW

•Task 2: Encode the following messages using a shift of 5

1. WORLD → BTLWI
2. CIPHER → HNUMJW
3. SECURITY → XJHWZNXZD
Part 2: Decoding Messages
Task 3: Decode the following messages with a shift of 4
backward
1. XLIEX
2. GSVVIH
3. WXVSKVI
Task 4: Decode the following messages with a shift of 7
backward
4. MZWWL
5. QVDIKN
6. HXHZN
Part 2: Decoding Messages
Task 3: Decode the following messages with a shift of 4
backward
1. XLIEX → TEBAS
2. GSVVIH → CRRRDE
3. WXVSKVI → STMPTOA

Task 4: Decode the following messages with a shift of 7


backward
4. MZWWL → FRPOP
5. QVDIKN → JUXDBF
6. HXHZN → AQATA
Challenge Task
• The following ciphertext was encoded using a
Caesar Cipher, but the shift is unknown.
• Try to decrypt it by figuring out the shift value:
Ciphertext:
• WKLV LV D WHVW PHVVDJH
Figure 3.3

Brute-Force
Cryptanalysis
of
Caesar Cipher
(This chart can be found on page 75 in the
textbook)
Monoalphabetic Cipher
• Permutation
• Of a finite set of elements S is an ordered sequence of
all the elements of S , with each element appearing
exactly once

• If the “cipher” line can be any permutation of the


26 alphabetic characters, then there are 26! or
greater than 4 x 1026 possible keys
• This is 10 orders of magnitude greater than the key
space for DES
• Approach is referred to as a monoalphabetic
substitution cipher because a single cipher alphabet is
used per message
Monoalphabetic Ciphers
• Easy to break because they reflect the frequency
data of the original alphabet
• Countermeasure is to provide multiple
substitutes (homophones) for a single letter
• Digram
• Two-letter combination
• Most common is th
• Trigram
• Three-letter combination
• Most frequent is the

You might also like