As the title says I'm trying to find out why python gives me different plaintexts, I'm using these values:
Key: 6ec23692ce90428e421bf68a5e1f64a3
Iv: 00000000000000000000000000000000
Encrypted data: 51a8c42907e251a2d5bbea21d290bd709a726e9a7502a34a4ad3e8df6cabeb5bab3056623fd48ab731407d59ada795327db050dcc1db06a5df3fe1aba695a33b64d91d946beb8c031aef793c1e015037c9aaaf3244d2e1c82a599507401f91b7096e77506c5f91a3c60b756de4b9357c5dddbbffd7eed5dc7689263196ac8f843181382d2058c891e8a7d5d19f6a730f5a27de19727316ac4f982e9b9f6cd591624bf89157b33282f91981692945225cc5000f4bf78dacbe7efdeec93cb5805e4bbf70e15890ac0fc6b3f3043e68fc4566172b037c2b35130cb530ab7c16ca06e15baba03c609fd98e2f4bab998a6d558b0d230a9abcb43f824d809b891ad5cb9a6064fea1ab7058fb1abfef71db1086d2fddeeb9ea31ea9efa1d1021bccf1932a90dea1366dd2c4ca97d1b48e36a3c8c4b4b7a40430fae994d5a932ff030fc1b3f310157a76f659d0b74022c4312c3d369f74a074cf377ba2e384dce79b379a554d0894153d5017984e90ccd65ca8887a3eafd0e3bb6b60f1fddb3ef9e720d626f262d24920a44ae9ca17a352e22b9fba988784db96f426cce6b56ad6dc2a26641853ba777682ccf40f42ba02aea77486a1325263198ccac1f761ca721624c1bae2322cbd48a20e6f5abbb27c61d8023c44efaebc9d3ae80de3fca0bcba7825cb9156fc9d69bb503e7edfe39913ed25944f5086308cc521c3538f1dcee0d98d
(data contains 512 bytes, so it is already fixed and padding is not needed)
The first plaintext block (16 bytes) is different:
- First decryption returns:
2e455bb228e3201d8cd466051852f418 - Second decryption returns:
ba0a0b34186fe53c4f87e918d6b22d95
The plaintext is equal after the first block (so others blocks are decrypted correctly).
I'm using python 3.9.6 (but I also tested it with 3.10.1).
Github script reference: https://github.com/shijimasoft/cia-unix/blob/experimental/decrypt.py
Decryption is executed at: https://github.com/shijimasoft/cia-unix/blob/4fc736101f8c936f31ddb5efe435ce903821bea4/decrypt.py#L139