Seems like the correct answer to the question, as initially asked by the poster, is forward secrecy.
"Nothing" is the wrong answer.
Assuming Alice (with public key $PK_A$) and Bob (with public key $PK_B$) know each other's public keys, then they can exchange an ephemeral key $k$. The ephemeral key $k$ can be exchanged in such a fashion that its security is independent of private key compromise.
Alice and Bob can negotiate a session key as follows:
- Alice and Bob agree on a group $G$ and a generator $g$ for $G$. For instance, $G$ can be $G \subset \mathbb{Z}_p, |G| = q$, where $p = 2q+1$, $p$ and $q$ are both prime.
- Next, they can perform an authenticated Diffie-Hellman (DH) key exchange.
- Alice picks a random $a \in \mathbb{Z}_q$ (DH secret)
- Alice computes $g^a \pmod p$ (DH public key)
- Bob picks a random $b \in \mathbb{Z}_q$ (DH secret)
- Bob computes $g^b \pmod p$ (DH public key)
- Alice sends Bob, $g^a$ and a signature on it $\mathsf{Sign}_{SK_A}(g^a, \text{"Alice"}, \text{"Bob"})$
- Bob sends Alice, $g^b$ and a signature on it $\mathsf{Sign}_{SK_B}(g^b, \text{"Alice"}, \text{"Bob"})$
- (Some additional freshness info should probably be included in the signature, to avoid reuse.)
- Alice and Bob can compute $g^{ab}$ as $(g^a)^b$ and $(g^b)^a$ respectively.
- Next, a key derivation function should be used on $g^{ab}$, obtaining the final key $k = \mathsf{KDF}(g^{ab})$
The signatures on the DH public keys prevent man in the middle attacks.
Compromise of the secret key $SK_A$ and/or $SK_B$ will not lead to compromise of $k$.
If Alice and Bob's keypairs should not be used to sign[1], or if deniable authentication is a goal for the key exchange, then you can look at the SKEME key-exchange protocol, which, if I recall correctly does not use signatures but maintains forward secrecy.
[1] Maybe because they are encrypt-only keypairs, as signing and encrypting with the same keypair can be disastrous.