I am trying to understand how forward secrecy works in general, using a simple instant messaging protocol as an example. Tell me if I have this process right or not:
1) Alice and Bob each generate a pair of long-term public and private keys, then verify public key fingerprints in person. The ONLY thing these keys will be used for is for authentication (signing messages, and signing things during session key exchange). These keys will NEVER be used for encryption of any kind.
2) Alice and Bob use a key exchange algorithm such as Diffie-Hellman in the clear, using the keys from step 1 only to authenticate one another during this process. They end up with a shared session key.
3) Alice sends Bob a message, encrypting it with a symmetric cipher using the session key negotiated in step 2.
4) Bob decrypts Alice's message using the key negotiated in step 2.
5) The process repeats for each new message sent, starting from step 2. Step 1 is never repeated.
Forward secrecy (by generating new session keys) ensures that past communications cannot be decrypted if the long-term private keys from step 1 are compromised, however, masquerading as Alice or Bob would be possible going forward if this occurred, possibly compromising all future messages.
Where have I gone wrong here? Thanks so much in advance!