Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 12-14-2009, 04:48 PM   #556
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by JohnTheRipper View Post
Hi joblack,

I was debugging the script, and found that the error was because of the lenght of the book session key in line 1196 (v3 of the script). Maybe there's something wrong in RSA decrypting so that the decryption of the streams does not work.

The RSA decryption is based in the AES key generated by ineptkey script. Maybe is not an AES CBC_MODE key for PDF older versions. i♥cabbages said that uses AES in CBC mode with a random IV... or maybe is not RSA with PKCS#1 v1.5 padding, who knows?

All of these questions influence the dump method, because my "decrypted" PDF has the correct structure.
Hey John

Perhaps that could be one solution for the problem

Bug fixes of pycrypto:
==========
2.1.0beta1


* Modified RSA.generate() to ensure that e is coprime to p-1 and q-1.
Apparently, RSA.generate was capable of generating unusable keys.
==========

Try it with a newer py crypto version.
---
It complains because the first item in the array isn't equal 02. I don't know why it compares it because in the PDF Reference nothing is mentioned about the 2 as a check value.

I haven't checked out the length but if the length is wrong as well (should be 16 Bytes) then something else got wrong.

A good idea from you ...

The Adobe PDF Reference reads a little bit cryptic so in the worst case someone has to dive into the assembly code of ADE (like ILC did).

You only use RSA for decrypting the main decryption key for the symmetric RC4 or AES decryption method who is doing the main work. Only using RSA would be too slow in processing (especially for ebook readers).

Last edited by joblack; 12-14-2009 at 05:03 PM.
joblack is offline   Reply With Quote
Old 12-14-2009, 08:10 PM   #557
imeagor
Member
imeagor began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Apr 2009
Device: none
to joblack, I have met a pdf file with drm decryption, however it can not be deprotected using present method given above. I have sent you a message about this, you can try.
imeagor is offline   Reply With Quote
Old 12-16-2009, 07:06 PM   #558
JohnTheRipper
Enthusiast
JohnTheRipper began at the beginning.
 
Posts: 28
Karma: 42
Join Date: Aug 2009
Device: none
Hi joblack,

Bad news. I've compiled new version from pycrypto, as you posted, and even pdfminer but no luck. I've regenerated the key using ineptkey and put it into ineptpdf but same error ocurred.

I'll try to keep searching a solution for decryption (maybe it's not a problem of an update but a research of the decryption algorithm for older versions)...
JohnTheRipper is offline   Reply With Quote
Old 12-16-2009, 09:19 PM   #559
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by JohnTheRipper View Post
Hi joblack,

Bad news. I've compiled new version from pycrypto, as you posted, and even pdfminer but no luck. I've regenerated the key using ineptkey and put it into ineptpdf but same error ocurred.

I'll try to keep searching a solution for decryption (maybe it's not a problem of an update but a research of the decryption algorithm for older versions)...
That's great news because you just eliminated an option.

See it that way, the Titanic needed several hours to sink to the ground and you can't expect to solve such a complex situation with a simple fix.

Delayed gratification and patience will bring us the solution - sooner or later.
joblack is offline   Reply With Quote
Old 12-18-2009, 05:38 PM   #560
tagtog
Member
tagtog began at the beginning.
 
Posts: 11
Karma: 12
Join Date: Oct 2009
Device: none
For informations:
The ebooks which have EBX_HANDLER V.3 128 byte have the problem "book key error"
And the ebooks which have EBX_HANDLER V.4 128 byte are decrypted fine.
tagtog is offline   Reply With Quote
Old 12-19-2009, 06:00 AM   #561
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by tagtog View Post
For informations:
The ebooks which have EBX_HANDLER V.3 128 byte have the problem "book key error"
And the ebooks which have EBX_HANDLER V.4 128 byte are decrypted fine.
Good to know - I hope the 128 Bit decrypt algorithm isn't different from the 48 Bit one ... I will check that.

