cancel
Showing results for 
Search instead for 
Did you mean: 

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

Wladimir
Associate II

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!

2 REPLIES 2
Bubbles
ST Employee

@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
Associate

@Wladimir​  Have you found the solution?

Best regards!