Understanding Cryptography CHPTR 13 - Key Establishment
Understanding Cryptography CHPTR 13 - Key Establishment
www.crypto-textbook.com
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure
- If a key is exposed (e.g., through hackers), there is limited damage if the key is
changed often
§ The key kAB is fed into a key derivation function together with a nonce r („number
used only once“).
§ Every different value for r yields a different session key
Alice Bob
generate nonce r
r
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure
Shortcomings
§ There are n (n-1) ≈ n2 keys in the system
§ There are n (n-1)/2 key pairs
§ If a new user Esther joins the network, new
keys kXE have to be transported via secure
channels (!) to each of the existing usersa
⇒ Only works for small networks which are
relatively static
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure
message y
y
y= eKses (x) x= e-1Kses (y)
Remaining problems:
§ No Perfect Forward Secrecy: If the KEKs are compromised, an attacker
can decrypt past messages if he stored the corresponding ciphertext
§ Single point of failure: The KDC stores all KEKs. If an attacker gets
access to this database, all past traffic can be decrypted.
§ Communication bottleneck: The KDC is involved in every
communication in the entire network (can be countered by giving the
session keys a long life time)
§ For more advanced attacks (e.g., key confirmation attack): Cf. Section
13.2 of Understanding Cryptography
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure
B
Compute common secret Compute common secret
kAB = Ba = (αa)b mod p kAB = Ab = (αb)a mod p
B´ B
substitute B´ = αo mod p
§ Oscar computes a session key kAO with Alice, and kBO with Bob
§ However, Alice and Bob think they are communicationg with each other !
§ The attack efficiently performs 2 DH key-exchanges: Oscar-Alice and Oscar-Bob
§ Here is why the attack works:
Alice computes: kAO = (B´)a = (αo)a Bob computes: kBO = (A´)b = (αo)b
Oscar computes: kAO = Ao = (αa)o Oscar computes: kBO = Bo = (αa)o
B´ B
substitute B´ = αo mod p
§ Oscar has now complete control over the channel, e.g., if Alice wants to send an
encrypted message x to Bob, Oscar can read the message:
y
y = AESkA,O (x) decrypt x = AES-1kA,O (y)
y´
re-encrypt y´= AESkB,O (x) x = AES-1kB,O (y´)
§ Q: What is the underlying problem that makes the MIM attack possible?
§ A: The public keys are not authenticated: When Alice receives a public key which is
allegedly from Bob, she has no way of knowing whether it is in fact his. (After all, a key
consists of innocent bits; it does not smell like Bob‘s perfume or anything like that)
Even though public keys can be sent over unsecure channels, they
require authenticated channels.
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure
§ In order to authenticate public keys (and thus, prevent the MIM attack) , all public keys
are digitally signed by a central trusted authority.
§ Such a construction is called certificate
certificate = public key + ID(user) + digital signature over public key and ID
§ In its most basic form, a certificate for the key kpub of user Alice is:
Cert(Alice) = (kpub, ID(Alice), sigKCA(kpub,ID(Alice) )
ce) CA Cert(
t( A l i Bob)
Cer
Alice Bob
kprA = a kprB = b
kpubA = A kpubB = B = αb mod p
Cert(Alice) = ((A, IDA), sigKCA (A,IDA)) Cert(Bob) = ((B, IDB), sigKCA (B,IDB))
Cert(Alice)
Cert(Bob)
§ Note that verfication requires the public key of the CA for verKpub,CA
§ In principle, an attacker could run a MIM attack when kpub,CA is being distributed
⇒ The public CA keys must also be distributed via an authenticated channel!
§ A: YES! The difference from before (e.g., DHKE without certificates) is that
we only need to distribute the public CA key once, often at the set-upt
time of the system
§ Example: Most web browsers are shipped with the public keys of many
CAs. The „authenticated channel“ is formed by the (hopefully) correct
distribution of the original browser software.
§ Introduction
§ The n2 Key Distribution Problem
§ Symmetric Key Distribution
§ Asymmetric Key Distribution
- Man-in-the-Middle Attack
- Certificates
- Public-Key Infrastructure