Top Banner
1 KUVEMPU KUVEMPU UNIVERSITY UNIVERSITY Seminar Seminar On On CRYPTOGRAPHY” CRYPTOGRAPHY” Seminar Guide: Seminar Guide: Murugendrappa. N Murugendrappa. N Lecturer, Lecturer, Department Of Electronics Department Of Electronics Jnana Sahyadri Jnana Sahyadri Shankaraghatta. Shankaraghatta. Seminar Seminar By: By: Deepti.S Deepti.S M.Sc. І І semester M.Sc. І І semester Department Of Electronics Department Of Electronics Jnana Sahyadri Jnana Sahyadri Shankaraghatta. Shankaraghatta.
23
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Cryptography

11

KUVEMPU UNIVERSITYKUVEMPU UNIVERSITY

SeminarSeminar On On

““CRYPTOGRAPHY”CRYPTOGRAPHY”

Seminar Guide: Seminar Guide: Murugendrappa. NMurugendrappa. N Lecturer,Lecturer, Department Of ElectronicsDepartment Of Electronics Jnana Sahyadri Jnana Sahyadri Shankaraghatta.Shankaraghatta.

Seminar By: Seminar By: Deepti.SDeepti.S M.Sc. І І semesterM.Sc. І І semester Department Of ElectronicsDepartment Of Electronics Jnana SahyadriJnana Sahyadri Shankaraghatta.Shankaraghatta.

Page 2: Cryptography

22

Contents :Contents : Introduction to Cryptography.Introduction to Cryptography. Why Cryptography.Why Cryptography. Encryption and Decryption.Encryption and Decryption. The Encryption model.The Encryption model. Cryptography in Mathematical Representation.Cryptography in Mathematical Representation. Algorithm Secrecy.Algorithm Secrecy. Some methods of Encryption.Some methods of Encryption. 1.Substitution cipher.1.Substitution cipher. 2.Transposition cipher.2.Transposition cipher. 3. One – Time Pad.3. One – Time Pad. Fundamental Cryptographic principle.Fundamental Cryptographic principle. Uses of Encryption.Uses of Encryption. Reference.Reference.

Page 3: Cryptography

33

Introduction Introduction to cryptographyto cryptographyCryptographyCryptography – comes from Greek word – comes from Greek word crypto-secret graphy -crypto-secret graphy -

writing.writing.

Definition :Definition : Cryptography deals with all aspects of secure messaging, Cryptography deals with all aspects of secure messaging,

authentication, digital signatures, electronic money, and other authentication, digital signatures, electronic money, and other applicationsapplications

Historically, four groups of people have used and Historically, four groups of people have used and

contributed to the art of cryptography: the military, the contributed to the art of cryptography: the military, the diplomatic corps, diarists, and lovers. Of these, the military has diplomatic corps, diarists, and lovers. Of these, the military has had the most important role and has shaped the field over the had the most important role and has shaped the field over the centuries. Within military organizations, the messages to be centuries. Within military organizations, the messages to be encrypted have traditionally been given to poorly-paid, low-level encrypted have traditionally been given to poorly-paid, low-level code clerks for encryption and transmission. code clerks for encryption and transmission.

Page 4: Cryptography

44

Why Cryptography?Why Cryptography?

Concerned with developing algorithms Concerned with developing algorithms which may be used to: which may be used to:

Conceal the context of some message from Conceal the context of some message from all except the sender and recipient (privacy or all except the sender and recipient (privacy or secrecy).secrecy).

Verify the correctness of a message to the Verify the correctness of a message to the recipient (authentication). recipient (authentication).

Forms the basis of many technological Forms the basis of many technological solutions to computer and communications solutions to computer and communications security problems.security problems.

Page 5: Cryptography

55

Encryption and DecryptionEncryption and Decryption

Encryption and Decryption Encryption and Decryption normally works in the following normally works in the following way:way:

“ “A message in its original form (plaintext) A message in its original form (plaintext)

is encrypted into an unintelligible form is encrypted into an unintelligible form (ciphertext) by a set of procedures known (ciphertext) by a set of procedures known as an as an EncryptionEncryption”.”.

Algorithm and a variable, called a Algorithm and a variable, called a keykey; and ; and

“ “The ciphertext is transformed The ciphertext is transformed (decrypted) back into plaintext using the (decrypted) back into plaintext using the encryption algorithm and a key known as encryption algorithm and a key known as an an DecryptionDecryption.”.”

Page 6: Cryptography

66

The Encryption modelThe Encryption model

Page 7: Cryptography

77

Definitions:Definitions:

Plain textPlain text : : In cryptographic terminology, the message is called In cryptographic terminology, the message is called

plaintextplaintext or or cleartextcleartext..

Encryption methodEncryption method : : Encoding the contents of the message Encoding the contents of the message in such a way that hides its contents from outsiders is in such a way that hides its contents from outsiders is called called encryption method encryption method ..

Cipher textCipher text : : The encrypted message is called the The encrypted message is called the cipher textcipher text..

Decryption methodDecryption method : T : The process of retrieving the plaintext he process of retrieving the plaintext from the ciphertext is called from the ciphertext is called decryption method decryption method ..

