apprenticeharper / DeDRM_tools

DeDRM tools for ebooks
14.55k stars 1.52k forks source link

Module Crypto vs Cryptodome (experience linux/debian11, e.g. ion.py) #1957

Open h-c-mueller opened 2 years ago

h-c-mueller commented 2 years ago

I'm on GNU/linux debian 11. I needed to change e.g. in ion.py from Crypto. in from Cryptodome.

dpkg -l "python3-*crypto*"gives

un  python3-crypto
ii  python3-cryptography
un  python3-cryptography-vectors 
ii  python3-pycryptodome

python3-crypto is not installable:

apt install python3-crypto
...
Package 'python3-crypto' has no installation candidate

From google it seems PyCrypto is considered unsafe and unmaintained. Successor is PyCryptodome.

The python3-pycryptodome debian package was generated similiar to pip install pycryptodomex see here with module name Cryptodome instead of Crypto.

So my naive suggestion is to change generally from module Crypto to Cryptodome or to implement a related fallback.

Thanks!

ElleKayEm commented 2 years ago

Development has stopped at this repo. See noDRM for currently active development on DeDRM.

ZolaLa9 commented 2 years ago

As ElleKayEm notes:

This repo is no longer being maintained: https://github.com/apprenticeharper/DeDRM_tools#readme

You can find active development at @noDRM's repo here: https://github.com/noDRM/DeDRM_tools

j-howell commented 2 years ago

PyCryptodome modules are imported using the name Crypto for compatibility with the older PyCrypto. This should all be taken care of if you use the official calibre installer for Linux.

h-c-mueller commented 2 years ago

PyCryptodome modules are imported using the name Crypto for compatibility with the older PyCrypto. This should all be taken care of if you use the official calibre installer for Linux.

I used the official debian installation package calibre 5.12.0+dfsg-1 all

ElleKayEm commented 2 years ago

j-howell is referring to this: https://calibre-ebook.com/download_linux