SlideShare une entreprise Scribd logo
1  sur  25
Distribution of Public Keys and HMAC
Presented by:
Anurag Jagetiya
Astt. Prof. MLV Textile & Engineering
College, Bhilwara
Objective
• Understand the technique use for distribution
of Public keys.
• Understanding of MAC.
Prerequisite
• Understanding of Network Security Principles
Outline
• Background
• Key Distribution
– RSA approach
– Publicly available directory
– Public key authority
– Public key certificate
• Hash base Message Authentication Code (HMAC)
Background
"Cryptography, defined as "the science and study of
secret writing" concerns the ways in which
communications and data can be encoded to prevent
disclosure of their contents through eavesdropping
or message interception, using codes, ciphers and
other methods, so that only certain people can see
the real message.“
- Yamen Akdeniz
The Need for Cryptography
Cryptography is required to ensure:
• Confidentiality
• Authentication
• Authorization
• Data Integrity
• Non-Repudiation
Types of Cryptography
• Private key (Symmetric) Cryptography
• Public Key (Asymmetric)Cryptography
Private key Cryptography
• Sender and the Recipient share a key that
must be kept private to them.
• Same key is used to encrypt and decrypt the
message.
• Example: DES, Triple DES, IDEA, blowfish, RC4
Problem: Private key Cryptography
• Every pair of user needs a unique key, thus
number of keys are very large.
• Number of keys for N users are N(N-1)/2.
• Key distribution is a big problem: cannot trust
upon third party
• Solution: Public Key Cryptography
Public Key Cryptography
• Sender & Receiver both has two sets of keys
Public key and Private key.
• Both the keys can be used for encryption/
decryption.
• Public key is publically available to everyone
wish to send secret message.
• Private key remains secret to user.
• Example: RSA, ECC, etc
Key Distribution
Distribution of Public Keys
RSA
• Based upon mathematics that it is easier to
multiply two large prime numbers but it’s very
difficult to find its factor.
• e.g. 40259, find its factors
• Public key is the product of two long prime
numbers
• Considered very secure but may suffer from
man in middle attack
317 *217
Publicly available directory
• directory must be trusted with properties:
– contain {name, public-key} entries
– participants register securely with directory
– participants can replace key at any time
– directory is periodically published
• Still vulnerable: trusted party can be attacked.
Or if intruder somehow know the private key
of any participant, she can pass counterfeit
key information to the directory.
Public key authority
• Authority provides its public keys to participants
• Participants can request for their keys in an
encrypted manner that can be decrypted by the
private key of the authority.
• Danger of tempering with authority is still
prevailing
• Dependency upon Authority is an overhead.
Public key certificate
• Digitally signed electronic certificates are used by the
participants to exchange public keys safely.
• These certificates are assigned by the certificate
authority like: VeriSign etc.
• Nobody other than the trusted certificate authority
can generate the certificates.
• Popular TLS protocol uses the services of X.509
directory authentication service for the same.
HMAC: Background
• Authentication techniques ensures
– Message is from alleged sender
– And, its integrity is preserved
• Hash functions are used to produce a fixed
length digest of the input message
• It is known as message digest or message
authentication code
Contd…
• Hash functions are known as one way
function i.e. easy in one direction but difficult
in another direction.
• for any two different messages it’s impossible
to get similar digest.
• Common hash algorithms
– MD5 produces fixed 128 bit digest
– SHA-1 produces 160 bit bits
HMAC Introduction
• HMAC uses popular cryptographic hash
function like MD-5 or SHA-1 to generate
strong and secure MAC.
• HMAC uses a secret key for the calculation
and verification of the MACs.
• HMAC is specified in RFC 2104
Contd…
• To use available and approved cryptographic hash
functions whose:
– Cryptographic strength has been proved effectively.
– Code is freely available and they perform well in software.
• Old embedded hash functions can be easily replaced
with new hash functions, when developed.
• To make a simple use of keys
HMAC Algorithm: Parameters and symbols
M Input Message to HMAC (With necessary padding)
B Block Size (In Bytes) of Input Message
H Embedded hash function
Ipad Inner Pad: the byte 0x36 (In hexadecimal) repeated B times
K Secret Key (Shared by only sender and receiver)
K0 Key K after necessary pre-processing (i.e. padded with zeros
on the left) to form a B byte key
Opad Outerpad: 0x5C (In hexadecimal) repeated B times
L Length of the hash code (in bytes)
|| Concatenation
Exclusive or
HMAC Algorithm: Cryptographic Key
• The size of secret key K used in HMAC shall be
equal to or greater than L/2
• Here L is the size of Hash function output
• If key size greater than input block size (B
bytes), first apply the key to hash function (H)
than the resultant L byte string is used as key
• Key should be chosen at random using key
generation algorithms and change
periodically.
HMAC Algorithm
1. If K = B than Set K0:= K. Go to step 4
2. If K < B than K is padded with zeros in the left that form B byte string K0.
Go to step 4.
3. If K> B than hash the key K through H to get L byte string than add B-L
zeros to get a B byte string. (i.e. K0=H (K) || 0000…) Go to step 4
4. XOR K0 and ipad to generate a B byte string: K0 ipad
5. Append the input message to the output string of step 4. (K0 ipad) || M
6. Apply H to the stream generate in step 5. H ((K0 ipad) || M)
7. XOR K0 and opad: K0 opad
8. Append the result of step 6 to result of step 7:
9. (K0 opad)|| H ((K0 ipad) || M)
10. Apply H to the stream generated in step 8 to get the final output:
11. H((K0 opad)|| H ((K0 ipad) || M))
Graphical representation of HMAC Algorithm
Image Source: http://blog.mousavi.net/2013/01/23/hmac-the-keyed-hash-based-
mac-function/
• XORing of ipad and opad with key K result in
the flipping of half of its key bits.
• But the flipped value will be different for ipad
and opad respectively.
• Thus two keys are pseudo randomly
generated by key K.
References
• Anurag Jagetiya, C. Ramakrishna, “Secure Socket Layer-A
Boon to E-commerce”, CSI Communications, May-2013.
• William Stallings, Cryptography and Network Security
Principles and Practices, Pearson Publication, 4th Edition.

