SSL/TLS Flashcards

(27 cards)

1
Q

what cryptographic algorithms does TLS/SSL support

A

RSA
DES
DH
specific cipher suite is negotiated at start of the session

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

what was SSL renamed to

A

TLS

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

what does an x.509 certificate contain:

A

subject (entity identity)
subjects public key
issuer’s name

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

what is the verification process of x.509 certificate

A

The issuer signs the hash of all the certificate data.
▶ To verify a certificate:
* Compute the hash of the data.
* Check the signature using the issuer’s public key.
▶ If I trust the issuer’s public key,
I can trust the subject’s public key.

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

what does it mean on a website when it says certificate is not valid

A
  • TTP has not checked third party
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is in the internet protocol stack
top to bottom

A

application layer
transport layer
network layer
link/hardware layer

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

what does the tls layer run in between in the internet protocol stack.

A

application and transport layer
encryption apparent in application layer
Normal TCP and IP protocols etc , can be used in lower layers

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

decribe the TLS protocol

A
  1. C →S : ClientHello (Supported ciphers, random nonce)
  2. S →C : ServerHello (Chosen cipher, random nonce)
    (basicaaly chooses a cipher)
  3. S →C : Certificate (Server’s public key signed by CA)
  4. C →S : Key Exchange (Pre-master secret encrypted with Server’s public key)
  5. C →S : Finished (Client’s verification message)
  6. S →C : Finished (Server’s verification message)

Key Exchange Options:
▶ RSA: Client encrypts pre-master secret with server’s public key.
▶ Diffie-Hellman: Client and server derive a shared secret.
After the handshake, all communication is encrypted using the negotiated symmetric key

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

what are the key exchange options in TLS protocols

A

RSA: Client encrypts pre-master secret with server’s public key.
Diffie-Hellman: Client and server derive a shared secret.

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

what is the notation for TLS hanshake protocol

A

TLS Handshake Steps
1. C →S : NC
2. S →C : NS , CertS
3. C →S : ES (Kseed ), {Hash1}KCS
4. S →C : {Hash2}KCS
Hash Computation:
▶ Hash1 = #(NC , NS , ES (Kseed ))
▶ Hash2 = #(NC , NS , ES (Kseed ), {Hash1}KCS )
Session Key Generation:
▶ KCS = f (NC , NS , Kseed ) where KCS is the session key derived
from NC , NS and Kseed.

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

TLS Handshake Steps
1. C →S : NC
2. S →C : NS , CertS
3. C →S : ES (Kseed ), {Hash1}KCS
4. S →C : {Hash2}KCS
what is Hash1 and hash2 equal to

A

Hash1 = #(NC , NS , ES (Kseed ))
Hash2 = #(NC , NS , ES (Kseed ),{Hash1}KCS )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. C →S : NC
  2. S →C : NS , CertS
  3. C →S : ES (Kseed ), {Hash1}K_CS
  4. S →C : {Hash2}K_CS
    what does K_CS
A

▶ KCS = f (NC , NS , Kseed ) where KCS is the session key derived
from NC , NS and Kseed.

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

what does C →S : ClientHello mean
give textual, mathematical notation and also explain what NC is for

A

▶ Textual: Client sends a random nonce and supported cipher list.
▶ Mathematical: C →S : NC
▶ NC is the client’s nonce, used in key derivation and preventing replay attacks.

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

what does S →C : ServerHello + Certificate mean
give textual, mathematical notation and also explain what NS and CertS is for

A

▶ Textual: Server responds with a random nonce and chosen cipher suite.
▶ Server sends its certificate (signed by CA).
▶ Mathematical: S →C : NS , CertS
▶ NS is the server’s random nonce, and CertS is the server certificate containing its public key

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

what does Key Exchange (C → S) mean
give textual, mathematical notation and also explain what ES (Kseed ): and Hash1 is for

A

