Senior LevelAuthentication & Authorization
What is Token Binding (RFC 8471) and how does TLS Exporter bind security tokens to underlying TLS keys?
❓ Interview Prompt: Explain RFC 8471 Token Binding, TLS Exporter secrets (RFC 5705), EKM (Exported Keying Material), and hardware key binding.
Token Binding (RFC 8471 / 8472) creates a cryptographic link between security tokens (cookies, OAuth access tokens, JWTs) and the underlying TLS connection on which they are transmitted.
Cryptographic Binding Mechanism:
1
During the TLS 1.3 handshake, client and server negotiate the Token Binding protocol extension.
2
TLS Exporter (RFC 5705) derives a unique Exported Keying Material (EKM) master secret bound to the specific TLS channel:
$$\text{EKM} = \text{TLS-Exporter}(\text{"EXPORTER-Token-Binding"})$$
3
The client signs the EKM using a private Token Binding key.
4
If an attacker intercepts the token and tries to send it over their own TLS connection, the target server calculates a different EKM and rejects the request!
Code Implementation Example
typescript
// Conceptual TLS Exporter Key Binding
function verifyTokenBinding(tlsSocket: TLSSocket, presentedTokenBindingSignature: Buffer, clientPublicKey: KeyObject) {
// Export master keying material derived from current active TLS connection
const ekm = tlsSocket.exportKeyingMaterial(32, "EXPORTER-Token-Binding");
// Verify client signed the exact TLS EKM secret
const isValid = crypto.verify(null, ekm, clientPublicKey, presentedTokenBindingSignature);
if (!isValid) throw new Error('Token Binding Error: Token stolen or replayed over different TLS channel!');
}💡Verifying TLS Exporter Keying Material (EKM) token binding signature.
🎯 Interview Key Takeaway
Token Binding (RFC 8471) uses TLS Exporters to cryptographically bind tokens to underlying TLS channels, rendering stolen tokens unusable.
#Token Binding#RFC 8471#TLS Exporter#Cryptography#Senior
Back to all Authentication & Authorization Questions→