I have modified my thinkpad's BIOS to remove the wifi whitelist and plan to flash the modified bios back to the eeprom. To do that I have to use a tool called [thinkpad-uefi-sign](https://github.com/thrimbor/thinkpad-uefi-sign) which signs the image so it can boot. Thinkpad-uefi-sign requires using pycryptodome. I installed that using
apt install python3-pycryptodome
However it still didn't work and have the error
ModuleNotFoundError: No module named 'Crypto'
when I run thinkpad-uefi-sign/verify.py. I am using Debian Testing Trixie with up to date packages and Python 3.11.5.
Another thing I tried was to install it using
pip install pycryptodome
however that gave a warning that it could break packages and to install it instead using apt install python-xyz. I then installed python3-full and set up a venv (virtual environment) using python3 -m venv /path/to/venv. I installed pycryptodome in the venv using
/path/to/venv/bin/pip3 install pycryptodome
I then ran the script thinkpad-uefi-sign/verify.py with
/path/to/venv/bin/python3 thinkpad-uefi-sign/verify.py Bios_Modded.bin
and still ran into the same error. After that I tried installing pycryptodomex, Crypto, and pycrypto using pip3 from the venv but still ran into the error when running the program. I additionally tried to try the answers from [this other post](https://stackoverflow.com/questions/51824628/modulenotfounderror-no-module-named-crypto-error) , but it didn't help much.
I also tried using a macbook and it seemed to work there for some reason so it might be a packaging-related issue.
Encase this could be helpful, this is the command and the full output.
$ ./python3_venv_with_pycryptodome/bin/python3 thinkpad-uefi-sign/verify.py Bios_Modded.bin
Traceback (most recent call last):
File "/home/witherslayer/Sowa/ThkpX1CG2_UEFIs/workflow/thinkpad-uefi-sign/verify.py", line 19, in
from Crypto.PublicKey import RSA
ModuleNotFoundError: No module named 'Crypto'
Asked by witherslayer
(1 rep)
Sep 18, 2023, 08:27 AM
Last activity: Apr 21, 2025, 07:01 PM
Last activity: Apr 21, 2025, 07:01 PM