Top Banner
CRYPTOGRAPHY
30
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

CRYPTOGRAPHY

Page 2: Cryptography

CONTENTS

• Definition

• Cryptography Issues

• Cryptography Components

• Cryptography Technique

• Cryptography Categories

• Symmetric key cryptography

• Asymmetric key cryptography

• Comparison of Symmetric and Asymmetric key cryptography

Page 3: Cryptography

DEFINITION

Page 4: Cryptography

CRYPTOGRAPHY

• A word with Greek origins, means “secret writing”.

• The term to refer to the science and art of transforming messages to make them secure and immune to attacks.

• Applications of cryptography includes ATM cards, computer passwords, and electronic commerce.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 5: Cryptography

CRYPTOGRAPHY ISSUES

Page 6: Cryptography

CRYPTOGRAPHY ISSUES

• Confidentiality: Only sender, intended receiver should “understand” message contents.

• End-Point Authentication: Sender and receiver want to confirm identity of each other.

• Message Integrity: Sender and receiver want to ensure message not altered (in transit, or afterwards) without detection.

Deepak
Sender encrypts the data and receiver decrypts it.
Page 7: Cryptography

CRYPTOGRAPHY COMPONENTS

Page 8: Cryptography

PLAINTEXT AND CIPHERTEXT

• The original message, before being transformed, is called plaintext.

• After the message is transformed, it is called ciphertext.

• An encryption algorithm transforms the plaintext into ciphertext; a decryption algorithm transforms the ciphertext back into plaintext.

• Example:

• Plaintext: HELLO

• Ciphertext: KHOOR

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Deepak
The sender uses an encryption algorithm, and the receiver uses a decryption algorithm.
Page 9: Cryptography

CIPHER

• Encryption and Decryption algorithms are referred as ciphers.

• Also used to refer to different categories of algorithms in cryptography.

• Example (Traditional Substitution Ciphers):

• Monoalphabetic cipher

• Polyalphabetic cipher

• Plaintext: HELLO

• Ciphertext: ABNZF

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Deepak
Every sender-receiver pair needs their very own unique cipher for a secure communication.On the contrary, one cipher can serve millions of communicating pairs.
Page 10: Cryptography

KEY

• A key is a number (or a set of numbers) that the cipher operates on, as an algorithm.

• To encrypt a message, we need an encryption algorithm, an encryption key, and the plaintext.

• To decrypt a message, we need a decryption algorithm, a decryption key, and the ciphertext. These reveal the original plaintext.

• Types:

• Shared key, Public key and Private key.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 11: Cryptography

USE OF KEY

• Example:

• Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3.

• Plaintext: HELLO

• Ciphertext: KHOOR

Page 12: Cryptography

ALICE, BOB, AND EVE

• Alice is the person who needs to send secure data.

• Bob is the recipient of the data.

• Eve is the person who somehow disturbs the communication between Alice and Bob.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 13: Cryptography

CRYPTOGRAPHY TECHNIQUE

Page 14: Cryptography

CRYPTOGRAPHY TECHNIQUE

Alice Bob

Eve

Plaintext PlaintextCiphertext

Alice’sEncryptionKey K1

Bob’sDecryptionKey K2

If m = Plaintext, then• Ciphertext = K1(m) and • m = K2(K1(m))

Page 15: Cryptography

CRYPTOGRAPHY CATEGORIES

Page 16: Cryptography

CRYPTOGRAPHY CATEGORIES

• We can divide all the cryptography algorithms (ciphers) into two groups:

• Symmetric key (also called secret-key) cryptography algorithms and

• Asymmetric key (also called public-key) cryptography algorithms.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 17: Cryptography

SYMMETRIC KEY CRYPTOGRAPHY

• In symmetric-key cryptography, the same key is used by both parties.

• The sender uses this key and an encryption algorithm to encrypt data; the receiver uses the same key and the corresponding decryption algorithm to decrypt the data.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 18: Cryptography

SYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE

Alice Bob

Alice’sEncryptionKey K

Bob’sDecryptionKey K

Plaintext PlaintextCiphertext

If m = Plaintext and K is the shared secret key, then• Ciphertext = K(m) and • m = K(K(m))

SharedSecretKey K

