Re: exporting DSS key using CryptoApi
From: Rhett Gong (v-raygon_at_online.microsoft.com)
Date: 10/10/03
- Next message: Xin Huang [MSFT]: "RE: Using certificates from CryptoAPI in custom operations"
- Previous message: Euphen Liu: "Re: [SmartCard CSP] How can I obtain a PIN to sign HASH ?"
- In reply to: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Next in thread: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Reply: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 10 Oct 2003 04:36:27 GMT
Hi Casey:
You said your code can successfully export DES, 3DES, RC2, and RSA keys
except DSS key. That's because the DSS algorithm is not supported by the
WinCE platform. If you search the MSDN for Microsoft Enhanced Cryptographic
Provider about WinCE, you will find the DSS is not listed in the table.
Does this answer your question?
If it does, please let me know! I will feel happier for that.
Best regards,
Rhett Gong [MSFT]
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties and confers no rights.
--------------------
From: "casey chesnut" <casey@brains-N-brawn.com>
References: <Ok52HQVjDHA.2772@TK2MSFTNGP12.phx.gbl>
<D4RRRmljDHA.1716@cpmsftngxa06.phx.gbl>
Subject: Re: exporting DSS key using CryptoApi
Date: Thu, 9 Oct 2003 07:17:52 -0500
Lines: 77
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <eEZIm8ljDHA.964@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.platformsdk.security
NNTP-Posting-Host: cpe-65-25-163-132.wi.rr.com 65.25.163.132
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.platformsdk.security:2910
X-Tomcat-NG: microsoft.public.platformsdk.security
no, thats definitely not it, because i am already calling it twice.
the same code has successfully exported DES, 3DES, RC2, and RSA keys.
when i make the same call for the DSS key using the DSS_DH provider,
it returns length of 0 and a byte [] of length 0.
(i'll have to try setting the initial length to a value and see if it
returns anything at all.)
also, i am calling it from the CE SmartPhone emulator.
Thanks
casey
"Rhett Gong" <v-raygon@online.microsoft.com> wrote in message
news:D4RRRmljDHA.1716@cpmsftngxa06.phx.gbl...
> Hi Casey:
> Did you see the post I replied to you today! It maybe the same problem
> as the problem you asked yesterday!
> I think you need call the CryptExportKey twice when you want to export
a
> key. First you must call CryptExportKey to get the real length. And then
> allocate the memory with that length. Second, you need use the length,
> which you get, and the allocated memory to call the CryptExportKey
> function.
> You can find more information(including the code snippet), when you
> search the key-- CryptExportKey.
>
> Does this answer your question?
> If it does, please let me know! I will feel happier for that.
> If not, write your problems with detailed information. I always do my best
> to
> solve your problems;-)
>
> Best regards,
>
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
>
> This posting is provided "AS IS" with no warranties and confers no rights.
>
> --------------------
> From: "casey chesnut" <casey@brains-N-brawn.com>
> Subject: exporting DSS key using CryptoApi
> Date: Tue, 7 Oct 2003 23:25:54 -0500
> Lines: 16
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> Message-ID: <Ok52HQVjDHA.2772@TK2MSFTNGP12.phx.gbl>
> Newsgroups: microsoft.public.platformsdk.security
> NNTP-Posting-Host: cpe-65-25-163-132.wi.rr.com 65.25.163.132
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
> Xref: cpmsftngxa06.phx.gbl microsoft.public.platformsdk.security:2858
> X-Tomcat-NG: microsoft.public.platformsdk.security
>
> Hello,
> I can export an RSA key fine, but am not having luck with DSA.
> (RSA_FULL vs DSS_DH provider)
>
> My goal is to sign a SHA1 hash with DSA, then export the public key for
> verification.
> The signature comes back fine,
> but my CryptExportKey call just keeps returning MORE_DATA,
> and not setting the 'ref' dataLength.
>
> Anybody got this to work? Maybe a code snippet?
>
> Thanks
> casey
>
>
>
>
>
- Next message: Xin Huang [MSFT]: "RE: Using certificates from CryptoAPI in custom operations"
- Previous message: Euphen Liu: "Re: [SmartCard CSP] How can I obtain a PIN to sign HASH ?"
- In reply to: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Next in thread: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Reply: casey chesnut: "Re: exporting DSS key using CryptoApi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]