Plainnotes

Rotating TLS session ticket keys

2025-04-02 · 2 min readNetwork

TLS 1.3 session resumption relies on tickets encrypted with a server-side key. If that key never changes, anyone who obtains it can decrypt traffic recorded earlier — forward secrecy is lost.

nginx enables tickets by default and generates the key at startup, so a reload rotates it. For explicit control:

ssl_session_ticket_key /etc/nginx/ticket.key;

The file holds 48 random bytes; 80 is recommended for compatibility with older versions. Rotate weekly, keeping the previous key around briefly for a smooth transition.

For higher assurance, disable tickets entirely and keep only the session cache — fewer resumptions and more handshakes, but no long-lived key.