IV must be 16 bytes long #1617
pzelchenko
started this conversation in
General
Replies: 1 comment
-
Those are pretty old. Current scripts here are adobekey.py 7.0 and ineptpdf.py 9.0.0. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have no idea if this is an old or obsolete issue - I just came into the de-DRM discussion through some Web searches [1a, 1b], not directly through ApprenticeAlf. I attempted using per the descriptions:
ineptkey_v5.4.pyw
ineptpdf_v7.10.pyw
Got the error you see in the title ("IV must be 16 bytes long") and tried adding the following code (via [2]) at line 113 of ineptkey_v5.4.pyw, at the invocation of the new AES instance forced a 16-byte key:
iv = os.urandom(16)
self._aes = _AES.new(key, _AES.MODE_CBC, iv)
This allowed a proper decryption of a DRM-encrypted PDF. Again, I don't know if this is an obsolete issue, but we have to pay attention to the many old threads online that don't connect to Github directly. A large number of people (most?) attempting to remove DRM today will go to these top hits in Google and hit a dead end after trying ineptkey and failing.
[1a] http://amrhaps.net/english/post/2011/06/05/Adobe-Digital-Editions-Ubuntu-and-DRMs
[1b] https://epubor.com/ineptpdf-pyw.html
[2] https://stackoverflow.com/questions/36834580/iv-must-be-16-bytes-long-error-in-aes-encryption
Beta Was this translation helpful? Give feedback.
All reactions