Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've found out that Microsoft finally implemented diffie-hellman into .net 3.5

Is it possible to do a key exchange with this implementation?

I want to be able to decrypt the secret information from the key exchange data.

Then I want to use the P and G paremeters Wiki...[] to create a key exchange.

I've been looking into this for an hour and msdn isn't quite explaining about this part of .net :sigh:

anybody an idea?:confused:
Posted

1 solution

Did you try anything besides MSDN?

I found this article: Elliptic Curve Diffie-Hellman[^] as the first result in a google search of ".NET Diffie-Hellman.

It looks like it shows you what you're asking.

[Response]
The .Net implementation doesn't appear to directly expose the g an p values, and it doesn't appear that they can be set either. Though you can pass a CngKey

To do a key exchange, you simply pass each other's PublicKey value.

If you want a true implementation, you may want to look at third-party dlls, such as Chilkat which allows for p and g.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900