Difference between revisions of "Menggunakan GnuPG"

From OnnoWiki
Jump to navigation Jump to search
Line 11: Line 11:
 
  $ gpg --keyserver certserver.pgp.com --send nobody@york.ac.uk
 
  $ gpg --keyserver certserver.pgp.com --send nobody@york.ac.uk
  
 +
 +
==Encrypt Decrypt Dokumen==
 +
 +
$ gpg --output doc.gpg --encrypt --recipient blake@cyb.org doc
 +
$ gpg --output doc --decrypt doc.gpg
 +
 +
Atau menggunakan Symetric Key
 +
 +
$ gpg --output doc.gpg --symmetric doc
 +
 +
==Membuat Tanda Tangan & Verifikasi Tanda Tangan==
 +
 +
$ gpg --output doc.sig --sign doc
 +
$ gpg --output doc --decrypt doc.sig
 +
 +
Supaya menjadi tanda tangan berbentuk ASCII text, istilahnya ASCII Armour
 +
 +
$ gpg --clearsign doc
  
 
==Membuat Key baru==
 
==Membuat Key baru==

Revision as of 08:41, 11 January 2010

Install GnuPG

# apt-get install gnupg


Perintah Penting

$ gpg --gen-key
$ gpg -gen-revoke nobody@york.ac.uk
$ gpg -armour --export nobody@york.ac.uk
$ gpg --keyserver certserver.pgp.com --send nobody@york.ac.uk


Encrypt Decrypt Dokumen

$ gpg --output doc.gpg --encrypt --recipient blake@cyb.org doc
$ gpg --output doc --decrypt doc.gpg

Atau menggunakan Symetric Key

$ gpg --output doc.gpg --symmetric doc

Membuat Tanda Tangan & Verifikasi Tanda Tangan

$ gpg --output doc.sig --sign doc $ gpg --output doc --decrypt doc.sig

Supaya menjadi tanda tangan berbentuk ASCII text, istilahnya ASCII Armour

$ gpg --clearsign doc

Membuat Key baru

Gunakan perintah gpg --gen-key

$ gpg --gen-key

Outputnya ..

gpg (GnuPG) 1.4.6; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
gpg: directory `/home/paijo/.gnupg' created
gpg: new configuration file `/home/paijo/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/paijo/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/paijo/.gnupg/secring.gpg' created
gpg: keyring `/home/paijo/.gnupg/pubring.gpg' created
Please select what kind of key you want:
   (1) DSA and Elgamal (default)
   (2) DSA (sign only)
   (5) RSA (sign only)
Your selection? 
DSA keypair will have 1024 bits.
ELG-E keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 
Requested keysize is 2048 bits
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 
Key does not expire at all
Is this correct? (y/N) y
You need a user ID to identify your key; the software constructs the user ID
from the Real Name, Comment and Email Address in this form:
    "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
Real name: Paijo Lembek
Email address: paijo@kmukus.com
Comment: Paijo
You selected this USER-ID:
    "Paijo Lembek (Paijo) <paijo@kmukus.com>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++.+++++++++++++++++++++++++...++++++++++.+++++.+++++++++++++++++++++++++.


Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 139 more bytes)
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++++++++++++..+++++.+++++.++++++++++++++++++++++++++++++..++++++++++++++++++++++++++++++
gpg: /home/paijo/.gnupg/trustdb.gpg: trustdb created
gpg: key 2F382081 marked as ultimately trusted
public and secret key created and signed.
gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
pub   1024D/2F382081 2008-02-13
      Key fingerprint = 7114 8ABD B397 50D6 65F8  FB60 57CC A3DB 2F38 2081
uid                  Paijo Lembek (Paijo) <paijo@kmukus.com>
sub   2048g/3D7CCC4C 2008-02-13



Pranala Menarik