Chapter 8i: Secure Channel Flashcards

1
Q

What does a secure channel provide?

Where are such constructions used?

Note:

A
  • Confidentiality, Integrity, Authenticity
  • Messages received in correct order
  • No duplicates/replayed messages (Bonus: we know which messages are missing)
  • Virtual private network protocols (VPN) like OpenVPN, IPSec, Wireguard
  • Transport layer security protocols like TLS, DTLS
  • Secure messenger applications like Signal

  • Secure channels require a long term (symmetric or asymmetric) key to work
  • Exchanging/agreeing on long term keys is often done out of band
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • How can we achieve confidentiality, integrity, and authenticity?
A
  • Using a symmetric cipher and a MAC algorithm

  • Security differs between the options
  • We are using different keys for encryption and integrity protection: k-int and k-enc
  • k-int and k-enc can be derived from a session key k using a key derivation function (KDF)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

#1: MAC-then-Enc

  • Enck -enc (m, MACk -int (m)):
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

#2: MAC & Enc

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

#3: Enc-then-MAC

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

Secure Channel Implementation

What do we need? Illustrate a toy implementation.

A
  • Message numbering
  • Encryption
  • Authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Secure Channel Implementation

Message Numbering:

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

Secure Channel Implementation

Explain.

A
  • We generate one key for each purpose
  • Initialization was shown for Alice! On Bob’s side, keys will be generated differently:
    e.g.: K_send_enc = KDF(k || “Enc Bob to Alice”)
  • We assume Alice and Bob share a session key k , established using authenticated DH key exchange
  • Where · ∥ · means string/byte concatenation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
  • Nonces are random 120bit values
  • We avoid the (unlikely) event that the same nonce is generated twice
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Secure Channel Implementation

What’s going on here?

A

Sending a message.

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

Secure Channel Implementation: Problems?

  • Verifying a MAC: def verify(k, msg, t):
    return HMAC -SHA -256(k, msg) == t
A

Problem:
* Runtime of equality test of two strings differs!
* Longs runtime for equal strings!
* Shorter runtime for different strings (function returns after first different byte!)
* Different runtimes can be attack vector for timing/side channel attacks!
* (See padding oracle attack)

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

Secure Channel Implementation

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

Secure Channel Implementation

  • Receiving a Message:
A

if n_recv + 1 >= MAX_INT - 1:

if not verify(K_recv_int, n || IV || c, t):

if n <= n_recv:

if n != n_recv + 1:

DEC-AES-128-CTR(K_recv_enc, IV, c)

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