Need Help with CryptoAPI DSA Signature Verification Options
- From: Shailesh <vshailesh@xxxxxxxxx>
- Date: Thu, 09 Aug 2007 12:56:11 -0700
I have problems verifying a signature signed using DSA with the
I believe I am not setting up the private key correctly, and would
like some help.
I have known P,Q,G,X & Y keys that have been working using a 3rd party
What works: Using CryptoAPI, I have Acquired a default container
with CRYPT_VERIFYCONTEXT | CRYPT_SILENT flags,
created a PUBLICKEYBLOB (v3), called CryptImportKey
and can succesully call CryptVerifySignature on a buffer
passing it a RS buffer (created from the 3rd party
What does not work:
a) In a new empty "named" container that I Acquired
( with CRYPT_NEWKEYSET | CRYPT_MACHINE_KEYSET | CRYPT_SILENT )
I set up a PRIVATEKEYBLOB (v3) and attempt to call
So I changed it to create a v2 PRIVATEKEYBLOB,
which CryptImportKey seems to be accept (returns TRUE)
(but interestingly GetLastError shows 0x000003f0 -
An attempt was made to reference a token that does not exist)
Then a call to CryptGetUserKey succeeds.
b) Using this key, (which I am under the impression is the private
I call CryptGetKeyParam( KP_VERIFY_PARAMS ) and it returns
This tells me (what I believe is) my private key may not have
( I also created a v3 PUBLICKEYBLOB and created the public key
in this container, but with or without it - the problems
c) if I ignore this, and continue onto creating a SHA1 hash and
the call to CryptVerifySignature fails.
In summary, if I call CryptVerifySignature with the public key,
on a buffer signed by the 3rd party library, the call succeeds.
But if I sign a buffer with CryptoAPI and call
the call fails.
What else do I need to do to get this to work?
- Prev by Date: Re: Questions about smart card minidriver
- Next by Date: Re: Questions about smart card minidriver
- Previous by thread: Questions about smart card minidriver
- Next by thread: RE: Need Help with CryptoAPI DSA Signature Verification Options