1/20
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Need for Encryption
It’s always possible for Internet traffic to go to the wrong places - you can’t control where packets go and everyone would be able to see what you send.
Needham-Schroeder Public Key Protocol
A protocol that sets up a symmetric key between two parties using public keys.
Needham-Schroeder Protocol - Notation
A → B: EB(Na, A)
Alice encrypts a message with Bob’s public key, saying “I am Alice and here is my nonce”
B → A: EA(Na, Nb)
Bob encrypts a message with Alice’s public key, saying “Here’s your nonce back to prove I am the person you sent the message to, here’s mine too”
A → B: EB(Nb)
Alice returns Bob’s nonce encrypted with his public key, proving it is her.
Needham-Schroeder Protocol - Vulnerability
Can be MITM’d, with an adversary - C - pretending to be A.
A → C: EC(Na, A)
C(A) → B: EB(Na, A)
B → C(A): EA(Na, Nb)
C → A: EA(Na, Nb)
A → C: EC(Nb)
C(A) → B: EB(Nb)
A knows it’s talking to C, but B thinks it’s talking to A when it’s actually talking to C.
Forward Secrecy
A protocol that even if an attacker has a recording and long term keys of the principal, cannot be broken.
Station to Station Protocol (STS)
A key exchange protocol that achieves forward secrecy by discarding important values after the protocol has finished.
Station to Station Protocol (STS) - Notation
A → B: gx
B → A: gy, {SB(gy, gx)}gxy
A → B: {SA(gy, gx)}gxy
B → A: {M}gxy
x, y and gxy are discarded after the protocol is run, with keys only used for signing to verify both identities.
Diffie-Hellman Key Exchange
A key exchange algorithm that relies on computational intensity, picking a large prime number and a primitive root.
Diffie-Hellman Key Exchange - Process
Two parameters, p and g, are chosen and shared in plaintext
p is a prime number
g is a primitive root
g < p and gcd(g, p - 1) = 1
Each party chooses a value between 2 and p - 2.
A = ga mod p
B = gb mod p
A and B are shared with the other party.
A shared key is then derived:
K = Ba = gba
K = Ab = gab
Important/Ideal Properties in a Protcol
They must provide secrecy
The keys must be fresh
Both parties should authenticate who they’re talking to
The protocol should be forward secret
The protocol should not support weak cipher suites
The protocol should not allow KCI (key compromise impersonation) attacks
The protocol should not be overly complex or have lots and lots of different modes
Transport Layer Security (TLS)
A form of encryption used on the Internet as part of HTTPS.
Transport Layer Security (TLS) - Notation
C → S: Nc, possible ciphersuites
S → C: Ns, Certs, chosen ciphersuite
C → S: ES(Kseed), {Hash1}Kcs
Where Hash1 = #(NC, NS, ES(Kseed))
S → C: {Hash2}Kcs
Where Hash2 = #(NC, NS, ES(Kseed), {Hash1}Kcs)
KCS is a session key based on the key derivation function (KDF) that uses NC, NS and Kseed.
TLS-DHE
An extension of TLS1.2 that uses Diffie-Hellman to make the protocol forward secret.
TLS-DHE - Notation
C → S: Nc, possible ciphersuites
S → C: Ns, gx, CertS, SignS(#(NC, NS, gx)), chosen ciphersuite
C → S: gy, {#(all previous messages)}K
S → C: {#(all previous messages)}K
K = kdf(NC, NS, gxy)
TLS - Authentication
Only server authentication is done, but client authentication can be done as well by having the client send their certificate over and verified accordingly.
TLS1.2 Deprecation
It had a lot of configurable options (e.g. client certification) that made it vulnerable - there were attacks against rare options, certain ciphersuites and implementation errors.
It also required 2 round-trips before sending data.
Key Compromise Impersonation Attacks
Any client with a known key can be fooled into thinking it’s talking to someone else.
KCI with Static DHE and Client Certificates
C → S: NC, possible ciphersuites
S → A(C): NS, CertS, gx, SignS(#(NC, NS, gx))
A(S) → C: NS, CertS, gx, SignS(#(NC, NS, gx)), Request Cert
C → A(S): gc, CertC(gc), {#(previous message)}kdf(Nc, Ns, gxc)
Because of Cert(gc), the attacker now knows c and can find gxc (the key)
A(S) → C: {#(previous message)}kdf(Nc, Ns, gxc)
TLS v1.3
An upgrade of TLS from 1.2 that attempts to resolve the issues 1.2 had.
TLS v1.3 - Forward Secrecy
Uses Diffie-Hellman from the very start to include forward secrecy in every communication.
TLS v1.3 - Notation
C → S: NC, ciphersuites, gx
S → C: NS, ciphersuites, gy,
{Certificate: (pks)}kdf1(gxym log1),
{CertVerify: (signskS (H(log2))}kdf1(gxy, log1),
{Finished: mackdf2(gxy, log1)(H(log3))}kdf1(gxy, log1)
C → S: {Finished: mackdf3(gxy, log1)(H(log4))}kdf4(gxy, log1)
Data encrypted with kdf5(gxy, log5)
S → C: Data encrypted with kdf6(gxy, log5)
log(x) is a log of all previous messages.