0% found this document useful (0 votes)
4 views

Encryption

The document provides an overview of cryptography, detailing its history, key concepts, and types of cryptosystems, including symmetric and asymmetric encryption. It explains the importance of keys, ciphers, and hashing in securing communications, as well as the principles of authentication and non-repudiation. Additionally, it discusses the advantages and disadvantages of symmetric key encryption and introduces digital signatures and certificates in the context of secure communication.

Uploaded by

shahkhushali2604
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Encryption

The document provides an overview of cryptography, detailing its history, key concepts, and types of cryptosystems, including symmetric and asymmetric encryption. It explains the importance of keys, ciphers, and hashing in securing communications, as well as the principles of authentication and non-repudiation. Additionally, it discusses the advantages and disadvantages of symmetric key encryption and introduces digital signatures and certificates in the context of secure communication.

Uploaded by

shahkhushali2604
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

ENIGMA

MACHINE
https://www.youtube.com/watch?
v=nuPZUUED5uk

3-1
Copyright © 2015 Pearson Education,
Inc.
WORLD’S FIRST:
ELECTRONIC DIGITAL
PROGRAMMABLE
COMPUTER

World’s first: electronic digital What is this?


programmable computer
3-2
Copyright © 2015 Pearson Education,
Inc.
INTRODUCTION TO ENCRYPTION
Some Early History:
1900 BC: Egyptians use non-standard hieroglyphics
475 BC: Spartans of Greece develop the scytale
50 BC: Julius Caesar using a simple cipher for military and
government communications.
725 AD: Abu `Abd al-Rahman al-Khalil ibn Ahmad ibn `Amr ibn
Tammam al Farahidi al-Zadi al Yahmadi wrote a (now
lost) book on cryptography
1466 AD: Leon Battista Alberti, the Father of Western
cryptography worked on polyaphabetic substitution and
a cipher disk.
1623 AD: Sir Francis Bacon described one of the first uses of
steganography

Copyright © 2015 Pearson Education,


Inc.
CRYPTOGRAPHY (2)
Cryptography is the use of mathematical operations to
protect messages traveling between parties or stored on
a computer;
The field of study related to encoding information
Crypto = “secret“ graphy = “writing”

???

Copyright © 2015 Pearson Education,


Inc.
OUR CONCERN IS BIGGER THAN
SECRET WRITING
CIA: Confidentiality- Integrity- Availability
Authentication means proving one’s identity to another
so they can trust you more;

Non-repudiation is the assurance that someone cannot


deny something;

Copyright © 2015 Pearson Education,


Inc.
KEYS AND LOCKS
• Cryptography can be compared with locks
in physical world.

• Locks by themselves are useless unless they


are part of big system (Like system of
protecting buildings with doors, even
including people)
• Similarly Cryptography is a small part of
a big security system.

• So when we are dealing with the security of


a system we deal with all aspects of the
security.
Copyright © 2015 Pearson Education,
Inc.
Cipher: a method /algorithm that encrypts or
disguises “text”

Key: the set of parameter that guide a cipher

Plaintext: The undisguised text is called “plaintext”


SOME
TERMINOL
Ciphertext: The disguised text is called
OGIES “ciphertext”

Cryptanalysis: the process of deciphering


ciphertext without knowing the key

Copyright © 2015 Pearson Education,


Inc.
TYPES OF
CRYPTOSYSTEMS
There are two fundamental types of cryptosystems based
on the keys
 Symmetric Key Encryption
• same keys are used for encryption and decryption
• symmetric key encryption = symmetric key
cryptography= secret key cryptography
• Examples: DES, AES, IDEA
 Asymmetric Key Encryption
• different keys are used for encrypting and
decrypting the data
• keys are mathematically related
• Example: RSA

Copyright © 2015 Pearson Education,


Inc.
TYPES OF

CRYPTOSYSTEMS
There are two fundamental types of
(2)
cryptosystems
based on the function
• The two basic building blocks of all Most real ciphers use
encryption functions: both substitution and
substitution and transposition. transposition
• Substitution Cipher
• A cipher that substitutes one character
with another, it can be as simple as
swapping a list, or can be based on more
complex rules
• These are NOT secure
anymore, but they used to be quite
common. What has changed?
• Examples: Caesar Cipher, Vigenère Cipher
• Transposition Cipher
• Change the position of characters
Copyright © 2015 Pearson Education,
Inc.
CAESAR’S CIPHER
• Caesar’s Cipher is a type of substitution cipher
• To encrypt: Replace each plaintext letter with the letter “k”
positions to the right.
• For example: if k = 3 then
• Sender: HELLO KHOOR
• Receiver: KHOOR HELLO

• Substitution is circular
K=19
• The person encrypting the messages
chooses key, “k”.
Copyright © 2015 Pearson Education,
Inc.
EXAMPLES

