« Return to Thread: PdfPKCS7 object without private key

Re: PdfPKCS7 object without private key

by mkl :: Rate this Message:

Reply to Author | View in Thread

Mikro,

Mikro Trekker wrote:
If filter is adobe.PKCS7.sha1 and I would like to create hashed siganture then how to achieve it ?
A good starting point would be studying the PDF Ref (ISO32000-1:2008) chapter 12.8.3.3 "PKCS#7 Signatures as used in ISO 32000" and additionally RFC 2315 on PKCS #7 while keeping in mind RFC 3852 and follow-ups on CMS.

You might want to re-evaluate your requirements before, though, as adobe.PKCS7.sha1 implies the use of a fairly unsafe algorithm (SHA1). The PDF Ref recommends:

"The format for encoding signature values should be adbe.pkcs7.detached. This encoding allows the most
options in terms of algorithm use."

BTW, RSA/1024 and MD5 aren't good choices for algorithms anymore, either.

If you want to sign without knowing what you are doing, you might want to simply do as Paulo says,

Paulo Soares wrote:
You'll have to use an external signature. See http://itextpdf.sourceforge.net/howtosign.html#signextitextsharp2 for an example.
without any further ado.

Regards,   Michael.

 « Return to Thread: PdfPKCS7 object without private key