Search This Blog

Friday, February 22, 2013

My GNU gpg recipes

My public GNU gpg key

A link to the always up to date public key can be found here: https://launchpad.net/~radoslaw-tomaszewski  -> EF9C6A5F .

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.11 (GNU/Linux)

mQENBFEncHsBCACwCfNU1ThBhqbFclS1xk0FIuk5/OyOSVU5lVsLHMTkQjZpDOSL
IwIgggCI+GIOA/iJ1UMZxTOPX5huqBatQxw3Z7CIXymDv1Gh309OfeNnGgSxGi1r
ebZDYTAqc7tTnjeZLC+dC0e3epZMLO4+tbOgTCRmCAg4JkcT06J77PMcfoc8AFcQ
90XI++1AobGzC2iDEwGtLLImTIDzCV8w4n+uBZ4+zy8IMefozlut3wtEHSFRD7nP
lUGzLQHTidXYWknNhRtnJIFERlzim3juLUTr7LdOhuSlFyqw3gKa8b2exU01qE4p
RZ3aE5enFQ2LnThm8cb5VbYknu3t01okow5bABEBAAG0NVJhZG9zbGF3IFRvbWFz
emV3c2tpIDxyYWRvc2xhdy50b21hc3pld3NraUBnbWFpbC5jb20+iQE+BBMBAgAo
AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCUSd3dQUJB4TU6wAKCRD40GUG
75xqX3UQB/0U61GULY5UKzjBV4SkQaVqxT0o9B14X1K8Qjnd6E0/rupTNPNNheYR
ClIBhX2lEq7KH/mwvw2Pa9iP1MJkGRspo4JnYQrt6vJ7uJ+tiUMOFWzAe2CUmtuN
uc2eyL7xFkkKujpOyp92ijjLwoRS4qAxt0dUKWa4xSbTxjFSB2dKOQtP+3c3kDIG
ztDdWDVRDZrxsnhws+rnqT67hGi1HoNdxqjMiEnCN7HwqVXhwGS9PBpyf1LIqR63
N3IOIIHgAh/KUixbyNuDOWKv6kXXh94uVxoJduC3isj1a/7PpTIxmOZpVPv1j3iA
7IZRjUPE9ExwGdSrm1nJov4E7iosg8HwuQENBFEncHsBCADSdkDTZE//RQj55Ij8
jz81VsIFkH50diJhWCSkLEfJN0soGqXW95Tcz80KVSz00za6/5+4/c7BWRbj7C4o
h6FYclRxxSXjBIFY2haQSOv/8+EwnlkJGXXJXpp2nKh3OGJqV0o0+S9VRdakza5k
sQbW1mYjOLteyaOx0L/fL9OVOHOsg21G1nvwxdjFrl4SY25iF2Z60IfaUy8aVvJ+
U8c4xNllNTimfMFNkBSeH9ve+JJ1rw/VjiZPiDjjoW6PK1+Vm6W+6oTctvgtGxtE
Dn5k60U6XO/jAUGTvHpTNiS7jLJLihAnXNHfu4rhFCs2+Nvp0nLWkcjGBw+rAGmJ
ZxpXABEBAAGJAR8EGAECAAkFAlEncHsCGwwACgkQ+NBlBu+cal8lLQf+NV0C2wKE
cikExD5rXWzzBwbyYVSlM7AIvGC6ZEQEOi3Lcho+VhxfJqORFPnmhUPjrK+O9qi2
38GIV4Y/yjwkLqtt0rBtWdV5YSIa215iTETOjjjiNxDrONCQFB3tDL6XPu7YFMTh
MGc8BB4Fn6r7K7a/72smuDoufQ7ahjPJ8wy4P6fJEAOEA274uep3VoR2Kp3vjWXL
4WQjax1VPLZcaStS18Sq8coAYBloKmYCnozrWMr+zwA5jJdvpuG+pZudR2ZoqewY
cCGeriKCa4NwoRCa2B+hco2YVxf9ivCMqXMvKi2S797DGTrT49MPz65zxoFLOeM2
mX8NpCOlg9YGcQ==
=dqQx
-----END PGP PUBLIC KEY BLOCK-----

To export a key
 
$ gpg --armor --output rado.pub.key --export EF9C6A5F 
$ gpg --armor --output rado.pri.key --export-secret-keys EF9C6A5F 

To import a pub/priv key
 
$ gpg --allow-secret-key-import --import rado.pri.key 
$ gpg --import rado.pub.key

To list keys
 
$ gpg --list-keys
gpg: checking the trustdb
gpg: no ultimately trusted keys found

$ gpg --list-keys
/home/rado/.gnupg/pubring.gpg
-----------------------------
pub   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
uid                  Radoslaw Tomaszewski 
sub   2048R/366D1276 2013-02-22

$ gpg --list-secret-keys
/home/rado/.gnupg/secring.gpg
-----------------------------
sec   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
uid                  Radoslaw Tomaszewski 
ssb   2048R/366D1276 2013-02-22

To encrypt a message with my public key
 
$ gpg --armor -r EF9C6A5F -e file.txt

To decrypt a message with private key
 
$ gpg -d file.txt.asc

Upload your key to Launchpad
 
$ gpg --send-keys --keyserver keyserver.ubuntu.com EF9C6A5F
gpg: sending key EF9C6A5F to hkp server keyserver.ubuntu.com
rado@laptop:~/$ gpg --fingerprint EF9C6A5F 
pub   2048R/EF9C6A5F 2013-02-22 [expires: 2017-02-21]
      Key fingerprint = 978C 670D F864 8723 C2D2  C9F0 F8D0 6506 EF9C 6A5F
uid                  Radoslaw Tomaszewski 
sub   2048R/366D1276 2013-02-22

References
  1. https://help.ubuntu.com/community/GnuPrivacyGuardHowto
  2. http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html
  3. http://www.gnupg.org/gph/en/manual.html


No comments:

Post a Comment