Importing ECC private keys is unsupported under Windows 2008


hi,

i'm working on open source implementation of jwt - signed token format use oauth2 - , have come unstuck trying implement elliptic curve message signing cryptography next generation apis. 

i able generate ecdsa key pairs, unable import private keys on windows 2008 machines. doubly odd because able generate persistent keys, means key storage must supported. able import ecdsa public keys: private key blobs affected.

i *am* able import private key pairs under windows 7, , use them validating signatures.

can tell me if there workaround, or @ least give me sensible reason why key import not supported?

i include code snippet reproduces issue

 

class program

    {

        static void main(string[] args)

        {

            var p = new cngkeycreationparameters { exportpolicy = cngexportpolicies.allowplaintextexport };

            var originalkey = cngkey.create(cngalgorithm.ecdsap256, null, p);

            // cngkeyblobformat.eccpublicblob *is* supported
            var exportformat = cngkeyblobformat.eccprivateblob;

            // line fails cryptographic exception "the requested operation not supported"
            var newkey = cngkey.import(originalkey.export(exportformat), exportformat);

        }

 

hi,

the question seems more related development, suggest post msdn forum assistance:

msdn forum

http://social.msdn.microsoft.com/forums/en-us/categories/

 


this posting provided "as is" no warranties, , confers no rights. please remember click “mark answer” on post helps you, , click “unmark answer” if marked post not answer question. can beneficial other community members reading thread.


Windows Server  >  Security



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file