0% found this document useful (0 votes)
23 views18 pages

Isnis Unit3

The document provides an overview of cryptography, including definitions of plaintext, ciphertext, and the processes of encryption and decryption. It discusses various cryptographic techniques such as symmetric and asymmetric cryptography, substitution and transposition techniques, and specific ciphers like Caesar's and Vigenère. Additionally, it touches on cryptanalysis, cryptology, and steganography, highlighting their applications and importance in securing data and communications.

Uploaded by

Aryan Jadhav
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)
23 views18 pages

Isnis Unit3

The document provides an overview of cryptography, including definitions of plaintext, ciphertext, and the processes of encryption and decryption. It discusses various cryptographic techniques such as symmetric and asymmetric cryptography, substitution and transposition techniques, and specific ciphers like Caesar's and Vigenère. Additionally, it touches on cryptanalysis, cryptology, and steganography, highlighting their applications and importance in securing data and communications.

Uploaded by

Aryan Jadhav
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/ 18

Unit 3.

Cryptography

Plaintext

 Clear text that anyone who knows the language can easily read the message
 Original message  plain text

Ciphertext:

 Plaintext codified with the help of any scheme


 Resultant message is ciphertext
 Coded message ciphertext

Cryptography:

 Art and science of wri ng secret message


 Used in areas: data and telecommunica on
 Most common over untrusted medium
 Cryptography - protects data and authen cates user


Applica on Of Cryptography

 Data hiding
 Digitally code – cryptography can be applied for digitally coding – so ware, graphics,
voice
 Electronic payment
 Message Authen ca on- to prevent message tampering

Cryptanalysis

 Cryptanalysis Breaking cipher text to obtain original message


 Decoding
 Non-readable <-> readable
 Without knowing how it was converted


Cryptology

 Combina on of cryptography and cryptanalysis


 In cryptography 
o cipher => algorithm for performing encryp on and decryp on
o

Encryp on

 Depends upon KEY


 Key – changes detailed opera on of algorithm
 Key must be selected before – cipher encrypts a message
 Without key – decryp on is impossible
 “Process of encoding Plaintext to Ciphertext is known as Encryp on”


Decryp on

 Opposite to Encryp on
 Ciphertext to plaintext
 Sender’s computer transforms plaintext to ciphertext (Encryp on)
 Ciphertext travels over network(internet)
 Receiver’s computer decryp on to get original message
 Encryp on algorithm => used for encryp on => sender’s end
 Decryp on algorithm => used for decryp on => receiver’s end


 Encryp on and Decryp on


Symmetric and Asymmetric Cryptography

 Cryptographic Algorithms: procedures or rules for encoding and decoding


 2 types of Cryptographic Algorithms


Symmetric Encryp on

 Same key for encryp on and decryp on


 Single key -> shared key -> shared key algorithm
 It’s a secret key known to – sender & receiver
 Both agree on the same key before communica on starts
 New communica on channel – new key
 Large number of shared key -> maintenance is tedious
 2 types of algorithms used:
o Block cipher :
 Encrypts 64 bits of data
 Complex encryp on func on used
 Same document  same key
o Stream cipher:
 Encrypts small blocks of plaintext(bits/bytes)
 Con nuously changing key stream
 Security depends upon key stream generator
 Faster than asymmetric key encryp on


Asymmetric Key Cryptography

 Public Key Cryptography


 Keys come in pairs
 One key encrypts
 Other key decrypts
 Interchangeable keys
 Encryp on Key ↔ Decryp on Key
 One key – public
 Other key – secret


 Only user having secret key – can decrypt message
 This method uses Key Management System
 Which implements Public Key Infrastructure
 This helps in finding suitable keys
 Advantage : Key is secure
Public Key Distribu on

 Public key – given to each user, freely shared


 Private key- kept confiden al
 Recipient of public key – encrypts message
 Recipient of private key – decrypts message
 When public key is distributed to bot users they should maintain confiden ality and
integrity
 3 aspects of public key encryp on
 Secure distribu on of public keys: guaranteeing the authen city of the keys
 Distribu ng secret keys using public-key encryp on
 Genera ng temporary keys for message encryp on: enhancing security and
confiden ality of communica on
 In fact 2 par es share the secret key
 Digital envelops: -
o It’s a public key encryp on to secure a symmetric key
o Used to protect message  sender and receiver need not pre-publish shared
secret key