Encryption and decryption keyEncryption and decryption key : : Encryption and decryption Encryption and decryption usually make use of a usually make use of a keykey, and the coding method is such , and the coding method is such that decryption can be performed only by knowing the proper that decryption can be performed only by knowing the proper key.key.

Page 8: Cryptography

88

Intruder Intruder : : The enemy or crooks, hears and accurately copies The enemy or crooks, hears and accurately copies down the complete cipher text called down the complete cipher text called intruderintruder. .

Passive IntruderPassive Intruder : : The intruder does not know what the The intruder does not know what the decryption key is and so cannot decrypt the cipher text easily decryption key is and so cannot decrypt the cipher text easily and he can just listen to the communication channel. and he can just listen to the communication channel.

Active IntruderActive Intruder : : The intruder can also record messages and play The intruder can also record messages and play them back later, inject his own messages, or modify messages them back later, inject his own messages, or modify messages before they get to the receiver. before they get to the receiver.

CryptanalysisCryptanalysis : : The art of breaking ciphers.The art of breaking ciphers.

CryptographersCryptographers: : People who do cryptography are People who do cryptography are cryptographers.cryptographers.

CryptanalystsCryptanalysts :: practitioners of cryptanalysis are cryptanalysts. practitioners of cryptanalysis are cryptanalysts.

CryptologyCryptology : : Is the actual study of codes and cipher. It is bothIs the actual study of codes and cipher. It is both cryptography & cryptanalysis. cryptography & cryptanalysis.

Page 9: Cryptography

99

Cryptography in MathematicalCryptography in Mathematical

RepresentationRepresentation Encryption Encryption C = EC = EKK(P).(P).

Decryption Decryption P = EP = EKK-1-1(C).(C).

EEKK is chosen as a cryptographic system. is chosen as a cryptographic system. The parameter that selects the individual transformation is The parameter that selects the individual transformation is

called the key K, selected from a keyspace called the key K, selected from a keyspace KK.. A cryptographic system is a single parameter family of invertible A cryptographic system is a single parameter family of invertible

transformations.transformations. EEKK ; K in K : P ; K in K : P C C with the inverse algorithm Ewith the inverse algorithm EK K

-1-1 ; K in ; K in KK : C : C P P such that the inverse is unique. such that the inverse is unique. Usually we assume the cryptographic system is public, and Usually we assume the cryptographic system is public, and

only the key is secret information. only the key is secret information.

Page 10: Cryptography

1010

Algorithm SecrecyAlgorithm Secrecy The idea that the cryptanalyst knows the algorithms and that The idea that the cryptanalyst knows the algorithms and that

the secrecy lies exclusively in the keys is called Kerchoff's the secrecy lies exclusively in the keys is called Kerchoff's principle principle

Kerchoff’s PrincipleKerchoff’s Principle: All algorithms must be public; : All algorithms must be public; only the keys are secretonly the keys are secret

All modern algorithms use a key toAll modern algorithms use a key to control encryption and decryption;control encryption and decryption; a message can be decrypted onlya message can be decrypted only if the key matches the encryption key. if the key matches the encryption key. The key used for decryption can be ofThe key used for decryption can be of

different from the encryption key, but for most different from the encryption key, but for most algorithms algorithms they are the same.they are the same.

Page 11: Cryptography

1111

Some Methods Of EncryptionSome Methods Of Encryption Substitution Cipher.Substitution Cipher. Transposition Cipher.Transposition Cipher. One – Time Pad.One – Time Pad.

Substitution cipher : Substitution cipher : In substitution ciphers letters In substitution ciphers letters are replaced by other letters.are replaced by other letters.

There are two types.There are two types.

1. Monoalphabetic1. Monoalphabetic - only one substitution. - only one substitution.

2. Polyalphabetic2. Polyalphabetic - where several substitutions. - where several substitutions.

Page 12: Cryptography

1212

Caesar Cipher - A Monoalphabetic Caesar Cipher - A Monoalphabetic Substitution CipherSubstitution Cipher

Replace each letter of message by a letter a fixed Replace each letter of message by a letter a fixed distance away e.g. use the 3rd letter on distance away e.g. use the 3rd letter on

Reputedly used by Julius Caesar, e.g. Reputedly used by Julius Caesar, e.g.

L FDPH L VDZ L FRQTXHUHGL FDPH L VDZ L FRQTXHUHG i came i saw i conqueredi came i saw i conquered

the mapping isthe mapping is

ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ DEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC

Page 13: Cryptography

1313

A Simple Substitution CipherA Simple Substitution Cipher

Plaintext:

abcdefghijklmnopqrstuvwxyz

QIAYMWFUBKPDGJZSOCVLXNETRH

Ciphertext:

Page 14: Cryptography

1414

PolyalphabeticPolyalphabeticSubstitution ExampleSubstitution 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 zM1: 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 LM2: 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 RM3: 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

JQx CZ VXK VCER AQC PCRTX LBQZ QPK

.

Page 15: Cryptography

1515

Transposition CiphersTransposition Ciphers Transposition or permutation ciphers hide the message Transposition or permutation ciphers hide the message

