SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
NETWORK SECURITY
Name of the Staff : M.FLORENCE DAYANA M.C.A.,M.Phil.,(Ph.D).,
Head, Dept. of CA
Bon Secours College For Women
Thanjavur.
Class : II MSc., CS
Semester : III
Unit : III
Topic : Public key Encryption and Hash Functions
2/15/20191
public-key Encryption
Public-key encryption is a cryptographic system that uses
two keys -- a public key known to everyone and
a private or secret key known only to the recipient of the
message.
Example: When John wants to send a secure message to Jane,
he uses Jane's public key to encrypt the message. Jane then
uses her private key to decrypt it.
An important element to the public key system is that the public
and private keys are related in such a way that only the public
key can be used to encrypt messages and only the
corresponding private key can be used to decrypt them.
Moreover, it is virtually impossible to deduce the private key if you
know the public key.
Public key encryption is a form of encryption that uses two
keys.
A public key, which everyone knows, and a private key, which
only you know.
To encrypt, the public key is applied to the target information,
using a predefined operation (several times), to produce a
pseudo-random number.
To decrypt, the private key is applied to the pseudo-random
number, using a different predefined operation (several times),
to get the target information back.
The algorithm relies on the fact that encryption is easy, and
decryption is hard, making decryption impractical without the
key.
It was the first system to allow secure information transfer,
without a shared Key.
Hash Functions
• A hash function H accepts a variable-length block
of data M as input and produces a fixed-size hash
value
• h = H(M)
• Principal object is data integrity
• Cryptographic hash function
• An algorithm for which it is computationally
infeasible to find either:
(a) a data object that maps to a pre-specified hash
result (the one-way property)
(b) two data objects that map to the same hash result
(the collision-free property)
Message Authentication Code
(MAC)
• Also known as a keyed hash function
• Typically used between two parties that share a
secret key to authenticate information exchanged
between those parties
Takes as input a secret key and a data block and produces a
hash value (MAC) which is associated with the protected
message
•If the integrity of the message needs to be checked, the MAC
function can be applied to the message and the result
compared with the associated MAC value
•An attacker who alters the message will be unable to alter the
associated MAC value without knowledge of the secret key
Digital Signature
• Operation is similar to that of the MAC
• The hash value of a message is encrypted with a
user’s private key
• Anyone who knows the user’s public key can
verify the integrity of the message
• An attacker who wishes to alter the message
would need to know the user’s private key
• Implications of digital signatures go beyond just
message authentication
Other Hash Function Uses
Commonly used to create
a one-way password file
When a user enters a
password, the hash of
that password is
compared to the stored
hash value for
verification
This approach to
password protection is
used by most operating
systems
Can be used for intrusion
and virus detection
Store H(F) for each file
on a system and secure
the hash values
One can later determine
if a file has been
modified by
recomputing H(F)
An intruder would need
to change F without
changing H(F)
Can be used to construct
a pseudorandom function
(PRF) or a pseudorandom
number generator (PRNG)
A common application
for a hash-based PRF is
for the generation of
symmetric keys
Two Simple Hash Functions
• Consider two simple insecure hash functions that operate
using the following general principles:
• The input is viewed as a sequence of n-bit blocks
• The input is processed one block at a time in an iterative fashion
to produce an n-bit hash function
• Bit-by-bit exclusive-OR (XOR) of every block
• Ci = bi1 xor bi2 xor . . . xor bim
• Produces a simple parity for each bit position and is known as a
longitudinal redundancy check
• Reasonably effective for random data as a data integrity check
• Perform a one-bit circular shift on the hash value after each
block is processed
• Has the effect of randomizing the input more completely and
overcoming any regularities that appear in the input
Two
Simple
Hash
Functions
Requirements and
Security
• x is the preimage of h for
a hash value h = H(x)
• Is a data block whose
hash function, using the
function H, is h
• Because H is a many-to-
one mapping, for any
given hash value h, there
will in general be multiple
preimages
• Occurs if we have x ≠ y
and H(x) = H(y)
• Because we are using
hash functions for data
integrity, collisions are
clearly undesirable
Table 11.1
Requirements for a Cryptographic Hash Function H
(Table can be found on page 323 in textbook.)
* Resistance required if attacker is able to mount a chosen message attack
Table 11.2
Hash Function Resistance Properties Required for Various
Data Integrity Applications
Attacks on Hash
Functions
• Does not depend on the
specific algorithm, only
depends on bit length
• In the case of a hash
function, attack depends
only on the bit length of the
hash value
• Method is to pick values at
random and try each one
until a collision occurs
• An attack based on
weaknesses in a
particular cryptographic
algorithm
• Seek to exploit some
property of the algorithm
to perform some attack
other than an exhaustive
search
Birthday Attacks
• For a collision resistant attack, an adversary wishes to find two messages or
data blocks that yield the same hash function
• The effort required is explained by a mathematical result referred to as the
birthday paradox
• How the birthday attack works:
• The source (A) is prepared to sign a legitimate message x by appending the
appropriate m-bit hash code and encrypting that hash code with A’s private key
• Opponent generates 2m/2 variations x’ of x, all with essentially the same meaning,
and stores the messages and their hash values
• Opponent generates a fraudulent message y for which A’s signature is desired
• Two sets of messages are compared to find a pair with the same hash
• The opponent offers the valid variation to A for signature which can then be
attached to the fraudulent variation for transmission to the intended recipient
• Because the two variations have the same hash code, they will produce the same
signature and the opponent is assured of success even though the encryption key
is not known
Hash Functions Based on
Cipher Block Chaining
• Can use block ciphers as hash functions
• Using H0=0 and zero-pad of final block
• Compute: Hi = E(Mi Hi-1)
• Use final block as the hash value
• Similar to CBC but without a key
• Resulting hash is too small (64-bit)
• Both due to direct birthday attack
• And “meet-in-the-middle” attack
• Other variants also susceptible to attack
Secure Hash Algorithm (SHA)
• SHA was originally designed by the National Institute
of Standards and Technology (NIST) and published as
a federal information processing standard (FIPS 180) in
1993
• Was revised in 1995 as SHA-1
• Based on the hash function MD4 and its design closely
models MD4
• Produces 160-bit hash values
• In 2002 NIST produced a revised version of the
standard that defined three new versions of SHA with
hash value lengths of 256, 384, and 512
• Collectively known as SHA-2
Note: All sizes are measured in bits.
Table 11.3
Comparison of SHA Parameters
Table 11.4
SHA-512 Constants
(Table can
be found
on page
333 in
textbook)
(Figure can be found on
page 337 in textbook)
SHA-512
Logic
SHA-3
SHA-1 has not yet been "broken”
• No one has demonstrated a technique
for producing collisions in a practical
amount of time
• Considered to be insecure and has been
phased out for SHA-2
SHA-2 shares the same structure and
mathematical operations as its
predecessors so this is a cause for
concern
• Because it will take years to find a
suitable replacement for SHA-2
should it become vulnerable, NIST
decided to begin the process of
developing a new hash standard
NIST announced in 2007 a competition
for the SHA-3 next generation NIST
hash function
• Winning design was announced by
NIST in October 2012
• SHA-3 is a cryptographic hash
function that is intended to
complement SHA-2 as the approved
standard for a wide range of
applications
The Sponge Construction
• Underlying structure of SHA-3 is a scheme referred to by its
designers as a sponge construction
• Takes an input message and partitions it into fixed-size
blocks
• Each block is processed in turn with the output of each
iteration fed into the next iteration, finally producing an
output block
• The sponge function is defined by three parameters:
• f = the internal function used to process each input block
• r = the size in bits of the input blocks, called the bitrate
• pad = the padding algorithm
Table 11.5
SHA-3 Parameters
SHA-3
Iteration
Function f
Table
11.6
Step
Functions
in SHA-3
Summary
• Applications of
cryptographic hash
functions
• Message authentication
• Digital signatures
• Other applications
• Requirements and
security
• Security requirements
for cryptographic hash
functions
• Brute-force attacks
• Cryptanalysis
• Hash functions based
on cipher block
chaining
• Secure hash
algorithm (SHA)
• SHA-512 logic
• SHA-512 round
function
• SHA-3
• The sponge
construction
• The SHA-3 Iteration
Function f

