fbpx

GPG, Kleopatra, and PGP

I needed to make a PGP encryption system to transfer some files around. Strictly for entertainment and memory process here’s an example of the command lines you need to encrypt a file and then decrypt it.

Encrypt looks like this:

(Now sometimes you have to do this prerequisite)

gpg –edit-key email@****.com

trust
5 (select 5 if you ultimately trust the key)
save

Ultimate Encryption Command:

F:test>gpg -r (NameOfCert) -o (NewEncryptedFile.pgp) -e (FileToBeEncrypted.pdf)

Decrypt looks like this:

F:test>gpg –batch –yes –passphrase (your passphrase) -o (UnencryptedOutput.xml) -d (EncryptedFileInput.pgp)
gpg: encrypted with 4096-bit RSA key, ID ********, created 2014-10-20
“Certificate Name, Description, Etc. <Email Address>”

Leave a Reply

Your email address will not be published. Required fields are marked *