Contenu connexe

Tendances

Network layer - design Issues
Network layer - design IssuesNetwork layer - design Issues
Network layer - design Issuesقصي نسور
 
Ll(1) Parser in Compilers
Ll(1) Parser in CompilersLl(1) Parser in Compilers
Ll(1) Parser in CompilersMahbubur Rahman
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design MAHASREEM
 
Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)   Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design) Tasif Tanzim
 
Hashing in datastructure
Hashing in datastructureHashing in datastructure
Hashing in datastructurerajshreemuthiah
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DESHemant Sharma
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authenticationchauhankapil
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler DesignShine Raj
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication ProtocolsTrinity Dwarka
 
Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptographyBarani Tharan
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve CryptographyJorgeVillamarin5
 
Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Samip jain
 
Block ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptographyBlock ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptographyRAMPRAKASHT1
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler designSudip Singh
 

Tendances (20)

Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Network layer - design Issues
Network layer - design IssuesNetwork layer - design Issues
Network layer - design Issues
 
Ll(1) Parser in Compilers
Ll(1) Parser in CompilersLl(1) Parser in Compilers
Ll(1) Parser in Compilers
 
LR Parsing
LR ParsingLR Parsing
LR Parsing
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)   Intermediate code generation (Compiler Design)
Intermediate code generation (Compiler Design)
 
Hashing in datastructure
Hashing in datastructureHashing in datastructure
Hashing in datastructure
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DES
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
Dempster shafer theory
Dempster shafer theoryDempster shafer theory
Dempster shafer theory
 
