Copyright IntelliPaat, All rights reserved
Cryptography
TUTORIAL
Copyright IntelliPaat, All rights reserved
Agenda
Copyright IntelliPaat, All rights reserved
Agenda
01 Introduction to Cryptography
Copyright IntelliPaat, All rights reserved
Agenda
02 Types of Cryptography
01 Introduction to Cryptography
Copyright IntelliPaat, All rights reserved
Agenda
02 Types of Cryptography
01 Introduction to Cryptography
03 Examples of Cryptography
Copyright IntelliPaat, All rights reserved
Agenda
02 Types of Cryptography
01 Introduction to Cryptography
03 Examples of Cryptography
04 Ethical Hacking Cryptography: Hands-on
Copyright Intellipaat. All rights reserved.
Introduction to
Cryptography
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Cryptography?
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Cryptography?
Cryptography is the study of the various processes which are
implemented to protect information and communications, through the
use of mathematical concepts and rule-based calculations
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Cryptography?
Cryptography is the study of the various processes which are
implemented to protect information and communications, through the
use of mathematical concepts and rule-based calculations
Data Mathematics Protected Data
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Intruder
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Intruder
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Intruder
Intruder is able to read
your data
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
Intruder
We need some method
to make this data
unreadable by the
intruder
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Why do we need
Cryptography?
Sender Recipient
Email
We do this with
‘Encryption’
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Encryption?
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Encryption?
Encryption (enciphering) is a cryptographic process where we convert
plaintext or raw data to unintelligible information (cipher) by processing
the data with an algorithm
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Encryption?
Encryption (enciphering) is a cryptographic process where we convert
plaintext or raw data to unintelligible information (cipher) by processing
the data with an algorithm
Sender Recipient
Email
plaintext
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Encryption?
Encryption (enciphering) is a cryptographic process where we convert
plaintext or raw data to unintelligible information (cipher) by processing
the data with an algorithm
Sender Recipient
Email
cipher
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Encryption?
Encryption (enciphering) is a cryptographic process where we convert
plaintext or raw data to unintelligible information (cipher) by processing
the data with an algorithm
Sender Recipient
Email
cipher
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Decryption?
Decryption (deciphering) is a cryptographic process where we convert
cipher back to plaintext by processing the data with an algorithm
Sender Recipient
Email
plaintext
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Cryptanalysis?
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
What is
Cryptanalysis?
Cryptanalysis is the study of deciphering ciphers without knowledge of
the encryption technique
cipher plaintext
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Security Goals
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Security Goals
Confidentiality
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Security Goals
Confidentiality
Integrity
Copyright IntelliPaat, All rights reserved
Introduction to Cryptography
Security Goals
Confidentiality
Integrity
Availability
Copyright Intellipaat. All rights reserved.
Types of
Cryptography
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Private Key Cryptography (Symmetric Key Cryptography) uses a single
common key on the receiving and sending end
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Private Key Cryptography (Symmetric Key Cryptography) uses a single
common key on the receiving and sending end
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Private Key Cryptography (Symmetric Key Cryptography) uses a single
common key on the receiving and sending end
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Private Key Cryptography (Symmetric Key Cryptography) uses a single
common key on the receiving and sending end
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Private Key
Cryptography
Private Key Cryptography (Symmetric Key Cryptography) uses a single
common key on the receiving and sending end
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Cryptography
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Cryptography
Public Key Cryptography (Asymmetric Key Cryptography) uses a non
secretive public key for encryption, and a secretive private key for
decryption
Sender Recipient
Email
Public Key Private Key
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Cryptography
Public Key Cryptography (Asymmetric Key Cryptography) uses a non
secretive public key for encryption, and a secretive private key for
decryption
Sender Recipient
Email
Private Key
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Cryptography
Public Key Cryptography (Asymmetric Key Cryptography) uses a non
secretive public key for encryption, and a secretive private key for
decryption
Sender Recipient
Email
Private Key
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Cryptography
Public Key Cryptography (Asymmetric Key Cryptography) uses a non
secretive public key for encryption, and a secretive private key for
decryption
Sender Recipient
Email
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Size of the cipher text is less
than equal to plaintext
Size of the cipher text is
greater than equal to plaintext
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Size of the cipher text is less
than equal to plaintext
Size of the cipher text is
greater than equal to plaintext
Fast Encryption, less resources Slow Encryption, high resources
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Size of the cipher text is less
than equal to plaintext
Size of the cipher text is
greater than equal to plaintext
Fast Encryption, less resources Slow Encryption, high resources
Used for large data Used for small data
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Size of the cipher text is less
than equal to plaintext
Size of the cipher text is
greater than equal to plaintext
Fast Encryption, less resources Slow Encryption, high resources
Used for large data Used for small data
Confidentiality
Confidentiality, Authenticity
and Non-Repudiation
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Public Key
Encryption
Vs
Private Key
Encryption
Public Key CryptographyPrivate Key Cryptography
Single Key Required Two Keys Required
Size of the cipher text is less
than equal to plaintext
Size of the cipher text is
greater than equal to plaintext
Fast Encryption, less resources Slow Encryption, high resources
Used for large data Used for small data
Confidentiality
Confidentiality, Authenticity
and Non-Repudiation
Eg: 3DES, AES, DES and RC4
Eg: Diffie-Hellman, ECC, El
Gamal, DSA and RSA
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Hash Functions
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Hash Functions
Functions that convert plaintext into encrypted text are called hash
functions
Copyright IntelliPaat, All rights reserved
Types of Cryptography
Hash Functions
Functions that convert plaintext into encrypted text are called hash
functions
f( )=Plaintext Cipher
Copyright Intellipaat. All rights reserved.
Examples of
Cryptography
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
FUN
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
FUN N = 3
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
FUN N = 3
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
FUN -> IXQ N = 3
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Substitution:
Caesar Cipher
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
FUN -> IXQ N = 3
By shifting the position of each alphabet forward by 3, we are able
to hide the original meaning of the word
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H
E
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H L
E
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H L O F O I T L I A T
E L R M N E L P A
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H L O F O I T L I A T
E L R M N E L P A
HLOFOITLIATELRMNELPA
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Transposition
Technique:
Rail-Fence Cipher
HELLO FROM INTELLIPAAT
H L O F O I T L I A T
E L R M N E L P A
HLOFOITLIATELRMNELPA
Since the position of the letters have been changed, this is called a
Transpositional Technique
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Steganography
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Steganography
Steganography is the technique of hiding secret data within ordinary
files or messages
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Steganography
Steganography is the technique of hiding secret data within ordinary
files or messages
Data
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Steganography
Steganography is the technique of hiding secret data within ordinary
files or messages
Data
Image file
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Steganography
Steganography is the technique of hiding secret data within ordinary
files or messages
Data
Image file
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
8 5 12 12 15
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
8 5 12 12 15
b x l k d
2 24 12 11 4
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
8 5 12 12 15
b x l k d
2 24 12 11 4
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
8 5 12 12 15
b x l k d
2 24 12 11 4
10 29 24 23 19
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
b x l k d
( 10 29 24 23 19 ) % 26
10 3 24 23 19
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
b x l k d
( 10 29 24 23 19 ) % 26
10 3 24 23 19
J C X W S
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
b x l k d
( 10 29 24 23 19 ) % 26
10 3 24 23 19
J C X W S
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
One Time Pad
(Vernam Cipher)
This is called the ‘One Time’ Pad because the key is uniquely generated
for each new data transfer or communication instance, and is only valid
once
H E L L O
b x l k d
( 10 29 24 23 19 ) % 26
10 3 24 23 19
J C X W S
Cipher
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Symmetric:
DES
(Data Encryption
Standard)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Symmetric:
DES
(Data Encryption
Standard)
The Data Encryption Standard (DES) is a symmetric-key block cipher
published by the National Institute of Standards and Technology (NIST)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Symmetric:
DES
(Data Encryption
Standard)
Initial Permutation
Round 1
Round 2
Round 16
Final Permutation
RoundKeyGenerator
64 bit Plaintext
64 bit Cipher
.
.
.
56 bit cipher key
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
DES
(Data Encryption
Standard)
Advantages
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
DES
(Data Encryption
Standard)
Advantages
Each small change in plaintext drastically affects the cipher
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
DES
(Data Encryption
Standard)
Advantages
Each small change in plaintext drastically affects the cipher
Each cipher bit depends on several bits of plaintext
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Asymmetric:
RSA
(Rivest–Shamir–
Adleman)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Asymmetric:
RSA
(Rivest–Shamir–
Adleman)
RSA is an asymmetric cryptography algorithm which requires two keys,
private, and public
Any two prime numbers : p & q
N = p * q
e is a derived number greater than 1 and less than
(q-1)(p-1). There should be no common factor for e and (q-
1)(p-1)
The public key is (N,e)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Asymmetric:
RSA
(Rivest–Shamir–
Adleman)
RSA is an asymmetric cryptography algorithm which requires two keys,
private, and public
The private key is d
Calculate d when: ed = 1 mod (p-1)(q-1)
Encryption formula is Cipher = Plaintext * e mod N
Decryption formula is Plaintext = Cipher * d mod N
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You create an account on a website
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You create an account on a website
(username, password)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You create an account on a website
(username, password)
f(password) =
Encrypted Password
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You create an account on a website
(username, password)
f(password) =
Encrypted Password
Encrypted Password stored in
website user database!
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You create an account on a website
(username, password)
f(password) =
Encrypted Password
Encrypted Password stored in
website user database!
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You log into the website later
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You log into the website later
(username, password)
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You log into the website later
(username, password)
f(password) =
Encrypted Password
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You log into the website later
(username, password)
f(password) =
Encrypted Password
Encrypted Password compared
with the one in the database for
your username
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
You log into the website later
(username, password)
f(password) =
Encrypted Password
Encrypted Password compared
with the one in the database for
your username
If it’s a match, you successfully
log into your account!
Copyright IntelliPaat, All rights reserved
Examples of Cryptography
Password Storage
Method
Even if an attacker gains access to the user database, the attacker can’t
gain access to your account as the password in the database isn’t in
plaintext format!
f(Encrypted Password) =
Something Entirely Different
f(password) =
Encrypted Password
Copyright Intellipaat. All rights reserved.
Cryptography Demo
Copyright Intellipaat. All rights reserved.
India: +91-7847955955
US: 1-800-216-8930 (TOLL FREE)
support@intellipaat.com
24/7 Chat with Our Course Advisor
sales@intellipaat.com

