3

The question pretty much sums it up. Are ECDSA and ECDH available for mono? If they are not, will they be?

poupou
  • 43,413
  • 6
  • 77
  • 174
Nate Diamond
  • 5,525
  • 2
  • 31
  • 57

3 Answers3

3

No they are not available inside Mono BCL, nor Xamarin.iOS or Xamarin.Android.

There's a bug report for each of them, ECDSA and ECDH, so you might want to add yourself on c.c. to know when this will change. Right now there's no time table to include them.

poupou
  • 43,413
  • 6
  • 77
  • 174
  • does this answer change now that Mono supports a BoringSSL backend (to bring TLS 1.2)? (http://tirania.org/blog/archive/2016/Sep-30.html) thanks – user1623521 Oct 18 '16 at 08:01
  • Right now the BoringSSL backend is only used for SSL/TLS and part of X.509 support. It likely could be expended to cover ECDSA and ECDH but it would not work across all platforms (e.g. macOS and iOS uses Apple TLS implementation). – poupou Oct 18 '16 at 12:05
2

Microsoft .NET supports both,

http://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdsacng.aspx

http://msdn.microsoft.com/en-us/library/system.security.cryptography.ecdiffiehellmancng.aspx

From both Mono source code and documentation you can see that ECDSA and ECDH are not supported, as the corresponding classes are missing,

https://github.com/mono/mono/tree/master/mcs/class/System.Core/System.Security.Cryptography

http://docs.go-mono.com/?link=N%3aSystem.Security.Cryptography

For Xamarin.iOS and Xamarin.Android which are derived from Mono, you might check if there are any native library to call.

Lex Li
  • 60,503
  • 9
  • 116
  • 147
1

You can try to use "The Legion of the Bouncy Castle". It's fully written in .NET and supports many signature and encryption algorithms. I found it a bit tricky to use, there's not a lof of documentation, but it works.

Try to find a NuGet package or visit their website:

http://www.bouncycastle.org/csharp/

andreas
  • 301
  • 3
  • 6