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

cipher-d-cipher 2025

The document provides an overview of cryptography, including definitions of key concepts such as encryption, decryption, and ciphers. It details various types of ciphers, including substitution ciphers like Caesar's and Affine ciphers, as well as more complex methods like the Hill and Playfair ciphers. Additionally, it discusses the Vigenère and AutoKey ciphers, highlighting their unique characteristics and methods of encryption.

Uploaded by

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

cipher-d-cipher 2025

The document provides an overview of cryptography, including definitions of key concepts such as encryption, decryption, and ciphers. It details various types of ciphers, including substitution ciphers like Caesar's and Affine ciphers, as well as more complex methods like the Hill and Playfair ciphers. Additionally, it discusses the Vigenère and AutoKey ciphers, highlighting their unique characteristics and methods of encryption.

Uploaded by

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

Decipher-D-Cipher

Pratyush Sharma
Ryan Azim Shaikh
Cryptography
❖ Cryptography comes from the Greek words kryptós
meaning "hidden/secret" and graphein meaning
"writing".
❖ It is about constructing and analyzing protocols that
prevent third parties or the public from reading
private messages.
❖ Modern cryptography is heavily based on
mathematical theory and computer science.
Encryption and Decryption
❖ Data that can be read and understood without any
special measures is called plaintext.
❖ Disguising plaintext in such a way as to hide its
substance is called encryption.
❖ Encrypting plaintext results in unreadable gibberish
called cipher text.
❖ The process of reverting cipher text to its original
plaintext is called decryption.
Cipher

❖ A cipher is a pair of algorithms which creates the


encryption and the reversing decryption.
❖ Operation of a cipher is controlled by the algorithm
and by a key.
Substitution Cipher
Substituting every plaintext character for a different cipher
text character.

Examples:
❖ Plain text: abcdefghijklmnopqrstuvwxyz
❖ Cipher text: phqgiumeaylnofdxjkrcvstzwb
❖ Plain text: DEFEND THE EAST WALL OF THE CASTLE
❖ Cipher text: GIUIFG CEI IPRC TPNN DU CEI QPRCNI
Caesar’s Cipher
❖ It is a type of substitution cipher in which each letter in the
plaintext is 'shifted' a certain number of places down the
alphabet.
❖ If 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25. We can now represent the
Caesar’s cipher encryption function, e(x), where x is the
character we are encrypting, as:
𝑒 𝑥 = 𝑥 + 𝑘 𝑚𝑜𝑑 26
where 𝑘 is the key (the shift) applied to each letter.
Keywords
❖ The cipher string can be generated using a keyword.
❖ For example, if the keyword were ‘Pratyush is God’
❖ Cipher Text: pratyushigodefjklmnqvwxzbc
❖ Often when two parties exchanged codes, they would
encode the first word using the cipher of the previous
day. This when decoded would give the keyword for the
rest of the message.
Affine Cipher
❖ It is a type of substitution cipher in which each letter in the plaintext is
‘multiplied’ by a number and then 'shifted' a certain number of places down the
alphabet.

❖ If 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25. We can now represent the Affine cipher encryption
function, e(x), where x is the character we are encrypting, as:
𝑒 𝑥 = 𝑎𝑥 + 𝑘 𝑚𝑜𝑑 26

where 𝑎 is a multiplicative factor, coprime to 26.

𝑘 is the key (the shift) applied to each letter.


Affine Cipher

❖ If 'a'=0, 'b'=1, 'c'=2, ... , 'z'=25. We can now represent the Affine
cipher decryption function, d(x), where x is the character we are
decrypting, as:
𝑑 𝑥 = 𝑎−1 𝑥 − 𝑘 𝑚𝑜𝑑 26
where 𝑎 is a multiplicative factor, coprime with 26
k is the key (the shift) applied to each letter
and 𝑎−1 is the modular multiplicative inverse of a modulo 26,
i.e.,
1 = 𝑎𝑎−1 𝑚𝑜𝑑 26
Hill Cipher
❖ Hill Cipher uses matrix multiplication to cipher chunk of letters of size .
❖ Key for Hill cipher is a matrix of size 3*3.
❖ Blank spaces at the end of sentence in chunks are filled with infrequent letters such as X or Q.
❖ Example:
2 4 5
𝐾= 9 2 1
3 17 7