CAESAR’S CIPHER TRANSPOSITION


EXAMPLE EXAMPLE
Plaintext: I like cryptography Ciphertext= ELPMAXE ELPMIS A
Key = 10 Plaintext=?
Ciphertext=?

Copyright © 2015 Pearson Education,


Inc.
EXAMPLES

CAESAR’S CIPHER TRANSPOSITION


EXAMPLE EXAMPLE
Plaintext: I like cryptography Ciphertext= ELPMAXE ELPMIS A
Key = 10 Plaintext= A SIMPLE EXAMPLE
Ciphertext= S vsuo mbizdyqbkzri

Copyright © 2015 Pearson Education,


Inc.
CRYPTANALYSIS OF CAESAR’S CIPHER
• Cryptanalysis = breaking a code
• Blackhat decrypts without knowing key
• Approaches for Cryptanalysis: brute force
– take ciphertext c and try all shifts k until a readable message
comes out

• Statistical Approach using frequency analysis

Copyright © 2015 Pearson Education,


Inc.
CRYPTANALYSIS OF CAESAR’S CIPHER
Ciphertext= S vsuo mbizdyqbkzri

• Statistical Approach using frequency analysis

Copyright © 2015 Pearson Education,


Inc.
THE KEY
OR
THE ALGORITHM?

Copyright © 2015 Pearson Education,


3-15
Inc.
KERCKHOFFS' PRINCIPLE
• Bob needs two things to decrypt the cipher text
‒The decryption algorithm
‒The key
• Kerckhoffs' principle says: “the security of the encryption scheme
must depend only on the secrecy of the key K, and not on the secrecy
of the algorithm”
• Think about it! Why algorithms should be published instead of keep
them a secret?

Copyright © 2015 Pearson Education,


Inc.
KEY LENGTH AND EXHAUSTIVE
SEARCH TIME
Key Length in Number of Possible Keys
Bits Each extra bit
doubles the
1 number of keys 2
2 4
4 16
8 256
16 65,536
40 1,099,511,627,776
56 72,057,594,037,927,900
112 5,192,296,858,534,830,000,000,000,000,000,000
112 5.1923E+33
168 Shaded keys are 3.74144E+50
256 Strong symmetric 1.15792E+77
512 keys (>=100 bits) 1.3408E+154

Copyright © 2015 Pearson Education,


Inc.
SYMMETRIC KEY ENCRYPTION FOR
CONFIDENTIALITY

Copyright © 2015 Pearson Education,


Inc.
• Authentication

SYMMETRIC
KEY
ENCRYPTION • Integrity
FOR:

• Non-repudiation

Copyright © 2015 Pearson Education,


Inc.
MAJOR SYMMETRIC KEY ENCRYPTION
CIPHERS
RC4 DES 3DES AES
Key Length 40 bits or 56 112 or 168 128, 192, or
(bits) more 256
Key Strength Very weak at Weak Strong Strong
40 bits
Processing Low Moderate High Low
Requirements
RAM Low Moderate Moderate Low
Requirements
Remarks Can use keys Created in Applies Today’s gold
of variable the 1970s DES three standard for
length times with symmetric
two or three key
different encryption
DES keys

Copyright © 2015 Pearson Education,


Inc.
SYMMETRIC KEY ENCRYPTION
ADVANTAGE AND
DISADVANTAGE

• Symmetric ciphers are fast and cheap


• Symmetric ciphers use same secret key
for encryption and decryption, no
secure
• Key distribution is a big problem
 Send the key through an existing
encryption channel
o Depends on the security of channel’s key

Copyright © 2015 Pearson Education,


Inc.
HASHING Hash function is a mathematical function that
converts any input value into compressed numerical
value
The result of the calculation is called the hash value

Copyright © 2015 Pearson Education,


Inc.
HASHING (2)
• The input to the hash function is of arbitrary length
but output is always of fixed length;

• Hash is a one-way function, knowing the


hash, infeasible to determine the original
message;

• No two messages can have same hash


value (unique)
Copyright © 2015 Pearson Education,
Inc.
HASHING (3)
•A small change in the input (in the word "over") drastically
changes the output (digest).

5
Copyright © 2015 Pearson Education,
Source of the diagram: https://en.wikipedia.org/wiki/Cryptographic_hash_function Inc.
HASHING (4)
Characteristic Encryption Hashing
Result length About the Short fixed
Hashing same length length
versus as the
plaintext
regardless of
message length
Encryption
Reversible? Yes. No. There is
Decryption no way to get
from the short
hash back to
the long
original
message

Copyright © 2015 Pearson Education,


Inc.
HASHING (5)
Hashing Algorithms
 MD5 (128-bit hashes)

 SHA-1 (160-bit hashes)

 SHA-224, SHA-256, SHA-384, and SHA-512


