User Tools

Site Tools


documentation:gnupg-intro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
documentation:gnupg-intro [2019/10/03 00:07] – created derekdocumentation:gnupg-intro [2019/10/03 01:15] (current) – [Data encryption] derek
Line 48: Line 48:
  
 ==== Key creation ==== ==== Key creation ====
 +In order to create a key pair type in terminal the following: ''gpg --full-generate-key''
 +{{documentation:gpg-create-1.png}}
 +
 +Choose first method e.g. RSA and RSA.
 +
 +{{documentation:gpg-create-2.png}}
 +
 +Choose 4096 bits key long (it's more technically secure).
 +
 +{{documentation:gpg-create-3.png}}
 +
 +We'd recommend to choose 2 year lifespan.
 +
 +{{documentation:gpg-create-4.png}}
 +
 +Finally type your name, email and comment for the key pair (this is optional, you can leave it blank). You will be asked to type a passphrase to encrypt your private key with.
 +
 +**NOTE:** Don't forget your passphrase, you can loss your private key without passphrase.
 + 
 +After this please be patient, some time is required to generate a key pair.
  
 ==== Import public key ==== ==== Import public key ====
 +
 +To import someone's else public key all you need is type in terminal ''gpg --import <filename of the public key>''
  
 ==== Commit your own public key ==== ==== Commit your own public key ====
 +
 +To publish your public key you need to provide it first. To get a file with your own public key, just type the following in terminal: ''gpg --export --armor 'yourname@example.com' > yourname.asc''
  
 ==== Sign the data ==== ==== Sign the data ====
  
 ==== Data encryption ==== ==== Data encryption ====
 +
 +=== Encrypt ===
 +To encrypt some data (e.g. file in the example below) you need to know a recipient and his/her public key. On the example below we're encrypting data in file secret.pdf for alice@askele.com: ''gpg -r 'alice@askele.com' -e secret.pdf''
 +
 +Result file will be secret.pdf.gpg
 +
 +=== Decrypt ===
 +In order to decrypt some data (e.g. file) you need to type the following (assuming you receive secret.pdf.gpg): ''gpg -d secret.pdf.gpg > secret.pdf''
 +
 +Result will be stored in secret.pdf which is a plain (decrypted) data.
documentation/gnupg-intro.1570061236.txt.gz · Last modified: by derek

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki