Key establishment and certificates Flashcards

1
Q

What is key establishment?

A

The process of setting up cryptographic keys to protect a subsequent communication session

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

What does key establishment in TLS use public keys for?

A

To allow clients and servers to share a new communication key

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

What phases does key management consist of?

A

Generation

distribution

storage

destruction

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

What is key generation?

A

Process of generating keys, ideally random keys

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

What is key distribution?

A

Process of distributing the keys in a secure fashion

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

What is key storage?

A

Way of storing keys in such a way that they are available for use, but not to unautherized users

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

What is key destruction?

A

Process of destroying a key, as removing it from memory is not always easy

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

Name 3 types of keys

A

Long-term

Ephemeral

Session

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

What are long-term keys?

A

Intended to be used for a long time (hours, months, years, etc.)

Either symmetric or asymmetric

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

What are ephemeral keys?

A

Generated for single use, then deleted (e.g. diffie hellman)

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

What are session keys?

A

Used for one communication session (seconds, hours, a day)

Usually symmetric with ciphers such as AES (authenticated encryption)

Sessions should be independent

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

What does it mean to have independent sessions?

A

The compromise of one key does not affect other sessions.

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

What is a typical usage of long-term and ephemeral keys?

A

Used in establishment of session keys

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

What are the security goals of key establishment protocols?

A

Authentication: If a party A completes the protocol and believes the session key Kab is shared with B, then Kab should not be shared with a different party C. Authentication can be mutual or unilateral

Confidentiality: An adversary is unable to obtain the session key accepted by a prticular party

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

What is mutual authentication?

A

When both parties achieve the authentication goals

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

What is unilateral authentication?

A

The authentication goals are only achieved by one side

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

What are 3 approaches to key establishment protocols?

A

Key pre-distribution

Key transport

Key agreement

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

What is key pre-distribution?

A

Keys are set in advance.

A trusted authority (TA) generates and distributes long-term keys to all users when they join the system.

The TA only operates in the pre-distribution phase, and don’t need to be online afterwards

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

What is key transport?

A

One party chooses the key and distributes it

A TA shares a long-term shared key with each user

TA generates and sends session keys to users when requested and protected by the long-term keys

TAs must be trusted, and they are a single point of attack

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

What is key agreement?

A

Two or more parties contribute to the session key

Usually add authentication with public keys, for example by signing the exchanged messages

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

What can be a problem with key transport?

A

Scalability

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

What is Kerberos?

A

Example of key transport establishment.

A SSO solution: users only provide username and password once for a session

Kerberos provides access selectively for different online services using individual tickets

Kerberos establishes a session key to deliver confidentiality and integrity services for each service access

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

How does key transport work with asymmetric cryptography?

A
  1. One user chooses key material and sends it encrypted with the other party’s public key
  2. Each party includes a random nonce to ensure that their key is new
  3. A key derivation function (KDF) binds the secret key material with other protocol elements to avoid some attacks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are some properties of a standard KDF?

A

Uses HMAC

Can be thought of as a hash function

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

Describe the Key transport protocol

A

2 parties: A and B

PKa: A’s public encryption key
Z: Random value generated by B
Kab: Session key
IDa: Identity of A
IDb: Identity of B

A sends IDa and Na to B
B sends IDb, Nb, E(Z, PKa) to A

Kab = KDF(Z, IDa, IDb, Na, Nb)

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

What is a widely used key agreement protocol?

A

Diffie-Hellman

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

What is the usual method of key establishment in TLS today?

A

TLS includes Diffie-Hellman

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

Describe signed Diffie-Hellman?

A

Parties: A and B
Identities: IDa and IDb

G: Group where computation takes place
g: Generator og G

a: random value chosen by A up to the order of G
b: random value chosen by B up to the order of G

SigA(m): a digital signature on message m by A
SigB(m): a digital signature on message m by B

Parties want to share session key
Both parties need each other’s public signature verification keys.

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

What secrecy does signed Diffie Hellman provide?

A

Forward secrecy because the long-term (signing) keys are only used for authentication

30
Q

How does the signed Diffie-Hellman protocol work?

A

A sends IDa, g^a

B sends IDbm G^b, SigB(IDb, IDa, G^b, g^a)

A sends SigA(IDa, IDb, g^a, g^b)

A checks the signature received from B in step 2. If it is valid A computes the shared secret:
Z = (g^b)^a = g^ab

B then checks the signature received from A. If valid, computes Z:
Z = (g^b)^a = g^ab

Session key:
Kab = KDF(Z, IDa, IDb, g^a, g^b)

31
Q

What happens when a long-term key is compromised?

A

Attacker can act as the owner of the long-term key.

Previous sessions can be compromised.

32
Q

What is (perfect) forward secrecy?

A

When compromise of long-term private keys does not reveal session keys previously agreed using those long-term keys

33
Q

What is Post-compromise security (PCS)

A

Protocols that can recover when long-term keys are compromised - also known as self-healing protocols.

The long-term key must evolve over time so that the attacker becomes locked out when the key updates.

34
Q

What are self-healing protocols?

A

Protocols that can recover adter a long-term key is compromised

35
Q

In what situations does PCS work?

A

When the attacker is passive

36
Q

What is a way to achieve PCS?

A

Send a new Diffie-Hellman share with every message and change the session key also after every message

37
Q

Does forward secrecy provide post-compromise security?

A

No, not by itself

38
Q

What does digital certificates contain?

A

A public key and the owner identity

Often information such as signature algorithm and validity period

39
Q

What are digital signatures used for?

A