Contenu connexe

Tendances

Information and data security cryptographic hash functions
Information and data security cryptographic hash functionsInformation and data security cryptographic hash functions
Information and data security cryptographic hash functionsMazin Alwaaly
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardDr.Florence Dayana
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authenticationchauhankapil
 
Transport Layer Security (TLS)
Transport Layer Security (TLS)Transport Layer Security (TLS)
Transport Layer Security (TLS)Arun Shukla
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherNiloy Biswas
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms WorkCheapSSLsecurity
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption StandardPrince Rachit
 
Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its UsesMohsin Ali
 
PUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONPUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONraf_slide
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation harshit chavda
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key CryptographyGopal Sakarkar
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptographyzahid-mian
 

Tendances (20)

Information and data security cryptographic hash functions
Information and data security cryptographic hash functionsInformation and data security cryptographic hash functions
Information and data security cryptographic hash functions
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Asymmetric Cryptography
Asymmetric CryptographyAsymmetric Cryptography
Asymmetric Cryptography
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Transport Layer Security (TLS)
Transport Layer Security (TLS)Transport Layer Security (TLS)
Transport Layer Security (TLS)
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 
How Hashing Algorithms Work
How Hashing Algorithms WorkHow Hashing Algorithms Work
How Hashing Algorithms Work
 
