Hi, I'm trying to sign a pdf document using external hash and signature.
I notice that if i hash the same document (the result of the method
getRangeStream() ) twice, i obtain two different digests.
I suppose that this is becouse the pdf signature methods introduce some
randomness into the document before hashing it.
This is a problem in this case:
- i generate a hash x of the document d
- i send the hash x to a user to make it signed
- i receive the signed hash x and i want to build a signed pdf document with
it.
If i use the code in the example "How to sign with an external signature" (
<http://itextpdf.sourceforge.net/howtosign.html>
http://itextpdf.sourceforge.net/howtosign.html) , specifing 
the signed value and the hash x in the method setExternalDigest, i obtain an
invalid signature, becouse the hash calculated by 
the PdfAppearence methods is different from the hash x.
Is there a method to rebuild the document corrisponding to the hash x and to
compose a valid pdf signature? 
(in some way i want to get the randomness, apply it to the original pdf
document, and build the pdf signature structure).
 
Thanks
 
Francesca Merighi

 
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to