I am encrypting a tar file (created using tar cfz
) on an Ubuntu 10.04 box using the following command:
openssl enc -aes-256-cbc -salt -in myfile.tar -out myfile.enc.tar -pass pass:${P}
Now I copy the encrypted file to another machine and decrypt it using following command:
openssl enc -d -aes-256-cbc -in myfile.enc.tar -out myfile.tar -pass pass:${P}
But I'm not able to open the decrypted arhchive file myfile.tar
. Am I doing something wrong here or this is not possible?
EDIT: Working now I think I missed a parameter during decryption (-salt
)
openssl enc -d -aes-256-cbc -salt