-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Cryptodome.cipher instead of Crypto.cipher #169
Comments
For me only
Are you sure you have |
I am using Debian Testing, which is different from Sid. The codename for testing is currently trixie. Testing is not as bleeding-edge as Sid is. Example: Sid already has the 6.7-series kernel, whereas Testing currently has 6.6. Stable is still on 6.1. I do have pycryptodome installed. Whenever I can, I use Debian's package system instead of pip. I only use pip if I have to, e.g. if I desperately need a newer version of a package. But with Debian Testing being very much up to date, that almost never happens. Here's a quick summary of my config: Python version: Python 3.11.7 (main, Dec 8 2023, 14:22:46) [GCC 13.2.0] on linux Here's a snippet of dpkg's file listing for the installed package: dpkg -L python3-pycryptodome As all files are placed in the subfolder Cryptodome, it seems quite natural to me, that I need to call the package accordingly. Maybe pip places these files differently? |
I just did some testing regarding this issue. I was able to reproduce it on latest Debian Testing. The issue seems to have to do with the difference how apt and pip are installing PyCryptodome. If the dependencies are installed using apt I'm experiencing the same issue but when I create a venv and use pip to install them everything works as expected. To solve this, I conserver using try/except to first try importing from Crypto and fallback on trying to import from Cryptodome if that fails and so correctly handle booth cases. Thanks a lot for reporting this. I don’t think I would ever have discovered this myself. |
Much appreciated! It is me who has to thank you for this great tool! |
I am a new user of NSZ v4.6 on Linux (Debian Testing).
In order to run NSZ, I need to make this change in nsz/nsz/nut/aes128.py:
-from Crypto.Cipher import AES
-from Crypto.Util import Counter
+from Cryptodome.Cipher import AES
+from Cryptodome.Util import Counter
I suggest pulling this change into the sources.
The text was updated successfully, but these errors were encountered: