Podcast
Questions and Answers
Which of the following is the primary function of the TLS Handshake Protocol?
Which of the following is the primary function of the TLS Handshake Protocol?
What is a key characteristic of TLS connections?
What is a key characteristic of TLS connections?
Which protocol is responsible for providing basic security services in TLS?
Which protocol is responsible for providing basic security services in TLS?
Which of the listed items are components of the TLS protocol stack?
Which of the listed items are components of the TLS protocol stack?
Signup and view all the answers
What is the primary purpose of a TLS Session?
What is the primary purpose of a TLS Session?
Signup and view all the answers
Which of the following functions is NOT a component of the TLS Record Protocol?
Which of the following functions is NOT a component of the TLS Record Protocol?
Signup and view all the answers
How does TLS help in securing web traffic?
How does TLS help in securing web traffic?
Signup and view all the answers
What does the term 'transient' describe in the context of TLS connections?
What does the term 'transient' describe in the context of TLS connections?
Signup and view all the answers
What is the primary purpose of the Handshake Protocol in TLS?
What is the primary purpose of the Handshake Protocol in TLS?
Signup and view all the answers
What is the function of the HMAC algorithm in TLS?
What is the function of the HMAC algorithm in TLS?
Signup and view all the answers
Which of the following is NOT a valid encryption method used by the TLS Record Protocol?
Which of the following is NOT a valid encryption method used by the TLS Record Protocol?
Signup and view all the answers
What does the 'Content Type' field in the TLS record format specify?
What does the 'Content Type' field in the TLS record format specify?
Signup and view all the answers
What is the function of the 'Change Cipher Spec Protocol'?
What is the function of the 'Change Cipher Spec Protocol'?
Signup and view all the answers
Which of the following best describes a 'fatal' alert level in the TLS Alert Protocol?
Which of the following best describes a 'fatal' alert level in the TLS Alert Protocol?
Signup and view all the answers
In the HMAC algorithm, what do ipad
and opad
represent?
In the HMAC algorithm, what do ipad
and opad
represent?
Signup and view all the answers
What does the 'Compressed Length' field in the TLS record format indicate?
What does the 'Compressed Length' field in the TLS record format indicate?
Signup and view all the answers
What is the primary purpose of the session identifier in TLS?
What is the primary purpose of the session identifier in TLS?
Signup and view all the answers
Within the Secure Shell protocol stack, what is the primary function of the Transport Layer Protocol?
Within the Secure Shell protocol stack, what is the primary function of the Transport Layer Protocol?
Signup and view all the answers
What does the Cipher Spec define in TLS?
What does the Cipher Spec define in TLS?
Signup and view all the answers
In the context of SSH server authentication, what is the role of the server's public/private key pair?
In the context of SSH server authentication, what is the role of the server's public/private key pair?
Signup and view all the answers
What is the role of the 'resumable flag' in the session state?
What is the role of the 'resumable flag' in the session state?
Signup and view all the answers
What is a common trust model used by clients for verifying host keys in SSH?
What is a common trust model used by clients for verifying host keys in SSH?
Signup and view all the answers
What are Server and Client Random in the TLS connection state?
What are Server and Client Random in the TLS connection state?
Signup and view all the answers
What is the purpose of Initialization Vectors (IVs) in TLS?
What is the purpose of Initialization Vectors (IVs) in TLS?
Signup and view all the answers
What does 'forward secrecy' mean in the context of the Transport Layer Protocol?
What does 'forward secrecy' mean in the context of the Transport Layer Protocol?
Signup and view all the answers
Which protocol within the SSH stack is responsible for managing multiple logical communication channels over a single connection?
Which protocol within the SSH stack is responsible for managing multiple logical communication channels over a single connection?
Signup and view all the answers
How are Initialization Vectors (IVs) initialized in TLS?
How are Initialization Vectors (IVs) initialized in TLS?
Signup and view all the answers
In the context of SSH, what role does a Certification Authority (CA) play?
In the context of SSH, what role does a Certification Authority (CA) play?
Signup and view all the answers
What is the significance of sequence numbers in TLS?
What is the significance of sequence numbers in TLS?
Signup and view all the answers
When is the sequence number reset in TLS?
When is the sequence number reset in TLS?
Signup and view all the answers
What is the primary purpose of the User Authentication Protocol within the Secure Shell stack?
What is the primary purpose of the User Authentication Protocol within the Secure Shell stack?
Signup and view all the answers
Regarding server host keys, what statement is correct?
Regarding server host keys, what statement is correct?
Signup and view all the answers
During the TLS handshake, what is the purpose of the 'finished' message?
During the TLS handshake, what is the purpose of the 'finished' message?
Signup and view all the answers
Which of the following describes the correct order of actions taken by the client after receiving the server's change_cipher_spec message?
Which of the following describes the correct order of actions taken by the client after receiving the server's change_cipher_spec message?
Signup and view all the answers
What is derived from the master secret using the PRF function?
What is derived from the master secret using the PRF function?
Signup and view all the answers
During the master secret creation for a TLS session, where does the 'pre_master_secret' originate in an RSA key exchange?
During the master secret creation for a TLS session, where does the 'pre_master_secret' originate in an RSA key exchange?
Signup and view all the answers
In the calculation of the master_secret, which of the following values are used as input to the PRF function?
In the calculation of the master_secret, which of the following values are used as input to the PRF function?
Signup and view all the answers
What is the primary purpose of the Pseudo-Random Function (PRF) in the context of TLS?
What is the primary purpose of the Pseudo-Random Function (PRF) in the context of TLS?
Signup and view all the answers
What input parameters are used to generate the 'key_block'?
What input parameters are used to generate the 'key_block'?
Signup and view all the answers
Which of the following describes the iterative process used inside of the Pseudo Random Function(PRF)?
Which of the following describes the iterative process used inside of the Pseudo Random Function(PRF)?
Signup and view all the answers
What does the server verify during SSH authentication?
What does the server verify during SSH authentication?
Signup and view all the answers
What does the SSH Connection Protocol assume about the underlying connection?
What does the SSH Connection Protocol assume about the underlying connection?
Signup and view all the answers
What is the purpose of 'channels' in SSH Connection Protocol?
What is the purpose of 'channels' in SSH Connection Protocol?
Signup and view all the answers
When can data be sent to a channel?
When can data be sent to a channel?
Signup and view all the answers
What does a 'session' channel primarily facilitate within SSH?
What does a 'session' channel primarily facilitate within SSH?
Signup and view all the answers
What is the purpose of the X11 channel type in SSH?
What is the purpose of the X11 channel type in SSH?
Signup and view all the answers
What is the main function of 'forwarded-tcpip' channel type?
What is the main function of 'forwarded-tcpip' channel type?
Signup and view all the answers
Which of the following is a key feature of SSH channels?
Which of the following is a key feature of SSH channels?
Signup and view all the answers
Flashcards
Transport Layer Security (TLS)
Transport Layer Security (TLS)
A protocol that provides security for communications over a computer network, using both symmetric and asymmetric encryption.
Handshake Protocol
Handshake Protocol
A process in TLS for exchanging certificates and generating a session key for secure communication.
Record Protocol
Record Protocol
Handles the secure transmission of data, including fragmentation, compression, and encryption under TLS.
Session
Session
Signup and view all the flashcards
Connections
Connections
Signup and view all the flashcards
IETF RFC 8446
IETF RFC 8446
Signup and view all the flashcards
Certificate Exchange
Certificate Exchange
Signup and view all the flashcards
Data encryption
Data encryption
Signup and view all the flashcards
Message Authentication Code (MAC)
Message Authentication Code (MAC)
Signup and view all the flashcards
HMAC algorithm
HMAC algorithm
Signup and view all the flashcards
Encrypted Data
Encrypted Data
Signup and view all the flashcards
Change Cipher Spec Protocol
Change Cipher Spec Protocol
Signup and view all the flashcards
Alert Protocol
Alert Protocol
Signup and view all the flashcards
Session Identifier
Session Identifier
Signup and view all the flashcards
Cipher Spec
Cipher Spec
Signup and view all the flashcards
Peer Certificate
Peer Certificate
Signup and view all the flashcards
Master Secret
Master Secret
Signup and view all the flashcards
Initialization Vectors
Initialization Vectors
Signup and view all the flashcards
Write MAC Secret
Write MAC Secret
Signup and view all the flashcards
Write Key
Write Key
Signup and view all the flashcards
Sequence Numbers
Sequence Numbers
Signup and view all the flashcards
Change Cipher Spec Message
Change Cipher Spec Message
Signup and view all the flashcards
Finished Message
Finished Message
Signup and view all the flashcards
Pre-Master Secret
Pre-Master Secret
Signup and view all the flashcards
Pseudo-Random Function
Pseudo-Random Function
Signup and view all the flashcards
Key Expansion
Key Expansion
Signup and view all the flashcards
Transport Layer Protocol
Transport Layer Protocol
Signup and view all the flashcards
Forward Secrecy
Forward Secrecy
Signup and view all the flashcards
User Authentication Protocol
User Authentication Protocol
Signup and view all the flashcards
Connection Protocol
Connection Protocol
Signup and view all the flashcards
Server Authentication
Server Authentication
Signup and view all the flashcards
Host Key
Host Key
Signup and view all the flashcards
Certification Authority (CA)
Certification Authority (CA)
Signup and view all the flashcards
Key Exchange
Key Exchange
Signup and view all the flashcards
Authentication in SSH
Authentication in SSH
Signup and view all the flashcards
Secure Authentication Connection
Secure Authentication Connection
Signup and view all the flashcards
SSH Connection Protocol
SSH Connection Protocol
Signup and view all the flashcards
Channel Mechanism
Channel Mechanism
Signup and view all the flashcards
Flow Control in Channels
Flow Control in Channels
Signup and view all the flashcards
Session Channel Type
Session Channel Type
Signup and view all the flashcards
X11 Channel Type
X11 Channel Type
Signup and view all the flashcards
Forwarded-TCPIP Channel Type
Forwarded-TCPIP Channel Type
Signup and view all the flashcards
Study Notes
Network Security
- The presentation covers Network Security, specifically Transport Level Security (TLS)
- It was presented by Prof. Dr. Torsten Braun at the University of Bern (18.11.2024 - 25.11.2024)
Transport Layer Security
- TLS is a protocol used for secure communication on the internet.
Table of Contents
- Introduction
- Transport Layer Security
- Datagram Transport Layer Security
- Hypertext Transfer Protocol Secure
- Secure Shell
Threats on the Web
- Integrity: Modification of user data, Trojan horse browsers, modification of memory, modification of message traffic
- Confidentiality: Eavesdropping on the network, theft of information from servers, theft of data from clients, info about network configuration, info about which client talks to server.
- Denial of Service: Killing of user threads, flooding machine with bogus requests, filling up disk or memory, isolating machine by DNS attacks
- Authentication: Impersonation of legitimate users, data forgery (misrepresentation)
- Consequences: Loss of information, machine compromise, vulnerability to other threats, loss of privacy
- Countermeasures: Cryptographic checksums, encryption, Web proxies, difficult to prevent
Web Traffic Security Approaches
- Network Level: HTTP, FTP, SMTP, TCP, IP/IPSec, IP
- Transport Level: HTTP, FTP, SMTP, TCP, SSL or TLS, IP
- Application Level: HTTP, FTP, SMTP, TCP, S/MIME, Kerberos, UDP, IP
Transport Layer Security (TLS) Overview
- Functions: Client and server authentication with public keys, sessions encrypted with symmetric keys, handshake protocol, certificate exchange, generation of a secret session key, record protocol (data exchange), fragmentation, compression and encryption
- Handshake Protocol: Authentication, key exchange,
- Record Protocol: Data exchange
TLS Protocol Stack
- IETF RFC 8446 defines TLS record protocol, providing basic security services
- Higher-layer protocols in TLS include Handshake Protocol, Change Cipher Spec Protocol, Alert Protocol, and Heartbeat Protocol
- These are all defined within the RFC 8446 standard
TLS Connections and Sessions
- Transport-layer connections are between two endpoints; peer-to-peer relationships—transient
- Every connection has one session
- A session is an association between a client and server, created by the Handshake Protocol
- Cryptographic Security Parameters defined
- session identifier
- peer certificate
- compression method
Session State
- Session Id: arbitrary byte sequence
- Peer certificate: X.509 certificate
- Compression method: algorithm
- Cipher Spec: specifies encryption and hash algorithms, and cryptographic attributes such as hash size.
- Resumable Flag: indicates whether a session can be used to initiate new connections.
Connection State
- Server and Client random: byte sequences chosen by client and server for each connection
- Server (Client) write MAC secret: secret keys used for MAC operations on data
- Server (Client) write key: the secret encryption key
- Initialisation Vectors: for block ciphers in CBC mode
- Sequence Numbers: separate numbers maintained for transmitted and received messages for each connection
Record Protocol Services
- Confidentiality: Handshake protocol defines a shared secret key used for conventional encryption of TLS payloads
- Message Integrity: Handshake protocol defines a shared secret key for forming a Message Authentication Code (MAC)
Record Protocol Operation
- Application Data, Fragment, Compress, Add MAC, Encrypt, Append TLS Record Header
- HMAC Algorithm (RFC 2104) - H[(K+⊕opad) || (K+⊕ipad) || M], where H is MD5 or SHA-1, and M is the message. K+ is the secret key padded with 0’s. ipad/opad are 36/5C repeated 64 times
- Encryption: AES-128/256, 3DES, or Stream Cipher (RC4-128).
Record Format
- Content Type: higher-layer protocol used to process the enclosed fragment.
- Major/Minor Version Numbers:
- Compressed Length (16 bits): length of plaintext fragment, or compressed if compressed, is (2^14 + 2048)
- MAC (0, 16 or 20 bytes)
Specific Protocols
- Change Cipher Spec Protocol: copies pending state into current state, to update the cipher suite used in a connection.
- Alert Protocol: conveys TLS-related alerts to the peer entity; levels are warning or fatal (immediate termination), code to indicate alert.
Handshake Protocol Messages
- hello_request, client_hello, server_hello, certificate, server_key_exchange, certificate_request, server_done, certificate_verify, client_key_exchange, finished.
Handshake Protocol Operation, Phase 1
- Client highest version understood, server lowest suggested; highest supported by server.
- Random structure: 32-bit timestamp, 28 bytes; used as nonces for key exchanges. Prevents replay attacks.
- Session ID: variable length; non-zero value indicates client wishes to update existing or create new conncetion; zero value means new conncetion.
- Cipher suites, compression methods
Handshake Protocol Operation, Phase 2
- Server authentication and key exchange
- Anonymous DH, 2 global DH values + server's public DH key, Ephemeral DH, RSA key exchange, temporary public/private RSA key pair.
- server_key_exchange
Handshake Protocol Operation, Phase 3
- Client authentication and key exchange. RSA 48-byte pre-master secret, encrypted using public key for second phase; Ephemeral/Anonymous DH parameters
Handshake Protocol Operation, Phase 4
- Client sends change cipher spec message. Copies pending state into current cipher spec; sends finished message to verify key exchange success.
- Server sends own change cipher spec message, transfers to current cipher spec; sends finished message.
- PRF is used, a function that generates the master secret values
Master Secret Creation
- Shared master secret: 48-byte value
- Stages 1 & 2: RSA and DH (Diffie-Hellman)
- master_secret - PRF(pre_master_secret, “master secret”, ClientHello.Random || ServerHello.Random)
- Cryptopgraphic parameters - MD5(master_secret, ServerHello.random, SHA("A" or "B" || master_secret || ClientHello.random))
TLS Pseudo-Random Function
- Generates pseudo-random key material from a seed value and a cryptographic secret key
Generation of Cryptographic Parameters
- Parameters generated from master secret by hashing, ordered by sufficient length for all parameters
Attacks
- Attacks on Handshake Protocol (e.g., compromising handshake, exploiting formatting)
- Attacks on Record and Application data Protocols (e.g., Browser Exploits, Chosen Plaintext Attack)
- Attacks on PKI (e.g., checking validity of X.509 certificates)
TLSv1.3
- TLSv1.3 removes several options & functions (e.g., compression and ciphers).
- Elliptic Curve DH for key exchange and doesn't permit RSA
- Encrypts all handshake messages after server_hello
- "1 round trip time" handshake order
Datagram Transport Layer Security (DTLS)
- DTLS is a protocol based on TLS, designed for UDP communication. DTLS is closely similar to TLS.
- Uses reliable transmission of handshakes and retransmission for communication
RSA Handshake
- Cookies prevent denial-of-service attacks by requiring a "cookie" from the server to demonstrate ability to handle packets
Hyper Text Transfer Protocol Secure (HTTPS)
- Secure version of HTTP; encrypts communications, provides encryption, data integrity, and authentication.
- Data sent using HTTPS
HTTPS Connection Initiation
- Agent acting as HTTP client also acts as a TLS client. Client initiates a connection, sends TLS client hello to begin TLS handshake.
- After handshake, client sends first HTTP request, all HTTP data sent as TLS application data.
HTTPS Connection Closure
- HTTP indicates closing of the connection; TLS protocol closes the connection with peer TLS entity, this involves closing underlying TCP connection.
- Use Alert Protocol to send close_notify alert to close connections appropriately
Secure Shell (SSH)
- Initial version provided secure remote logon facility. Replaced TELNET and similar protocols.
- SSH provided a more general client/server capability for applications like file transfer and e-mail.
SSH Protocol Stack
- User authentication protocol: authenticates client to server
- SSH Transport Layer Protocol: provides server authentication, confidentiality, integrity and optional compression.
- TCP: Reliable connection end-to-end delivery
- IP: Datagram delivery across multiple networks
SSH Transport Layer Protocol
- Server authentication based on public/private key pair. Server may have multiple host keys for different asymmetric encryption algorithms.
- Multiple hosts may use the same host key. Host key is used during key exchange.
SSH Packet Exchange
- TCP connection established, identification string exchange, algorithm negotiation, key exchange, end of key exchange, SSH messages exchanged, service request.
SSH Cryptographic Algorithms
- Lists various cryptographic algorithms including 3DES, Blowfish, Twofish, AES, Serpent, RC4, and CAST-128. Also lists MAC algorithms and compression algorithms.
SSH Key Generation
- Encryption and MAC keys are generated from shared secret key (K), which comes from DH key exchange, calculated from hash value (H). Session identifier equal to H
- Subsequent key exchange occurs after initial key exchange.
SSH User Authentication Protocol
- Client sends SSH_MSG_USERAUTH_REQUEST with method specified; server validates the user name; responds with SSH_MSG_USERAUTH_FAILURE if validation fails; returns a list of authentication methods used
SSH Authentication Methods
- Public Key: client sends a message containing public key, signed by the client's private key. The server verifies the key (client's public key is acceptable for authentication) and signature
- Password: Client sends a password that's protected by encryption. Authentication on Host-based (client's host, not its client)
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on the TLS Handshake Protocol and its components. This quiz covers key functions, characteristics, and security measures provided by TLS connections. Discover how well you understand TLS and its role in securing web traffic.