Hello guys, This is Shadowblade and in this article i'm gonna showcase how i generated my gpg key and encrypted a paragraph with a gpg key.
GPG stands for Gnu Privacy Guard and is a public key cryptography implementation. To create one, you need to have the gnupg program.
To install it just type:
To view your key type:
and named it mykey.gpg (i know that it's a name without any inspiration) then ran:
GPG stands for Gnu Privacy Guard and is a public key cryptography implementation. To create one, you need to have the gnupg program.
To install it just type:
$ sudo dnf install gnupg2Now generate a key with:
$ gpg --gen-keyAnswer the questions and there you have your key.
To view your key type:
$ gpg --list-secret-keysNow, in my case i imported a gpg key from a source i won't say (for privacy reasons)
and named it mykey.gpg (i know that it's a name without any inspiration) then ran:
$ gpg --import mykey.gpg
Then created a file named myfile.txt(yet another name without inspiration) and to encrypt it i ran:
$ gpg --output myfile.txt.gpg --encrypt --recipient <email_of_the_source_owner> myfile.txt
This will create a file named myfile.txt.gpg which contains the encrypted version of myfile.txt, only the owner of the private key can decript it.
useful links:- https://www.digitalocean.com/community/tutorials/how-to-use-gpg-to-encrypt-and-sign-messages
- https://www.howtogeek.com/427982/how-to-encrypt-and-decrypt-files-with-gpg-on-linux/
That's it folks, have a happy new year
Commentaires
Enregistrer un commentaire