KUVEMPU UNIVERSITY
Seminar On
“CRYPTOGRAPHY”
Seminar Guide:
Murugendrappa. N
Lecturer,
Department Of Electronics
Jnana Sahyadri
Shankaraghatta.
Seminar By:
Deepti.S
M.Sc. І І semester
Department Of Electronics
Jnana Sahyadri
Shankaraghatta.
1
Contents :
Introduction to Cryptography.
Why Cryptography.
Encryption and Decryption.
The Encryption model.
Cryptography in Mathematical Representation.
Algorithm Secrecy.
Some methods of Encryption.
1.Substitution cipher.
2.Transposition cipher.
3. One – Time Pad.
Fundamental Cryptographic principle.
Uses of Encryption.
Reference.
2
Introduction to cryptography
Cryptography – comes from Greek word crypto-secret graphy
-writing.
Definition :
Cryptography deals with all aspects of secure messaging,
authentication, digital signatures, electronic money, and other
applications
Historically, four groups of people have used and
contributed to the art of cryptography: the military, the
diplomatic corps, diarists, and lovers. Of these, the military has
had the most important role and has shaped the field over the
centuries. Within military organizations, the messages to be
encrypted have traditionally been given to poorly-paid, low-level
code clerks for encryption and transmission.
3
Why Cryptography?
Concerned with developing algorithms
which may be used to:
Conceal the context of some message from
all except the sender and recipient (privacy or
secrecy).
Verify the correctness of a message to the
recipient (authentication).
Forms the basis of many technological
solutions to computer and communications
security problems.
4
Encryption and Decryption
Encryption and Decryption
normally works in the following
way:
“A message in its original form (plaintext)
is encrypted into an unintelligible form
(ciphertext) by a set of procedures known
as an Encryption”.
Algorithm and a variable, called a key; and
“The ciphertext is transformed
(decrypted) back into plaintext using the
encryption algorithm and a key known as
an Decryption.”
5
The Encryption model
6
Definitions:
Plain text : In cryptographic terminology, the message is called
plaintext or cleartext.
Encryption method : Encoding the contents of the message
in such a way that hides its contents from outsiders is
called encryption method .
Cipher text : The encrypted message is called the cipher text.
Decryption method : The process of retrieving the plaintext
from the ciphertext is called decryption method .
Encryption and decryption key : Encryption and decryption
usually make use of a key, and the coding method is such
that decryption can be performed only by knowing the proper
key.
7
Intruder : The enemy or crooks, hears and accurately copies
down the complete cipher text called intruder.
Passive Intruder : The intruder does not know what the
decryption key is and so cannot decrypt the cipher text easily
and he can just listen to the communication channel.
Active Intruder : The intruder can also record messages and play
them back later, inject his own messages, or modify messages
before they get to the receiver.
Cryptanalysis : The art of breaking ciphers.
Cryptographers: People who do cryptography are
cryptographers.
Cryptanalysts : practitioners of cryptanalysis are cryptanalysts.
Cryptology : Is the actual study of codes and cipher. It is both
cryptography & cryptanalysis. 8
Cryptography in Mathematical
Representation
Encryption C = EK(P).
Decryption P = EK-1(C).
EK is chosen as a cryptographic system.
The parameter that selects the individual transformation is called
the key K, selected from a keyspace K.
A cryptographic system is a single parameter family of invertible
transformations.
EK ; K in K : P C
with the inverse algorithm EK -1 ; K in K : C P
such that the inverse is unique.
Usually we assume the cryptographic system is public, and
only the key is secret information. 9
Algorithm Secrecy
The idea that the cryptanalyst knows the algorithms and that
the secrecy lies exclusively in the keys is called Kerchoff's
principle
Kerchoff’s Principle: All algorithms must be public;
only the keys are secret
All modern algorithms use a key to
control encryption and decryption;
a message can be decrypted only
if the key matches the encryption key.
The key used for decryption can be of
different from the encryption key, but for most algorithms
they are the same. 10
Some Methods Of Encryption
Substitution Cipher.
Transposition Cipher.
One – Time Pad.
Substitution cipher : In substitution ciphers letters
are replaced by other letters.
There are two types.
1. Monoalphabetic - only one substitution.
2. Polyalphabetic - where several substitutions.
11
Caesar Cipher - A Monoalphabetic
Substitution Cipher
Replace each letter of message by a letter a fixed
distance away e.g. use the 3rd letter on
Reputedly used by Julius Caesar, e.g.
L FDPH L VDZ L FRQTXHUHG
i came i saw i conquered
the mapping is
ABCDEFGHIJKLMNOPQRSTUVWXYZ
DEFGHIJKLMNOPQRSTUVWXYZABC
12
A Simple Substitution Cipher
Plaintext:
abcdefghijklmnopqrstuvwxyz
QIAYMWFUBKPDGJZSOCVLXNETRH
Ciphertext:
13
Polyalphabetic
Substitution Example
Suppose that a polyalphabetic cipher of period 3 is being used, with the
three monoalphabetic ciphers M1, M2, M3 as defined below. To
encrypt a message, the first 3 letters of the plaintext are enciphered
according to ciphers M1, M2, M3 respectively, with the process being
repeated for each subsequent block of 3 plaintext letters.
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
M1: K D N H P A W X C Z I M Q J B Y E T U G V R F O S L
M2: P A G U K H J B Y D S O E M Q N W F Z I T C V L X R
M3: J M F Z R N L D O W G I A K E S U C Q V H Y X T P B
Plaintext
now is the time for every good man
Ciphertext
14
Transposition Ciphers
Transposition or permutation ciphers hide the message
contents by rearranging the order of the letters.
The cipher is keyed by a word or phase not containing any
repeated letters.
Here MEGABUCK is the key.The purpose of the key is to
number the column. Column1 being under the key letter
closest to the start of the alphabet and so on. The plaintext is
written horizontally in rows padded to fill the matrix if need be.
The ciphertext readout by column, starting with the column
whose key letter is the lowest.
15
Transposition Cipher Example
(1)
M E G A B U C K Key
7 4 5 1 2 8 3 6 Weights to be used for double transposition
p l e a s e t r
Plaintext
a n s f e r o n
pleasetransferonemilliondollarstomyswis
e m i l l i o n sbankaccountsixtwotwo
d o l l a r s t
o m y s w i s s Ciphertext
b a n k a c c o AFLLSKSOSELAWAIATOOSSCTCLNM
u n t s i x t w OMANTESILYNTWRNNTSOWDPAEDO
BUOERIRICXB
o t w o a b c d
16
Transposition Cipher
Example(2)
Key S H O E S
Weights to be used for double transposition 1 4 5 3 2
p a y m e
Plaintext
b y s u n
paymebysundayorsufferthecons
d a y o r
equences
s u f f e
Ciphertext r t h e c
o n s e q
PBDSROUSENRECQEZMUOF
EECZAYAUTNEZYSYFHSNZ u e n c e
s z z z z 17
One Time Pad - OTP
In this method we have to choose a random bit string as the
key. Then convert the plain text into a bit string.
For example using its ASCII representation finally, compute
the XOR (exclusive OR) of these two strings bit by bit.
The resulting ciphertext cannot be broken because it should
be a large sample called “one time pad”
with a one time pad there are many bits in the key as in the
plaintext.
This is the primary drawback of onetime pad, but it is also
the source of its perfect security.
It is essential that no portion of the key ever be reused for
another encryption otherwise cryptanalysis can break the
cipher 18
One Time Pad Algorithm
The cipher itself is exceedingly simple.
To encrypt plaintext, P, with a key, K,
producing ciphertext, C, simply compute
the bitwise exclusive-or of the key and the
plaintext:
P + C
C = K XOR P
To decrypt ciphertext, C, the recipient K
computes
P = K XOR C C + P
It's that simple, and it’s perfectly secure,
as long as the key is random and is not K
compromised.
19
Two Fundamental Cryptographic
Principle
Redundancy :
Cryptographic principle 1 : Messages must contain some
redundancy.
Freshness :
Cryptographic principle 2 : Some method is needed to foil
replay attacks.
i.e. some measures must be taken to ensure that each
message received can be verified as being fresh
20
Uses of Encryption
Protecting data from prying eyes is not the only
security issue in networking
Protecting data from being read by unauthorized
persons
Verifying the sender of each message
Preventing unauthorized persons from inserting or
deleting messages
Making it possible for users to send signed
documents electronically
21
References
Computer Networks…
Tanenbaum third edition.
Information Theory ,Coding and Cryptography…
Ranjan Bose.
Internet…
22
23