Page 19: Cryptography

SYMMETRIC KEY CIPHERS

TraditionalCiphers

ModernCiphers

SubstitutionCiphers

Transposition

Ciphers

Mono-alphabetic

Ciphers

Poly-alphabetic

Ciphers

DES, AES, IDEA, CAST, RC4, RC5,

etc.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Page 20: Cryptography

ASYMMETRIC KEY CRYPTOGRAPHY

• In asymmetric or public-key cryptography, there are two keys: a private key and a public key.

• The private key is kept by the receiver.

• The public key is announced to the public.

• If Alice wants to send a message to Bob, Alice uses the public key to encrypt the message. When the message is received by Bob, the private key is used to decrypt the message.

• Some of the asymmetric algorithms are:

• Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography (ECC), Man-in-the-Middle Attack etc.

Ref: Ch.30, Data Communications and Networking, Fourth Edition by Behrouz A. Forouzan

Deepak
In public-key encryption/decryption, the public key that is used for encryption isdifferent from the private key that is used for decryption. The public key is available tothe public;' the private key is available only to an individual.
Page 21: Cryptography

ASYMMETRIC KEY CRYPTOGRAPHY TECHNIQUE

Alice BobCiphertextPlaintext Plaintext

Bob’sPublicKey K+

Bob’sPrivateKey K-

If m = Plaintext, then• Ciphertext = K+(m) and • m = K-(K+(m))

To PublicUsed for encryption

Used for decryption

Page 22: Cryptography

COMPARISON OF SYMMETRIC AND ASYMMETRIC KEY CRYPTOGRAPHY

Page 23: Cryptography

SYMMETRIC KEY CRYPTOGRAPHY

• Only 1 shared key is involved.

• The same key encrypts and decrypts the plaintext.

• The shared key is kept secret between Alice and Bob.

• Examples of Symmetric algorithms:

• DES, 3DES, AES, IDEA, BLOWFISH, TWOFISH, RC4, RC5, SAFER etc.

ASYMMETRIC KEY CRYPTOGRAPHY

• Here 2 keys : a private and a public key are involved.

• The Public key encrypts the plaintext while the private key decrypts it.

• The private key is just kept secret by the Bob while the public key is made public.

• Examples of Asymmetric algorithms:

• Diffie-Hellman, RSA, El Gamal, Elliptic Curve Cryptography (ECC) etc.

Page 24: Cryptography

CONCLUSION

• By using of encryption techniques a fair unit of confidentiality, authentication, integrity, access control and availability of data is maintained.

• Using cryptography Electronic Mail Security, Mail Security, IP Security, Web security can be achieved.

Page 25: Cryptography

REFERENCECHAPTER 30, CRYPTOGRAPHY

DATA COMMUNICATIONS AND NETWORKING

BY BEHROUZ A. FOROUZAN

Page 26: Cryptography

THANK YOU

Page 27: Cryptography

EXAMPLES

Page 28: Cryptography

MONOALPHABETIC CIPHER

• Use Monoalphabetic Cipher to encrypt “HELLO” with key = 3.

Key=3 means shift each character of plaintext by character at 3 places ahead of it. Hence replacing H by K, E by H, L by O and O by R in the plaintext.

• Plaintext: HELLO

• Ciphertext: KHOOR

Page 29: Cryptography

POLYALPHABETIC CIPHER

• Use Polyalphabetic Cipher to encrypt “HELLO” with key = 3,2.

Divide HELLO in group of 3 characters viz. HEL-LO and use key=3 to encrypt HEL and key=2 to encrypt LO.

• Plaintext: HELLO

• Ciphertext: KHONB

Page 30: Cryptography

TRANSPOSITION CIPHER

• Encrypt the message "HELLO MY DEAR" using the key:

• Plaintext: 1234

• Ciphertext: 2413

In encryption, we move the character at position 2 to position 1, the character at position 4 to position 2, and so on. We first remove the spaces in the message. We then divide the text into blocks of four characters. We add a bogus character Z at the end of the third block. The result is HELL OMYD EARZ. We create a three-block ciphertext ELHLMDOYAZER.

• Plaintext: HELLO MY DEAR

• Ciphertext: ELHLMDOYAZER