o
o
 Public Key Cer ficate
o Public key is shared others
o Even it is broadcasted publicly
o This is significant weakness
o Anyone can fake such public announcement

o
o Solu on: use public-key cer ficate
o Cer ficate includes – public key & user ID of key owner
o Signed by trusted third-party
o Third party  cer ficate authority (can be government agency or financial
ins tu on)
o User can send public key to CA and get cer ficate
o User can share cer ficate with others
o Who needs public key verifies cer ficate for authen city

Subs tu on Technique
 2 ways to convert plaintext to ciphertext
o Subs tu on Technique
o Transposi on Technique
 Subs tu on  text replaced by another le ers / numbers/symbols

Caesar’s Cipher

 Simple & well known


 Replacement by shi ing technique
 E.g. ad, be, …. kn, ….ya, zc
 Invented by Julius Caesar
 Le or right rota on is possible
 Plaintext: HAPPY JOURNEY
 Cipher Text: KDSSBMRXUQHB
 Plaintext: HAPPY BIRTHDAY
 Ciphertext: KDSSBELUKGDB
 Plaintext: VARSHA YALVATKAR
 Ciphertext: YDUVKD
 Le ers can also be transformed into numbers
 E.g. A=0, B=1,C=2…..Y=24, Z=25
 Encryp on formulated as
o En (x)=(x+n)mod26
o Where, x- le er n- shi
 Decryp on formula
o Dn(x)=(x-n)mod26
 Plaintext – “I AM A HACKER”
 Key- 6
 Caeser’s cipher-(use any key)- OGSGNGIQKX
 Plaintext-“INFORMATION SECURITY”
 Key - 6
 Caeser’s cipher- OTLUXTGZOUT YKIAXOZE
Modified Caesar’s Cipher

 An alphabet can be replaced with any of remining 25 alphabets


 A ackers need to check all possibili es
 Called as Brute-Force-A ack

Play Fair Cipher

 It’s a manual encryp on of data


 Bogus le er is introduced
 Invented in 1854 by Charles Wheatstone
 But named a er Lord Playfair ( who promoted its use)
 This cipher is harder to break
 Because frequency analysis doesn’t work with this
 25*25=625 diagraphs(pair of alphabets) or 25 monographs(single alphabet)
 Time consuming for a acker
 2 phases of playfair cipher
o Crea on and popula on matrix
o Encryp on
 Crea on and popula on matrix
o Draw Polybius square
o Keyword followed by English alphabets (either i or j /skipping q) from the
square
o 5x5 matrix for storing keyword
o Same key for encryp on and decryp on
 Rules for 5x5 matrix
o Write keyword row wise – from le to right – top to bo om
o Drop duplicate le ers
o Fill remaining alphabets from a-z
 Encryp on process
o Plain text message is broken into group of 2
o Follow steps for each group/diagraph
1. If diagraph has same le er twice / only one le er le at the end e.g
HELLO  HE LX LO , STUMP  ST UM PX
2. If diagraph appears on the same row  replace by next le er on right
(wrap text/ cycling round)
3. If diagraph appears in same column  replace by le er below (wrap
text / cycling round)
4. If diagraph forms rectangle  replace by swapping le ers (on
opposite side of same row in rectangle) (maintain order)
 E.g. Plaintext – “ hide the gold in the tree stump”
Key-phrase – playfair example
 Generate Polybius Square (combine i/j)
P L A Y F

I R E X M

B C D G H

K N O Q S

T U V W Z

 Encryp on :split text into diagraphs


hi de th eg ol di nt he tr ee st um p

 In place of repeated le er insert x . that will adjust last diagraph as well


hi de th eg ol di nt he tr ex es tu mp

 Apply rules 1 to 4 to form cipher text using 5x5 matrix above


 Cipher text :-

 E.g plain text- 1. A ack 2. Academy 3. Balloon

Key – MONARCHY

 Generate Polybius Square (combine i/j)


M O N A R

C H Y B D

E F G I/J K

L P Q S T

U V W X Z

 Plain text - a ack


 Diagraph-
 Cipher text -

 Plain text -academy


 Diagraph-


 Cipher text -


 Plain text - balloon
 Diagraph-

 Diagraph -


 Cipher text -

