• Re: Very simple file decryption.

    From Raphael@2:250/1 to All on Thursday, August 31, 2023 11:58:33
    On 03/02/2023 18:37, Folderol wrote:
    What I'm after is a *desktop* program that will read a *specific* file and on being given the correct password will decript it, passing it direct to a text editor like kwrite, or better still a text reader that has no write capability.

    The person who this is intended for will not need to do any of the encryption.

    Any ideas?

    I use GPG

    === You ===

    1 Generate a passphrase. I use a (sufficient) number of bytes from
    /dev/random piped into uuencode or base64. Save this in a file (passphrase.txt), and send it to the counterparty.

    2 . Encrypt the file

    gpg --output "some file name" --batch --passphrase-fd 0 \
    -r "receipient's email address" -e "input file name" \
    < passphrase.txt

    3. Export the generated public key

    gpg --export -a "recipient's email address" > public.key

    Send the public key to the counterparty - separately from the passphrase

    4. Send the encrypted file to the counterparty - separately from the
    other two items.

    === Counterparty ===

    5. Save and import public.key

    gpg --import public.key

    6. Decrypt the file using the received file. the saved passphrase and
    the imported public key

    gpg --decrypt --output "some file name" --batch \
    --passphrase-fd 0 -r "recipient's email address" \
    "received data file" < passphrase.txt

    If you have more files to send then only steps 2,4 and 6 are needed.

    The "recipient's email address" is used as an identifier to distinguish between vaious key pairs that you might have.

    --- MBSE BBS v1.0.8.4 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)