Three address code In Compiler Design
Three address code In Compiler DesignThree address code In Compiler Design
Three address code In Compiler Design
 
Authentication Protocols
Authentication ProtocolsAuthentication Protocols
Authentication Protocols
 
Elliptical curve cryptography
Elliptical curve cryptographyElliptical curve cryptography
Elliptical curve cryptography
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
Hash Function
Hash Function Hash Function
Hash Function
 
Run time storage
Run time storageRun time storage
Run time storage
 
Secure Socket Layer (SSL)
Secure Socket Layer (SSL)Secure Socket Layer (SSL)
Secure Socket Layer (SSL)
 
Block ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptographyBlock ciphers &amp; public key cryptography
Block ciphers &amp; public key cryptography
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler design
 

En vedette

Lecture 9 key distribution and user authentication
Lecture 9 key distribution and user authentication Lecture 9 key distribution and user authentication
Lecture 9 key distribution and user authentication rajakhurram
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
public key infrastructure
public key infrastructurepublic key infrastructure
public key infrastructurevimal kumar
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applicationsthai
 
Implementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HWImplementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HWJoe Jiang
 
Ch01
Ch01Ch01
Ch01n C
 
Digital signature
Digital  signatureDigital  signature
Digital signatureAJAL A J
 
CCNA Security 012- cryptographic systems
CCNA Security 012- cryptographic systemsCCNA Security 012- cryptographic systems
CCNA Security 012- cryptographic systemsAhmed Habib
 
8 Authentication Security Protocols
8 Authentication Security Protocols8 Authentication Security Protocols
8 Authentication Security Protocolsguestfbf635
 
block ciphers
block ciphersblock ciphers
block ciphersAsad Ali
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMACKrishna Gehlot
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptographydrewz lin
 

En vedette (20)

Lecture 9 key distribution and user authentication
Lecture 9 key distribution and user authentication Lecture 9 key distribution and user authentication
Lecture 9 key distribution and user authentication
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
public key infrastructure
public key infrastructurepublic key infrastructure
public key infrastructure
 
Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
 
Protocols for Public Key Management
Protocols for Public Key ManagementProtocols for Public Key Management
Protocols for Public Key Management
 
Ch14
Ch14Ch14
Ch14
 
NetworkSecurity
NetworkSecurityNetworkSecurity
NetworkSecurity
 
Implementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HWImplementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HW
 
Digital signature
Digital signatureDigital signature
Digital signature
 
Fuzzy Set | Statistics
Fuzzy Set | StatisticsFuzzy Set | Statistics
Fuzzy Set | Statistics
 
Encryption and Key Distribution Methods
Encryption and Key Distribution MethodsEncryption and Key Distribution Methods
Encryption and Key Distribution Methods
 
Fuzzy Set
Fuzzy SetFuzzy Set
Fuzzy Set
 
Ch01
Ch01Ch01
Ch01
 
Digital signature
Digital  signatureDigital  signature
Digital signature
 
CCNA Security 012- cryptographic systems
CCNA Security 012- cryptographic systemsCCNA Security 012- cryptographic systems
CCNA Security 012- cryptographic systems
 
Email security
Email securityEmail security
Email security
 
8 Authentication Security Protocols
8 Authentication Security Protocols8 Authentication Security Protocols
8 Authentication Security Protocols
 
block ciphers
block ciphersblock ciphers
block ciphers
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptography
 

Similaire à Distribution of public keys and hmac

Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash functionomarShiekh1
 
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
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptxSurendraBasnet6
 
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
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functionsDr.Florence Dayana
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3koolkampus
 
IS413 Topic 5.pptx
IS413 Topic 5.pptxIS413 Topic 5.pptx
IS413 Topic 5.pptxWarrenPhiri4
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
Message auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxMessage auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxaribariaz507
 
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
 
BAIT1103 Chapter 2
BAIT1103 Chapter 2BAIT1103 Chapter 2
BAIT1103 Chapter 2limsh
 