Vigenère cipher

 Made up of mul ple simple subs tu on ciphers


 Invented by Leon Ba sta in 1568
 Examples of this technique -> Vigenère Cipher and Beaufort Cipher
 Uses mul ple 1-character keys
 1st key  encrypts  1st character , 2nd key  encrypts  2nd character ….so on

 E.g. key- FRINGE
 Plaintext- “get each soldier a meal”
 Write message with all spaces removed
 Write the key above the plaintext
 Repat key as many mes as necessary


 Search key le er  row wise
 Search plaintext le er  column wise


 Cipher Text- MWCSHHNKXZKNKJJALFR

Vernam Cipher (one- me pad)

 Invented by – Gilbert Vernam in 1998


 Uses a random set of non-repea ng characters as the input cipher text
 Once key is used for encryp on or decryp on  never used again
 So called as  “one- me pad”
 Produces random output
 Has no sta s cal rela onship with plaintext
 Length of key = length of plaintext
 Plain text – HOW ARE YOU
 ONE-TIME PAD- NCBTZQARX


 Cipher Text- UQXTQUYFR
 Highly secure method
 Hard for large messages

Transposi on Technique
Rail fence technique

 This is a type of transposi on cipher


 Name is given on the basis of the way of encoding
 Plaintext  wri en downwards on successive “rails” of fence
 Start a new column when bo om is reached
 Message is read according to rows
 E.g. plaintext – WELCOME STUDENTS rails - 2


 Cipher text – WLOETDNSECMSUET
 E.g. plain text- COMPUTER SECURITY rails-2

 ciphertext- CMUESCRTOPTREUIY
 plaintext – THANK YOU VERY MUCH rails -3

T K V M
H N Y U E Y U H
A O R C
 ciphertext - TKVMHNYUEYUHAORC
 Algorithm :
o Write down plain text message as a sequence of diagonals
o Read the plain text wri en in step1 as a sequence of rows

Simple Columnar Technique


Plaintext –“ALL IS WELL FOR YOUR EXAM”

Key=6 (NUMBER OF COLUMNS)

Col- 1 Col-2 Col-3 Col-4 Col-5 Col-6


A L L I S W

E L L F O R
Y O U R E X
A M

 Reading Pa ern- (6 3 2 4 1 5) (COLUMNWISE)


 Cipher Text -WRXLLULLOMIFRAEYASOE
 READING PATTERN -1 2 3 4 5 6
 CIPHER TEXT - AEYALLOMLLUIFRSOEWRX

 Plaintext – “WELCOME HOME”


 Key- ZEBRAS (length=6)
 So number of columns = __6__= length of key
 Reading pa ern= (246135)
Col- 1 Col-2 Col-3 Col-4 Col-5 Col-6
W E L C O M

E H O M E

 Ciphertext- ___EHCMMWELOOE_________________________________

 Plaintext – “COME HOME TOMORROW”


 Key-length=6
 So number of columns = ___6_= length of key
 Reading pa ern= (________461253_________)

Col- 1 Col-2 Col-3 Col-4 Col-5 Col-6


C O M E H O

M E T O M O
R R O W

 Ciphertext- _______EOWOOCMROERHMMTO_____________________________

Algorithm:

 Write plaintext row by row in a rectangle of a predefined size


 Read message column by column. (order chosen by encoder)
 Message obtained is Ciphertext

Rail Fence Technique

Simple Columnar Transposi on

Steganography

 Defini on: “ a technique of hiding large amount of secret message within and
ORDINARY message and extrac on of it at its des na on”
 One step ahead of cryptography
 Hides encrypted message
 Data is more secure
 Data is encrypted using encryp on algorithm
 Encrypted data  inserted into covered media (JPEG image)
 Stego-key is used
 Steganography process:


 Resultant file = stego-medium
 Cover media can be :- image/audio file
 Image :
o All bits represen ng same color pixels repeated in a row
o Encrypted data applied to this redundant data in random manner
o So result will have “ noise pa erns”
 Disadvantages:
o Once a acked data become worthless
o Lots of overhead to hide few bits of informa on
 Solu on:
o Inser on method with some key
o First encrypt then hide
 Advantage:
o Can be useful for par es dealing with highly secret informa on
 Terminologies :
o Cover-medium: data within which a message is to be hidden
o Stego-medium: data within which a message has been hidden
o Message: data to be hidden
o Redundant bits: bits of data in cover medium that can be modified without
compromising medium integrity

You might also like