You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EPUBs with font file encoding in combination with Adobe DRM
I have deleted the "my version" and "logfile" sections from the issue report as I'm reporting a hypothetical issue / code question, and not an actual issue with one of my EPUB files - I hope that that's okay.
There are EPUB files like this where particular font files are obfuscated with a XOR-like encryption using the unique book UID as the key. This obfuscation is specified here.
Apparently this feature is sometimes used so that the font files are "linked" to that particular eBook and you can't easily take the font files out of the EPUB and use them elsewhere. The fact that this obfuscation occurs is noted in the encryption.xml file, where the Adobe DRM information is also stored.
Looking at the DRM removal code in ineptepub.py, I don't see any code to handle this. The code parses the XML to find the Adobe-related entries, and then it removes the entire file from the resulting EPUB. This means that if you had an EPUB file which A) has Adobe DRM and B) has its font files obfuscated using the algorithm linked above, running them through the DRM removal scripts will break all the fonts as the necessary encryption information for these is lost.
The question would be, is this combination even possible in the wild? I don't think the EPUB standard forbids using multiple different encryption methods inside the encryption.xml file, so the question would be, are there any EPUBs that use this? There certainly are some that use this font encoding (see the example file above), I just don't know if this can even be combined with Adobe DRM.
If it can, then it might be worth it to fix that in the DRM removal script. For example by only removing the Adobe-related encryption.xml entries, keeping all others intact (only deleting the encryption.xml file if no other encryption entries were found).
The text was updated successfully, but these errors were encountered:
CheckList
The Title
and TheLog Title
are setted correctly.my environment
.the log
.EPUBs with font file encoding in combination with Adobe DRM
I have deleted the "my version" and "logfile" sections from the issue report as I'm reporting a hypothetical issue / code question, and not an actual issue with one of my EPUB files - I hope that that's okay.
There are EPUB files like this where particular font files are obfuscated with a XOR-like encryption using the unique book UID as the key. This obfuscation is specified here.
Apparently this feature is sometimes used so that the font files are "linked" to that particular eBook and you can't easily take the font files out of the EPUB and use them elsewhere. The fact that this obfuscation occurs is noted in the encryption.xml file, where the Adobe DRM information is also stored.
Looking at the DRM removal code in ineptepub.py, I don't see any code to handle this. The code parses the XML to find the Adobe-related entries, and then it removes the entire file from the resulting EPUB. This means that if you had an EPUB file which A) has Adobe DRM and B) has its font files obfuscated using the algorithm linked above, running them through the DRM removal scripts will break all the fonts as the necessary encryption information for these is lost.
The question would be, is this combination even possible in the wild? I don't think the EPUB standard forbids using multiple different encryption methods inside the encryption.xml file, so the question would be, are there any EPUBs that use this? There certainly are some that use this font encoding (see the example file above), I just don't know if this can even be combined with Adobe DRM.
If it can, then it might be worth it to fix that in the DRM removal script. For example by only removing the Adobe-related encryption.xml entries, keeping all others intact (only deleting the encryption.xml file if no other encryption entries were found).
The text was updated successfully, but these errors were encountered: