Lect. 06
Lect. 06
CN 316
Networks Security
Fall 2024/2025
Processes communicating
Fall 2024/2025
Sockets
process sends/receives messages to/from its socket
socket similar to door
◦ sending process shoves message out door
◦ sending process relies on transport infrastructure on other
side of door to deliver message to socket at receiving
process
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
Fall 2024/2025
Addressing processes
Fall 2024/2025
Fall 2024/2025
❖ widely
deployed security ◦ web-server authentication
protocol ◦ optional client authentication
▪ supported by almost all ◦ minimum hassle in doing
browsers, web servers
business with new merchant
▪ https://
available to all applications over
▪ billions $/year over SSL
TCP
❖ variation -TLS: transport layer
◦ secure socket interface
security, RFC 2246
◦ most widely: HTTPS, TCP
❖ original goals:
port 443
▪ web e-commerce ◦ but also: FTPS, SMTPS,
transactions LDAPS,
▪ encryption (especially
credit-card numbers)
Fall 2024/2025
Application Application
SSL
TCP
TCP
IP IP
SSL Services
Fragmentation:
◦ dividing the data into blocks
Compression:
◦ each fragment of data is compressed.
Message Integrity:
◦ using a keyed-hash function to create a MAC.
Confidentiality:
◦ original data and the MAC are encrypted using symmetric-key
cryptography
Framing:
◦ A header is added to encrypted payload,, then passed to a reliable
transport layer protocol.
Fall 2024/2025
Fall 2024/2025
10
Fall 2024/2025
11
Encryption/Decryption Algorithms
Fall 2024/2025
12
Hash Algorithm
Fall 2024/2025
13
Fall 2024/2025
14
Fall 2024/2025
15
Compression Algorithms
Fall 2024/2025
16
The server needs the same, but different from those for
other direction. If there is attack in one direction, other
direction is not affected.
Fall 2024/2025
17
Fall 2024/2025
18
Fall 2024/2025
19
Fall 2024/2025
20
Fall 2024/2025
21
Fall 2024/2025
22
Fall 2024/2025
23
SSL Sub-Protocols
Fall 2024/2025
24
Handshake Protocol
• Handshake Protocol: using the Record protocol to
exchange messages between an SSL-enable server and an
SSL-enable client.
Purpose:
1. server authentication
2. negotiation: agree on
crypto algorithms
3. establish keys
4. client authentication
(optional)
Fall 2024/2025
25
Handshake Protocol
• Handshake Protocol: using the Record protocol to
exchange messages between an SSL-enable server and an
SSL-enable client.
Fall 2024/2025
26
Handshake Protocol
Phase I of Handshake Protocol
27
Handshake Protocol
Phase II of Handshake Protocol
Fall 2024/2025
28
Handshake Protocol
Phase III of Handshake Protocol
29
Handshake Protocol
Phase IV of Handshake Protocol
After Phase IV, the client and server are ready to exchange
data.
Fall 2024/2025
30
Server
Privat Public
Certificate is Good and Valid
e key key
Client
Public
key
After Phase IV, the client and server are ready to exchange
data.
Fall 2024/2025
31
Fall 2024/2025
32
SSL connection
everything
henceforth
is encrypted
33
Fall 2024/2025
34
Alert Protocol
• Alert protocol: uses for reporting errors; explains
severity of the message and its description. Alerts are
compressed same as other data
Alerts defined for SSL
Fall 2024/2025
35
Record Protocol
• Record Protocol: carries messages from upper layers
(Handshake, Change-Ciphers-Spec, Alert protocols or from
application layer); defines the format used to transmit data.
Fall 2024/2025
36
Record Protocol
data
data data
MAC MAC
fragment fragment
37
Record Protocol
Processing done by the Record Protocol
Fall 2024/2025
38
Record Protocol
Calculation of MAC (Message Authentication Code)
Fall 2024/2025
39
Fall 2024/2025
40
Fall 2024/2025
41
Alert message
Fall 2024/2025
42
Types of Handshake
messages
Fall 2024/2025
43
Application Data
Record Protocol message for application data
Fall 2024/2025
44
Fall 2024/2025
45
Fall 2024/2025
46
Data-expansion function
Fall 2024/2025
47
Fall 2024/2025
48
Fall 2024/2025
49
Alert Protocol
• TLS supports all of the alerts defined in SSL except for No
Certificate. TLS also adds some new ones to the list. Table
below shows the full list of alerts supported by TLS.
Fall 2024/2025
50
Record Protocol
Fall 2024/2025
51