Professional Documents
Culture Documents
Faculty Name: Dr. Gautam Borkar Dr. Nilesh Marathe
Faculty Name: Dr. Gautam Borkar Dr. Nilesh Marathe
2
Module No: 2 Module name:Block Cipher and Public Key cryptography
Lecture No.17
Key management – Diffie Hellman Key
Algorithm
Diffie-Hellman Key Agreement
Let us give a trivial example to make the procedure clear. Our example uses small
numbers, but note that in a real situation, the numbers are very large. Assume that g = 7
and p = 23. The steps are as follows:
1.Alice chooses x = 3 and calculates R1 = 73 mod 23 = 21.
2.Bob chooses y = 6 and calculates R2 = 76 mod 23 = 4.
3.Alice sends the number 21 to Bob.
4.Bob sends the number 4 to Alice.
5.Alice calculates the symmetric key K = 43 mod 23 = 18.
6.Bob calculates the symmetric key K = 216 mod 23 = 18.
7.The value of K is the same for both Alice and Bob;
gxy mod p = 718 mod 35 = 18.
Lecture No: 18
Example: Man in Middle
Attack
Man-in-The Middle Attack
•Background
•Man in the Middle
•Network level – heavily researched
•Web application level – sporadic research
•Outline
•Passive MitM attacks
•Active MitM attacks
•Penetrating an internal network
•Remediation
Internet
Boring
Boring
Sensitive
Sensitive sites
sites
Interesting
Interesting
Attacker
Attacker views
Attacker
views the
the response
Attacker views
views the
responsethe request
request
Victim
Victim browses
browses to
to aa manipulates
manipulates manipulates
it
manipulates
it itit Server
Server returns
returns aa response
response
website
website and
and forwards
and
andto
forwards forwards
to victim
victim to
forwards to server
server
Other
Other servers
servers are
are not
not affected
affected
TheVictim
attacker
Victim browses
browsesactively
to
Attacker addsdirects
to aa adds
Attacker an
an IFRAME
IFRAMEthe
Attack victim
transfers to
referencing
Attack transfers
referencing the an “interesting”
the
Server siteresponse
Server returns
returns aa response
“boring” site
“boring” site an “interesting”
request
an “interesting” site
request to the server
site to the server
The IFrame could be invisible
My Weather Channel
Other
Other servers
servers are
are not
not affected
affected
My Bank Site
Automatic
Automatic request
request sent
sent to
to the
the
interesting server
interesting server
Automatic
Automatic request
request contains
contains victim’s
victim’s
cookies
cookies
Result
– Attacker can execute scripts on any domain she desires
– Scripts can fully interact with any “interesting” website
Limitations
– Will only work for non SSL web sites
Attacker
Attacker forwards
forwards the
the
Victim
Victim surfs
surfs to
to aa Attacker
Attacker injects
injects an
an IFRAME
IFRAME automatic
automatic request to the
request to the
“boring” site
“boring” site with the directing
directing to an “interesting” site
to an “interesting” site
Script
Script executes
executes with the “interesting”
“interesting” server
server
“interesting”
“interesting” server’s
server’s restrictions
restrictions
Automatic
Attacker
Automatic
Attacker adds request
request sent
adds aa malicious
malicioussent to
script
to
script
the
to
to interesting
thethe
interesting
the response server
responseserver “Interesting”
“Interesting” server
server
returns a response
returns a response
Login Mechanism
Login
Login request
request is
is sent
sent through
through aa
secure channel
secure channel Site
Site returns
returns aa response
response
with
with login
login form
form
Result
– Attacker can steal any auto-completion information she desires
Limitations
– Will only work for pre-login pages not encrypted
– Will not work seamlessly in IE
Attacker
AttackerAttacker
returns
returns redirect
Attacker the
the original
victim
original
redirect login
to
to aa
login
victim
form
form together
request
together with
withto
request toaaaamalicious
pre-login
pre-loginscript
malicious page
script
page
Script
Script accesses
accesses the
the auto-completion
auto-completion
information
information using the
using the DOM
DOM
23
Module No: 3 Module name:Cryptographic Hashes, Message Digest and
Digital Certificates
Lecture No.19
Authentication Requirement-
Authentication Function
Message Authentication
Disclosure
Traffic analysis
Masquerade
Content modification
Sequence modification
Timing modification
Source repudiation
Destination repudiation
•Message authentication
•A procedure to verify that messages come from the alleged source and have not
been altered
•Message authentication may also verify sequencing and timeliness
•Digital signature
•An authentication technique that also includes measures to counter repudiation
by either source or destination
Lecture No. 20
Type of Authentication
Type of Authentication
User authentication
Biometrics
Token-based authentication
Trusted Intermediaries
b. Challenge Response
Basic idea
User has a secret password
System checks password to authenticate user
Issues
How is password stored?
How does system check password?
How easy is it to guess a password?
Difficult to keep password file secret, so best if it is hard to guess password
even if you have the password file
(https://www.unix-ninja.com/p/Password_DNA)
38
Basic password scheme
User
Password file
kiwifruit
exrygbzyf
kgnosfix
hash function ggjoklbsz
…
…
Credit-card like
Has own processor, memory, I/O ports
ROM, EEPROM, RAM memory
Executes protocol to authenticate with reader/computer
Static: similar to memory cards
Dynamic: passwords created every minute; entered manually by user or
electronically
Challenge-response: computer creates a random number; smart card provides its
hash (similar to PK)
Also have USB dongles
Serves the same purpose as other national ID cards (e.g., a driver’s licence)
A German card
Personal data, Document number, Card access number (six digit random
number), Machine readable zone (MRZ): the password
Uses: ePass (government use), eID (general use), eSign (can have private
key and certificate)
45
Thank You