Btw. the plural of information is still information (it's different compared to the German language).

Last edited by joblack; 12-19-2009 at 06:35 AM.
joblack is offline   Reply With Quote
Old 12-20-2009, 07:44 PM   #562
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
FYI: ineptpdf5.pyw released

# ineptpdf5.pyw, version 5
(...)
# 5 - removing small bug with V3 ebooks (anon)
(...)

It can be found at the usual places .

Might most probably solve the book session key error. Might not solve the bookkey error (if not report in the forum). And it most probably won't solve the problem where the pdfs are decrypted correctly (without error message) but then can't be opened (this is a pdf creation problem).

Last edited by joblack; 12-20-2009 at 10:57 PM.
joblack is offline   Reply With Quote
Old 12-20-2009, 09:03 PM   #563
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by JohnTheRipper View Post
Hi joblack,

I was debugging the script, and found that the error was because of the lenght of the book session key in line 1196 (v3 of the script). Maybe there's something wrong in RSA decrypting so that the decryption of the streams does not work.

The RSA decryption is based in the AES key generated by ineptkey script. Maybe is not an AES CBC_MODE key for PDF older versions. i♥cabbages said that uses AES in CBC mode with a random IV... or maybe is not RSA with PKCS#1 v1.5 padding, who knows?

All of these questions influence the dump method, because my "decrypted" PDF has the correct structure.
The book session key problem is (most probably) solved. The Bookkey error could be still a problem.

IMHO this error only occures if you have registered and activated your ADE on a website where they gave you a RC4, DES, Tripple DES or RC2 instead of an AES with CBC.

see at:

The algorithms that shall be used to encrypt the enveloped data in the PKCS#7 object are: RC4 with key lengths up to 256-bits, DES, Triple DES, RC2 with key lengths up to 128 bits, 128-bit AES in Cipher Block Chaining (CBC) mode, 192-bit AES in CBC mode, 256-bit AES in CBC mode. The PKCS#7 specification is in Internet RFC 2315, PKCS #7: Cryptographic Message Syntax, Version 1.5 (see the Bibliography).

Anyway, only time will show if the bookkey error will be resistant (I never had one in my bought ebooks - if you still have one after trying out the new version drop me a line).

Last edited by joblack; 12-20-2009 at 10:52 PM.
joblack is offline   Reply With Quote
Old 12-21-2009, 12:02 AM   #564
tagtog
Member
tagtog began at the beginning.
 
Posts: 11
Karma: 12
Join Date: Oct 2009
Device: none
Thumbs up

Quote:
Originally Posted by joblack View Post
# ineptpdf5.pyw, version 5
(...)
# 5 - removing small bug with V3 ebooks (anon)
(...)

It can be found at the usual places .

Might most probably solve the book session key error. Might not solve the bookkey error (if not report in the forum). And it most probably won't solve the problem where the pdfs are decrypted correctly (without error message) but then can't be opened (this is a pdf creation problem).
Wawwwwwwwwwwww
Its WOOOooOOOrK,
Thank you Joblack;

Now we can Read And Print our ebooks; Which bought them at prices expensive.
Thank you Joblack for this release.
tagtog is offline   Reply With Quote
Old 12-21-2009, 02:53 AM   #565
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Question usual places

Quote:
Originally Posted by joblack View Post
It can be found at the usual places .
The usual search engines did not put anything up - are there any hints on where those "usual places" are?

Martin
krischik is offline   Reply With Quote
Old 12-21-2009, 03:46 AM   #566
chorpler
Zealot
chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.chorpler has a complete set of Star Wars action figures.
 
Posts: 128
Karma: 278
Join Date: Jun 2008
Device: Kindle; PRS-500; MobiPocket on Windows Mobile
Quote:
Originally Posted by krischik View Post
The usual search engines did not put anything up - are there any hints on where those "usual places" are?

Martin
People usually post things at pastebin.com. You can search for things like "ineptpdf" there.
chorpler is offline   Reply With Quote
Old 12-21-2009, 06:05 AM   #567
JohnTheRipper
Enthusiast
JohnTheRipper began at the beginning.
 
Posts: 28
Karma: 42
Join Date: Aug 2009
Device: none
Thank you very much joblack. I've seen changes from version 4, and these are changesin v5 (if ebx_V == 3: V = 3). I couldn't imagine such a change would make this script work.

Thanks joblack
JohnTheRipper is offline   Reply With Quote
Old 12-21-2009, 06:34 AM   #568
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by JohnTheRipper View Post
Thank you very much joblack. I've seen changes from version 4, and these are changesin v5 (if ebx_V == 3: V = 3). I couldn't imagine such a change would make this script work.
Yes the actual change was really small but the 'overhead' to understand what's really going wrong is another story. Of course if you already have the solution it immediately gets crystal clear (at least if you have studied the script for a while).

Last edited by joblack; 12-21-2009 at 06:39 AM.
joblack is offline   Reply With Quote
Old 12-21-2009, 07:15 AM   #569
tagtog
Member
tagtog began at the beginning.
 
Posts: 11
Karma: 12
Join Date: Oct 2009
Device: none
Now we can Automated The script "ineptpdf_auto_version5.pyw version 5"

Thank you Joblack
tagtog is offline   Reply With Quote
Old 12-21-2009, 07:25 AM   #570
joblack
Wizard
joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.joblack ought to be getting tired of karma fortunes by now.
 
Posts: 1,752
Karma: 4382688
Join Date: Jul 2006
Location: Somewhere on earth
Device: Onyx Boox Tab X C
Quote:
Originally Posted by tagtog View Post
Now we can Automated The script "ineptpdf_auto_version5.pyw version 5"

Thank you Joblack
I want to wait until enough feedback is available (especially for the bookkey error).
joblack is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fileopen DRM for PDF circumvented tetrachroma PDF 26 02-09-2012 07:15 AM
Adobe ADEPT DRM for EPUB circumvented i♥cabbages ePub 969 08-28-2011 08:52 AM
Barnes & Noble DRM for EPUB circumvented i♥cabbages ePub 83 01-30-2011 02:55 PM
iPhone adept drm for epub on the iphone philippd Apple Devices 24 12-28-2009 02:29 PM
Adobe PDF DRM? valkyriesound Sony Reader 7 02-16-2007 11:25 PM


All times are GMT -4. The time now is 10:52 PM.


MobileRead.com is a privately owned, operated and funded community.