Welcome to the new Woodmann RCE Messageboards Regroupment
Please be patient while the rest of the site is restored.

To all Members of the old RCE Forums:
In order to log in, it will be necessary to reset your forum login password ("I forgot my password") using the original email address you registered with. You will be sent an email with a link to reset your password for that member account.

The old vBulletin forum was converted to phpBB format, requiring the passwords to be reset. If this is a problem for some because of a forgotten email address, please feel free to re-register with a new username. We are happy to welcome old and new members back to the forums! Thanks.

All new accounts are manually activated before you can post. Any questions can be PM'ed to Kayaker.

solution a page down

To discuss DES MD5 El-Gamal RSA PGP and others....
Locked
joblack
Junior Member
Posts: 27
Joined: Wed Feb 10, 2010 8:12 am

solution a page down

Post by joblack »

solution a page down
5aLIVE
Senior Member
Posts: 215
Joined: Tue Dec 16, 2003 7:35 am

Post by 5aLIVE »

Couldn't you share you findings with us rather than delete you original question? I would been interested read how you reached a solution.
joblack
Junior Member
Posts: 27
Joined: Wed Feb 10, 2010 8:12 am

Post by joblack »

5aLIVE wrote:Couldn't you share you findings with us rather than delete you original question? I would been interested read how you reached a solution.
Sure.

As described in

http://livedocs.adobe.com/acrobat_sdk/9 ... DataExProc

the PDCryptNewCryptDataExProc is a callback function for the decryption routine. If you use a PDF Security handler this is the function which gives you the key to decrypt your pdf.

Syntax

void (*PDCryptNewCryptDataExProc)(PDDoc pdDoc, char **cryptData, ASInt32 *cryptDataLen, ASInt32 *cryptVersion)

The PDDoc is the PDF handle, the cryptData is a pointerpointer to the decryption key, the cryptDataLen is they decryption key lenth (in bytes).

So far so good - I just was puzzled about the cryptversion variable. A very popular plugin uses 1 or 2 as version.

The only difference between 1 and 2 is the key length (a little bit redundant but who knows why).

The algorithm is described in The Adobe PDF Reference (check under the Encryption section: V=1 or V=2 (not the password protection))). For further information: the algorithm is practially used in the ineptpdf scripts (getkey_v2 function).

As a quick and dirty solution for every unknown plugin (without any deeper inside). You can set a breakpoint on that function and get the key manually.
5aLIVE
Senior Member
Posts: 215
Joined: Tue Dec 16, 2003 7:35 am

Post by 5aLIVE »

Thanks for replying, I'm guessing the key length will either be either 40 or 128 bits in this case.
I've sent you a private message. :)
joblack
Junior Member
Posts: 27
Joined: Wed Feb 10, 2010 8:12 am

Post by joblack »

5aLIVE wrote:Thanks for replying, I'm guessing the key length will either be either 40 or 128 bits in this case.
I've sent you a private message. :)

Yes, but in theory there could be keys between 40 and 128 bits (in 8 bit steps -> padding).
Locked