User Tools

Site Tools


en:aux_support:gpg:symmetric

This is an old revision of the document!


Symmetric encryption

This is basically the most simple type of encryption we can perform with GnuPG. No private or public keys are involved in the process. Instead of the keys we just use a passphrase (password). So it's important to use a secure and long enough passphrase.

Creating the passphrase

A good practice would be using 12 - 45 randomly chosen characters combining alphanumeric characters ([0-9],[a-z],[A-Z]) and some special characters like !,@,# or $.

In Linux we have a utility program, pwgen, which will create random strings for passphrase purpose.

Example using pwgen: (create single 20 character long passphrase, no special characters)

$ pwgen -s 20 1
EiLdHF7meFXsbN8PTUWz

And one more example with special characters:

$ pwgen -sy 20 1
!xZF3GLv$-,Qf1O9B+i~

Note: Sometimes it's more convenient to use slightly longer passphrase without special characters.

So we have my_text.txt file which we want to encrypt by using symmetric encryption.

$ gpg --symmetric my_text.txt

After pressing [ENTER], gpg will ask you to input the passphrase (twice).

If everything went well (the two password matched), a new file with name my_text_.txt.gpg will be created.

en/aux_support/gpg/symmetric.1541075679.txt.gz · Last modified: 2018/11/01 12:34 by superadmin