(name gives hash length in bits)
 Note: MD5 and SHA-1 should not be
considered very trusted because they have been
shown to be unsecure

Copyright © 2015 Pearson Education,


Inc.
PROBLEMS WITH SYMMETRIC KEY
CRYPTOSYSTEM
Symmetric ciphers use same secret key for encryption and
decryption

Key distribution is a big problem

Lack of non-repudiation service

Solution:
1970 James Ellis a British cryptographer
1973 Clifford Cocks implemented
gave the idea of non secret encryption.
Asymmetric Copyright
cryptosystem (RSA)
But how? Inc.
© 2015 Pearson Education,
ASYMMETRIC
CRYPTOSYSTEM

Copyright © 2015 Pearson Education,


Inc.
CONCEPTS IN ASYMMETRIC
CRYPTOSYSTEM

Asymmetric cryptography uses a pair of keys

Keys are not chosen randomly,


instead keys are generated using an
algorithm.

Copyright © 2015 Pearson Education,


Inc.
CONCEPTS IN ASYMMETRIC
CRYPTOSYSTEM (2)

Characteristics of asymmetric algorithms:


One of the two related keys can be used
for encryption and the other for
decryption
When encrypted with one key, can only
be decrypted with the other related
key
Knowing the encryption algorithm and
encryption key, it shouldn’t be feasible
to determine the decryption key.

Copyright © 2015 Pearson Education,


Inc.
PRIVATE AND PUBLIC KEYS
• Alice has a pair of related keys: public and private

‒ PRA PUA

• Bob also has a pair of related keys: public and


private

‒PRB PUB

Copyright © 2015 Pearson Education,


Inc.
PRIVATE AND PUBLIC KEYS
(2)

Characteristics of Keys

• Public keys known to anyone, needs to be


published

• Private key: Secret known by owner only

Copyright © 2015 Pearson Education,


Inc.
REMEMBER?
CIA: Confidentiality- Integrity- Availability
Authentication means proving one’s identity to another
so they can trust you more;

Non-repudiation is the assurance that someone cannot


deny something;

Copyright © 2015 Pearson Education,


Inc.
Asymmetric Key Encryption for
Confidentiality
• Sender (in this example Bob) encrypts the message using
receiver’s public key (in this example Alice)
• Receiver (in this example Alice) decrypts the message using her
private key

Only the person with the correct


private key can successfully decrypt
the message

Image source: Wikipedia Copyright © 2015 Pearson Education,


Inc.
ASYMMETRIC KEY
ENCRYPTION FOR
CONFIDENTIALITY

Copyright © 2015 Pearson Education,


Inc.
• Authentication

ASYMMETRIC
KEY
ENCRYPTION • Integrity
FOR:

• Non-repudiation

Copyright © 2015 Pearson Education,


Inc.
ASYMMETRIC ENCRYPTION FOR
OTHER SERVICES:
Digital Signature provides:
Integrity
Authentication
Non-repudiation

Image source: Wikipedia Copyright © 2015 Pearson Education,


Inc.
Digital Signature (1)

Copyright © 2015 Pearson Education,


Inc.
Digital Signature (2)

Image source: Wikipedia Copyright © 2015 Pearson Education,


Inc.
HOW DOES DIGITAL SIGNATURE
PROVIDES AUTHENTICATION?

Copyright © 2015 Pearson Education,


Inc.
Alice Message: I love you  Hash value=1@M6  ciphertext (DS)= 011001

Blackhat Message : I hate you  Hash value= Pj9  ciphertext (DS)= 110010

I hate you  Hash value = Pj9 ≠ 1@M6 =Hash value  I love you

Ciphertext=011001  Plaintext= 1@M6


Ciphertext= 110010  Plaintext= Pj9

HOW DOES DIGITAL SIGNATURE


PROVIDES INTEGRITY?
Copyright © 2015 Pearson Education,
Inc.
HOW DOES DIGITAL SIGNATURE
PROVIDES NON-REPUDIATION?

Copyright © 2015 Pearson Education,


Inc.
What digital
certificate is
for?

Copyright © 2015 Pearson Education,


Inc.
Certified Authority

Copyright © 2015 Pearson Education,


Inc.
DIGITAL CERTIFICATE

Copyright © 2015 Pearson Education,


3-45
Inc.
Cryptography is the practice and study of techniques for
secure communication in the presence of third parties
called adversaries;
Symmetric vs asymmetric
Substitution vs transposition
Confidentiality in symmetric encryption
Confidentiality, integrity, authentication and non-
repudiation is asymmetric encryption
Hashing

SUMMERY

Copyright © 2015 Pearson Education,


3-46
Inc.

You might also like