password encription for a data file - Unix

This is a discussion on password encription for a data file - Unix ; Hi, I would like to know how to encript a data file (ascii, and other format as well if possible) by using a password. On my *nix incarnation (Linux) I was able to find nothing and even zip has the ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: password encription for a data file

  1. password encription for a data file

    Hi,
    I would like to know how to encript a data file (ascii, and other format
    as well if possible) by using a password.
    On my *nix incarnation (Linux) I was able to find nothing
    and even zip has the password encription somehow not enabled.
    Any ideas?
    Luciano


  2. Re: password encription for a data file

    On Wed, 11 May 2005 08:55:08 +0200, Luciano
    wrote:

    >Hi,
    >I would like to know how to encript a data file (ascii, and other format
    >as well if possible) by using a password.
    >On my *nix incarnation (Linux) I was able to find nothing
    >and even zip has the password encription somehow not enabled.
    >Any ideas?
    >Luciano


    Use gpg.

    You can do a plain symmetric encryption with
    gpg -c somefile

    It defaults to twofish, IIRC

    Read "gpg -h"


    --
    I'm not really a human, but I play one on earth.
    http://zentara.net/japh.html

  3. Re: password encription for a data file


    Luciano writes:

    > Hi,
    > I would like to know how to encript a data file (ascii, and other format
    > as well if possible) by using a password.
    > On my *nix incarnation (Linux) I was able to find nothing
    > and even zip has the password encription somehow not enabled.
    > Any ideas?
    > Luciano


    Here's a script that uses openssl.
    -SEan


    #! /bin/bash
    #
    usage()
    {
    echo "Usage: encrypt foo .. encrypts foo, stores in foo.enc"
    echo " encrypt -d foo.enc .. decrypts foo.enc, stores in foo"
    echo " encrypt -c foo.enc .. decrypts foo.enc, writes to stdout"
    }

    if [ $# -eq 1 -a "$1" = "-h" ]
    then
    usage
    elif
    [ $# -eq 2 -a "$1" = "-c" ]
    then
    openssl enc -d -des -in $2
    elif
    [ $# -eq 2 -a "$1" = "-d" ]
    then
    openssl enc -d -des -in $2 -out ${2%.enc}
    elif
    [ $# -eq 1 -a -f "$1" ]
    then
    openssl enc -e -des -in $1 -out $1.enc
    else
    usage
    fi



  4. Re: password encription for a data file

    Luciano writes:

    > Hi,
    > I would like to know how to encript a data file (ascii, and other format
    > as well if possible) by using a password.
    > On my *nix incarnation (Linux) I was able to find nothing
    > and even zip has the password encription somehow not enabled.
    > Any ideas?
    > Luciano


    I've used mcrypt in the past. It is a replacement of the old UNIX crypt
    program, with much improved security, and supporting many cryptographic
    algorithms. An example of usage is:

    % mcrypt -a blowfish file.txt

    You are then prompted for a password. Decryption is as easy:

    % mdecrypt file.txt.nc

    See

    --
    Neil

+ Reply to Thread