Session Keys: Temporary Secrets for a Protected Exchange
A session key is a temporary secret value used to encrypt and decrypt information during a limited exchange. Encryption turns readable information into a protected form; decryption recovers it. The key's temporary role doesn't guarantee that an exposed copy becomes harmless when the conversation ends.
In symmetric encryption, the communicating systems use the same secret key for the matching encryption and decryption work.
The Internet Security Glossary describes a session key as short-lived, potentially used for a connection, a set of transactions or a period of high-volume communication. The term doesn't prescribe one universal lifetime.
- Understand what AES, RSA and hashing actually do before you rely on them.
- Learn to spot the mistakes that break real-world encryption.
- Get a practical introduction to modern encryption in one book.
A connection can have more than one working key
TLS 1.3 shows how this works for a connection. TLS, Transport Layer Security, is a protocol used to protect communications, including modern web connections.
Its initial handshake is an exchange in which the two sides agree how to protect the data and establish shared secret values. A calculation uses those values to produce the keys that protect data sent over the connection.
The TLS 1.3 specification distinguishes keys by direction and phase. The key used to protect one side's outgoing data differs from the key used for traffic going the other way. Keys for the initial exchange also differ from keys protecting later application data.
Either side can update its sending keys during the connection. A single ongoing conversation therefore needn't use one unchanged secret for all of its traffic.
That is one protocol's design. Other protocols organize keys differently, so “one new key every time someone logs in” is too simple a definition.
The login token is doing another job
A website's session identifier, or token, connects repeated requests with an application session. After a successful login, the application can use it to recognize requests associated with the signed-in account.
A cryptographic traffic key protects the communication carrying those requests. These are separate jobs at different parts of the system.
The OWASP session-management guidance describes the application's continuity mechanism. It should not be read as a description of when TLS creates or removes encryption keys.
Logging out can invalidate an application session while its encryption keys follow the connection protocol's rules. The presence of the word “session” in both phrases doesn't synchronize their lifetimes.
Why Today's Stolen Key Can't Read Yesterday's Traffic
Deleting your copy doesn't delete someone else's
Changing keys limits which traffic is protected by a particular key. Removing old keys also matters: the TLS 1.3 specification recommends deleting previous traffic secrets and keys after updates.
But consider a hypothetical attacker who already copied a traffic key and recorded data protected by it. Deleting the legitimate copy doesn't remove the attacker's copy. That known old key may still let the attacker decrypt the corresponding recorded data.
A Symmetric Key Has a Life Beyond the Encrypted File

Diffie–Hellman Key Exchange, With Numbers You Can Follow

Perfect Forward Secrecy: Protecting Yesterday’s Traffic

QUOTE:
"Amateurs hack systems, professionals hack people."
