  
  import pyghmi.exceptions as exc
  from pyghmi.ipmi.private import constants
-@@ -309,10 +309,6 @@ class Session(object):
+@@ -309,10 +309,6 @@
      # can do something like reassign our threading and select modules
      socketchecking = None
  

-                                                     ) + decryptor.finalize())
+                decrypter = AES.new(self.aeskey, AES.MODE_CBC, iv)
+                decrypted = decrypter.decrypt(payload[16:])
+                payload = decrypted
                 padsize = payload[-1] + 1
                 payload = payload[:-padsize]
             if ptype == 0:
diff --git a/requirements.txt b/requirements.txt
index 1fb58a9..26ff921 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-cryptography>=2.1  # BSD/Apache-2.0
+pycryptodomex>=2.6

     @classmethod
     def _cleanup(cls):
         for sesskey in list(cls.bmc_handlers):
@@ -872,14 +868,9 @@
                 iv = os.urandom(16)
                 message += iv
                 payloadtocrypt = bytes(payload + _aespad(payload))
