How to use BouncyCastle's Diffie-Hellman in C#?
问题 I'm writing an app that'll exchange data between a phone and a Windows PC, and I want to protect the data sent with key generated with a Diffie-Hellman exchange. I'm trying to use BouncyCastle for that, but the almost non-existant documentation for the C# implementation has me stumped. What I want to know is: what's the workflow for generating a DH key and computing a shared key when the other side's key is received? (I'm assuming I can send my key as a string and I can work with the other