I have a problem in combining encryption with a host software tool based on LibTomCrypt sources, then decryption with the hardware BEE (Bus Encryption Engine) of an i.MX RT1062 NXP processor. I am using AES 128 CTR with KEY = 0xdc5301d107837268e68ffc887df29528, IV (nonce) = 0x73793afe52944a1b61fae8bcaa6d3cf9, and for comparison purposes, trying to decode a sequence of 0xff. I have tried also with cryptii. The problem is that I have three different results:
The input for decryption is always:
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
- LibTomCrypt based tool decrypted output:
01 81 1c 90 e8 13 35 0f 73 c3 eb ba 5d 53 4d 76
b0 d8 e4 44 15 77 b7 28 f0 73 78 2a 64 42 f9 9d
- NXP i.MX RT1062 NXP processor decrypted output:
a7 7b f9 bf 40 c0 4c 58 88 fd 72 9f 0e 06 5d 8c
1a 82 88 af e6 d7 8c 4b 60 18 f8 99 f3 7b b9 46
- cryptii online decrypted output:
a0 ec f9 f5 0f 6b 24 f3 42 f1 38 3b 69 fb 0d 74
6a 71 3d c3 4d 62 c7 32 30 ac b1 34 2a 2b 78 52
I have tried reverting the bytes of the KEY and IV for little/big endian option, but without success.
Which of 1, 2, 3 decryption is correct?
Any hint to find what parameter does not match? Or hints for another software tool to use for comparison?