gpg --symmetric filename.bin
gpg --decrypt -o filename.bin filename.bin.gpg
gpg --sign --armor plaintext.txt gpg --verify plaintext.txt.asc gpg --decrypt plaintext.txt.asc > plaintext.txt
gpg --clearsign plaintext.txt gpg --verify plaintext.txt.asc
gpg --detach-sign filename gpg --verify filename.gpg filename
If you want to send secret emails but your favourite client does not use any cryptology there is nevertheless a solution. You only need GnuGPG installed. After generating a key for your encryption/decryption.
gpg --encryption --armor --recipient bob << EOM >this is secret >EOM
The ascii characters that will be printed out you can easily insert per mark&paste into your edit/compose window of your mail client. Afterwards send this to bob. He has to decrypt with
gpg --decrypt << EOM
and paste also per mark&paste the ascii part of the email here into the shell and see what is supposed only for his eyes.
gpg --gen-key
gpg --export --armor bob > bob.asc
scp bob.asc webserver:
Now Bob's public key is on the webserver. Alice has to import it to write a encrypted message to Bob.
wget http://webserver/bob.asc
or
scp webserver:bob.asc . gpg --import bob.asc gpg --encypt --armor --recipients bob file_with_sec.txt
scp file_with_sec.txt.asc bobs_computer:
After this Bob decrypts file_with_sec.txt.asc with
gpg --decrypt file_with_sec.txt.asc
The passphrase protects the private key from accessing except you.
gpg --sign filename gpg --verify filename.gpg gpg --encrypt --sign -r bob secrettextfile.doc
use --clearsign if you want the data in readable form:
gpg --clearsign cleartext.txt gpg --detach-sign filename
To verify against the original file:
gpg --detach-sign cleartext.txt gpg --verify cleartext.txt.asc cleartext.txt gpg --encrypt --sign -r bob rechnung.sxc
gpg --gen-key
Afterwards think about securing the directory where the key are stored with
chmod 700 .gnupg -R
With "shred" you can overwrite a file to hide its contents. To export the key to an external media after creating them on the hard disk use
shred *ring.gpg
in .gnupg directory.
secring.gpg
pubring.gpg
gpg --list-keys
gpg --gen-revoke <keyid>
gpg --edit-key <keyid> or <userid>
gpg --export --armor alice > alice.asc
gpg --keyserver keyserver --send-key keyid
gpg --import bob.ascii
gpg --rec-key ABDD123
To verify the received key you can ask Bob for a fingerprint and compare it with the outcome of:
gpg --fingerprint bob
To set the status of the key to "trust" do the following:
gpg --edit-key bob Command>trust Your decision? 4
The level of trust can be
gpg --search-keys Pattern Patternoix gpg --list-sigs bob