TLS 1.3 and IPsec Flashcards

1
Q

What is TLS 1.3?

A

The latest TLS version
Significant changes from earlier versions affecting security and efficiency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is IPsec?

A

Framework for ensuring secure communications over IP (internet protocol) networks

Similar security services as TLS, but at a lower layer in the communications protocol stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 7 layers of the OSI model?

A

Application

Presentation

Session

Transport

Network

Data link

Physical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What layer does TLS operate on?

A

Application layer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What layer does IPsec operate on?

A

Network layer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What efficiency and security problems in earlier versions, does TLS 1.3 fix?

A

Efficiency: Needing 2 round trip times before data can be sent

Sec: Too complex protocol, supported old and weak cipher suites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does TLS 1.3 aim to achieve?

A

Provable security

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What items in TLS was removed from version 1.2 to 1.3? (6)

A

Static RSA and DH key exchange

Renegotiation

SSL 3.0 negotiation

DSA in finite fields

data compression

non-AEAD cipher suites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What items was added in TLS 1.3 from 1.2? (3)

A

Zero round-trip-time (0-RTT) mode from pre-shared keys

Post-handshake client authentication through “certificate verify” signature

More AEAD cipher suites

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the TLS 1.3 handshake protocol: Hello messages

A

Client sends keyshare field in client hello for one or more anticipated cipher suites

Server can obtains session key on receipt of client hello if:
- server accepts one of the cipher suites
- the keyshare matches the accepted ciphersuite

If the conditions above fail:
- Server sends an optional Hello Retry Request
- Client responds is these in an acceptable cipher suite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In TLS 1.3 what messages are encrypted?

A

After hello - all later parts of the protocol are encrypted using the keys from the handshake

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What messages in TLS 1.3 handshake are not cryptographically protected?

A

Client and sever hello/keyshare messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does TLS 1.3 derive individual keys?

A

HKDF standard (hash key derivation function)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What different key types can be derived from the master secret?

A

Handshake traffic keys
Application traffic keys
Early data keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Application traffic keys used for?

A

Protect client-server traffic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are Handshake traffic keys used for?

A

Protect handshake protocol

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are early data keys used for?

A

Used for 0-RTT data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

In TLS 1.2 and 1.3, what does the CertificateVerify message do?

A

Used by the client to send a certificate and authenticate using the message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does the CertificateVerify message contain?

A

A signature which can be verified using the public key in the certificate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the post-handshake client authentication extension in TLS 1.3?

A

If used, the server may request client authentication at any time after the handshake completed

The client then responds with its certificate and a signature in the form of CertificateVerify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is early-data?

A

Application data that parties can start sending immediately, in 0-RTT key establishments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Describe 0-RTT in TLS 1.3

A

0-RTT is based on a pre-shared key (PSK), that is either agreed outside TLS or from an earlier TLS session

At the end of the handshake protocol, the server can send to the client one or more new session tickets as PSKs

A client may start a new PSK sesion without negotiating version and ciphersuite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is one thing needed to make 0-RTT possible, and what is this used for?

A

Pre shared key

PSK is used to authenticate Diffie Hellman

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What secrecy does early data lack?

A

Forward secrecy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What option does the TLS handshakes always use?

A

Diifie-Hellman option

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

In TLS 1.3, what does the cipher suites specify?

A

Which AEAD cipher to use in Record layer

Hash function to use for KDF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What ciphersuite is mandatory to implement in TLS 1.3?

A

TLS_AES_128_GCM_SHA256

27
Q

What is the ChaCha algorithm?

A

Stream cipher with MAC

Faster than AES

256-bit key

Combines XOR, addition modulo 2^32, rotation operations over 20 rounds

Produces 512 bits of keystream

28
Q

What are the efficiency improvements of TLS 1.3?

A

Saving of one round trip time in handshake

Can set up follow-on session with 0-RTT

29
Q

What security improvements came with TLS 1.3?

A

Only forward-secret key exchange now allowed

Many legacy cipher suite no longer allowed

Renegotiation option removed

Formal security proof

30
Q

What does the Selfie attack on TLS break?

A

Mutual authentication in PSK mode

31
Q

How does the selfie attack on TLS work?

A

Victim party A must be prepared to act as client and a server

A shares a PSK with B

The attacker reflects messages back to herself so client A believes she is talking to B while actually taking with server A

32
Q

How can the selfie attack on TLS be prevented?

A

Forbidding to share a PSK between more than one server and one client

33
Q

What types of algorithms does IPsec use?

A

Encryption, authentication and key management

34
Q

What is IPsec most commonly used for?

A

To provide VPN

Provides a security architecture for both IPv4 and IPv6

35
Q

What is message confidentiality?

A

Protects against unautherised data disclosure by the use of encryption

36
Q

What is message integrity?

A

Detects if data has been changed by using a MAC or authenticated ancryption

37
Q

What is message replay protection?

A

The same data is not replayed and data is not delivered badly out of order

38
Q

What is Limited traffic analysis protection?

A

Eavesdropper on network traffic should not know which parties communicate, how often or how much data is sent

39
Q

What is Peer authentication?

A

Each IPsec endpoint confirms the identity of the other IPsec endpoint

40
Q

What 5 security services does IPsec provide?

A

Message confidentiality
Message integrity
Message replay protection
Limited traffic analysis protection
Peer authentication

