noDRM / DeDRM_tools

DeDRM tools for ebooks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to decrypt KFX DRM voucher with any key

gemini-trek opened this issue · comments

Question / bug report

Hello! I'm having trouble using DeDRM.
All tools are being used on the same computer.
The books appear in the KFX-ZIP format and it is not possible to convert them.

Which version of Calibre are you running?

7.8

Which version of the DeDRM plugin are you running?

v10.0.9

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

2.3.1 (70682)

Log output

ApplicationPaletteChange event ignored
Using calibre Qt style: True
calibre Debug log
calibre 7.8  embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 10, 0) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0)
calibre 7.8  embedded-python: True
Windows-10-10.0.22631-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22631')
Python 3.11.5
Windows: ('10', '10.0.22631', 'SP0', 'Multiprocessor Free')
Interface language: None
EXE path: C:\Program Files\Calibre2\calibre-debug.exe
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 10, 0) && DeDRM (10, 0, 9) && Package KFX (from KFX Input) (2, 10, 0) && KFX metadata reader (from KFX Input) (2, 10, 0) && From KFX (2, 10, 0) && KFX Input (2, 10, 0)
QPA platform: windows
devicePixelRatio: 1.25
logicalDpi: 96.0 x 96.0
physicalDpi: 87.70489335006272 x 87.60718562874251
[0.00] Starting up...
[0.00] Showing splash screen...
[0.16] splash screen shown
[0.16] Initializing db...
[0.16] db initialized
[0.16] Constructing main UI...
[0.95] GUI main window shown
[1.00] main UI initialized...
[1.00] Hiding splash screen
Gather KFX-ZIP (from KFX Input) 2.10.0: Importing C:\Users\userz\OneDrive\Documentos\My Kindle Content\B07WG46WYT_EBOK\B07WG46WYT_EBOK.azw
Gather KFX-ZIP (from KFX Input): Gathered 16 file(s) as C:\Users\userz\AppData\Local\Temp\calibre_5d1x1ny3\j34qv43a.kfx-zip
DeDRM v10.0.9: Trying to decrypt j34qv43a.kfx-zip
[10.19] splash screen hidden
[10.19] Started up in 10.19 seconds with 0 books
stdout+stderr from file dialog helper: [b'', b'']
piped data from file dialog helper: [b'\xd6n\x8c!\xfbu\n \x1e\x97\x0b\xc9\x07\xd7\x9c\xfd\x14\x04\xad~cN}rU\xe8\xe5\xc6\xac$\xc8D', b'C:\\Users\\userz\\OneDrive\\Documentos\\My Kindle Content\\B07WG46WYT_EBOK\\B07WG46WYT_EBOK.azw']
Decrypting KFX-ZIP ebook: j34qv43a
Got DSN key from database kindle_key_1713398418_1
Found 1 keys to try after 0.7 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.1943afec-367a-452f-ba31-84593da00838.voucher
Traceback (most recent call last):
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
DeDRM v10.0.9: Failed to decrypt with error: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Looking for new default Kindle Key after 0.7 seconds
searching for kinfoFiles in C:\Users\userz\AppData\Local
Found K4PC 1.25+ kinf2018 file: C:\Users\userz\AppData\Local\Amazon\Kindle\storage\.kinf2018
Decrypted key file using IDString '3202902070' and UserName 'userz'
DeDRM v10.0.9: Found 1 new key
Decrypting KFX-ZIP ebook: j34qv43a
Got DSN key from database key_0
Found 1 keys to try after 0.9 seconds
Decrypting KFX DRM voucher: amzn1.drm-voucher.v1.1943afec-367a-452f-ba31-84593da00838.voucher
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 104, in decrypt_voucher
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 1394, in parse
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\ion.py", line 103, in _assert
Exception: Unknown type encountered in envelope, expected VoucherEnvelope
Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre_plugins.dedrm.__init__", line 965, in KindleMobiDecrypt
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key
DeDRM v10.0.9: Ultimately failed to decrypt after 0.9 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_plugins.dedrm.__init__", line 931, in KindleMobiDecrypt
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\k4mobidedrm.py", line 203, in GetDecryptedBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 67, in processBook
  File "C:\Users\userz\AppData\Roaming\calibre\plugins\DeDRM.zip\kfxdedrm.py", line 111, in decrypt_voucher
Exception: Failed to decrypt KFX DRM voucher with any key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.dedrm.__init__", line 1030, in run
  File "calibre_plugins.dedrm.__init__", line 981, in KindleMobiDecrypt
calibre_plugins.dedrm.DeDRMError: DeDRM v10.0.9: Ultimately failed to decrypt after 0.9 seconds. Read the FAQs at noDRM's repository: https://github.com/noDRM/DeDRM_tools/blob/master/FAQs.md
Package KFX (from KFX Input) 2.10.0: Packaging C:\Users\userz\AppData\Local\Temp\calibre_5d1x1ny3\j34qv43a.kfx-zip
Processing container: B07WG46WYT_EBOK.azw
Running file type plugin Package KFX (from KFX Input) failed with traceback:
Traceback (most recent call last):
  File "calibre\customize\ui.py", line 199, in _run_filetype_plugins
  File "calibre_plugins.kfx_input.package_filetype", line 23, in run
  File "calibre_plugins.kfx_input.package_filetype", line 34, in package_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 79, in convert_to_single_kfx
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 212, in decode_book
  File "calibre_plugins.kfx_input.kfxlib.yj_book", line 321, in get_container
calibre_plugins.kfx_input.kfxlib.utilities.KFXDRMError: Book container B07WG46WYT_EBOK.azw has DRM and cannot be converted
KFX metadata reader (from KFX Input) activated for C:\Users\userz\AppData\Local\Temp\calibre_5d1x1ny3\el26u1ap_add_books\0\B07WG46WYT_EBOK.kfx-zip

That appears to be a book with stronger encryption which cannot be removed at this time. Note that the product page says:

On Android and Fire tablets, the latest version of the Kindle app is required.
On PC & Mac, the latest version of the Kindle app is required.

That's what I thought.
Thanks for the quick reply!