Skip to main content
Wladimir
Associate II
Jun 7, 2021 6:57 PM UTC
Question

AES Cryptolib encrypted data doesn't decrypting by any other libraries on other platforms except Cryptolib itself

Hello everyone!

I encrypt the data with the AES-256 ECB algorithm using the X-Cube-Cryptolib library, while the library itself can decrypt the data correctly, and third-party libraries decrypt it incorrectly. I use 32 random bytes as the key.

I tried using Aes, AesManaged, Aes Crypto Provider, Rijndael, and RijndaelManaged in C# with the following parameters in the constructor

KeySize = 256;

Block Size = 128;

Mode = CipherMode.ECB;

Padding = PaddingMode.Zeros;

Key = key;

And on these sites by copying the bytes of the key and data from the debag:

https://www.devglan.com/online-tools/aes-encryption-decryption

http://aes.online-domain-tools.com/

https://www.javainuse.com/aesgenerator

https://encode-decode.com/aes256-encrypt-online/

https://gchq.github.io/CyberChef/#recipe=AES_Encrypt(%7B'option':'UTF8','string':'hello'%7D,%7B'option':'Hex','string':''%7D,'','','',%7B'option':'Hex','string':'undefined'%7D)&input=VGVzdA

Please tell me, maybe there is some error in the library. Thanks!

Best regards!

This topic has been closed for replies.

2 replies

Bubbles
ST Employee
Jun 18, 2021 2:05 PM UTC

@Wladimir​ ,

have you checked the endiannes?

J.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MRosi.2
Visitor II
Feb 24, 2022 11:32 AM UTC

@Wladimir​  Have you found the solution?

Best regards!