wishmaster
wishmaster

Reputation: 1303

Implement ECDiffieHellmanCng in Xamarin

I am trying to use the Elliptic Curve Diffie-Hellman algorithm for key exchange in a xamarin application. However, I am getting a reference/compilation errors for the class. My assumption is that the class is not part of Mono. Do you know of a workaround for using that algorithm in Xamarin Apps? Please share your thoughts.

Thank you!

ECDiffieHellmanCng

var sessionClient = new ECDiffieHellmanCng {
                KeySize = 521,
                KeyDerivationFunction = ECDiffieHellmanKeyDerivationFunction.Hash,
                HashAlgorithm = CngAlgorithm.Sha256
            };

Upvotes: 2

Views: 773

Answers (1)

Lex Li
Lex Li

Reputation: 63123

Sounds like you can use third party solutions like,

https://www.nuget.org/packages/Curve25519/

This blog post contains tons of samples for different platforms,

http://blog.srinivasan.biz/software/elliptic-curve-cryptography-computing-shared-key

Upvotes: 2

Related Questions