where det(K) !=0 and not divisible by 2 or 13

[A T T] = [0 19 19]

2 4 5 0 171 15
9 2 1 19 = 57 𝑚𝑜𝑑 26 = 5 = ‘PFO’
3 17 7 19 456 14
Atbash Cipher:
❖ A substitution cipher where the letters of the alphabet are reversed i.e. all
'A's are replaced with 'Z's, all 'B's are replaced with 'Y's, and so on.
❖ Example:
❖ Plain text: ATTACK AT DAWN
❖ Cipher text: ZGGZXP ZG WZDM
Transposition Cipher

❖ A method of encryption by which the positions held by units of plaintext are shifted according to a regular system
that is, the order of the units is changed.

❖ A simple example is to reverse the order of the letters in a plaintext. "a simple example" becomes "ELPMAXE ELPMIS A.”

❖ Another example consists of writing the text in chunks of 5 letters with one chunk below the other and reading
columnwise

Plain Text: MEET ME SOON

MEETM
ESOON

Cipher Text: ME ES EO TO MN
Vigenère and AutoKey Ciphers

❖ Once considered unbreakable ciphers.


❖ Uses a 26*26 custom table or tabula recta.
❖ Tabula recta:
Vigenère and AutoKey Ciphers
❖ For Vigenère cipher, a key is repeated all along the length of
plain text, thus assigning each plain text a key character.
❖ Cipher text for a plain text is then the text present in the
column and row to corresponding to key character and plain
text character respectively.
❖ Example:

❖ The key repeats itself. This property has been exploited to


design a method to break vigenère cipher.
Vigenère and AutoKey cipher

❖ In auto key cipher the key is not repeated but instead it is concatenated with the
plain text and then this is run all along the plain text, thus avoiding the
repetition.
❖ Example:
Plaintext: ATTACK AT D AWN…
Key: QUEENL YA T T ACK AT DAWN
Ciphertext: QNXEPV YT WT WP …

❖ First auto key cipher has defect that it did not use key but for all the letters in a
word the key character is the first letter of the word.
❖ Thus it was as difficult for the receiver as anyone else to decipher the cipher text.
❖ Notice how Vignère and AutoKey are different from Substitution codes, the
position of the character in a message matters.
Playfair Cipher
❖ The First practical "digraph" substitution cipher. Invented by Charles Wheatstone
but named after Lord Playfair who promoted the use of cipher.

❖ The key is 5*5 square which is built using a key word.

❖ Start filling the key square by the key word and discard the letters which are
repeated and then fill the rest with the remaining letters in alphabetical order.

❖ KEY :- PLAYFAIR EXAMPLE

❖ i and j are clubbed.


Playfair Cipher
❖ To encrypt the plain text it broken into digraphs. If left with a single character,
complete it with infrequent one like X.
❖ Now each digraph is replaced by its own cipher text.
❖ Locate letters in the digraph in the key square and follow the following rules to
find the corresponding cipher text.
Example:
Plain text: "Hide the gold in the tree stump"
Digraphs : HI DE TH EG OL DI NT HE TR EX ST UM PX
If in a digraph the letters are repeated then replace the later with infrequent
letter (X above).
Playfair Cipher

Rules for finding cipher text using the key square:


❖ If both letters are the same (or only one letter is left), add an "X" after the first
letter. Encrypt the new pair and continue.
❖ If the letters appear on the same row of your table, replace them with the letters
to their immediate right respectively.
❖ If the letters appear on the same column of your table, replace them with the
letters immediately below respectively.
❖ If they are not in same row or column, replace them, in same order , with the
letters in same row but at the other corner of the rectangle defined by the letters
in digraph as corners.
Playfair Cipher

Example:
Digraph: HI
Playfair Cipher

Example:
Digraph: DE
Playfair Cipher

Example:
Digraph: EX

Following the above rules


Plain text : HI DE TH EG OL DI NT HE TR EX ST UM PX
Cipher text : BM OD ZB XD NA BE KU DM UI XM MO UV IF
THANK YOU!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy