Re: CryptSignMessage on very large files
- From: "Mitch Gallant" <jensigner@xxxxxxxxxxxxxxxx>
- Date: Mon, 11 Sep 2006 16:36:46 -0400
One simple solution is to incrementally compute the SHA-1 hash of the large
pdf and then digitally sign that hash with CryptSignMessage (the message now
being the 20 byte hash).
- Mitch
"patrickc" <patrickc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4E53A5E6-CEF9-411D-9255-E0B0E44D7B3F@xxxxxxxxxxxxxxxx
Then why are you replying to my post about CryptSignMessage???
(other than to solicit your own commercial software package.........)
"Stefan Engelbert" wrote:
Our own methods
"patrickc" <patrickc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:15F577AC-4AFE-47AD-91E6-84C410FE7F98@xxxxxxxxxxxxxxxx
What Crypt* methods did you use to hash these 'chunks'?
"Stefan Engelbert" wrote:
No, I'm certain that the PDF is being assembled correctly.
OK
Why doesn't CryptSignMessage provide the ability to call into
multiple
times
to sign large amounts of data?
Well, there might be several reasons behind it. But you dont have to
ask
me
:-)
I dont know if it would help you. Our Software does internally suppot
hashing of chunks.
Since we are currently opening our APIs to the public and document
them
on
http://www.aloaha.com/software-development/smart-card-api.php
we could do that next with our HASH function.
But what kind of application are you coding? Would you be able to use
3rd
party software?
Stefan
"Stefan Engelbert" wrote:
Hi,
probably you are not missing only a step while signing but also
several
steps while rebuilding the PDF. Why dont you simply take an
existing
solution?
Stefan
"patrickc" <patrickc@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7B6B315B-81F8-4713-A0F9-6E9520060704@xxxxxxxxxxxxxxxx
Hello,
I'm using CryptSignMessage to sign PDF files and it works fine
for
the
most
part. However, I really don't want to have to buffer up the
entire
file
(they could be huge!) to pass in the MessageArray. I've looked
at
using
CryptMsgCalculateEncodedLength/CryptMsgOpenToEncode/CryptMsgUpdate
with
the
appropriate SHA1 algo and CMSG_DETACHED_FLAG and CMSG_SIGNED
flags
turned
on
- but the resulting PKCS7 is smaller than what I get out of
CryptSignMessage,
and Acrobat rejects the signed PDF as 'corrupted'. This is the
sample
code
I started with:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/security/example_c_program_encoding_and_decoding_an_enveloped_message.asp
Am I missing a step? I can't find any solid doc on how to
simulate
CryptSignMessage using the lower-level Crypt* calls.
.
- Follow-Ups:
- Re: CryptSignMessage on very large files
- From: patrickc
- Re: CryptSignMessage on very large files
- References:
- Re: CryptSignMessage on very large files
- From: Stefan Engelbert
- Re: CryptSignMessage on very large files
- From: Stefan Engelbert
- Re: CryptSignMessage on very large files
- From: patrickc
- Re: CryptSignMessage on very large files
- From: Stefan Engelbert
- Re: CryptSignMessage on very large files
- From: patrickc
- Re: CryptSignMessage on very large files
- Prev by Date: Re: CryptSignMessage on very large files
- Next by Date: Re: CryptSignMessage on very large files
- Previous by thread: Re: CryptSignMessage on very large files
- Next by thread: Re: CryptSignMessage on very large files
- Index(es):
Relevant Pages
|