I recently migrated my manufacturing machine from Ubuntu 20 to Ubuntu 22. However, I can no longer install python3-crypto using apt, as instructed in the Disk Encryption documentation. This prevents gen_ekb.py from working properly.
Has anyone encountered this issue or found a workaround?
gen_ekb.py errors:
from Crypto.Cipher import AES
ModuleNotFonudError: No module named 'Crypto'
Note:
It works perfectly on Ubuntu 20
Update:
I resolved the issue by replacing the import statement in gen_ekb.py:
from Crypto.Cipher import AES
with
from Cryptodome.Cipher import AES
Furthermore, I removed python3-crypto from the installation list and installed the following packages instead:
Yes, I did try installing cryptography, but I’m still getting the same error No module named 'Crypto', so I think modifing the code directly might be the quickest solution.
Thanks for the information. Unfortunately, I’m still seeing the same error: No module named 'Crypto'. I’m wondering if you’ve tried any approach that works without modifying any code~
By the way, the document already mentions installing python3-cryptography