Cryptography
CryptographyCryptography
Cryptography
 
AES-Advanced Encryption Standard
AES-Advanced Encryption StandardAES-Advanced Encryption Standard
AES-Advanced Encryption Standard
 
Principles of public key cryptography and its Uses
Principles of  public key cryptography and its UsesPrinciples of  public key cryptography and its Uses
Principles of public key cryptography and its Uses
 
PUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTIONPUBLIC KEY ENCRYPTION
PUBLIC KEY ENCRYPTION
 
Block cipher modes of operation
Block cipher modes of operation Block cipher modes of operation
Block cipher modes of operation
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Message digest 5
Message digest 5Message digest 5
Message digest 5
 
Web Security
Web SecurityWeb Security
Web Security
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Intro to modern cryptography
Intro to modern cryptographyIntro to modern cryptography
Intro to modern cryptography
 

Similaire à Public Key Encryption & Hash functions

secure hash function for authentication in CNS
secure hash function for authentication in CNSsecure hash function for authentication in CNS
secure hash function for authentication in CNSNithyasriA2
 
Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxrichardnorman90310
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit ivArthyR3
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit ivArthyR3
 
BAIT1103 Chapter 2
BAIT1103 Chapter 2BAIT1103 Chapter 2
BAIT1103 Chapter 2limsh
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash functionomarShiekh1
 
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKUNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKjeevasreemurali
 
Distribution of public keys and hmac
Distribution of public keys and hmacDistribution of public keys and hmac
Distribution of public keys and hmacanuragjagetiya
 
IS413 Topic 5.pptx
IS413 Topic 5.pptxIS413 Topic 5.pptx
IS413 Topic 5.pptxWarrenPhiri4
 
CISSP Week 20
CISSP Week 20CISSP Week 20
CISSP Week 20jemtallon
 
Hash Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & AnalysisPawandeep Kaur
 
unit 4.pptx of hash function in cryptography
unit 4.pptx of hash function in cryptographyunit 4.pptx of hash function in cryptography
unit 4.pptx of hash function in cryptographyNithyasriA2
 
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...Vaibhav Khanna
 
Information and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authenticationInformation and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authenticationVaibhav Khanna
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3koolkampus
 

Similaire à Public Key Encryption & Hash functions (20)

secure hash function for authentication in CNS
secure hash function for authentication in CNSsecure hash function for authentication in CNS
secure hash function for authentication in CNS
 
Cryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docxCryptography and Network Security Principles and Practice.docx
Cryptography and Network Security Principles and Practice.docx
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cns
CnsCns
Cns
 
BAIT1103 Chapter 2
BAIT1103 Chapter 2BAIT1103 Chapter 2
BAIT1103 Chapter 2
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
 
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKUNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
 
Distribution of public keys and hmac
Distribution of public keys and hmacDistribution of public keys and hmac
Distribution of public keys and hmac
 
Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4
 
IS413 Topic 5.pptx
IS413 Topic 5.pptxIS413 Topic 5.pptx
IS413 Topic 5.pptx
 
CISSP Week 20
CISSP Week 20CISSP Week 20
CISSP Week 20
 
HASH FUNCTIONS.pdf
HASH FUNCTIONS.pdfHASH FUNCTIONS.pdf
HASH FUNCTIONS.pdf
 
Hash Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & Analysis
 
unit 4.pptx of hash function in cryptography
unit 4.pptx of hash function in cryptographyunit 4.pptx of hash function in cryptography
unit 4.pptx of hash function in cryptography
 
Unit 4
Unit 4Unit 4
Unit 4
 
Mj2521372142
Mj2521372142Mj2521372142
Mj2521372142
 
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...
 
Information and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authenticationInformation and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authentication
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3
 

Plus de Dr.Florence Dayana

Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.Florence Dayana
 
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdf
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdfDr.M.Florence Dayana-Cloud Computing-Unit - 1.pdf
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdfDr.Florence Dayana
 
