Suppose I have a system whereby parties are identified by their public key (with some pre-selected asymmetric key algorithm). Suppose I have a party PUB1 which wants to establish a secure channel with a party PUB2. This necessarily means that party PUB1 already has PUB2's public key.
Given an untrusted medium with possibility of MITM, how can the parties establish a secure channel (no eavesdropping, no MITM) while mutually authenticating each other as the party that owns PRIV1/PRIV2 secrets matching the PUB1/PUB2 identity?
I understand that Diffie-Hellman with public keys can do exactly this – is that correct? Are there standard implementations for .NET which have built-in support for this mode of operation?