contents by rearranging the order of the letters.contents by rearranging the order of the letters.

The cipher is keyed by a word or phase not containing any The cipher is keyed by a word or phase not containing any repeated letters.repeated letters.

Here Here MEGABUCKMEGABUCK is the key.The purpose of the key is to is the key.The purpose of the key is to number the column. Column1 being under the key letter number the column. Column1 being under the key letter closest to the start of the alphabet and so on. The plaintext is 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.written horizontally in rows padded to fill the matrix if need be.

The ciphertext readout by column, starting with the column The ciphertext readout by column, starting with the column whose key letter is the lowest.whose key letter is the lowest.

Page 16: Cryptography

1616

Transposition Cipher Example Transposition Cipher Example (1)(1)

Plaintext

pleasetransferonemilliondollarstomyswissbankaccountsixtwotwo

Ciphertext

AFLLSKSOSELAWAIATOOSSCTCLNMOMANTESILYNTWRNNTSOWDPAEDOBUOERIRICXB

M E G A B U C K

7 4 5 1 2 8 3 6

p l e a s e t r

a n s f e r o n

e m i l l i o n

d o l l a r s t

o m y s w i s s

b a n k a c c o

u n t s i x t w

o t w o a b c d

Key

Weights to be used for double transposition

Page 17: Cryptography

1717

Transposition Cipher Transposition Cipher Example(2)Example(2)

S H O E S

1 4 5 3 2

p a y m e

b y s u n

d a y o r

s u f f e

r t h e c

o n s e q

u e n c e

s z z z z

Key

Weights to be used for double transposition

Plaintext

paymebysundayorsuffertheconsequences

Ciphertext

PBDSROUSENRECQEZMUOFEECZAYAUTNEZYSYFHSNZ

Page 18: Cryptography

1818

One Time Pad - OTPOne Time Pad - OTP In this method we have to choose a random bit string as the In this method we have to choose a random bit string as the

key. Then convert the plain text into a bit string.key. Then convert the plain text into a bit string. For example using its ASCII representation finally, compute For example using its ASCII representation finally, compute

the XOR (exclusive OR) of these two strings bit by bit.the XOR (exclusive OR) of these two strings bit by bit.

The resulting ciphertext cannot be broken because it should The resulting ciphertext cannot be broken because it should be a large sample called be a large sample called “one time pad”“one time pad”

with a one time pad there are many bits in the key as in the with a one time pad there are many bits in the key as in the plaintext.plaintext.

This is the primary drawback of onetime pad, but it is also This is the primary drawback of onetime pad, but it is also the source of its perfect security.the source of its perfect security.

It is essential that no portion of the key ever be reused for It is essential that no portion of the key ever be reused for another encryption otherwise cryptanalysis can break the another encryption otherwise cryptanalysis can break the ciphercipher

Page 19: Cryptography

1919

One Time Pad AlgorithmOne Time Pad Algorithm The cipher itself is exceedingly simple.The cipher itself is exceedingly simple.

To encrypt plaintext, P, with a key, K, To encrypt plaintext, P, with a key, K, producing ciphertext, C, simply compute producing ciphertext, C, simply compute the bitwise exclusive-or of the key and the bitwise exclusive-or of the key and the plaintext: the plaintext:

C = K C = K XORXOR P P

To decrypt ciphertext, C, the recipient To decrypt ciphertext, C, the recipient computes computes P = K P = K XORXOR C C

It's that simple, and it’s perfectly secure, It's that simple, and it’s perfectly secure, as long as the key is random and is not as long as the key is random and is not compromised.compromised.

+P C

K

+C P

K

Page 20: Cryptography

2020

Two Fundamental Cryptographic Two Fundamental Cryptographic PrinciplePrinciple

RedundancyRedundancy : :

Cryptographic principle 1 : Messages must contain some Cryptographic principle 1 : Messages must contain some redundancy.redundancy.

Freshness :Freshness :

Cryptographic principle 2 : Some method is needed to foil Cryptographic principle 2 : Some method is needed to foil replay attacks.replay attacks.

i.e. some measures must be taken to ensure that each i.e. some measures must be taken to ensure that each message received can be verified as being freshmessage received can be verified as being fresh

Page 21: Cryptography

2121

Uses of EncryptionUses of Encryption

Protecting data from prying eyes is not the only Protecting data from prying eyes is not the only security issue in networkingsecurity issue in networking

ProtectingProtecting data from being read by unauthorized data from being read by unauthorized personspersons

Verifying the sender of each message Verifying the sender of each message Preventing unauthorized persons from inserting or Preventing unauthorized persons from inserting or

deleting messagesdeleting messages Making it possible for users to send signed Making it possible for users to send signed

documents electronicallydocuments electronically

Page 22: Cryptography

2222

ReferencesReferences

Computer Networks…Computer Networks… Tanenbaum third edition.Tanenbaum third edition.

Information Theory ,Coding and Cryptography…Information Theory ,Coding and Cryptography… Ranjan Bose.Ranjan Bose.

Internet…Internet…

Page 23: Cryptography

2323