Archive for the ‘PGP’ tag
How to Batch Decrypt With GNU GPG
Batch decrypting multiple files using a wildcard is as simple as:
echo thisismypassphrase|gpg --passphrase-fd 0 --decrypt-files *.gpg
And mind the lack of spaces right and left of the pipe
Creating strong PGP keys – Quick and Dirty
Ok, all PGP keys are strong. However, here is some advice on how to create good keys:
- $ gpg –gen-key –enable-dsa2
- Select (1) DSA and Elgamal (default).
- Use 3072 as keysize for DSA keys.
- Use 4096 as keysize for ELG-E keys.
- Continue at will until key generation is finished.
- gpg –edit-key Key-ID
- showpref
- setpref AES256 TWOFISH AES192 AES SHA256 SHA512 RIPEMD160 ZIP BZIP2
- save
- ALWAY CREATE A REVOKE CERTIFICATION IN CASE YOU LOOSE YOUR PASSPHRASE:
gpg –gen-revoke Key-ID > Key-ID.revcert.asc in der Konsole eingeben
- Main Operations:
gpg --list-keys gpg --keyserver hkp://[YOURKEYSERVERURL] --send-keys Key-ID gpg -ao Key-IDpubkey.asc --export Key-ID gpg -o Key-IDseckey --export-secret-keys Key-ID gpg --import Keyfile.asc gpg --keyserver hkp:[YOURKEYSERVERURL] --search-keys "User Name" gpg --fetch-keys URL gpg --recv-keys Key-ID
- Change passphrase:
- gpg –edit-key Key-ID
- passwd
- save
- Cleanup (remove unused stuff):
- gpg –edit-key Key-ID
- clean
- save
- Revoke:
- gpg –edit-key Key-ID
- key n (if only subkeys need to be revoked)
- revkey
BTW, useful stuff: