GnuPG is a complete and free implementation of the OpenPGP standard as defined by RFC4880 (also known as PGP). GnuPG allows you to encrypt and sign your data and communications; it features a versatile key management system, along with access modules for all kinds of public key directories.
GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications. A wealth of frontend applications and libraries are available. GnuPG also provides support for S/MIME and Secure Shell (ssh).
Let’s create a simple text file with the help of gedit tool which is already pre-installed in Kali Linux OS.
To create a file, type
To encrypt this file, type the following command:
gpg -c yeahhub.txt
which further asks you to set your password and will create a new file named yeahhub.txt.gpg
Type “ls” to list all the files in current directory and as you can see that, now we’ve two files i.e. yeahhub.txt and yeahhub.txt.gpg (which i encrypted) and is very difficult to recover or crack.
To view the content of encrypted file, type “cat yeahhub.txt.gpg” as shown below:
To decrypt the same file, type “gpg yeahhub.txt.gpg” in same terminal which actually extracts the original file.