I'm testing some AES implementation in C, got it from here, compiled it and tested it, encrypting and decrypting works fine for each other.
At site it says:
This implementation encrypts 128-bit blocks.
And also
These programs should be used only for demonstration purposes, because the use of a password as a key gives an effective key length much shorter than the 256-bit key passed to the Rijndael encryption package.
So, I'm trying to test them and interact with the openssl, so if I encrypt anything with the compiled code I got, it can be decrypted with open-ssl or viceversa.
I've tried with openssl aes-128-cbc -in attack-plan.txt -out message.enc
for encrypting and openssl aes-128-cbc -d -in message.enc -out plain-text.txt
for decrypting, methods which I actually got from here. Also tried with 128-ecb
but not getting results.
When I try to decrypt with openssl a file encrypted with the compiled code, and I input the password, it gives me the bad magic number error. When I try to decrypt an openssl encrypted file with my compiled code I'm not getting a right decrypted output.
I really need to get any implementation of AES in C, and proove it against openssl and getting it working good together.