Closed wiresnchains closed 1 year ago
Hi @flowxrc and thanks for your interest in this project :)
This looks like a usage error to me.
AES CBC needs both a key and an IV.
The code shown does not set the IV, which means you are encrypting and decrypting with an uninitialized IV - that’s probably why you get different results.
Try setting the IV, e.g. by calling AES_init_ctx_iv(struct AES_ctx* ctx, const uint8_t* key, const uint8_t* iv)
instead of AES_init_ctx(…)
AES256 Encryption returns two different values when compiling in x32 and x64