I encrypted a file by using the following command from a stackoverflow answer:
openssl enc -in file_name -aes-256-cbc -pass stdin -out file_name.aes;
I can decrypt this file by running:
openssl enc -in file_name.aes -d -aes-256-cbc -pass stdin -out file_name
However, the decryption command only works in the machine where I encrypted the file (CentOS). If I copy the encrypted file
file_name.aes over to my other machine (running on Fedora) and I try to decrypt it, I get an error message:
140667230762896:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:evp_enc.c:592:
Which suggests I am typing the wrong password. Is OpenSSL aes encryption system depedent? Why can I only decrypt the file in CentOS but not in Fedora?