Distribution of cryptographic keys to protect subsequent sessions. In TLS, public keys allow clients/servers to share a new communication key.
Kerberos: key establishment without public keys.
Key Management
Key management has four phases:
- Key generation: keys should be generated such that they are all equally likely to occur
- Key distribution: keys should be distributed in a secure fashion
- Key protection: keys should be accessible only to authorized parties
- Key destruction: once a key has performed its function, it should be destroyed such that it (TODO the encrypted data?) has value to an attacker
Hierarchy
Keys often organized into a hierarchy. In a two-level hierarchy, there are long- and short-term keys:
- Long-term/static keys are used to protect the distribution of session keys. They may last anywhere from a few hours to a few years, depending on the application
- Short-term/session/ephemeral keys are used to protect communications in a session. They may last anywhere from a few seconds to a few hours, depending on the application
Key Establishment
Symmetric keys with ciphers (e.g. AES, MAC) are used in practice for session keys as as they are more efficient than public key algorithms.
Long-term keys can be symmetric or asymmetric.
Key Distribution Security Goals
Authentication: they should be able to authenticate that the receiver is the party they intended to send the key to.
Confidentiality: no adversary can obtain the session key accepted by a particular party.
In formal models, the protocol is broken if the adversary can distinguish the session key from a random string.
Mutual and Unilateral Authentication
Mutual authentication: both parties achieve the authentication goal.
Unilateral authentication: only one party achieves the authentication goal. This is done by most real-world key establishment protocols: typically clients authenticate the server with client authentication happening later.
Adversary Capabilities
A strong adversary knows the details of the cryptographic algorithms and can:
- Eavesdrop on all messages
- Alter messages sent
- Re-route messages to any other party
- Obtain the session key used in any previous run
Distribution of Pre-Shared Keys
A trusted authority (TA) generates and distributes long-term keys to all users when they join the system. Their involvement ends here in the pre-distribution phase so if there are no new users they can go offline.
A simple scheme is to assign a secret key for each pair of users, but this will not scale well as the number of keys grows quadratically.
Probabilistic schemes reduce key material at each party by forwarding messages to other parties that hopefully have a link to the final receiver. Hence, it offers only a high probability of a secure channel between any two parties and requires other nodes to be trusted as they must decrypt and re-encrypt the message. This is suitable for sensor networks.
Key Distribution using Symmetric Keys
Key distribution with online server.
A TA shares a long-term shared key with each user. They distribute session keys to users when requested and hence, the TA is highly trusted and is a single point of attack. Scalability may also be a problem.
Needham-Schroeder Protocol
Widely-known key establishment protocol published 1978. Found vulnerable to replay attacks in 1981 - attacker can replay old messages that a honest party will accept an old session key.
Notation:
- Two parties,
and - TA
-
and share a long-term key -
and share a long-term key - New session key
generated by - Nonce
, randomly generated by and respectively for one-time use -
: sends message to -
: message encrypted using key . There is assumed to be some authentication mechanism
Protocol:
Replay Attacks
If an attacker
To defend against this, the established key must be fresh for each session:
- Random challenges (nonces)
- Timestamps
- Counters
The repaired protocol uses random challenges. After
Tickets can also be used: if
Kerberos
Now on V5, released 1995. Standardized as RFC 4120. Used in Windows as the default domain authentication method.
Kerberos allows:
- Secure network authentication service in an insecure network
- Single sign-on: users only need to enter their username/password once per session
- Access to different online services using individual tickets
- Session keys to be established in an authenticated and confidential fashion
It is a 3-level protocol:
Level 1
Client
Where:
-
is the symmetric key shared between and , usually generated on login from -
is the symmetric key generated by -
is the nonce generated by to ensure is fresh -
is the long-term key shared between and -
is valid for some validity period .
At the end of this exchange,
Level 2
Client
Where:
-
is a session key shared between and -
is a long-term key shared between and -
is a nonce -
is a ticket for service with validity period -
where is a timestamp - The ticket-granting server must check that the timestamp is valid
The ticket-granting server must also check that the client has permission to access the service
In practice, the AS and TGS are the same machine.
Level 3
Client
Where:
The reply from
Limitations
Realms (domains over which an authentication server has authority to authenticate a user) must share keys with every other realm, so although multiple realms are supported it has limited scalability.
Key Distribution using Asymmetric Cryptography
No online TA is required. Instead, public keys (managed by PKI - certificates and CAs) is used for authentication. Users are trusted to generate good session keys (so hopefully each party has a good PRNG).
Key transport: user chooses key material and sends it to another party (encrypted, possibly signed). Does NOT provide forward secrecy.
Key agreement: Diffie-Hellman or some other protocol where both parties provide input to the key. The messages are signed, providing authentication. Provides forwards secrecy.
TLS supports both key transport and agreement.
Forward Secrecy
If a long-term key is compromised, the attacker can now claim to be the owner of the key. If key transport is used, all previous session keys will be compromised.
A protocol provides (perfect) forwards secrecy if compromise of the long-term secret keys do not reveal session keys previously agreed using the long-term keys.
Signed Diffie-Hellman
Computations done in
- Generator
- Random values
and chosen by each party where -
is a signature on message from signed with their signing/long-term key -
is a signature on message from signed with their signing/long-term key -
and are and ’s identities respectively - Both parties know each other’s public verification key
- Long-term signing keys provide only authentication, hence it has perfect forward secrecy
Protocol:
-
sends , -
sends , and -
checks signature. If valid, computes session key
-
- A sends
-
checks signature. If valid, computes session key
-