Encryption

1 view
Skip to first unread message

Jay S

unread,
Nov 23, 2021, 10:21:24 PM11/23/21
to LUNI - Linux Users Of Northern Illinois (Chicago) - Technical Discussion
Hi,

I'm curious is there an encryption utility where I can, in the shell, type a "this is the phrase I want to encrypt" supply a password and have it encrypt and spit out an encrypted message? All from the command line.
likewise, do it in reverse?

Thanks
Jay

eviljoel

unread,
Nov 23, 2021, 10:55:03 PM11/23/21
to luni-c...@googlegroups.com
You can use gpg:

echo "text to encrypt" | gpg --symmetric --cipher-algo AES256 \
--pinentry-mode loopback > test.gpg
gpgconf --kill gpg-agent # To get gpg to forget the passphrase.
cat test.gpg | gpg --decrypt --pinentry-mode loopback

- eviljoel
--
Let me teach you encrypted e-mail. eviljoel's PGP fingerprint:
A2BE 2D12 24D1 67CA 8830 DDE7 DFB3 676B 196D 6430

OpenPGP_signature

David L Carlson

unread,
Nov 23, 2021, 10:55:08 PM11/23/21
to luni-c...@googlegroups.com
The way you phrased your question it sounds like you are asking for a symmetrical encryption/decryption algorithm, which, I think, does not exist, at least in a secure form. If you want to encrypt and later decrypt messages more than 256 characters long you might as well use a real program rather than work from the command line.

--
You received this message because you are subscribed to the Google Groups "Linux Users of Northern Illinois" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luni-chicago...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/luni-chicago/CANpdWGXQQrBA%3DR-k6wYNm7HgU0UpzHAfgotuogtd9K-PZvA0CQ%40mail.gmail.com.


--
David Carlson

Jay S

unread,
Nov 23, 2021, 11:12:29 PM11/23/21
to LUNI - Linux Users Of Northern Illinois (Chicago) - Technical Discussion
Unfortunately, the version of GnuPG on my Cygwin doesn't have the "--pin-entrymode" option

C:\WINDOWS\system32> gpg --version
gpg (GnuPG) 2.2.11
libgcrypt 1.8.4
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.



--
You received this message because you are subscribed to the Google Groups "Linux Users of Northern Illinois" group.
To unsubscribe from this group and stop receiving emails from it, send an email to luni-chicago...@googlegroups.com.

Jay S

unread,
Nov 23, 2021, 11:13:30 PM11/23/21
to LUNI - Linux Users Of Northern Illinois (Chicago) - Technical Discussion
Do you have a good suggestion for something I can install on Mac and Windows?
Simple / Free 

Thanks
Jay

eviljoel

unread,
Nov 24, 2021, 8:11:58 AM11/24/21
to luni-c...@googlegroups.com, Jay S
Try removing the "--pinentry-mode loopback" parameter.

- eviljoel
OpenPGP_signature
Reply all
Reply to author
Forward
0 new messages