Re: Signing data (Urgent)
From: Drew Cooper [MSFT] (dcoop_at_online.microsoft.com)
Date: 01/10/04
- Next message: Guangxi Wu: "Use a private key file generated from Linux for digital signature in .NET"
- Previous message: Robert Rolls: "CertFindCRLInStore (PInvoke)"
- In reply to: Emre OSMA: "Re: Signing data (Urgent)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 9 Jan 2004 16:53:43 -0800
If you add something to the data, the hash is only the hash of the initial
data, not the data + prefix/suffix. Why not sign the whole thing?
Signing means 1) get a hash of thing to be signed, 2) get an asymmetric
keypair, 3) cryptographically muck with the hash and the private key.
Checking a signature means 1) getting some data blob, 2) getting a public
key, 3) getting a hash out of the blob using the public key, 4) hashing the
file again, 5) checking whether the signed hash is the same as the result
you just got in step 4.
CryptSignHash doesn't hash data. It signs (cryptographically mucks with) a
hash that you feed it. The result is a data blob.
If you need to hash the data, you can call CryptHashData with a hash handle
from CryptCreateHash.
-- Drew Cooper [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights. "Emre OSMA" <emreosma_nospam@ekart.com.tr> wrote in message news:usvYrzn1DHA.1356@TK2MSFTNGP10.phx.gbl... > > It is an EMV project and I have already hashed data. > I have to add a prefix and a suffiix to the hashed data then I need to sign > it. > Is it possible? > > Thanks > Emre > > "Drew Cooper [MSFT]" <dcoop@online.microsoft.com> wrote in message > news:%23qmbjKj1DHA.3216@TK2MSFTNGP11.phx.gbl... > > Not sure if I understand this. Why don't you want to hash the data? How > > are you expecting signing to work? > > -- > > Drew Cooper [MSFT] > > This posting is provided "AS IS" with no warranties, and confers no > rights. > > > > > > "Emre OSMA" <emreosma@ekart.com.tr> wrote in message > > news:uLZS7ff1DHA.2396@TK2MSFTNGP09.phx.gbl... > > > Hi everybody, > > > for a very important and urgent project > > > I have to sign a data with PlatformSDK functions. > > > But the problem is I need to sign the data without hash. > > > I can not use the CryptSignHash and other functions, because that > > functions > > > hash the data before sign it. My data is more than 20 bytes. > > > Is it possible to do that with PlatformSDK functions. If yes which > > > function(s) yhat I need to use... > > > > > > Thanks in advande > > > Emre > > > > > > > > > > > >
- Next message: Guangxi Wu: "Use a private key file generated from Linux for digital signature in .NET"
- Previous message: Robert Rolls: "CertFindCRLInStore (PInvoke)"
- In reply to: Emre OSMA: "Re: Signing data (Urgent)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|