CISSP Week 20
CISSP Week 20CISSP Week 20
CISSP Week 20jemtallon
 
CNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingCNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingSam Bowne
 
CNIT 141 7. Keyed Hashing
CNIT 141 7. Keyed HashingCNIT 141 7. Keyed Hashing
CNIT 141 7. Keyed HashingSam Bowne
 
Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...CAS
 
CNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed HashingCNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed HashingSam Bowne
 

Similaire à Distribution of public keys and hmac (20)

Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
 
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
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
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
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functions
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3
 
IS413 Topic 5.pptx
IS413 Topic 5.pptxIS413 Topic 5.pptx
IS413 Topic 5.pptx
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
SHA_and_DS.pdf
SHA_and_DS.pdfSHA_and_DS.pdf
SHA_and_DS.pdf
 
Message auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxMessage auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptx
 
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
 
BAIT1103 Chapter 2
BAIT1103 Chapter 2BAIT1103 Chapter 2
BAIT1103 Chapter 2
 
CISSP Week 20
CISSP Week 20CISSP Week 20
CISSP Week 20
 
CNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingCNIT 1417. Keyed Hashing
CNIT 1417. Keyed Hashing
 
CNIT 141 7. Keyed Hashing
CNIT 141 7. Keyed HashingCNIT 141 7. Keyed Hashing
CNIT 141 7. Keyed Hashing
 
Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...Improved authentication & key agreement protocol using elliptic curve cryptog...
Improved authentication & key agreement protocol using elliptic curve cryptog...
 
CNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed HashingCNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed Hashing
 
SSL/TLS 101
SSL/TLS 101SSL/TLS 101
SSL/TLS 101
 

