When creating the DES cipher object with DES.new, we use the property card_keys.dek. This property may hold a 16 byte key, but DES uses an 8 byte key (56 bit + 8 bit integrity). Pycryptodome does not automatically ignore excess key bytes. Instead it throws an exception. This means we need to make sure to supply only the first 8 bytes of card_keys.dek See also: https://pycryptodome.readthedocs.io/en/latest/src/cipher/des.html Related: OS#6531 Change-Id: I92e0dc6a6196b532bd8b53fca7b9e78070d6903f