Key Exchange (C → S)
▶ Textual: Client encrypts a pre-master secret with the server’s public key.
▶ Mathematical: C →S : ES (Kseed ), {Hash1}KCS
▶ ES (Kseed ): The pre-master secret encrypted with the server’s public key.
▶ Hash1 ensures integrity and is encrypted using the session key KCS.

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

what does Server Verifies and Responds (S → C) mean
give textual, mathematical notation and also explain what Hash2 is for

A

▶ Textual: Server verifies handshake and confirms key agreement.
▶ Mathematical: S →C : {Hash2}KCS
▶ Hash2 is computed over handshake data, confirming mutual agreement.

16
Q

what is key derivation
give textual, mathematical notation and also explain what F is for

A

Textual: Both sides derive the session key using nonces and exchanged key
material.
▶ Mathematical: KCS = f (NC , NS , Kseed )
▶ f is a Key Derivation Function (KDF) that combines NC , NS , and Kseed to
generate KCS.

17
Q

what are weaknesses in TLS

A

Configuration Weaknesses:
▶ Cipher Downgrading (forcing weaker ciphers)
▶ Self-Signed Certificates (no trusted authority)

18
Q

what is a cipher downgrading attack

A

attacker forces use of weakest cipher

19
Q

describe self signed certifcates and what their problem is

A

▶ Maintaining a set of certificates is hard (especially on apps and IoT devices).
▶ It’s much easier just to accept any certificate
(or certificates that sign themselves).
▶ What’s the problem?
▶ If the client accepts the self-signed certificates, then it’s easy to
man-in-the-middle.
▶ This has been shown to happen a lot in devices and code that use TLS!

20
Q

is it safe if one side supports a weaker cipher suite then the other

A

Generally considered safe.
▶ Browser developers removed all weak ciphers, some remained in servers.
▶ This depends on different cipher suites being incompatible

21
Q

what is a problem with diffie hellman in TLS

A

Many servers reuse the same small set of DH primes, making them
vulnerable to precomputation attacks

22
Q

what is diffie hellman used for in TLS

A

for foward secrecy

23
Q

what are the steps of logjam

A

Step 1: Man-in-the-Middle Attack
▶ The attacker intercepts the ClientHello message.
▶ The client proposes a strong Diffie-Hellman group (2048-bit).
▶ The attacker modifies this to request an export-grade 512-bit DH group.
Step 2: Server Accepts Weak DH Group
▶ The server allows the downgrade and responds with a weak DH group.
▶ The attacker can now easily compute the discrete log for the shared key.

24
this is the Original Secure TLS Handshake: 1. C → S: ClientHello (Strong DH group, e.g., 2048-bit) 2. S → C: ServerHello (Same DH group) 3. S → C: Certificate, DH Params 4. C → S: Key Exchange what is the downgraded TLS
Downgraded TLS Handshake (LogJam Attack): 1. C → MITM → S: ClientHello (Requesting weak 512-bit DH) 2. S → MITM → C: ServerHello (Accepting weak 512-bit DH) 3. S → C: Certificate, Weak DH Params 4. Attacker quickly computes the shared secret due to precomputed discrete logs. 5. Attacker decrypts and relays traffic in real-time.
25
why logjams work
Many servers reuse the same small set of DH primes. ▶ The NSA (and others) can precompute discrete logs for these primes. 2. Export-grade cryptography is still widely supported. ▶ These ”weak” DH groups were left in for legacy reasons. ▶ Attackers can downgrade connections to force weak groups. 3. No authentication of the DH parameters. ▶ The TLS handshake does not authenticate the DH group selection. ▶ Attackers can modify the handshake without detection
26
defending against logjams
Mitigation Steps: ▶ Increase minimum DH key size to at least 2048 bits. ▶ Disable export-grade ciphers completely. ▶ Use unique DH groups instead of common shared primes. ▶ Prefer Elliptic Curve Diffie-Hellman (ECDH) over traditional DH.