368 Lecture Compile
368 Lecture Compile
CSCI368/968
1
Contact details
If you email me it please include the subject and topic in the subject
line: For example: CSCI368: A1.
– This way I can tell if an email is about almost due assessment or similar
important matters. (Start with: Hi Fuchun,)
– While I generally reply to emails within a couple of working days there will be
times when other activities will take priority.
– If possible, use your university account for email.
– Send emails to both of us if it is related to Fuchun and Tutor.
2
About Me
Dr Fuchun Guo
Associate Professor
Institute of Cybersecurity and Cryptology
www.uow.edu.au/~fuchun
3
How to Make a Question?
• You might have some questions to ask, but the questions look
“Naive”!
• Actually, these “naive” questions are the key for fully understanding
this subject.
5
CSCI368: How to Secure Network and Access
• Covering a wide range of topics in computer network
security
– From cryptography to network protocols
– From security programming to protocol design
• Knowledge required
– Basic cryptography (will be introduced briefly)
– Basic computer network knowledge (OSI Model)
– Programming: C, or Java or python (not introduced)
6
Aims
• Understand network vulnerabilities and network-
based attacks
• Apply a range network security technologies for
securing networks
• Use appropriate security standards and network
security tools to enhance security of a distributed
system
• Evaluate, compare, and recommend network
security applications and systems
7
Fuchun’s Personal Perspective
• Eventually, you will forget what you have learned,
but this is fine and normal.
8
Textbook and References
• William Stallings, Cryptography and Network Security,
7th edition, Pearson, 2016
• Other references:
– C. Kaufman, R. Perlman, and M. Speciner, Network Security:
PRIVATE communication in a PUBLIC world, 2nd edition,
Prentice Hall, 2002.
– William Stallings, Network Security Essentials, 6th edition,
Pearson, 2016
– Colin Boyd, Anish Mathuria, Douglas Stebila, Protocols for
Authentication and Key Establishment, 2nd Edition, Springer,
2020 9
Contents
treated as blackbox
11
Contents (related to textbook)
13
Assessments (Individual)
14
Assessment
• Assignments must be submitted via Moodle.
• It is the student’s responsibility to keep a backup of his/her work. There will be
no extension granted due to any circumstance related to the failure of students’
own equipment.
• Penalties apply to all late work, except if student academic consideration has
been granted.
• Late submissions will attract a penalty of 25% of the assessment mark per day
including weekends.
• Students who copy an assignment may receive zero for that assignment. This
also covers assignments which may be the product of community effort by
several students. Working together is acceptable, but the final coding should be
the work of the individual student, as assessment is a measure of your ability. All
students involved in plagiarism will have a zero mark for that assessment task.
• At least 45% (27/60) in the final exam, otherwise TF may be given.
15
Security Basics
16
Network Security & Cyber Security
• Cyber security is a subset of information security which refers to
a set of techniques and methodologies used to protect integrity of
networks, devices, programs, and data from damage, attack, or
unauthorized access. In simple terms, cyber security is the practice
of protecting internet-connected systems and networks from
digital attacks.
18
A Model for Network Security
19
Threat and Attack
Threat in a servicer: An organization uses email for communication, and employees regularly receive
emails containing sensitive information or links to important documents. The existence of phishing
emails is a threat. Phishing emails are deceptive attempts to trick individuals into revealing sensitive
information, such as usernames, passwords, or financial information.
Service under Attack: An employee receives an email that appears to be from a trusted source, such
as the organization's IT department. The email contains a link that supposedly leads to a critical
software update. If the employee clicks on the link and provides their login credentials on a fake
website, this action constitutes a phishing attack. The attacker has successfully exploited the
vulnerability of the employee being deceived by the phishing email.
20
From Attack to Mechanism& Security Service
21
Security Requirements (Aims)
• Confidentiality: Stored or transmitted information
should be accessible only by authorised parties.
• Integrity: Information should be protected from
unauthorised modification - alteration, insertion, or
deletion.
• Authenticity: The origin of a message should be assured.
22
Security Issues: Four Types of Attacks
• Active Attacks:
– Impersonation attack
– Modification of message
– Denial of service
– ……
24
Protections again Attacks
• Cryptographic Protection...
– It is powerful, but
– it cannot protect everything.
– Mechanism and resistant
• Non-cryptographic protection
– Physical hardware support
– Detect and block (firewall)
25
Protections again Attacks
• Encryption:
– Symmetric Cryptosystems – Secret key
• AES, DES, RC4, ...
– Asymmetric Cryptosystems – Public key
• RSA, ElGamal, ...
• Digital signature:
– RSA, DSS, ElGamal.
• (Keyed) Hash:
– MD5, SHA-1/2/3, HMAC, etc.
• Others.....
27
Security protocols (services)
28
Network Security is …
30
Terms Together (Arow and Shield)
mechanism
34
Questions: List one passive attack and one active attack.
Answer: (1) Analysis. The adversary tries to analyze the key information from
the commuinication (2) impersonation. The adversary tries to log into a user’s
account without authorization.
35
Relations
They: client-client, client-server, server-server
36
Network Basics
37
Outline
• Introduction to network protocols
• OSI
• TCP/IP
• Address
• NAT Protocol
• Some network threats
38
Introduction
39
Example
• Assume Maria and Ann are neighbors with a lot of
common ideas. However, Maria speaks only Spanish,
and Ann speaks only English.
41
OSI: the seven layer model…
• …dates back to 1983 and was released by ISO.
• The OSI is an abbreviation of Open Systems Interconnection.
• the standardization of designing various protocols used in
computer networks
• Generally we distinguish between the upper layers, the top three,
and the lower layers, the bottom four.
– Effectively the upper layers are local and associated with the “end-user”, while the lower layers
relate to the actual network and communication services.
• Split a task into pieces and then solve each piece independently (or
nearly so).
42
Layering Example: Federal Express
• Letter in envelope, address on outside
• FedX guy adds addressing information, barcode.
• Local office drives to airport and delivers to hub.
• Sent via airplane to nearest city.
• Delivered to right office
• Delivered to right person
43
OSI Layers
7. identifying communication partners, determining resource
availability, and synchronizing communication
6. data form representation by translating between application and
network formats
5. establishes, manages and terminates the connections between the
local and remote application.
4. provides the functional and procedural means of transferring
variable-length data sequences from a source to a destination host,
while maintaining the quality of service functions. (port number)
3. provides the functional and procedural means of transferring
variable length data sequences from one node to another connected
in "different networks“ (IP)
2. It detects and possibly corrects errors that may occur in the
physical layer. It defines the protocol to establish and terminate a
connection between two physically connected devices. (MAC)
1. responsible for the transmission and reception of unstructured
raw data between a device and a physical transmission medium. It
converts the digital bits into other signals.
44
OSI Layers
45
OSI Layers
https://www.youtube.com/watch?v=Kb4hVvlCx40 46
Simplified 4 Layers
47
TCP/IP Suite
48
OSI versus TCP/IP Model
7-layer 5-layer
OSI TCP/IP
Reference Internet
Application Model Model
Application
Presentation
Session
OSI is a conceptual model. OSI is not a
Transport protocol but a reference model used for Transport
understanding and designing the system
architecture.
Network Internet
Segment (Transport Layer): If the transport protocol is TCP, the unit of data sent
from TCP to network layer is called Segment.
Datagram (Internet/Network Layer): If the network protocol is IP, the unit of data
is called Datagram (packet). At transport layer, if protocol is UDP, we use datagram there
as well. Hence, we differentiate them as UDP Datagram, IP Datagram.
Frame (Data Link Layer): the protocol data unit at the data link layer 50
Example
A Computer Network
51
Communication at Physical layer
Legend Source Destination
A R1 R3 R4 B
Physical Physical
layer layer
Link 1 Link 3 Link 5 Link 6
52
Communication at Data Link layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Data link Data link
Physical Physical
Link 1 Link 3 Link 5 Link 6
D2 H2
Frame
D2 am e
Fr
H2
D2 H2 D2 H2
Frame Frame
53
Communication at Network layer
Legend Source Destination D Data H Header
A R1 R3 R4 B
Network Network
Physical Physical
D3 H3
Datagram
D3 H3
Datagram
54
Communication at Transport layer
A Legend Source Destination D Data H Header B
Transport Transport
R1 R3 R4
Network Network
Physical Physical
D4 H4
Segment
D4 H4
Segment 55
Communication at Application layer
A B
Application Legend Source Destination D Data H Header Application
Transport Transport
R1 R3 R4
Network Network
Physical Physical
D5 D5
Message
D5 D5
Message 56
Addressing
57
Addresses in the TCP/IP protocol
58
Addresses in the TCP/IP
https://www.youtube.com/watch?v=oGoWqdlaOMI
http://www.ques10.com/p/21477/discuss-the-different-types-of-addresses-used-in-t/ 59
TCP Header
Port Address
Logical/IP Address
61
Frame-Header
MAC Address
62
Example
packet packet
discarded discarded
1 packet
87 10 Data accepted
87 10 Data
2 3
4
Physical
addresses
changed
95 66 A P Data 95 66 A P Data
33 99 A P Data
Physical
addresses
changed
The computer with logical address A and physical address 10 needs to send a
packet to the computer with logical address P and physical address 95. 64
Example
A Sender Receiver P
Data Data
a j Data a j Data
A P a j Data A P a j Data
H2 A P a j Data H2 A P a j Data
Internet
The sending computer is running three processes at this time with port
addresses a, b, and c. The receiving computer is running two processes at 65
this
time with port addresses j and k.
NAT Protocol
66
NAT Protocol
67
NAT Protocol
68
NAT Protocol- Mapping
69
Advantages of NAT
• The main advantage of NAT (Network Address Translation) is that it can prevent
the exhaustion of IPv4 addresses.
• • NAT (Network Address Translation) allows to use your own private IPv4
addressing system and prevent the internal address changes if you change the service
provider.
70
Disadvantages of NAT
• • Some technologies and network applications will not function as expected in a NAT
(Network Address Translation) configured network.
71
Internet security threats
Packet sniffing (analyse):
– the attacker reads all packets passing by
– can read all unencrypted data (e.g. passwords)
– e.g.: C sniffs B’s packets
A C
https://www.youtube.com/watch?v=0_SxSYyEvos 72
Internet security threats
Replay Attack:
– the attacker resends a sniffed packet to A.
– A might respond to payload again.
A C
A C
https://www.youtube.com/watch?v=rxN4zWTNSds 74
Internet security threats
Denial of service (DoS):
– flood of maliciously generated packets “swamp” a receiver
– Distributed DOS (DDoS): multiple coordinated sources swamp a
receiver
– e.g., C and remote hosts SYN-attack A
A C
SYN
SYN
SYN SYN SYN
B
SYN
SYN
75
Review,Summary, and PMP
76
Review & Summary
o Each network protocol is to provide one Function; While each
network security protocol is to provide one kind of Protection.
o There are four types of addresses to make sure that the network
communications can be successful for multiple users(devices) and
multiple applications(software) at the same time.
77
PMP: Practice Makes Perfect
o Briefly explain the need of having Port Number.
oAlice said that the header of IPV4 protocol is for security purpose.
Justify what Alice has said.
oAlice said that the replay attack is about the confidentiality. Justify
what Alice has said.
78
PMP: Practice Makes Perfect
o Briefly explain the need of having Port Number.
Multiple applications can enjoy communication within one network.
o Briefly justify the difference beteewn IP address and MAC address.
IP address is the logic address and used for communications over different
networks; While MAC address is the physical address and good enough for
communication within one local network.
o Alice said that the header of IPV4 protocol is for security purpose. Justify
what Alice has said.
False. The information is used to diliver data packets succseefully over
networks.
o Alice said that the replay attack is about the confidentiality. Justify what
Alice has said.
False. Replay attack allows the adversary to impersonate as a sender who
sends data to a receiver. So, it is more about integrity. 79
Network Security
CSCI368/968
1
Cryptography Basics
2
Types of Cryptography (High-Level View)
Cryptography
Classical Modern
kekd
ke=kd
Symmetric Public-key
3
Providing CIA
Confidentiality Encryption
Symmetric
Integrity Message Authentication
Codes
Public Key
4
Modern Cryptography Overview
5
1976 Modern Cryptography
1965 Computational
Complexity Theory
1960 Computer Networks
Classical Cryptography
6
Steganography vs Cryptography
• Steganography
– Also known as secret/covered writing
– Hiding secret messages in public ones
– Focused on hiding the presence of secret information, or
communication channel
• Cryptography (before 1976)
– The communication channel is public
– Focused on transforming cleartext (plaintext) to
ciphertext
7
8
Classical Cryptography
9
Cryptography
Cryptography (before 1883)
Cryptography = Encryption + Decryption
Cryptography (1883-1976)
Cryptography = Encryption + Decryption
• Main techniques
• Shift cipher
• Substitution cipher
• Transposition cipher
11
Shift Cipher
• Replace letters of a message by other distinct letters a fixed distance away
• Famous shift cipher: Caesar Cipher
• Shift by 3 letters
• reputedly used by Julius Caesar (100 – 44 B.C.)
• Plaintext: ATTACK AT DAWN
Ciphertext: DWWDFN DW GDZQ
A B C D E … X Y Z
0 1 2 3 4 … 23 24 25
12
Substitution Cipher
• A key is a random permutation of the alphabetic characters.
• E.g.
Key: 4312567
Plaintext:
attackpostponeduntiltwoam 4 3 1 2 5 6 7
A T T A C K P
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ O S T P O N E
D U N T I L T
W O A M X Y Z
14
1949 Shannon’S Work
15
Shannon’S Work
• Shannon joined Bell Labs to work on fire-control systems and
cryptography during World War II
One-Time Pad: K ⊕ M
• Secret key is as long as messages to be encrypted
• Each secret key will be used once only
• Choose secret key randomly.
1976 Modern Cryptography
1965 Computational
Complexity Theory
1960 Computer Networks
Classical Cryptography
18
Alan Turing and Turing Machine
19
• one of the most influential mathematicians of the 19th and
early 20th centuries.
20
In 1936, Turing published his paper "On Computable Numbers, with an Application to the
Entscheidungsproblem“
Turing Machine
21
Turing Machine
22
Turing Machine
23
Computers and Network
24
2.Networks
1960s
1.Computers
1940s
3. ATM
25
Bank Sever
26
What has happened next?
27
• Computer Networks need protection with cryptography (encryption
and decryption)
28
Bank Sever
29
2.Networks
1.Computers
3. Emails
30
Email Sever
31
However……
32
1976 Public-Key Cryptography
33
After 1976
• Symmetric-Key Encryption
• Asymmetric-Key Encryption
Cryptography
• Message Authentication Code
• Digital Signatures
• Hash Function
Cryptology
• Security Protocols
q Zero-Knowledge Proof
q Identification Protocol Cryptanalysis
q MPC
q Commitment
34
How to understand each cryptography?
35
Basic Concepts
• Algorithm Definition
• We use algorithms for providing security service
• Security Model
• Formally define what kinds of attacks it can resist.
36
Outline of Introduced Cryptography
• Service? (Confidentiality/Integerity)
38
Symmetric-Key Encryption
39
Symmetric-Key Encryption
C
M E D M
41
Types of modern symmetric ciphers
RC4
DES Stream
AES Block
Stream ciphers
Operate on the plaintext a single bit (or sometimes byte) at a time
Block ciphers
Operate on the plaintext in groups of bits. The groups of bits are called blocks.
Typical block size is 64 bits or multiple of it (e.g. 128 bits, 256 bits).
42
Block vs Stream Ciphers
43
Stream Ciphers
• Stream Ciphers convert plaintext to ciphertext by a
key stream.
C = c1 c2 ... = Ek1(p1) Ek2(p2) ...
• The simplest stream cipher
– Keystream generator: {ki}, i=1,2, ...n
– A stream of plaintext bits: {pi}, i=1,2,...,n
– Stream of ciphertext bits: {ci}, i=1,2,...,n
– Encryption: ci = pi ki
– Decryption: pi = ci ki
44
Stream Ciphers
• Security issues of stream ciphers
– The security depends entirely on the insides of the
keystream generator
• If the keystream is an endless stream of zeros, ...
• If the keystream is an endless random bits, we have a
one-time pad.
45
Block Ciphers
• A block of plaintext is encrypted as a whole to produce a
ciphertext block of equal length
100111
010110
100111 ciphertext
Encryption
plaintext 010010
110100
key 110110
46
Block Ciphers
avalanche effect:
47
Hash Function
48
Hash Functions
• A hash function (algorithm) is denoted by
h: {0, 1}* {0, 1}n
where n is a security parameter.
49
Hash Functions: Original Motivation
• A hash function (algorithm) is denoted by
h: {0, 1}* {0, 1}n
where n is a security parameter.
We want to use h(x) to represent x.
• Cryptographic computations on h(x) are much easier than
on x.
However, there exist different inputs x_1 and x_2 such that
y=h(x_1)=h(x_2).
So, will y represent x_1 or x_2? To avoid this, we make this become
computationally hard.
50
Cryptographic hash functions
51
Message Authentication Code
52
Message Authentication Code
54
What is message integrity
• Preventing unauthorised modification of data
• Different from error detection
– This is for unintentional modification of data (e.g., due to
noise)
• Both involve a checksum
– Integrity check value is based on the message and a secret
key
– Error correction/detection code does not use secret key
55
Message Authentication Code
• Transmitter and receiver share a secret key K. To transmit M, the transmitter
calculates a MAC and appends it to M, thus t=MACK(M).
MAC MAC
Oscar
• The receiver receives a message (M, t). It uses the key K and M to calculate
MACK(M) and compare it with t. If the two match, the received message is
accepted as authentic.
57
Public-Key Encryption
58
Public-Key Encryption
Note: More precisely, we should call this permutation instead of function, where the
function input and output are from the same space and a distinct input will generate
a distinct output.
60
Modular Arithmetic
• Define modulo operator
b = a mod n
to be the remainder when a is divided by n
61
RSA
• The RSA Public--Key Cryptosystem (Rivest, Shamir and
Adleman (1978)) is the most popular and versatile PKC.
62
The Textbook RSA
1. Choose two large primes p and q. Compute n = pq and m=(n)=
(p-1)(q-1).
• (n) is Euler’s totient function: It is the number of positive integers less than
n that are relatively prime to n.
2. Choose e, 1 e m - 1, such that gcd(e,m)=1.
3. Finds d such that ed=1 mod m.
• This is possible because of the choice of e.
• d is the multiplicative inverse of e modulo m and can be found using the
extended Euclidean (gcd) algorithm.
4. The Public key is (e, n).
The Private key is (d, n).
63
RSA Encryption and decryption
• When Alice wants to decrypt Y, she uses the private key and
calculates
X = Yd mod n
64
• Example: Choose p=11 and q=13.
n=11*13=143
m=(p-1)(q-1)=10*12=120
e=37 gcd(37,120)=1
65
The ElGamal Encryption
66
Generator of Zp*
67
Discrete Logarithm Problem
INPUT:
• Zp*
• g in Zp* , a generator of Zp*
• h in Zp*
Find the unique number a<p such that
h=ga mod p
• DL Assumption: There is no efficient algorithm to
solve DL problem.
• It is widely believed that this assumption holds.
68
The ElGamal Cryptosystem
• Key generation:
– Alice chooses a prime p and two random numbers g and u,
both less than p, where g is a generator of Zp* .
– Then she finds:
y = gu mod p
Alice’s public key is (p, g, y), her secret key is u.
69
• To encrypt a message X for Alice, Bob chooses a random
number k < p - 1. Then he calculates:
a = gk mod p
b = yk × X mod p
b Division means
X u mod p calculating the
a inverse mod p
70
Digital Signatures
71
Digital Signatures
• Sign(M, sk): Taking as input a message and a secret key sk, the
P.P.T. algorithm returns a signature denoted by S.
S←Sign(M, sk)
0/1 M t M
V S
Verification Signing
73
RSA Signature Scheme
• Key Generation:
– Generate primes P and Q, compute N = PQ
– Generate d and e such that de = 1 mod (P-1)(Q-1)
– Public Key (N, e)
– Private Key d
• SIGN:
– Given message m, compute s = md mod N
• VER:
– Given message m, signature s, check if m = se mod N
74
Hash-then-Sign
75
Identification (Protocol)
76
• Impersonation attack: An impersonation attack is an attack in
which an adversary successfully assumes the identity of one of the
legitimate parties in a system or in a communications protocol.
(Adversary logins as the identity Alice)
77
Schnorr Identification
79
Fast.
Symmetric Key Key establishment,
distribution and management
are problems though.
Slow.
Key authenticity and
Public Key efficiency are now
the problems.
Certificates &
Public Key
Infrastructures
Slow.
Key authenticity and
Public Key efficiency are now
the problems.
81
Review, Summary, and PMP
82
Review and Summary
• Symmetric-Key Encryption • Message Authentication Code
• Asymmetric-Key Encryption • Identification
• Digital Signatures • Authentication
• Hash Function
1965 Computational
1960 Computer Networks Complexity Theory
1883 Cryptography
1936 Turing Machine
Principle
Classical Cryptography 83
Practice Makes Perfect
o Briefly describe one scenario where asymmetric-key
encryption is needed (instead of symmetric one)
85
Practice Makes Perfect
o “Alice and Bob are using message-authentication code
for security protection. They should know each other.”
Justify this statement.
86
Practice Makes Perfect
oAlice says “We can use hash function to encrypt
messages into H(m) and then decrypt m from H(m) ”.
Justify what Alice said.
87
END
88
Network Security
CSCI368/968
1
Authentication and Key Establishment
Protocols
2
Outline
3
Network security protocols
• Examples:
– Identification
– Key exchange
– E-voting
– E-payment
– E-auction
– ……
4
Protocol VS Scheme
5
Protocol
• Authentication:
1. Verify the integrity of data
2. Verify the integrity of identity (Identification)
Motivation: Alice wants to authenticate Bob first, who wants
to communicate with Alice.
7
Common attacks
• Eavesdropping attack
– The attacker captures the information sent in the protocol.
• Replay attack
– The adversary records information seen in the protocol, and then
sends it to the same, or a different, entity, possibly during a later
protocol run.
• Man-in-the-middle attack
– The attacker alters the information sent in the protocol.
• Reflection attack
– The adversary sends protocol messages back to the entity who
sent them
• Known-(session)key attack
– The adversary obtains the key of one communication session, and
uses it to attack another session
• …… 8
Security Assumptions
• Assumption 1: what can do
The adversary is able to eavesdrop, modify, re-route,
insert messages during the execution of a protocol.
• Assumption 2: who A is
The adversary may be a legitimate protocol participant
(an insider), or an external party (an outsider), or a
combination of both.
9
Security Assumptions
• Assumption 3: know partial secrets
The adversary is able to compromise some past
communication sessions
10
Authentication
11
Entity Authentication
• Entity authentication - Definition
– … is the process whereby one party (Alice) is assured of the
identity of a second party (Bob) involved in a protocol, and
that the second has actually participated (i.e., is active at, or
immediately prior to, the time the evidence is acquired).
--- Handbook of applied cryptography (Menezes et al.)
12
A Simple Example
13
An Improved Scheme
14
Improved Scheme II
Client Ns Server
username, pw username, pw
Username, H(pw, Ns)
15
Entity Authentication Approaches
• Password based
• Token based
• Biometric based
16
TFA: Two pieces of evidence are used for an authentication mechanism
• Password
• Biometrics
• Mobile Phone
17
Two pieces of evidence are used for an authentication mechanism
18
Password+ •Smart Card (connected): needs a secure reader
19
Two pieces of evidence are used for an authentication mechanism
20
Without keypad, H(K, time) With keypad, H(K, R)
• A unique and random key is installed in each device.
• Each device also have a serial number.
• The producer(server) knows the random key for each SN.
21
Passoword + Google Authenticator
22
Notations
• A – Alice
• B – Bob
• E – Eve
• EB : E impersonating B
• i : step i of a protocol session
• i’ : step i of a concurrent/parallel protocol session
24
Entity Authentication
25
Entity Authentication
TB : a timestamp
26
Key Establishment
27
Key Establishment
28
Key Establishment Goals
• The shared session key is a good key for A to use
with B only if A has assurance that:
29
Key Establishment Protocols
• There are two main categories of key establishment:
• Key agreement has become much more popular than key transport in
recent years.
• There is an intuitive feeling that key agreement is 'fairer' than key
transport, and
• Can result in higher quality random keys than key transport.
--
31
Key Transport
(SKA,PKA) PKA
Alice Bob K
K
YB = E(PKA, K)
32
Diffie-Hellman Key Agreement
33
Diffie-Hellman Key Agreement
• The Protocol:
– Alice selects a secret XA, for XA Zp, and computes her
public key YA = gXA mod p.
– Bob selects a secret XB, for XB Zp, and computes his public
key YB = gXB mod p.
– Alice sends YA to Bob.
– Bob sends YB to Alice.
– Alice computes the shared secret key K = YBXA mod p.
– Bob computes the shared secret key K = YAXB mod p.
K = ���∗�� 34
Diffie-Hellman Key Agreement
• The Protocol
Alice Bob
XA YA
DH DH K =YAXB
YB XB
K=
XA, g, p XB, g, p
YBXA
1: A B: YA = gXA mod p
2: B A: YB = gXB mod p
35
Diffie-Hellman Key Agreement
• Man-in-the-Middle Attack
Eve
Alice Bob
XE
XA YA Y K’’=YEXB
E
DH DH
YB XB
K’=YEXA Y
XA, g, p E
XB, g, p
K’=(YA)XE K’’=(YB)XE
1: A E: YA
2: E B: YE
How to solve the problem?
3: B E: YB (hint: authentication)
4: E A: YE
36
Key Agreement
37
Authenticated Key Establishment (AKE)
Protocol
msg 1
msg 2
msg 3
Alice …… Bob
K K
38
Symmetric-key Based AKE
long-term key
Alice Bob
K K
Question: why not simply use the long-term key as the session
key? 39
Why session keys: Fresh Response and More (Different each time)
n ....limit the amount of ciphertext available under a
single key.
40
Public-key Based AKE
long-term key
msg 1
(PKA, SKA) (PKB, SKB)
msg 2
msg 3
Alice Bob
K K
session key
1: A B: A, YA
2: B A: B, YB, SigB(YB, YA)
3: A B: SigA(YA, YB)
42
An unknown key share attack
A E B
A, YA
E, YA
SigA(YA, YB)
SigE(YA, YB)
• Protocol IV
1: A B: “I’m Alice”, NA
2: B A: “I’m Bob", SigB(“I’m Bob”, A, NA)
44
Diffie-Hellman Revisited
1: A B: A, YA
2: B A: B, YB, SigB(A, YB, YA),
3: A B: SigA(B, YA, YB)
• ISO/IEC IS 9798-3
1: A B: EPKB(A, B, KA)
2: B A: EPKA(B, A, KB)
Shared key K = Hash(KA,KB)
No forward secrecy!
46
Key Transport
(SKA,PKA) PKA
Alice Bob K
K
YB = E(PKA, K)
Forward Secure?
47
Brief Summary
• Key aggrement is better than key tranport
• Key Agreement (Man-in-the-middle attacks work?)
• Authenticated Key Agreement
• Authenticated Key Agreement + Session Key
49
Password-based Protocols
• The following Encrypted Key Exchange (EKE) protocol can
resist the off-line dictionary attack:
50
Review, Summary, and PMP
51
Review and Summary
o Authentication and nounce
o Key Establishment
o Key Transport
o Key Agreement/Exchange
54
PMP
oWhat is the benefit of key agreement compared to key
transport?
55
PMP
o What is the motivation of using session key instead of
long-term key?
56
PMP
o Briefly describe how MITM attack works on the DH.
57
PKI
58
Outline
59
Motivation (We have a Problem)
60
Digital Signatures
Alice generates a key pair (pk,sk). pk is public key and published to all
others, while sk is secret and only known by Alice.
Alice Bob
(pk,sk,m) pk
m, Sign(sk,m)
The data that Alice sent to Bob cannot be modified by the adversary.
Bob only needs to know that pk belongs to Alice (no need to share a secret key!)
In Public-key encryption and digital signatures, we assume that an entity pre-knows the public
key of another entity.
30 82 01 0a 02 82 01 01 00 dd 9e e4 f6 88 b5 0d d7 a1 5f bc 25 6e cc 44 14 cf 34 e2 b5 73 09 1e e4 4b 12 52 38 95 36 1a
c6 66 ed f0 c8 03 c9 b3 43 45 4e 0d 6a 92 4b 1b eb 94 60 5b 11 b9 15 79 b1 a5 f6 fc 5d bf a4 30 59 84 02 dd 3f 6d 21 6a
44 b7 18 1c 24 fc f5 02 2e 87 0c 20 3e c6 c5 b6 9f ad 16 1b 76 86 e9 73 9c 8d 31 60 3a a0 f0 2f da ad 8e f6 74 c9 81 d3 ea
f7 5d ab 5d bb 05 63 b0 78 55 ed 72 13 a4 42 43 72 23 73 c0 de 33 9b 44 5c 89 a9 8a 90 d1 99 be bc f7 21 21 5f fb 22 8a
5c 50 b9 69 7c dc 87 92 ed 79 56 ed 32 55 41 9f af 41 f6 da d4 70 88 e9 a3 41 1d 66 9f a6 98 d2 7e 5b a9 52 38 1c 56 b4
cc 45 62 72 0c c7 f7 ef 2c 47 0a 3b 1a 7a ac e7 ae a9 a8 1e 98 43 b0 58 56 e9 41 44 72 e6 da 67 1c d7 b6 f4 e6 b4 90 5c
b5 0a 98 b3 23 0c e7 35 6d 10 14 73 0e 94 5d 7c 4e 0a 18 f4 05 20 67 9f 02 03 01 00 01
Alice Bob
(pk,sk,m)
M
This is not secure!!!! (because the public key could be replaced by the adversary.)
Digital Certificate:
64
Digital Certificate
C
Bob Alice
65
Digital Certificate
C
Bob Alice
o Bob trusts what C will say and pre-knows that pk* belongs to C.
o Bob can input (m, S) and pk* to verify that “pk belongs to Alice”
66
Digital Certificate: More than One Trust
C
D
Bob
Bob Alice
o Revocation: Alice found that her sk was stolen before the expiracy
time Y and need to revoke it in use.
68
69
70
Public Key Infrastructure (PKI)
71
Public Key Infrastructure (PKI)
RFC 4949 (Internet Security Glossary) defines public-key
infrastructure (PKI) as the set of hardware, software,
people, policies, and procedures needed to create, manage,
store, distribute, and revoke digital certificates based on
asymmetric cryptography.
So
q Digital Certificate is a “Mechanism”, while
q PKI is a security service/protocol.
72
Public Key Infrastructure (PKI)
73
Public Key Infrastructure (PKI)
■End entity: A generic term used to denote end users, devices (e.g., servers, routers), or any
other entity that can be identified in the subject field of a public-key certificate. End entities
typically consume and/or support PKI related services.
■ Certification authority (CA): The issuer of certificates and (usually) certifi_x0002_cate
revocation lists (CRLs). It may also support a variety of administrative functions, although these
are often delegated to one or more Registration Authorities.
■ Registration authority (RA): An optional component that can assume a num_x0002_ber of
administrative functions from the CA. The RA is often associated with the end entity registration
process but can assist in a number of other areas as well.
■ CRL issuer: An optional component that a CA can delegate to publish CRLs.
■ Repository: A generic term used to denote any method for storing certificates and CRLs so
74
that they can be retrieved by end entities.
Certificate Revocation List (CRL)
• A CRL is a way of telling users about revoked certificates.
75
https://www.entrust.net/customer/crlchecker
Certificate Access
• PK certificates will typically be stored in repositories
and accessed as required.
76
Certificate Repositories in Firefox
77
X.509 Based PKI
78
X.509 Certificate(Standard)
• X.509 defines a structure for PK Certificates.
79
X.509 Certificate(Standard)
80
X.509 Certificate(Standard)
81
X.509 Certificate(Standard)
Subject: The name of the user to whom this certificate refers. That is,
this certificate certifies the public key of the subject (user) who holds
the corresponding private key.
83
X.509 Certificate(Standard)
X.509 was initially issued in 1988. X.509 is an important
standard because the certificate structure and
authentication protocols defined in X.509 are used in a
variety of contexts. For example,
• S/MIME
• IP Security
• SL/TLS
84
X.509 Certificate(Standard)
• A CA assigns a unique name to each user and issues a signed
certificate, often name is the URL or email address.
• CA’s are connected in a tree structure. Each CA issues a
certificate for those beneath it.
• CA can issue certificates to other CA’s vouching for their
PK’s and vouching for their trustworthiness as CA’s.
• Users can then obtain certificates from one of the delegated
CA’s instead of having to go to the trust anchor CA.
85
Delegated CA’s (Centralized Trust)
86
PGP Based PKI
87
PGP Certificate
• Pretty Good Privacy (PGP) was created by Phil Zimmerman
and implemented as a product (for email security) first released
in 1991. It was made available free of charge and became quite
popular for personal use.
• The initial PGP protocol was proprietary and used some
encryption algorithms with intellectual property restrictions.
90
Anarchy (Decentralized Trust)
• No centralised CA
• Used by PGP.
• Each user is responsible for configuring some trust
anchors, eg. PK’s of people he has met and who have
handed him a business card with a PGP fingerprint (the
message digest of the PK).
91
Web of Trust
92
PGP
• OpenPGP does not include the sender’s public key with each message,
so it is necessary for recipients of OpenPGP messages to separately
obtain the sender’s public key in order to verify the message.
• Many organizations post OpenPGP keys on TLS-protected websites:
People who wish to verify digital signatures or send these organizations
encrypted mail need to manually download these keys and add them to
their OpenPGP clients.
• Keys may also be registered with the OpenPGP public key servers,
which are servers that maintain a database of PGP public keys organized
by email address. Anyone may post a public key to the OpenPGP key
servers, and that public key may contain any email address. There is no
trust, so users must use the Web-of-Trust to decide whether to trust a
given public key.
93
Review, Summary and PMP
94
Review and Summary
• pk is a random string and certificate mechanism help users
identify the ownership of a public key.
• Certificate is some kind of digital signatures signed by trust
like CA or known individuals or organizations.
• PKI is a security protocol having lots of important services
like certificate revocation.
95
PMP
o Briefly describe the problem of certificate without
revocation.
96
PMP
o Briefly describe the problem of certificate without
revocation.
Answer: The certificate is to prove the ownership of a
public key. If a user’s secret key is stolen, he/she need
to generate a new one and disable the old one.
o What are the difference of certificate generator in
X.509 and in PGP?
Answer: In X.509, certificate is generated by an entity
who can be trusted by all users. In PGP, certificate is
generated by an entity who knows pk and its owner.
97
END
98
Network Security
CSCI368/968
1
Outline
2
Centralized Authentication & Key-Distribution
3
Motivation
oAlice and Bob would like to have a secure
communication.
• Must be online....
7
Centralised Approach (Two Models)
• User → Authentication Server:
– Pls give me something as the proof to show to server that I am
Alice.
– Service Server verifies Alice directly.
9
NTLM Protocol
In a Windows network, NT (New Technology) LAN Manager
(NTLM) is a suite of Microsoft security protocols intended to
provide authentication, integrity, and confidentiality to users
10
NTLM: Server contacts AS
11
NTLM
Auth.
Server
E Ks (Yes/no)
E Ks (U,C,R)
C
User Server
(U) R = E Hash(pwd)(C) (S)
Yes/no
13
Needham-Schroeder protocol
• The Needham–Schroeder protocol is the key
transport protocol intended for use over an insecure
network, proposed by Roger Needham and Michael
Schroeder.
3. Alice sends the ticket to Bob (who then has the session key).
4. Bob acknowledges receiving the session key.
5. Alice responds.
KDC
1
2
3
A 4 B
5
15
Needham-Schroeder protocol
1. A KDC: A, B, NA
2. KDC A: EKA( NA, B, KAB, EKB(KAB, A))
3. A B: EK (KAB, A)
B
4. B A: EK (NB)
AB KA, KB
5. A B: EK (NB+1) KDC
AB
1
2
3
NX: Nonce A 4 B
KA 5
KB
16
Needham-Schroeder protocol
17
Modified Needham-Schroeder protocol
1. A KDC: A, B, NA
2. KDC A: EKA( NA, B, KAB, T, EKB(KAB, A, T))
3. A B: EKB(KAB, A, T)
4. B A: EKAB(NB)
5. A B: EKAB(NB+1)
KA, KB
KDC
1
2
3
A 4 B
KA 5
KB
18
Modified Needham-Schroeder protocol
19
Kerberos Protocol
20
Kerberos
22
Kerberos (Two keys)
23
Kerberos Architecture
Kerberos
24
Kerberos Operation Overview(HighLevel)
• Once per user logon session:
– (1) C AS: IDC, IDtgs
– (2) AS C: E(KC, Kc,tgs), Tickettgs
25
Step 1: Client requests…
26
Step 2: AS responds…
27
Step 3: Ticket Granting request
29
Step 5: Client request (of server)
C V: TicketV, AuthenticatorC
AuthenticatorC = EKc,v[IDC, ADC, TS5]
V C: EKc,v[TS5 + 1]
31
Kerberos Protocol V4
32
Kerberos V4 Limitations
• Encryption: V4 uses DES only. V5 allows any encryption method.
• Restricted ticket lifetime: V4 uses an 8 bit lifetime, for a maximum
of about 21 hours. V5 allows the specification of start and end times.
• Authentication forwarding: V4 does not allow credentials issued to
one client to be forwarded to another host. Consider the following
example of when this might be desirable: A client issues a request to a
print server that then accesses the client’s file from a file server, using
the client’s credentials.
• Double encryption of the tickets in steps two and four. This is
unnecessary and inefficient.
• Offline dictionary attack: The message from the authentication
server to the client (step 2) can be captured. A password attack
against it can be launched where success occurs if the decrypted result
is of an appropriate form.
33
Kerberos V5
1: C AS: Options, IDC, RC, IDtgs, Times, N1
35
Review, Summary, and PMP
36
Review
• Without pre-sharing keys, any two parties (known as
Client and Server) in a group can secure communication
with the help of a centralised TTP (Authentication Server).
• Who will contact the TTP/AS?
37
Summary: How to Understand a Protocol?
38
PMP
• In this protocol, if A and B have secure communications.
Can we set C=1 for all authentications?
39
PMP
• In this protocol, if A and B have secure communications.
Can we set C=1 for all authentications?
Answer: NO. Otherwise, Bob can impersonate as Alice to
communicate with C (Another service server).
40
NS Protocol
• In this protocol, what is the purpose of computing
41
NS Protocol
• In this protocol, what is the purpose of computing
Answer: Make sure that B know who the client is and can
get the session key K_AB for secure communication.
42
END
43
Network Security
CSCI368/968
1
Background
• Bob sends a message M to Alice
2
Background
Internet
• C-S Security Internet
• S-S Security
3
ONE Question
An application (version 1) requires communication but it is
insecure. What should we do to have a secure V2?
Transport
Data Link
Physical
5
Topic 7
6
Outline
q Email
q PGP
q S/MIME
• This ensures that the email is universal and works for all
users.
8
Email Protocols
9
Email Protocols
SMTP Protocol
• SMTP stands for Simple Mail Transfer Protocol. SMTP is the principal email protocol
that is responsible for the transfer of emails between email clients and email servers.
POP Protocol
• POP stands for Post Office Protocol. Email clients use the POP protocol support in the
server to download the emails. This is primarily a one-way protocol and does not sync
back the emails to the server.
IMAP Protocol
• IMAP stands for Internet Message Access Protocol. IMAP Protocol is used to sync the
emails in the server with the email clients. It allows two-way sync of emails between the
server and the email client, while the emails are stored on the server.
10
Email Protocols
11
Email Protocols (SMTP)
12
Email Protocols (SMTP)
13
Email Protocols (POP)
16
Email Protocols (IMAP)
17
Email Protocols (IMAP VS POP)
18
Email Protocols (IMAP)
• C: a001 login username password
• S: a001 OK LOGIN completed
• C: a002 select inbox
• S: * 18 EXISTS
• S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
• S: * 2 RECENT
• S: * OK [UNSEEN 17] Message 17 is the first unseen message
• S: * OK [UIDVALIDITY 3857529045] UIDs valid
• S: a002 OK [READ-WRITE] SELECT completed
• C: a003 fetch 12 full
• S: * 12 FETCH (FLAGS (\Seen) INTERNALDATE "17-Jul-1996 02:44:25 -0700"
• RFC822.SIZE 4286 ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)"
• "IMAP4rev1 WG mtg summary and minutes"
• (("Terry Gray" NIL "gray" "cac.washington.edu"))
• (("Terry Gray" NIL "gray" "cac.washington.edu"))
• (("Terry Gray" NIL "gray" "cac.washington.edu"))
• ((NIL NIL "imap" "cac.washington.edu"))
• ((NIL NIL "minutes" "CNRI.Reston.VA.US")
• ("John Klensin" NIL "KLENSIN" "MIT.EDU")) NIL NIL
• "<[email protected]>")
• BODY ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL NIL "7BIT" 3028
• 92))
• S: a003 OK FETCH completed
19
Email Protocols (MIME)
• SMTP protocol was designed for purely ASCII text-based, it did not
deal well with binary files, or characters in many non-English
languages.
20
Email Protocols (MIME)
■ RFC 822 (for SMTP) emails contain only ASCII characters.
■ MIME messages are intended to transport arbitrary data.
■ Lack of Integrity
- Both the header and content can be modified.
■ Lack of Authentication
- The sender of an email is also forgeable.
24
2. PGP Overview
Basically, PGP provides confidentiality and authentication services
to enhance the security for email transmission and storage.
26
2. PGP Overview
Operational Description
- Authentication
- Confidentiality
- Confidentiality and Authentication
- Email Compatibility (encoding)
- Segmentation and Reassembly
Email Compatibility:
■ PGP needs to convert the raw 8-bit binary stream into a stream
of printable ASCII characters under SMTP.
39
RFC 822
■ S/MIME (Secure/Multipurpose Internet Mail Extensions)
- A security enhancement to MIME email
- based on technology from RSA Data Security
- specified by RFCs 3369, 3370, 3850 and 3851.
S/MIME
- Functions
- Algorithms
- Processing
- Certificate management
S/MIME
EnvelopedDataPK
header
CS object
SignedData S/MIME
PKCS object header
SignerInfo:
Hash S/MIME body:
PUa, signature,
and algorithms
Sign etc. Base64 encoded
Base64 PKCS
object
MIME
MIME
entity
entity
48
Review
oBackground: SMTP, POP, IMAP, MIME
oPGP
oS/MIME
oConfidentiality or Integrity
49
Summary
PGP S/MIME
On SMTP MIME
Useage Personal Enteroprise
https://security.stackexchange.com/questions/7874/how-does-
pgp-differ-from-s-mime
1/22/2024 Network Security 50
PMP
Question 1: Bob is runing an SMTP protocol to send
an email to Alice. What can the adversary see if it
serves as the server between Alice and Bob?
51
PMP
Question 1: Bob is runing an SMTP protocol to send
an email to Alice. What can the adversary see if it
serves as the server between Alice and Bob?
52
PMP
Question 2: Alice runs PGP to send a secure email to
Bob. While Bob runs POP to dowload the email. Can
the adversary see the email contents if POP has no
security protection?
53
PMP
Question 2: Alice runs PGP to send a secure email to
Bob. While Bob runs POP to dowload the email. Can
the adversary see the email contents if POP has no
security protection?
Answer: No. The email that Bob is downloading has
been encrypted by Alice. The adversary can only see
ciphertext from the POP protocol.
54
Topic 8
55
Secure SHell (SSH)
SSH Overview
• SSH = Secure Shell
– Initially designed to replace insecure rsh, telnet utilities.
– Secure remote administration (mostly of Unix systems).
– Latter, provide a general secure channel for network
applications.
– Only covers traffic explicitly protected.
– Applications need modification, but port-forwarding eases some
of this
SSH Overview
SSH Protocol Stack
SSH-2 Architecture
xs xc xs
K=y c =g (mod p).
SSH Transport Layer Protocol
Diffie-Hellman Key Exchange
to Client.
SSH Transport Layer Protocol
Key Derivation
• After the key exchange, both Server and Client obtain two
common values:
– a shared secret value K , and
– an exchange hash value H.
Login
server
UM User’s Mail
machine server
Web
server
SSH Port Forwarding
With SSH and port forwarding.
Mail
server
UM User’s SSH-enabled
machine Login
Web
server
server
Port A
SSH is runing
All data sent to port A will be sent to another device via SSH channel
SSH Port Forwarding (Application)
Two computers using firewalls to block all port numbers except SSH.
example
it will connect to local machines port 8080, which ssh will forward on
to remote ssh, and it will then make a request to 127.0.0.1:80. Note
127.0.0.1 is actually the remote server's localhost, but it could have
been a host/IP available at the remote machine's network.
SSH Port Forwarding (Remote)
Asks ssh to create a listening port on the remote machine which it
will forward back (Reverse) to the local ssh to forward on.
So, after ssh connects to webserver, the remote ssh creates and lsitens
on a port 10123. A process on webserver connecting to 10123, ssh
will pick it up and send it back to the local machine's ssh, which sends
it on to 127.0.01:123 port.
- alert
- Handshake
- change_cipher_spec
- application data
- The change cipher spec message is sent by both the client and
server to notify the receiving party that subsequent records will
be protected under the newly negotiated CipherSpec and keys.
■ Alert Protocol:
- Used to convey TLS-related alerts to the peer entity. Tell the
other party that something wrong is happening.
>=
1: A B: A, YA
2: B A: B, YB, SigB(A, YB, YA),
3: A B: SigA(B, YA, YB)
101
Key Transport
(SKA,PKA) PKA
Alice Bob K
K
YB = E(PKA, K)
102
Handshake Protocol
■ Key exchange methods supported by TLS1.2:
- RSA: Client encrypt a secret with server’s RSA public key.
- Anonymous DH: No authentication (without certificates).
- Fixed DH: Server has an authorized DH key, while client
may or may not have an authorized DH key.
- Ephemeral DH: Use one-time DH keys, which are signed by
the senders using RSA or DSS.
Handshake Protocol
• ClientHello
– Contain protocol version, client nonce as well as the
client’s list of preferred ciphersuites
• ServerHello
– Contain chosen protocol version, server nonce as well as
the chosen ciphersuite
More on Cipher Suites
• Format of a typical cipher suites:
– key exchange algorithm_authentication (signature)
algorithm_symmetric encryption algorithm_MAC
algorithm
• Some key exchange algorithms: RSA, DH, ECDH, ECDHE
• Some authentication algorithms: RSA, DSA, ECDSA
• Some symmetric encryption algorithms: AES, 3DES, CAMELLIA (old)
• Some MAC algorithms: SHA, MD5
• Sometimes key length is specified.
105
More on Cipher Suites
• Example : TLS_DHE_RSA_WITH_3DES_CBC_SHA
– The key exchange algorithm: DHE
– The authentication algorithm: RSA
– The symmetric encryption algorithm: 3DES_CBC
– The MAC algorithm: SHA
• Example: TLS allocates ID for each cipher suite.
106
Handshake Protocol
• Server Certificate
– Required when server authentication is needed
– X.509 certificate for one of the following type (depending
on the key exchange method)
• RSA Encryption Key
• Fixed Diffie-Hellman Public Key
• Digitial Signature Public Key
Handshake Protocol
• Certificate Verify
– Required when client has a certificate for RSA/DSS
signature
– Client signs all the handshake messages it has sent and
received previously
Handshake Protocol
MS (48 bytes)
PMS: Pre-Master Secret
MS: Master Secret
Nc: ClientHello.random
Ns: SeverHello.random
MS MS MS …
key-block …
■ master_secret=
PRF(pre_master_secret, ‘master secret’, client_random||server_random)
■ key-block=
PRF(master_secret, ‘key expansion’, server_random||client_random)
■ Session resumption
It allows client and server to use an abbreviated
handshake to resume a previously established session.
– More efficient than a full handshake
– Only to re-establish the encryption and MAC keys with
new server nonce and client nonce
HTTPS
HTTPS (HTTP over SSL/TLS)
• use https:// rather than http://
and port 443 rather than 80
• encrypts
URL, document contents, form data, cookies, HTTP headers
119
Review and Summary
oSSH
oClient doesn’t need to pre-share a secret key with the server.
oClient does need to pre-know the public key of the server.
oTLS/SSL
oClient doesn’t need to pre-share a secret key with the server.
oClient doesn’t need to pre-know the public key of the server
with the help of certificate
o All applications (software) need (different)
modification (part of rewriting) to enjoy protections
from SSH or TLS.
120
PMP
• Question 1: Devices A and B are running SSH
protocol. It must be that an admin is trying to connect
to server for remote administration purpose.
121
PMP
• Question 1: Devices A and B are running SSH
protocol. It must be that an admin is trying to connect
to server for remote administration purpose.
122
PMP
• Question 2: In the handshake protocol, what will the
client and server (not) know after the protocol if the
client doesn’t have a certificate?
123
PMP
• Question 2: In the handshake protocol, what will the
client and server (not) know after the protocol if the
client doesn’t have a certificate?
124
Network Security
CSCI368/968
1
Topic 9
2
3
IP Security
IP Security Overview
LAN
LAN
ESP ESP
AH (encr.) (encr.+auth.)
Access control
Connectionless integrity
Data origin auth.
Anti-replay
Confidentiality
Limited traffic flow conf.
TCP/UDP Before AH
IP header Payload
header
IPSec AH TCP/UDP
IP header Payload After AH
header header
14
AH in Tunnel mode IPv4
TCP/UDP Before AH
IP header Payload
header
22
IPSec Policy Based Approach
Network Security
Security Associations (SA)
31
IPSec Internet Key Exchange (IKE)
Protocols
o Confidentiality&Authenticity OR Authenticity
o IPSec Policy
39
PMP
Question 1: Computer A and Computer B are running
the IPSec protocol. Alice said that the adversary must
not be able to see communicated messages. Justify
what Alice said.
40
PMP
Question 1: Computer A and Computer B are running
the IPSec protocol. Alice said that the adversary must
not be able to see communicated messages. Justify
what Alice said.
41
PMP
Question 2: Computer A is running the IPSec
protocol. All messages sent from A to outside have
security protections.
42
PMP
Question 2: Computer A is running the IPSec
protocol. All messages sent from Alice to outside
have security protections.
43
44
Outline
Transport
Internet
Data Link
Physical
45
Outline
46
Background of Wireless Networks
– Infrastructure mode.
– Ad hoc mode.
Infrastructure Mode
55
Security in Wireless Networks
56
Threats against Wireless systems
Types of Threats:
• Eavesdropping.
• Communications jamming.
– Denial of Service (DoS) jamming.
• Injection and modification of data.
– Man-in-the-Middle Attacks.
• Rogue Access Point.
• Cryptographic threats.
1
Eavesdropping
Listening in on communications.
Communications Jamming
M ICV
XOR
keystream RC4(v, k)
v ciphertext
transmitted data
WEP Encryption process
• 802.1x Authentication
– Port-based Network Access Control
– Extensible Authentication Protocol (EAP).
• 802.1x Authentication
– Port-based Network Access Control
– Extensible Authentication Protocol (EAP).
XOR
keystream RC4(v, k)
v ciphertext
transmitted data
How does it work?
89
WPA-Personal (WPA-PSK):
This mode is appropriate for most home networks. When a password is set on a
wireless router or an access point (AP), it must be entered by users when
connecting to the Wi-Fi network.
93
Review and Summary
o Wireless local area network (WLAN) links two or more devices
over a short distance using a wireless distribution method,
usually providing a connection through an access point (AP)
for internet access.
1
Mobile IP
T u n n el !!! X
1.0.0.0/24 1.0.0.254 2.0.0.254 2.0.0.0 2.0.0
a
home internet foreign
UOW Router MARS
Router
1 2
C
Home Agent foreign Agent
1.0.0.4
5.MN is gone!
6. The home agent updates Its new address
their binding list. Is 2.0.0.254
Z
MN 2.0.0.3 MN
1.0.0.1 1.0.0.1
Attacker
3.0.0.254
Internet
Attacker
3.0.0.254
Internet
(Removed)
The mobile environment
Authentication Mobile
Server station
Mobile
station
Mobile
station
Mobile System Security
• 2/…/5G telecommunication systems
• Security issues:
– Authentication
– Confidentiality
– Integrity
– Anonymity
GSM Authentication and Key Agreement
38
Review and Summary
• Mobile IP uses two addresses: Home addres and
Care-of address.
• The motivation of having mobile IP?
• Benefits of this technique: seamless roaming when
changing the local area network.
39
PMP
Question 1: Alice wants to send a message to Bob.
When using the mobile IP protocol, does Alice need to
know where Bob is currently located?
40
PMP
Question 1: Alice wants to send a message to Bob.
When using the mobile IP protocol, does Alice need to
know where Bob is currently located?
41
PMP
Question 2: Can A5 be a hash function?
42
PMP
Question 2: Can A5 be a hash function?
Answer: No. Otherwise, MS cannot get TMSI for
future communication.
43
END of Lectures
44
Revision
45
Key Establishment + Centralized Authentication
WEP,WPA
46
Exam Questions (Like A2 and PMP)
• Understand why security protocols were designed in this way (to resist
a serial of attacks)
47
Questions
1- 2 sentences = 1 Mark
48