This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:aux_support:gpg:symmetric [2018/11/01 12:50] superadmin [Decryption] |
en:aux_support:gpg:symmetric [2018/11/01 13:22] (current) edoc2 [Decryption] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Symmetric encryption ====== | ====== 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. | + | 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 long and complex |
===== Creating the passphrase ===== | ===== Creating the passphrase ===== | ||
Line 23: | Line 23: | ||
==== Encryption ===== | ==== Encryption ===== | ||
- | So we have my_text.txt file which we want to encrypt by using symmetric encryption. | + | So we have **my_text.txt** file which we want to encrypt by using symmetric encryption: |
$ gpg --symmetric my_text.txt | $ gpg --symmetric my_text.txt | ||
| | ||
- | After pressing | + | After hitting |
- | If everything went well (no mistakes while entering the password), a new file with name my_text_.txt.gpg will be created. | + | If everything went well (no mistakes while entering the password), a new file with name **my_text.txt.gpg** will be created. |
- | my_text_.txt.gpg contains the encrypted version of the file. This file can now be transmitted via email or simply just held for later purpose on the filesystem. In the later case it's of course important to remove the original file from the filesystem. | + | **my_text.txt.gpg** contains the encrypted version of the file. This file can now be transmitted via email or simply just held for later purpose on the filesystem. In the later case it's of course important to remove the original file from the filesystem. |
Example of removing the original (plaintext) file: | Example of removing the original (plaintext) file: | ||
Line 38: | Line 38: | ||
| | ||
**Warning: | **Warning: | ||
+ | |||
==== Decryption ===== | ==== Decryption ===== | ||
- | Now we will decrypt | + | Decrypting **my_text.txt.gpg** back to readable (plaintext) format: |
$ gpg -d my_text.txt.gpg > my_plain_text.txt | $ gpg -d my_text.txt.gpg > my_plain_text.txt | ||
| | ||
- | After pressing | + | After hitting |
- | If the operation was successful | + | If the operation was successful |