PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com _____________________________________________________________
Step 2: The 5 byte key from algorithm 3.2 has the three byte object number "00 00 14" and gen number "00 00" appended to it. Run this through MD5 Step 3: Only use the first five bytes of the MD5 hash from step 2. Can you pst your code? I did, and someone else managed to point out a rather subtle difference that I had overlooked a couple dozen times. --Mark Storer Software Engineer Cardiff Software #include <disclaimer> typdef std::disclaimer<Cardiff> Discard; > -----Original Message----- > From: Gordon Campbell [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 16, 2003 2:56 PM > To: [EMAIL PROTECTED] > Subject: RE: [PDFdev] Encryption (again) > > > > PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com > _____________________________________________________________ > > I've done some more checking and if I remove everything from > my page I don't > get an error. But as soon as I add "BT ET" into my page I > get the errors > described. From this, I'm guessing that I'm probably (must > be) generating > the original key incorrectly .... but then, my passwords are working > correctly. So that just leaves me with the definition of how > to encrypt > string data. > > Step 1: > ------- > Obtain Object Number (20) and Generation Number (0) > > Step 2: > ------- > Convert Obj/Gen to "00 00 00 00 14" and extend to original > n-byte key (I'm > assuming that this original key is determined in Algorithm > 3.2 Step 7 -- can > someone verify this) > > Step 3: > ------- > Run rc4 passing in "BT ET" as the text and the key from Step 2 (above) > > > Does this look correct? > > TIA, > Gordon > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Mark Storer > Sent: Thursday, October 16, 2003 10:29 AM > To: '[EMAIL PROTECTED]' > Subject: RE: [PDFdev] Encryption (again) > > > > PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com > _____________________________________________________________ > > The "in document" part of that message leads me to believe that it's a > structural problem with the document itself rather than > something wrong with > the page contents. > > When Acrobat runs into a structural problem it often won't > open the doc (but > not always). When there's something wrong with the page, the > document will > be openend, but the page will be blank. Which are you getting? > > If you hold down the 'control' key while clicking the okay > button on that > error message, you'll get another, more meaningful error > message. This > message is the string associated with the exception that was > thrown. It may > or may not be helpful to you. > > --Mark Storer > Software Engineer > Cardiff Software > #include <disclaimer> > typdef std::disclaimer<Cardiff> Discard; > > > > -----Original Message----- > > From: Gordon Campbell [mailto:[EMAIL PROTECTED] > > Sent: Thursday, October 16, 2003 7:37 AM > > To: [EMAIL PROTECTED] > > Subject: [PDFdev] Encryption (again) > > > > > > > > PDFdev is a service provided by PDFzone.com | http://www.pdfzone.com > > _____________________________________________________________ > > > > Hello, > > > > I've gotten to the point in my project where I can verify > > that I am creating > > correct User and Master passwords ... and these are accepted > > by Reader. > > > > But, I'm getting the error message 'unrecognized token' plus > > a bunch of > > binary data 'in document'. > > > > So I'm assuming that I'm not converting my text stream > > correctly. I'll > > outline what I'm doing and hopefully someone can point me > in the right > > direction. > > > > Assume the following: > > Using Rev 2 of Standard Security Handler (40 Byte encryption) > > Object ID = 20 > > Generation Number = 0 > > Original Key = 8E 8F 68 E7 C7 > > My 10 digit encryption key would be: 8E 8F 68 E7 C7 00 00 14 00 00 > > My page stream is: > > > > "BT" + CHR(13) > > + "/F1 10 Tf" + CHR(13) > > + "1 0 0 1 10 742 Tm" + CHR(13) > > + "10 TL" + CHR(13) > > + "(Hello World!) Tj" + CHR(13) > > + "ET" + CHR(13) > > > > Questions: > > - Is my 10 digit key correct? > > - Should I be encrypted the entire string or each line individually? > > - Should I be encrypting CHR(13)? > > - other than Page Streams what other items would I need to > > encrypt? Assume > > no images or embedded fonts etc ... a very basic PDF document. > > > > If you need more info, please let me know. I'm really > > pulling my hair out > > here. > > > > Thanks, > > Gordon > > > > > > > > To change your subscription: > > http://www.pdfzone.com/discussions/lists-pdfdev.html > > > > To change your subscription: > http://www.pdfzone.com/discussions/lists-pdfdev.html > > > > > To change your subscription: > http://www.pdfzone.com/discussions/lists-pdfdev.html > To change your subscription: http://www.pdfzone.com/discussions/lists-pdfdev.html