M. Florence Dayana - Hadoop Foundation for Analytics.pptx
M. Florence Dayana - Hadoop Foundation for Analytics.pptxM. Florence Dayana - Hadoop Foundation for Analytics.pptx
M. Florence Dayana - Hadoop Foundation for Analytics.pptxDr.Florence Dayana
 
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdfM. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdfDr.Florence Dayana
 
M.FLORENCE DAYANA/electronic mail security.pdf
M.FLORENCE DAYANA/electronic mail security.pdfM.FLORENCE DAYANA/electronic mail security.pdf
M.FLORENCE DAYANA/electronic mail security.pdfDr.Florence Dayana
 
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdf
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdfM. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdf
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdfDr.Florence Dayana
 
Professional English - Reading
Professional English - ReadingProfessional English - Reading
Professional English - ReadingDr.Florence Dayana
 
Professional English - Speaking
Professional English - SpeakingProfessional English - Speaking
Professional English - SpeakingDr.Florence Dayana
 
Professional English - Listening
Professional English - ListeningProfessional English - Listening
Professional English - ListeningDr.Florence Dayana
 
Network Security- Secure Socket Layer
Network Security- Secure Socket LayerNetwork Security- Secure Socket Layer
Network Security- Secure Socket LayerDr.Florence Dayana
 
M.florence dayana dream weaver
M.florence dayana   dream weaverM.florence dayana   dream weaver
M.florence dayana dream weaverDr.Florence Dayana
 
M.florence dayana computer networks transport layer
M.florence dayana   computer networks transport layerM.florence dayana   computer networks transport layer
M.florence dayana computer networks transport layerDr.Florence Dayana
 
M.Florence Dayana Computer Networks Types
M.Florence Dayana  Computer Networks TypesM.Florence Dayana  Computer Networks Types
M.Florence Dayana Computer Networks TypesDr.Florence Dayana
 
M.Florence Dayana Computer Networks Introduction
M.Florence Dayana   Computer Networks IntroductionM.Florence Dayana   Computer Networks Introduction
M.Florence Dayana Computer Networks IntroductionDr.Florence Dayana
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMDr.Florence Dayana
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageDr.Florence Dayana
 
M.Florence Dayana/Cryptography and Network security
M.Florence Dayana/Cryptography and Network securityM.Florence Dayana/Cryptography and Network security
M.Florence Dayana/Cryptography and Network securityDr.Florence Dayana
 

Plus de Dr.Florence Dayana (20)

Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
 
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdf
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdfDr.M.Florence Dayana-Cloud Computing-Unit - 1.pdf
Dr.M.Florence Dayana-Cloud Computing-Unit - 1.pdf
 
M. Florence Dayana - Hadoop Foundation for Analytics.pptx
M. Florence Dayana - Hadoop Foundation for Analytics.pptxM. Florence Dayana - Hadoop Foundation for Analytics.pptx
M. Florence Dayana - Hadoop Foundation for Analytics.pptx
 
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdfM. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
M. FLORENCE DAYANA/unit - II logic gates and circuits.pdf
 
M.FLORENCE DAYANA/electronic mail security.pdf
M.FLORENCE DAYANA/electronic mail security.pdfM.FLORENCE DAYANA/electronic mail security.pdf
M.FLORENCE DAYANA/electronic mail security.pdf
 
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdf
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdfM. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdf
M. FLORENCE DAYANA - INPUT & OUTPUT DEVICES.pdf
 
Professional English - Reading
Professional English - ReadingProfessional English - Reading
Professional English - Reading
 
Professional English - Speaking
Professional English - SpeakingProfessional English - Speaking
Professional English - Speaking
 
Professional English - Listening
Professional English - ListeningProfessional English - Listening
Professional English - Listening
 
INPUT AND OUTPUT DEVICES.pdf
INPUT  AND OUTPUT DEVICES.pdfINPUT  AND OUTPUT DEVICES.pdf
INPUT AND OUTPUT DEVICES.pdf
 
NETWORK SECURITY-SET.pptx
NETWORK SECURITY-SET.pptxNETWORK SECURITY-SET.pptx
NETWORK SECURITY-SET.pptx
 
Network Security- Secure Socket Layer
Network Security- Secure Socket LayerNetwork Security- Secure Socket Layer
Network Security- Secure Socket Layer
 
M.florence dayana dream weaver
M.florence dayana   dream weaverM.florence dayana   dream weaver
M.florence dayana dream weaver
 