Dernier

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Dernier (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

Distribution of public keys and hmac

  • 1. Distribution of Public Keys and HMAC Presented by: Anurag Jagetiya Astt. Prof. MLV Textile & Engineering College, Bhilwara
  • 2. Objective • Understand the technique use for distribution of Public keys. • Understanding of MAC.
  • 3. Prerequisite • Understanding of Network Security Principles
  • 4. Outline • Background • Key Distribution – RSA approach – Publicly available directory – Public key authority – Public key certificate • Hash base Message Authentication Code (HMAC)
  • 5. Background "Cryptography, defined as "the science and study of secret writing" concerns the ways in which communications and data can be encoded to prevent disclosure of their contents through eavesdropping or message interception, using codes, ciphers and other methods, so that only certain people can see the real message.“ - Yamen Akdeniz
  • 6. The Need for Cryptography Cryptography is required to ensure: • Confidentiality • Authentication • Authorization • Data Integrity • Non-Repudiation
  • 7. Types of Cryptography • Private key (Symmetric) Cryptography • Public Key (Asymmetric)Cryptography
  • 8. Private key Cryptography • Sender and the Recipient share a key that must be kept private to them. • Same key is used to encrypt and decrypt the message. • Example: DES, Triple DES, IDEA, blowfish, RC4
  • 9. Problem: Private key Cryptography • Every pair of user needs a unique key, thus number of keys are very large. • Number of keys for N users are N(N-1)/2. • Key distribution is a big problem: cannot trust upon third party • Solution: Public Key Cryptography
  • 10. Public Key Cryptography • Sender & Receiver both has two sets of keys Public key and Private key. • Both the keys can be used for encryption/ decryption. • Public key is publically available to everyone wish to send secret message. • Private key remains secret to user. • Example: RSA, ECC, etc
  • 12. RSA • Based upon mathematics that it is easier to multiply two large prime numbers but it’s very difficult to find its factor. • e.g. 40259, find its factors • Public key is the product of two long prime numbers • Considered very secure but may suffer from man in middle attack 317 *217
  • 13. Publicly available directory • directory must be trusted with properties: – contain {name, public-key} entries – participants register securely with directory – participants can replace key at any time – directory is periodically published • Still vulnerable: trusted party can be attacked. Or if intruder somehow know the private key of any participant, she can pass counterfeit key information to the directory.
  • 14. Public key authority • Authority provides its public keys to participants • Participants can request for their keys in an encrypted manner that can be decrypted by the private key of the authority. • Danger of tempering with authority is still prevailing • Dependency upon Authority is an overhead.
  • 15. Public key certificate • Digitally signed electronic certificates are used by the participants to exchange public keys safely. • These certificates are assigned by the certificate authority like: VeriSign etc. • Nobody other than the trusted certificate authority can generate the certificates. • Popular TLS protocol uses the services of X.509 directory authentication service for the same.
  • 16. HMAC: Background • Authentication techniques ensures – Message is from alleged sender – And, its integrity is preserved • Hash functions are used to produce a fixed length digest of the input message • It is known as message digest or message authentication code
  • 17. Contd… • Hash functions are known as one way function i.e. easy in one direction but difficult in another direction. • for any two different messages it’s impossible to get similar digest. • Common hash algorithms – MD5 produces fixed 128 bit digest – SHA-1 produces 160 bit bits
  • 18. HMAC Introduction • HMAC uses popular cryptographic hash function like MD-5 or SHA-1 to generate strong and secure MAC. • HMAC uses a secret key for the calculation and verification of the MACs. • HMAC is specified in RFC 2104
  • 19. Contd… • To use available and approved cryptographic hash functions whose: – Cryptographic strength has been proved effectively. – Code is freely available and they perform well in software. • Old embedded hash functions can be easily replaced with new hash functions, when developed. • To make a simple use of keys
  • 20. HMAC Algorithm: Parameters and symbols M Input Message to HMAC (With necessary padding) B Block Size (In Bytes) of Input Message H Embedded hash function Ipad Inner Pad: the byte 0x36 (In hexadecimal) repeated B times K Secret Key (Shared by only sender and receiver) K0 Key K after necessary pre-processing (i.e. padded with zeros on the left) to form a B byte key Opad Outerpad: 0x5C (In hexadecimal) repeated B times L Length of the hash code (in bytes) || Concatenation Exclusive or
  • 21. HMAC Algorithm: Cryptographic Key • The size of secret key K used in HMAC shall be equal to or greater than L/2 • Here L is the size of Hash function output • If key size greater than input block size (B bytes), first apply the key to hash function (H) than the resultant L byte string is used as key • Key should be chosen at random using key generation algorithms and change periodically.
  • 22. HMAC Algorithm 1. If K = B than Set K0:= K. Go to step 4 2. If K < B than K is padded with zeros in the left that form B byte string K0. Go to step 4. 3. If K> B than hash the key K through H to get L byte string than add B-L zeros to get a B byte string. (i.e. K0=H (K) || 0000…) Go to step 4 4. XOR K0 and ipad to generate a B byte string: K0 ipad 5. Append the input message to the output string of step 4. (K0 ipad) || M 6. Apply H to the stream generate in step 5. H ((K0 ipad) || M) 7. XOR K0 and opad: K0 opad 8. Append the result of step 6 to result of step 7: 9. (K0 opad)|| H ((K0 ipad) || M) 10. Apply H to the stream generated in step 8 to get the final output: 11. H((K0 opad)|| H ((K0 ipad) || M))
  • 23. Graphical representation of HMAC Algorithm Image Source: http://blog.mousavi.net/2013/01/23/hmac-the-keyed-hash-based- mac-function/
  • 24. • XORing of ipad and opad with key K result in the flipping of half of its key bits. • But the flipped value will be different for ipad and opad respectively. • Thus two keys are pseudo randomly generated by key K.
  • 25. References • Anurag Jagetiya, C. Ramakrishna, “Secure Socket Layer-A Boon to E-commerce”, CSI Communications, May-2013. • William Stallings, Cryptography and Network Security Principles and Practices, Pearson Publication, 4th Edition.