Make sure we can be confident about the correct binding between a public key and its owner.

Important when using a public key to encrypt a message or to verify a digital signature

40
Q

What is a certification authority (CA)?

A

Creates, issues and revokes certificates for users and other CAs

Have a certification practice statement (CPS)

41
Q

What is public key infrastructure PKI?

A

A framework that is established to issue, maintain and revoke public-key certificates

42
Q

What entities can be involved in PKIs?

A

Registration authorities
Naming authorities
Certification authorities

43
Q

What does registration authorities do?

A

Manages identities?

44
Q

What does naming authorities do?

A

Manage domain naming

45
Q

What does a CPS cover?

A

Covers issues such as:
- Does checks performed before certificate issue
- Physical, personnel and procedural security controls for the CA
- Technical and key pair protection and management controls
- Certificate revocation management procedures
- Audit procedures for the CA
- Accreditation information
- legal and privacy issues and liability limitations

46
Q

How are certificates verified?

A

By checking that the CA signature is valid

Check that conditions set in the certificate are correct

The user of the certificate must have the correct public key of the CA

47
Q

How can users obtain certificates?

A

Sent by owner during a protocol run

distributed with web browsers

In public directories

As part of DNS record

48
Q

What are certification paths?

A

A chain of trust where CA_n certifies the public key of CA_(n-1) which further certifies the public key of CA_(n-2)

If an entity has a trusted copy of the public key of CAn, the certification path for all the intermediate CAs can be used to obtain a trusted copy of the public key of CA0

49
Q

What is the structure of hierarchical PKIs?

A

Have root CA, intermediate CAs and users

CAs certify the public key of the entity below

Tree structure

50
Q

How does non-hierarchical PKI work?

A

Any CAs can certify any CAs public key

51
Q

Describe browser PKIs

A

Contain multiple hierarchies with preloaded public keys as root CAs

CAs and intermediate CAs can be added

52
Q

What certificates are self-signed?

A

Root certificates

The CA for the root is the root itself

53
Q

What are two widely deployed revocation mechanisms?

A

Certificate revocation lists (CRL)

Online certificate status protocol (OCSP)

54
Q

Describe Certificate revocation lists (CRL)

A

Each CA periodically issues a list of revoked certificates which can be downloaded and then checked by clients

55
Q

Describe Online certificate status protocol (OCSP)

A

A server maintains a current list of revoked certificates and responds to requests about specific certificates

56
Q

Describe the notation of the Needham-Schroeder protocol

A

Parties to establish session key: A, B
S: The key that is the trusted authority

Shared secret keys: Kas, Kbs, Kab
Long-term: Kas, Kbs (shared by A and S, and B and S)
Kab: Session key generated by S

Na, Nb: Randomly generated nonce for one time use

S -> A: M (S sends message M to A)

{X}_K: Authenticated encryption of message X using the shared secret key K

57
Q

What attack is the Needham-Schroeder protocol vulnerable to?

A

Replay attack

58
Q

What is a replay attack?

A

An attacker is able to replay old protocol messages and the honest party accepts an old session key

59
Q

How does the replay attack work on Needham-schroeder?

A

An attacker C obtains a session key K’ab previously established between A and B

C masquerades as A and is thus able to persuade B to use the old key K’ab

60
Q

Look at the Figures on slide 31, 33, 34

A
61
Q

How can we defend against replay attacks?

A

The key established must be fresh for each session

62
Q

What are three mechanisms used to achieve freshness?

A

Random challenges (nonces)
Timestamps (string on the current time)
Counters (increased for each message)

63
Q

What is the repaired Needham-Schroeder protocol?

A

Uses random challenges to provide freshnes

64
Q

What are tickets in regards to Needham-Schroeder?

A

Way to fix the NS protocol by using a key with a validity period

When A wishes to obtain access to server B, the auth server S issues a ticket to allow A access

Ticket format: {Kab, IDa, IDb, Tb}Kbs

Tb: A timestamp, which can be interpreted as a validity period

A can obtain the ticket and use it to gain access to B at any time while Tb is still valid

65
Q

Describe the 3 level Kerberos protocol

A

Level 1: Client C interact with auth server AS to obtain a ticket-granting ticket (happens once per session)

Level 2: C interacts with ticket-granting server TGS to obtain a service ticket - happens once for each server during the session

Level 3: C interacts with app server V to obtain a service - happens each time client requests service during session

66
Q

In 3 level kerberos, what information is sent between C and AS in level 1?

A

C to AS: IDc, IDtgs, N1

AS to C: {Kc, IDtgs, N1}Kc, ticket_tgs
Kc: Symmetric key shared with AS
N1: Nonce used by C to check that K_(c, tgs) is fresh

Ticket: {K_(c, tgs), IDc, T1}Ktgs
T1: Validity period
K_(c, tgs): Symmetric key generated by AS to share with TGS
Ktgs: Long-term key shared between AS and TGS

Result: User has ticket-granting ticket, which can be used to obtain different service granting. tickets

67
Q

What is the result of level 2 interaction with TGS?

A

User has service-granting ticket which can be used to obtain access to a specific server

68
Q

TODO: Go through figures for 3-level Kerberos (40, 42, 44)

A
69
Q

What is the result of level 3 interaction with TGS?

A

User has secure access to a specific server V

70
Q

What are some limitations of Kerberos?

A

Limited scalability: Each realm needs to share a key with each other realm

Suited for corporate environments with shared trust

Offline password guessing is a possible attack when Kc is derived from a human memorable password

The standard does not specify how to use the session key once it is established