M.florence dayana computer networks transport layer
M.florence dayana   computer networks transport layerM.florence dayana   computer networks transport layer
M.florence dayana computer networks transport layer
 
M.Florence Dayana Computer Networks Types
M.Florence Dayana  Computer Networks TypesM.Florence Dayana  Computer Networks Types
M.Florence Dayana Computer Networks Types
 
M.Florence Dayana Computer Networks Introduction
M.Florence Dayana   Computer Networks IntroductionM.Florence Dayana   Computer Networks Introduction
M.Florence Dayana Computer Networks Introduction
 
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEMM. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
M. FLORENCE DAYANA/DATABASE MANAGEMENT SYSYTEM
 
M.Florence Dayana
M.Florence DayanaM.Florence Dayana
M.Florence Dayana
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
 
M.Florence Dayana/Cryptography and Network security
M.Florence Dayana/Cryptography and Network securityM.Florence Dayana/Cryptography and Network security
M.Florence Dayana/Cryptography and Network security
 

Dernier

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Dernier (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

Public Key Encryption & Hash functions

  • 1. NETWORK SECURITY Name of the Staff : M.FLORENCE DAYANA M.C.A.,M.Phil.,(Ph.D)., Head, Dept. of CA Bon Secours College For Women Thanjavur. Class : II MSc., CS Semester : III Unit : III Topic : Public key Encryption and Hash Functions 2/15/20191
  • 2. public-key Encryption Public-key encryption is a cryptographic system that uses two keys -- a public key known to everyone and a private or secret key known only to the recipient of the message. Example: When John wants to send a secure message to Jane, he uses Jane's public key to encrypt the message. Jane then uses her private key to decrypt it. An important element to the public key system is that the public and private keys are related in such a way that only the public key can be used to encrypt messages and only the corresponding private key can be used to decrypt them. Moreover, it is virtually impossible to deduce the private key if you know the public key.
  • 3. Public key encryption is a form of encryption that uses two keys. A public key, which everyone knows, and a private key, which only you know. To encrypt, the public key is applied to the target information, using a predefined operation (several times), to produce a pseudo-random number. To decrypt, the private key is applied to the pseudo-random number, using a different predefined operation (several times), to get the target information back. The algorithm relies on the fact that encryption is easy, and decryption is hard, making decryption impractical without the key. It was the first system to allow secure information transfer, without a shared Key.
  • 4. Hash Functions • A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value • h = H(M) • Principal object is data integrity • Cryptographic hash function • An algorithm for which it is computationally infeasible to find either: (a) a data object that maps to a pre-specified hash result (the one-way property) (b) two data objects that map to the same hash result (the collision-free property)
  • 5.
  • 6.
  • 7.
  • 8. Message Authentication Code (MAC) • Also known as a keyed hash function • Typically used between two parties that share a secret key to authenticate information exchanged between those parties Takes as input a secret key and a data block and produces a hash value (MAC) which is associated with the protected message •If the integrity of the message needs to be checked, the MAC function can be applied to the message and the result compared with the associated MAC value •An attacker who alters the message will be unable to alter the associated MAC value without knowledge of the secret key
  • 9. Digital Signature • Operation is similar to that of the MAC • The hash value of a message is encrypted with a user’s private key • Anyone who knows the user’s public key can verify the integrity of the message • An attacker who wishes to alter the message would need to know the user’s private key • Implications of digital signatures go beyond just message authentication
  • 10.
  • 11. Other Hash Function Uses Commonly used to create a one-way password file When a user enters a password, the hash of that password is compared to the stored hash value for verification This approach to password protection is used by most operating systems Can be used for intrusion and virus detection Store H(F) for each file on a system and secure the hash values One can later determine if a file has been modified by recomputing H(F) An intruder would need to change F without changing H(F) Can be used to construct a pseudorandom function (PRF) or a pseudorandom number generator (PRNG) A common application for a hash-based PRF is for the generation of symmetric keys
  • 12. Two Simple Hash Functions • Consider two simple insecure hash functions that operate using the following general principles: • The input is viewed as a sequence of n-bit blocks • The input is processed one block at a time in an iterative fashion to produce an n-bit hash function • Bit-by-bit exclusive-OR (XOR) of every block • Ci = bi1 xor bi2 xor . . . xor bim • Produces a simple parity for each bit position and is known as a longitudinal redundancy check • Reasonably effective for random data as a data integrity check • Perform a one-bit circular shift on the hash value after each block is processed • Has the effect of randomizing the input more completely and overcoming any regularities that appear in the input
  • 14. Requirements and Security • x is the preimage of h for a hash value h = H(x) • Is a data block whose hash function, using the function H, is h • Because H is a many-to- one mapping, for any given hash value h, there will in general be multiple preimages • Occurs if we have x ≠ y and H(x) = H(y) • Because we are using hash functions for data integrity, collisions are clearly undesirable
  • 15. Table 11.1 Requirements for a Cryptographic Hash Function H (Table can be found on page 323 in textbook.)
  • 16.
  • 17. * Resistance required if attacker is able to mount a chosen message attack Table 11.2 Hash Function Resistance Properties Required for Various Data Integrity Applications
  • 18. Attacks on Hash Functions • Does not depend on the specific algorithm, only depends on bit length • In the case of a hash function, attack depends only on the bit length of the hash value • Method is to pick values at random and try each one until a collision occurs • An attack based on weaknesses in a particular cryptographic algorithm • Seek to exploit some property of the algorithm to perform some attack other than an exhaustive search
  • 19. Birthday Attacks • For a collision resistant attack, an adversary wishes to find two messages or data blocks that yield the same hash function • The effort required is explained by a mathematical result referred to as the birthday paradox • How the birthday attack works: • The source (A) is prepared to sign a legitimate message x by appending the appropriate m-bit hash code and encrypting that hash code with A’s private key • Opponent generates 2m/2 variations x’ of x, all with essentially the same meaning, and stores the messages and their hash values • Opponent generates a fraudulent message y for which A’s signature is desired • Two sets of messages are compared to find a pair with the same hash • The opponent offers the valid variation to A for signature which can then be attached to the fraudulent variation for transmission to the intended recipient • Because the two variations have the same hash code, they will produce the same signature and the opponent is assured of success even though the encryption key is not known
  • 20.
  • 21. Hash Functions Based on Cipher Block Chaining • Can use block ciphers as hash functions • Using H0=0 and zero-pad of final block • Compute: Hi = E(Mi Hi-1) • Use final block as the hash value • Similar to CBC but without a key • Resulting hash is too small (64-bit) • Both due to direct birthday attack • And “meet-in-the-middle” attack • Other variants also susceptible to attack
  • 22. Secure Hash Algorithm (SHA) • SHA was originally designed by the National Institute of Standards and Technology (NIST) and published as a federal information processing standard (FIPS 180) in 1993 • Was revised in 1995 as SHA-1 • Based on the hash function MD4 and its design closely models MD4 • Produces 160-bit hash values • In 2002 NIST produced a revised version of the standard that defined three new versions of SHA with hash value lengths of 256, 384, and 512 • Collectively known as SHA-2
  • 23. Note: All sizes are measured in bits. Table 11.3 Comparison of SHA Parameters
  • 24.
  • 25.
  • 26. Table 11.4 SHA-512 Constants (Table can be found on page 333 in textbook)
  • 27.
  • 28.
  • 29. (Figure can be found on page 337 in textbook) SHA-512 Logic
  • 30. SHA-3 SHA-1 has not yet been "broken” • No one has demonstrated a technique for producing collisions in a practical amount of time • Considered to be insecure and has been phased out for SHA-2 SHA-2 shares the same structure and mathematical operations as its predecessors so this is a cause for concern • Because it will take years to find a suitable replacement for SHA-2 should it become vulnerable, NIST decided to begin the process of developing a new hash standard NIST announced in 2007 a competition for the SHA-3 next generation NIST hash function • Winning design was announced by NIST in October 2012 • SHA-3 is a cryptographic hash function that is intended to complement SHA-2 as the approved standard for a wide range of applications
  • 31. The Sponge Construction • Underlying structure of SHA-3 is a scheme referred to by its designers as a sponge construction • Takes an input message and partitions it into fixed-size blocks • Each block is processed in turn with the output of each iteration fed into the next iteration, finally producing an output block • The sponge function is defined by three parameters: • f = the internal function used to process each input block • r = the size in bits of the input blocks, called the bitrate • pad = the padding algorithm
  • 32.
  • 33.
  • 35.
  • 38.
  • 39.
  • 40. Summary • Applications of cryptographic hash functions • Message authentication • Digital signatures • Other applications • Requirements and security • Security requirements for cryptographic hash functions • Brute-force attacks • Cryptanalysis • Hash functions based on cipher block chaining • Secure hash algorithm (SHA) • SHA-512 logic • SHA-512 round function • SHA-3 • The sponge construction • The SHA-3 Iteration Function f