# OpenSSL Decryption Issues



## fitzlt (Oct 26, 2012)

I have a small problem...

I encrypted some files using OpenSSL a few months ago.

I am now trying to decrypt them on a Windows 7 computer using openssl on cygwin.

The problem is, I don't remember what the name of the files were before they were encrypted.

Does that matter? Is there a way to simply decrypt them to whatever they were--or do I have to specifically name the file with the "-out" option?

Thanks for any help.


----------



## xtaz (Oct 26, 2012)

Filename doesn't matter. I have two shell scripts that I use to do the same thing:


```
Encrypt: openssl enc -aes-256-cbc -salt -in "$1" -out "$2"

Decrypt: openssl enc -d -aes-256-cbc -salt -in "$1" -out "$2"
```

The output filename is independent of the encrypted file. It's just a filename to write the output to. The original filenames won't be part of the encrypted file, so if you don't know what they were you will have to just make up a filename for the output.


----------



## SirDice (Oct 26, 2012)

It's probably better to tar(1) up the files first, then encrypt the resulting tarball. That'll save the filenames (and more).


----------

