• 0

[C#] Elliptic Curve Key Storage


Question

How do I store an Elliptic Curve Diffie Hellman keypair as a byte array so that it can be imported later? I've so far only been able to export the public component. Worthless documentation and examples on MSDN and on the .NET security blog. Lots of not-implemented methods in the new derived CNG encryption classes. Thumbs down for Microsoft unless I'm really missing something here.

			ECDiffieHellmanCng alice = new ECDiffieHellmanCng(521);

			//All private key export operations throw a cryptographic exception
			byte[] aliceKey = alice.Key.Export(CngKeyBlobFormat.EccPrivateBlob);

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.