Network Security Concepts and Mechanisms
Network Security Concepts and Mechanisms
Network Security Concepts and Mechanisms
mechanisms
Chapter 4
1
Web Security Threats
- Bob’s private
K
B key
7
Modular Arithmetic
• Most of the public key algorithms are based
on modular arithmetic.
• Modular arithmetic uses the non-negative
integers less than some positive integer n,
performs ordinary arithmetic operations such
as addition and multiplication, and then
replaces the result with its remainder when
divided by n.
• The result is said to be modulo n or mod n.
• Ciphertext C = Me (mod n)
• Plaintext: M = Cd (mod n)
31
IPSec Services
• IPSec uses two protocols to provide security:
1. Authentication Header (AH): an
authentication protocol.
2. Encapsulating Security Payload (ESP): a
combined encryption and authentication
protocol.
32
Transport vs. Tunnel Mode
• AH and ESP support two modes:
Transport and tunnel.
1. Transport Mode:
>Protection extends to the payload of an IP
packet.
>Used for end-to-end communication between
two hosts (client and server, or two
workstations).
33
Transport vs. Tunnel Mode
2. Tunnel Mode:
>Provides protection to the entire IP packet.
>After AH or ESP fields are added, the entire
packet plus security fields are treated as a
payload of a new IP packet.
>A new IP header is attached.
34
End-to-end versus End-to-Intermediate
Authentication
35
Transport vs. Tunnel Mode
• Both AH and ESP have two modes
1. Transport mode:
>Encryption is provided directly between two
hosts.
>Packet header is not encrypted.
>Protection extends to the payload of an IP
packet.
36
Transport vs. Tunnel Mode…
2. Tunnel Mode:
>Entire packet is treated as a payload of a new
IP packet.
>A new IP header is attached.
>The new IP packet is tunneled from one
gateway to another.
>Hosts avoid implementing security capabilities.
37
Transport Mode ESP
• Used to encrypt and authenticate (optional)
data in an IP packet.
• In IPv4:
>ESP header is inserted after the IP header.
>ESP trailer (Padding, Padding length, Next
Header) is placed at the end of the packet.
>If authentication is used, authentication data is
put after the ESP trailer.
38
Transport Mode ESP…
• In IPv6:
>ESP header is inserted after the IP header and extension
headers.
>ESP trailer (Padding, Padding length, Next Header) is
placed at the end of the packet.
>If authentication is used, authentication data is put after
the ESP trailer.
>Encryption covers: entire ciphertext.
>Authn. Covers: ciphertext + ESP header.
39
ESP Encryption and Authentication
40
Tunnel Mode ESP
• Entire IP packet is encrypted.
• A new IP header is used to help routing.
• In IPv4:
>ESP header is inserted after the new IP header.
>ESP trailer (Padding, Padding length, Next Header) is
placed at the end of the packet.
>If authentication is used, authentication data is put
after the ESP trailer.
41
Tunnel Mode ESP…
• In IPv6:
>ESP header is inserted before the original IP header.
>ESP trailer (Padding, Padding length, Next Header) is
placed at the end of the packet.
>If authentication is used, authentication data is put
after the ESP trailer.
>Encryption covers: entire ciphertext.
>Authn. Covers: ciphertext + ESP header.
42
ESP Encryption and Authentication
43
II. SSL Architecture