diff --git a/README.md b/README.md index 025b5187..db13a52d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Please install the following dependencies: - termcolor - colorlog - packaging - - pycryptodome + - pycryptodomex Example for Debian: ```sh @@ -54,6 +54,7 @@ sudo apt-get install --no-install-recommends \ pcscd libpcsclite-dev \ python3 \ python3-setuptools \ + python3-pycryptodome \ python3-pyscard \ python3-pip pip3 install --user -r requirements.txt diff --git a/pySim/ota.py b/pySim/ota.py index 83303a6c..5955a084 100644 --- a/pySim/ota.py +++ b/pySim/ota.py @@ -150,8 +150,8 @@ class OtaDialect(abc.ABC): pass -from Crypto.Cipher import DES, DES3, AES -from Crypto.Hash import CMAC +from Cryptodome.Cipher import DES, DES3, AES +from Cryptodome.Hash import CMAC class OtaAlgo(abc.ABC): iv = property(lambda self: bytes([0] * self.blocksize)) diff --git a/pySim/utils.py b/pySim/utils.py index 6b8ee374..537014f0 100644 --- a/pySim/utils.py +++ b/pySim/utils.py @@ -616,9 +616,9 @@ def derive_milenage_opc(ki_hex: Hexstr, op_hex: Hexstr) -> Hexstr: """ Run the milenage algorithm to calculate OPC from Ki and OP """ - from Crypto.Cipher import AES + from Cryptodome.Cipher import AES # pylint: disable=no-name-in-module - from Crypto.Util.strxor import strxor + from Cryptodome.Util.strxor import strxor from pySim.utils import b2h # We pass in hex string and now need to work on bytes diff --git a/requirements.txt b/requirements.txt index fb94472f..b12cb4db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ gsm0338 pyyaml>=5.1 termcolor colorlog -pycryptodome +pycryptodomex packaging diff --git a/setup.py b/setup.py index d14ebc66..d4fb15f7 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup( "pyyaml >= 5.1", "termcolor", "colorlog", - "pycryptodome", + "pycryptodomex", "packaging", ], scripts=[