Cryptography Tutorial

  • 1.
    Copyright IntelliPaat, Allrights reserved Cryptography TUTORIAL
  • 2.
    Copyright IntelliPaat, Allrights reserved Agenda
  • 3.
    Copyright IntelliPaat, Allrights reserved Agenda 01 Introduction to Cryptography
  • 4.
    Copyright IntelliPaat, Allrights reserved Agenda 02 Types of Cryptography 01 Introduction to Cryptography
  • 5.
    Copyright IntelliPaat, Allrights reserved Agenda 02 Types of Cryptography 01 Introduction to Cryptography 03 Examples of Cryptography
  • 6.
    Copyright IntelliPaat, Allrights reserved Agenda 02 Types of Cryptography 01 Introduction to Cryptography 03 Examples of Cryptography 04 Ethical Hacking Cryptography: Hands-on
  • 7.
    Copyright Intellipaat. Allrights reserved. Introduction to Cryptography
  • 8.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Cryptography?
  • 9.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Cryptography? Cryptography is the study of the various processes which are implemented to protect information and communications, through the use of mathematical concepts and rule-based calculations
  • 10.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Cryptography? Cryptography is the study of the various processes which are implemented to protect information and communications, through the use of mathematical concepts and rule-based calculations Data Mathematics Protected Data
  • 11.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography?
  • 12.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender
  • 13.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender
  • 14.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email
  • 15.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email
  • 16.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email Intruder
  • 17.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email Intruder
  • 18.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email Intruder Intruder is able to read your data
  • 19.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email Intruder We need some method to make this data unreadable by the intruder
  • 20.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Why do we need Cryptography? Sender Recipient Email We do this with ‘Encryption’
  • 21.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Encryption?
  • 22.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Encryption? Encryption (enciphering) is a cryptographic process where we convert plaintext or raw data to unintelligible information (cipher) by processing the data with an algorithm
  • 23.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Encryption? Encryption (enciphering) is a cryptographic process where we convert plaintext or raw data to unintelligible information (cipher) by processing the data with an algorithm Sender Recipient Email plaintext
  • 24.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Encryption? Encryption (enciphering) is a cryptographic process where we convert plaintext or raw data to unintelligible information (cipher) by processing the data with an algorithm Sender Recipient Email cipher
  • 25.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Encryption? Encryption (enciphering) is a cryptographic process where we convert plaintext or raw data to unintelligible information (cipher) by processing the data with an algorithm Sender Recipient Email cipher
  • 26.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Decryption? Decryption (deciphering) is a cryptographic process where we convert cipher back to plaintext by processing the data with an algorithm Sender Recipient Email plaintext
  • 27.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Cryptanalysis?
  • 28.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography What is Cryptanalysis? Cryptanalysis is the study of deciphering ciphers without knowledge of the encryption technique cipher plaintext
  • 29.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Security Goals
  • 30.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Security Goals Confidentiality
  • 31.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Security Goals Confidentiality Integrity
  • 32.
    Copyright IntelliPaat, Allrights reserved Introduction to Cryptography Security Goals Confidentiality Integrity Availability
  • 33.
    Copyright Intellipaat. Allrights reserved. Types of Cryptography
  • 34.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography
  • 35.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography Private Key Cryptography (Symmetric Key Cryptography) uses a single common key on the receiving and sending end
  • 36.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography Private Key Cryptography (Symmetric Key Cryptography) uses a single common key on the receiving and sending end Sender Recipient Email
  • 37.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography Private Key Cryptography (Symmetric Key Cryptography) uses a single common key on the receiving and sending end Sender Recipient Email
  • 38.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography Private Key Cryptography (Symmetric Key Cryptography) uses a single common key on the receiving and sending end Sender Recipient Email
  • 39.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Private Key Cryptography Private Key Cryptography (Symmetric Key Cryptography) uses a single common key on the receiving and sending end Sender Recipient Email
  • 40.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Cryptography
  • 41.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Cryptography Public Key Cryptography (Asymmetric Key Cryptography) uses a non secretive public key for encryption, and a secretive private key for decryption Sender Recipient Email Public Key Private Key
  • 42.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Cryptography Public Key Cryptography (Asymmetric Key Cryptography) uses a non secretive public key for encryption, and a secretive private key for decryption Sender Recipient Email Private Key
  • 43.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Cryptography Public Key Cryptography (Asymmetric Key Cryptography) uses a non secretive public key for encryption, and a secretive private key for decryption Sender Recipient Email Private Key
  • 44.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Cryptography Public Key Cryptography (Asymmetric Key Cryptography) uses a non secretive public key for encryption, and a secretive private key for decryption Sender Recipient Email
  • 45.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography
  • 46.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required
  • 47.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required Size of the cipher text is less than equal to plaintext Size of the cipher text is greater than equal to plaintext
  • 48.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required Size of the cipher text is less than equal to plaintext Size of the cipher text is greater than equal to plaintext Fast Encryption, less resources Slow Encryption, high resources
  • 49.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required Size of the cipher text is less than equal to plaintext Size of the cipher text is greater than equal to plaintext Fast Encryption, less resources Slow Encryption, high resources Used for large data Used for small data
  • 50.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required Size of the cipher text is less than equal to plaintext Size of the cipher text is greater than equal to plaintext Fast Encryption, less resources Slow Encryption, high resources Used for large data Used for small data Confidentiality Confidentiality, Authenticity and Non-Repudiation
  • 51.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Public Key Encryption Vs Private Key Encryption Public Key CryptographyPrivate Key Cryptography Single Key Required Two Keys Required Size of the cipher text is less than equal to plaintext Size of the cipher text is greater than equal to plaintext Fast Encryption, less resources Slow Encryption, high resources Used for large data Used for small data Confidentiality Confidentiality, Authenticity and Non-Repudiation Eg: 3DES, AES, DES and RC4 Eg: Diffie-Hellman, ECC, El Gamal, DSA and RSA
  • 52.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Hash Functions
  • 53.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Hash Functions Functions that convert plaintext into encrypted text are called hash functions
  • 54.
    Copyright IntelliPaat, Allrights reserved Types of Cryptography Hash Functions Functions that convert plaintext into encrypted text are called hash functions f( )=Plaintext Cipher
  • 55.
    Copyright Intellipaat. Allrights reserved. Examples of Cryptography
  • 56.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher
  • 57.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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
  • 58.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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 FUN
  • 59.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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 FUN N = 3
  • 60.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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 FUN N = 3
  • 61.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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 FUN -> IXQ N = 3
  • 62.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Substitution: Caesar Cipher 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 FUN -> IXQ N = 3 By shifting the position of each alphabet forward by 3, we are able to hide the original meaning of the word
  • 63.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher
  • 64.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT
  • 65.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT
  • 66.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H
  • 67.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H E
  • 68.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H L E
  • 69.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H L O F O I T L I A T E L R M N E L P A
  • 70.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H L O F O I T L I A T E L R M N E L P A HLOFOITLIATELRMNELPA
  • 71.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Transposition Technique: Rail-Fence Cipher HELLO FROM INTELLIPAAT H L O F O I T L I A T E L R M N E L P A HLOFOITLIATELRMNELPA Since the position of the letters have been changed, this is called a Transpositional Technique
  • 72.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Steganography
  • 73.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Steganography Steganography is the technique of hiding secret data within ordinary files or messages
  • 74.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Steganography Steganography is the technique of hiding secret data within ordinary files or messages Data
  • 75.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Steganography Steganography is the technique of hiding secret data within ordinary files or messages Data Image file
  • 76.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Steganography Steganography is the technique of hiding secret data within ordinary files or messages Data Image file
  • 77.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher)
  • 78.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once
  • 79.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O
  • 80.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O 8 5 12 12 15
  • 81.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O 8 5 12 12 15 b x l k d 2 24 12 11 4
  • 82.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O 8 5 12 12 15 b x l k d 2 24 12 11 4
  • 83.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O 8 5 12 12 15 b x l k d 2 24 12 11 4 10 29 24 23 19
  • 84.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O b x l k d ( 10 29 24 23 19 ) % 26 10 3 24 23 19
  • 85.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O b x l k d ( 10 29 24 23 19 ) % 26 10 3 24 23 19 J C X W S
  • 86.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O b x l k d ( 10 29 24 23 19 ) % 26 10 3 24 23 19 J C X W S
  • 87.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography One Time Pad (Vernam Cipher) This is called the ‘One Time’ Pad because the key is uniquely generated for each new data transfer or communication instance, and is only valid once H E L L O b x l k d ( 10 29 24 23 19 ) % 26 10 3 24 23 19 J C X W S Cipher
  • 88.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Symmetric: DES (Data Encryption Standard)
  • 89.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Symmetric: DES (Data Encryption Standard) The Data Encryption Standard (DES) is a symmetric-key block cipher published by the National Institute of Standards and Technology (NIST)
  • 90.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Symmetric: DES (Data Encryption Standard) Initial Permutation Round 1 Round 2 Round 16 Final Permutation RoundKeyGenerator 64 bit Plaintext 64 bit Cipher . . . 56 bit cipher key
  • 91.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography DES (Data Encryption Standard) Advantages
  • 92.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography DES (Data Encryption Standard) Advantages Each small change in plaintext drastically affects the cipher
  • 93.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography DES (Data Encryption Standard) Advantages Each small change in plaintext drastically affects the cipher Each cipher bit depends on several bits of plaintext
  • 94.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Asymmetric: RSA (Rivest–Shamir– Adleman)
  • 95.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Asymmetric: RSA (Rivest–Shamir– Adleman) RSA is an asymmetric cryptography algorithm which requires two keys, private, and public Any two prime numbers : p & q N = p * q e is a derived number greater than 1 and less than (q-1)(p-1). There should be no common factor for e and (q- 1)(p-1) The public key is (N,e)
  • 96.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Asymmetric: RSA (Rivest–Shamir– Adleman) RSA is an asymmetric cryptography algorithm which requires two keys, private, and public The private key is d Calculate d when: ed = 1 mod (p-1)(q-1) Encryption formula is Cipher = Plaintext * e mod N Decryption formula is Plaintext = Cipher * d mod N
  • 97.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method
  • 98.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You create an account on a website
  • 99.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You create an account on a website (username, password)
  • 100.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You create an account on a website (username, password) f(password) = Encrypted Password
  • 101.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You create an account on a website (username, password) f(password) = Encrypted Password Encrypted Password stored in website user database!
  • 102.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You create an account on a website (username, password) f(password) = Encrypted Password Encrypted Password stored in website user database!
  • 103.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You log into the website later
  • 104.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You log into the website later (username, password)
  • 105.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You log into the website later (username, password) f(password) = Encrypted Password
  • 106.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You log into the website later (username, password) f(password) = Encrypted Password Encrypted Password compared with the one in the database for your username
  • 107.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method You log into the website later (username, password) f(password) = Encrypted Password Encrypted Password compared with the one in the database for your username If it’s a match, you successfully log into your account!
  • 108.
    Copyright IntelliPaat, Allrights reserved Examples of Cryptography Password Storage Method Even if an attacker gains access to the user database, the attacker can’t gain access to your account as the password in the database isn’t in plaintext format! f(Encrypted Password) = Something Entirely Different f(password) = Encrypted Password
  • 109.
    Copyright Intellipaat. Allrights reserved. Cryptography Demo
  • 110.
    Copyright Intellipaat. Allrights reserved. India: +91-7847955955 US: 1-800-216-8930 (TOLL FREE) support@intellipaat.com 24/7 Chat with Our Course Advisor sales@intellipaat.com

Editor's Notes

  • #2 Welcome back to the forth module of data science.