Results 1 to 5 of 5

Thread: Adobe Security handler cryptversion and 'NewCryptDataExProc' function question

  1. #1

    solution a page down

    solution a page down
    Last edited by joblack; June 2nd, 2010 at 14:10.

  2. #2
    Couldn't you share you findings with us rather than delete you original question? I would been interested read how you reached a solution.

  3. #3
    Quote Originally Posted by 5aLIVE View Post
    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.1/Acrobat9_1_HTMLHelp/API_References/Acrobat_API_Reference/PD_Layer/PDDoc.html#PDCryptNewCryptDataExProc

    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.
    Last edited by joblack; June 2nd, 2010 at 14:19.

  4. #4
    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.

  5. #5
    Quote Originally Posted by 5aLIVE View Post
    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).
    Last edited by joblack; June 2nd, 2010 at 23:43.

Similar Threads

  1. Breakpoint handler
    By vxx in forum Plugins (General)
    Replies: 7
    Last Post: January 8th, 2005, 08:57
  2. quick question about __allrem function
    By dive2code in forum The Newbie Forum
    Replies: 3
    Last Post: December 8th, 2004, 23:48
  3. interrupt handler problem
    By 0rp in forum Advanced Reversing and Programming
    Replies: 7
    Last Post: September 6th, 2004, 01:38
  4. bug exception handler
    By Anonymous in forum Bugs
    Replies: 4
    Last Post: November 22nd, 2002, 00:19
  5. debugs debugger's int handler
    By dion in forum Tools of Our Trade (TOT) Messageboard
    Replies: 10
    Last Post: August 29th, 2002, 10:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •