HELP !!! DIGITAL SIGNATURE CAPICOM

G

Guest

I to am looking for example source: using CapiCOM from a .NET 1.1 C# program,
I need to understand the following steps:

1) create a hash from the contents of what could be a very large file
(~10MBytes) in such a way where the hash is created in progressive or chunked
manner. That is, the CapiCOM hash method is fed the data to be hashed in
chunked read input buffers.

2) take the resultant hash from step one and sign it (encrypt it with a
smart card resident private key).

3) take the resultant signed hash, generate a "detached" PKCS#7 blob. I do
not wish include, as ContentInfo, the orignal data sourced from the above
mentioned file in the SignedData blob.

I have a colleague who thinks that all the data contained by the file has to
be read into a C# string first before being passed to CapiCOM to do steps 1
through 3 by way of one CapiCOM method call. But I know Microsoft wouldn't
provide such an awkward interface. Please prove me right.

According to CapiCOM documentation, it obvious you can implement step #1 as
detailed above. The trick I'm trying to uncover is step #2; signing the
output of step #1, the hash, as a separate step. And then embedding it in a
"detached" PKCS#7 compliant blob as the third step. Please remember, I'm
restricted to C# .NET 1.1 and CapiCOM through an auto generated interop DLL.
Also, I'm just signing here, no encryption for privacy (or envelope).

To summarize what I need again, I'm trying to split the signing process into
three steps: 1) hash generation from large input data set read from a file,
2) sign the resultant hash from step #1 and 3) take the signed hash and
generate a PKCS#7 "detached" variety blob.

Go CapiCOM - actually make my job easier - Please!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top