I am looking for command line encryption utility for Windows - paid or free. Would prefer it to support AES-256. It has to be something with large user base and actively in development. Need to be able to specify password in command line - not looking to use private/public keys.

It will be used as a part of my backup process. In a nutshell I would just use Winzip or 7-zip encryption but the list of files in encrypted archive is visible and I don't like that. So the plan is to zip files without the password and then encrypt ZIP file itself.

I do use TrueCrypt but it is not convenient for this process - one has to backup whole volume which is not effective storage-wise plus one cannot create encrypted volumes from the command line as far as I know.

Basically looking for something like this: http://hcrypto.sourceforge.net/ but this software doesn't seem to be under active development.

  • to hide the file names you can zip the files without password then zip the zipped file with a password. the question is : is the zip encryption secure? – EKanadily Dec 17 '16 at 9:25

In the command line version of 7-zip 7z.exe you can use the -p switch to set a password. This will also enable header encryption ( -mhe option for the 7z format) which means file names will also be encrypted.

  • Unless the 7-zip encryption code is Open Source, I would not recommend using it. Open Source encryption code has been vetted by more eyes, and is much harder to hide backdoors in. – Fran Jun 9 '12 at 19:29
  • 4
    7-zip uses AES and it's LGPL v2 and I really think a guy who is competent enough to invent a widely-used archieve format knows how to use an ecryption lib correctly. – billc.cn Jun 9 '12 at 19:32
  • 2
    @billc.cn I agree. I just didn't know if the source was open. It is, so 7-zip is a perfectly valid solution. – Fran Jun 10 '12 at 0:22

openssl is available for Windows is widely used and supports command line encryption

# encrypt file.txt to file.enc using 256-bit AES in CBC mode
openssl enc -aes-256-cbc -salt -in file.txt -out file.enc

If necessary, you can specify the pass-phrase on the command-line

… -pass pass:mySillyPassword


… -pass file:/path/to/secret/password.txt

(from http://www.madboa.com/geek/openssl/#encrypt-simple)

See also this answer to a related question that mentions GPG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.