noDRM / DeDRM_tools

DeDRM tools for ebooks
6.56k stars 287 forks source link

Font files don't decrypted from azw3 #540

Open Tokariew opened 2 months ago

Tokariew commented 2 months ago

Question / bug report

Hi I tried to decrypt one of my latest purchases from amazon The book nearly work, but it seems that fonts wasn't ecrypted during process

When i run calibre from command line it seems that everything is fine:

Initialized urlfixer
DeDRM v10.0.3: Trying to decrypt Edgedancer.azw3
Using Library AlfCrypto DLL/DYLIB/SO
MobiDeDrm v1.1.
Copyright © 2008-2020 The Dark Reverser, Apprentice Harper et al.
Decrypting Kindle Format 8 ebook: Edgedancer
Found 4 keys to try after 0.1 seconds
Crypto Type is: 2
File is encoded with PID i+9xJLliE7.
Decrypting. Please wait . . . . done
Decryption succeeded after 0.1 seconds
DeDRM v10.0.3: Finished after 0.1 seconds

But after using calibre plugin to get epub from kf8 file, fonts are not readable. In epub there was additional file: META-INF/encryption.xml

<encryption xmlns="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:enc="http://www.w3.org/2001/04/xmlenc#" xmlns:deenc="http://ns.adobe.com/digitaleditions/enc">
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00123.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00124.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00125.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00126.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00127.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00128.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00129.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00130.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00131.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
  <enc:EncryptedData>
    <enc:EncryptionMethod Algorithm="http://ns.adobe.com/pdf/enc#RC"/>
    <enc:CipherData>
      <enc:CipherReference URI="OEBPS/Fonts/font00132.ttf"/>
    </enc:CipherData>
  </enc:EncryptedData>
</encryption>

Is it possible to recover the fonts?

Which version of Calibre are you running?

7.9 linux flatpak

Which version of the DeDRM plugin are you running?

10.0.3

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

No response

Log output

No response