41
Q

What is a gateway-to-gateway architecture?

A

Provides secure network communications between two networks

Traffic is routed through the IPsec connection, protecting it appropriately

Only protects data between 2 gateways

42
Q

What is a gateway-to-gateway architecture most often used for?

A

When connecting two secured networks, such as linking a branch office to headquarters over the internet

43
Q

What is a Host-to-gateway architecture?

A

The organization deploys a VPN gateway onto their network

Each remote user establishes a VPN connection between the local computer (host) and the gateway

The VPN gateway may be a dedicated device or part of another network device

44
Q

When are host-to-gateway architectures mostly used?

A

When connecting hosts on unsecured networks to resources on secured networks.

Commonly used to provide secure remote access

45
Q

What are host-to-host architectures?

A

Provide end-to-end protection for data (throughout its transit)

resource-intensive to implement/maintain in terms of user and host management.

All user systems and servers that will participate in VPNs need to have VPN software installed and/or configured

Key management through a manual process

46
Q

What are host-to-host architectures typically used for?

A

For special purpose needs, such as system administrators performing remote management of a single server

47
Q

What are the 3 IPsec protocol types?

A

ESP: Encapsulating Security Payload

AH: Authentication Header

IKE: Internet Key Exchange

48
Q

What does the IPsec protocol provide: Encapsulating Security Payload?

A

Provides:
- confidentiality
- authentication
- integrity
- replay protection

49
Q

What is the IPsec protocol: Authentication Header

A

Provides:
- authentication
- integrity
- replay protection

No confidentiality and because of that deprecated

50
Q

What is the IPsec protocol: Internet Key Exchange

A

Takes care of negotiating, creating and managing session keys in so-called security associations

51
Q

How are IPsec connections set up?

A

Key exchange: IKEv2 protocol

IKEv2 uses DH authenticated using signatures with public keys in X.509 certificates

Includes cookies: client must return a time-dependent cookie value before the server proceeds

52
Q

What attacks does using cookies when setting up a IPsec connection mitigate, and what do they provide?

A

The cookies mitigates denial-of-service attacks

The cookies provide proof of reachability before any expensive cryptographic processing is completed

53
Q

What is a Security Association (SA)?

A

Contains info needed by an IPsec endpoint to support an IPsec connection

SA tells the endpoint how to process inbound IPsec packets or how to generate outbound packets

SAs are needed for each direction of connection

54
Q

What can SAs include?

A

cryptographic keys and algorithms

Key lifetimes

Security parameter index (SPI): included in the IPsec header to associate a packet with the appropriate SA

Security protocol identifier (ESP or AH)

55
Q

What is used to establish keys to use in SAs?

A

IKEv2

56
Q

Name 2 modes of operation in IPsec

A

Transport and tunnel mode

(both protocol ESP and AH can operate in both)

57
Q

What is transport mode in IPsec?

A

Maintains IP header of the original packet and protects payload

Generally only used in host-to-host architectures

58
Q

What is tunnel mode in IPsec?

A

Original packet encapsulated into a new one, meaning payload is the original packet

Typical use is gateway-to-gatewat architecure

59
Q

What are the components of the ESP protocol in IPsec?

A

ESP header: contains SPI identifying the SA and sequence numbers

ESP trailer: Contains padding and padding length, may include extra padding to enhance traffic flow confidentiality

ESP auth: Contains MAC of the encrypted data and ESP header, may not be required if an authenticated encryption mode is used

60
Q

What does a IP packet look like when protected by Transport-ESP?

A

Original IP packet:
[ IP header ] [ Data ]

Protected:
[IP header] [ESP header] [Data] [ESP trailer] [ESP auth]

Data and ESP trailer are encrypted

ESP header, Data and ESP trailer are authenticated

61
Q

What does a IP packet look like when protected by Tunnel-ESP?

A

Original IP packet:
[ IP header ] [ Data ]

Protected:
[New IP header] [ESP header] [IP header][Data] [ESP trailer] [ESP auth]

Encrypted: IP header, data, ESP trailer
Authenticated: ESP header, IP header, data, ESP trailer

62
Q

Describe outbound packet processing in ESP transport mode

A

Padding of data after original IP header: add ESP trailer and result encrypted using the symmetric cipher and key in the SA

ESP header is prepended

ESP MAC calculated over the data prepared so far and appended (if an SA uses the authentication service)

Original IP header is prepended but some fields must be changed:
- Protocol fields from TCP to ESP
- Total length changes to reflect addition of ESP header
- Checksum recalculated

63
Q

Describe outbound packet processing in ESP tunnel mode

A

Entire original packet is padded by adding an ESP trailer

The result is encrypted using the symmetric cipher and key agreed in the SA

ESP header prepended

ESP MAC calculated and appended, if SA uses auth service

New outer IP header is prepended
- Inner IP header of the original IP packet carries the ultimate src and dst addresses
- Outer IP header may contain distinct IP addresses such as addresses of security gateways
- Outer IP header protocol field is set to ESP

64
Q

Describe the security of IPsec

A

Providing enc without integrity is insecure - active attacks have been demonstrated

ESP applies enc before MAC in normal usage

Using AH, a MAC can be applied before enc. Attacks have been demonstrated on such configs

IPsec key exchange protocol (IKEv2) has no significant weaknesses