I'm looking for a key exchange solution between a .NET app and an embedded device. The two endpoints have a shared secret key, making the Elliptic Curve Diffie-Hellman (ECDH) algorithm excellent for securely exchanging a master secret for the session.
There is a good C++ library, crypto++, which implements ECDH and is suitable for the embedded device. However, its implementation of ECDH differs from Mirosoft's ECDiffieHellmanCng implementation (as alluded to in its FAQ). We'd like to stay compatible with .NET security algorithms so that we can stick with managed code for the PC app (now, or if we use CNG, when we drop XP someday).
Has anyone seen an implementation besides Microsoft's that is compatible with Microsoft's? Alternatively, are there other good key exchange solutions between .NET code and embedded C++ code for use with pre-shared keys?
Update 2010-01-27: To clarify, I'm trying to use ECDH to perform both two-way authentication and key exchange between two ad-hock endpoints that don't trust each other until they see that they share the same secret. This is similar to the Bluetooth pairing scenario where the shared secret is exchanged out of band (except in my case the devices might not be near each other).