Command line encryption tool

Discussion in 'privacy general' started by rpk2006, Feb 10, 2017.

  1. rpk2006

    rpk2006 Registered Member

    Joined:
    Jan 29, 2003
    Posts:
    114
    Location:
    Planet Earth
    I am looking for a command-line encryption utility which allows passphrase to be supplied with the syntax. I checked Google and Bing but found few utilities that use Blowfish or some obsolete algorithms.

    Any utility which offers few modern algorithms and supports multiple encryption as well.
     
  2. mirimir

    mirimir Registered Member

    Joined:
    Oct 1, 2011
    Posts:
    9,252
    You can do that with GnuPG.
    Code:
    gpg -c --batch --passphrase 123456789 -o foo.gpg foo
    But do wipe command history afterwards :)
     
  3. rpk2006

    rpk2006 Registered Member

    Joined:
    Jan 29, 2003
    Posts:
    114
    Location:
    Planet Earth
    I tried GPG but it opens a dialog box to enter passphrase.

    ** Edited **

    Thanks the syntax you provided worked. I tried gpg -help but didn't find those options.
     
  4. rpk2006

    rpk2006 Registered Member

    Joined:
    Jan 29, 2003
    Posts:
    114
    Location:
    Planet Earth
    Any command-line tool which supports cascaded encryption?
     
  5. guest

    guest Guest

    Another solution:
    OpenSSL
    https://www.madboa.com/geek/openssl/#encrypt-simple
    Code:
    # provide password on command line
    openssl enc -aes-256-cbc -salt -in file.txt -out file.enc -pass pass:password
    
    # provide password in a file
    openssl enc -aes-256-cbc -salt -in file.txt -out file.enc -pass file:/path/to/secret/password.txt
    Or the command-line version of 7z:
    Code:
    7z.exe a -ppassword secret.7z secret.txt
    7z.exe a -ppassword secret.7z secret.txt -mhe
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.