You are on page 1of 14

Cryptography

Objectives of Information Security


1. Confidentiality (secrecy)
Only the sender and intended receiver should be able to understand the
contents of the transmitted message.
2. Authentication
Both the sender and receiver need to confirm the identity of other party
involved in the communication.
3. Data integrity
The content of their communication is not altered, either maliciously
or by accident, in transmission.
4. Availability
Timely accessibility of data to authorized entities.
5. Non-repudiation
An entity is prevented from denying its previous commitments or
actions.
6. Access control
An entity cannot access any entity that it is not authorized to.
7.Anonymity
The identity of an entity if protected from others.
Cryptography

• Cryptography is the science of secret,


or hidden writing.
• The algorithm used for encryption and decryption is
called a cipher (or cypher).
• It has two main Components:
1. Encryption
– Practice of hiding messages so that they can not
be read by anyone other than the intended
recipient
2. Authentication & Integrity
– Ensuring that users of data/resources are the
persons they claim to be and that a message has
not been surreptitiously altered
• Encryption:
– is a process by which a message (called plaintext) is
transformed into another message (called ciphertext)
using a mathematical function and a special encryption
password (called a key).
• Decryption :
– is the reverse process: transforming a ciphertext
message back into its original plaintext form using a
mathematical function and a key.

 The mathematical functions and keys used for


encryption and decryption may be the same, or
may be different.
Encryption
Cipher
• Cipher is a method for encrypting messages

Plain Text Encryption Cipher Text Decryption Plain Text


Algorithm Algorithm

Key A Key B

• Encryption algorithms are standardized & published


• The key which is an input to the algorithm is secret
– Key is a string of numbers or characters
– If same key is used for encryption & decryption the
algorithm is called symmetric
– If different keys are used for encryption & decryption the
algorithm is called asymmetric
Types :
• Symmetric Encryption (Private Key)
• Asymmetric Encryption (Public Key)

• Private key: This key must be know only by its owner.


• Public key: This key is known to everyone (it is public)
• Relation between both keys: What one key encrypts,
the other one decrypts, and vice versa. That means that
if you encrypt something with my public key ,I would
need my private key to decrypt the message.
Encryption
Symmetric Algorithms

• Algorithms in which the key for encryption and decryption are the
same are Symmetric.
Example: Caesar Cipher
• Caesar Cipher is a method in which each letter in the alphabet is
rotated by three letters as shown

ABCDEFGHIJKLMNOPQRSTUVWXYZ

DEFGHIJKLMNOPQRSTUVWXYZABC
Example: Caesar Cipher

Encryption
Plain Text Cipher Text
Cipher:
Message: Caesar Cipher Message:
Attack at Dawn Algorithm Dwwdfn Dw Gdyq

Key (3)
Decrypti
on
Cipher Text
Cipher:
Plain Text

Message: Caesar Cipher Message:


Dwwdfn Dw Gdyq Algorithm Attack at Dawn

Key (3)
• Secret Key Cryptography (symmetric)

 Based on a single secret key also known as symmetric


encryption or private key encryption. The same key is used
by the sender ( for encryption) & receiver (for decryption)

Keysender (= Keyreceiver) Keyreceiver

Original Scrambled Scrambled Original


Internet
Message Message Message Message
Sender
Encryption Decryption Receiver

 Works on DFS (Data Encryption Standard) algorithm.


Disadvantage of Symmetric Cryptography:

• It presumes two parties have agreed on a key and been


able to exchange that key in a secure manner prior to
communication. This is a significant challenge.

• Symmetric algorithms are usually mixed with public key


algorithms to obtain a blend of security and speed.
Asymmetric Encryption
Basics
• Uses a pair of keys for encryption
– Public key for encryption
– Private key for decryption
• Messages encoded using public key can only be
decoded by the private key
– Secret transmission of key for decryption is not
required
– Every entity can generate a key pair and release its
public key
Plain Text Cipher Text Plain Text
Cipher Cipher

Public Key Private Key


Asymmetric Encryption
Types
• Two most popular algorithms are RSA & El
Gamal
– RSA
• Developed by Ron Rivest, Adi Shamir, Len Adelman
• Both public and private key are interchangable
• Variable Key Size (512, 1024, or 2048 buts)
• Most popular public key algorithm
– El Gamal
• Developed by Taher ElGamal
• Variable key size (512 or 1024 bits)
• Less common than RSA, used in protocols like PGP
Public Key Cryptography ( Public & Private Keys)

Public Key is known to all authorized users, but the private key is known to one person
its owner. Uses RSA ( Rivest, Shamir & Adelman algorithm)

Public Keyreceiver Private Keyreceiver

Original Scrambled Scrambled Original


Message Internet
Message Message Message Message

Sender Receiver

Private Keysender Public Keysender

Digital Original Scrambled Scrambled Original


Internet
Signature Message Message Message Message

Sender Receiver
Public Key Encryption
• Advantages :
1. there is no need to agree on a common key
for both the sender and the receiver.
2. public-key systems can guarantee integrity
and authentication, not only privacy.

• Disadvantage:
1. not as fast as symmetric algorithms.

You might also like