noDRM / DeDRM_tools

DeDRM tools for ebooks
7.26k stars 324 forks source link

RSA key format is not supported when import epub from Adobe Digital Editions #177

Open neofytouv opened 2 years ago

neofytouv commented 2 years ago

Question / bug report

RSA key format is not supported when import epub from Adobe Digital Editions

Which version of Calibre are you running?

6.6.1

Which version of the DeDRM plugin are you running?

v10.0.3

If applicable, which version of the Kindle software are you running?

No response

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
ApplicationPaletteChange event received
calibre Debug log
calibre 6.6.1  embedded-python: True
Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.10.1
Windows: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3)
calibre 6.6.1  embedded-python: True
Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.10.1
Windows: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: DeDRM (10, 0, 3)
QPA platform: windows
devicePixelRatio: 1.0
logicalDpi: 96.0 x 96.0
physicalDpi: 110.95789473684209 x 111.8704347826087
[0.00] Starting up...
[0.00] Showing splash screen...
[0.20] splash screen shown
[0.20] Initializing db...
[0.22] db initialized
[0.22] Constructing main UI...
[0.84] main UI initialized...
[0.84] Hiding splash screen
Starting QuickView
DeDRM v10.0.3: Trying to decrypt My Book.epub
DeDRM v10.0.3: Verifying zip archive integrity
DeDRM v10.0.3: My Book.epub is a secure Adobe Adept ePub for UUID 218321aj-21as-3knz-kd9j-qd54dp43al1z
DeDRM v10.0.3: Looking for new default Adobe Digital Editions Keys after 0.1 seconds
Found 1 keys
DeDRM v10.0.3: Trying a new default key
bdkwoj1o.epub is a secure Adobe Adept ePub.
Could not decrypt bdkwoj1o.epub because of an exception:
Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\calibre\plugins\DeDRM.zip\ineptepub.py", line 305, in decryptBook
  File "Crypto\PublicKey\RSA.py", line 788, in import_key
ValueError: RSA key format is not supported

DeDRM v10.0.3: Failed to decrypt with new default key after 0.2 seconds
DeDRM v10.0.3: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Running file type plugin DeDRM failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 178, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1067, in run
  File "calibre_plugins.dedrm.__init__", line 665, in ePubDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.3: Ultimately failed to decrypt after 0.2 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
[57.00] splash screen hidden
[57.00] Started up in 57.00 seconds with 0 books
Added My Book to db in: 0.1
Added 1 books in 0.8 seconds
ElleKayEm commented 2 years ago

There have been some issues lately with DeDRM retrieving Adobe keys, and it looks like noDRM has done some work on this since the last release. Click on "plugin" at the bottom of this page to get the current master file. If that doesn't do it, @noDRM will need to take a look.

neofytouv commented 2 years ago

Tried the current master file and same error

ElleKayEm commented 2 years ago

If you have a saved Adobe key in DeDRM already, try deleting it and then adding a book (letting DeDRM try to get a correct key automatically). You have ADE authorized with your Adobe ID and on the same machine and user as calibre/DeDRM, yes?

neofytouv commented 2 years ago

Tried and still fail. I have ADE authorized on same machine with calibre

ElleKayEm commented 2 years ago

Will have to see if @noDRM can take a look. Email is in their profile.

JPFrancoia commented 1 year ago

Did you figure it out?