Tester Keyring
![]() |
PGP is a hybrid cryptosystem which means that it uses both symmetric as well as asymmetric encryption. Let me explain
There are two types of encryption
Symmetric encryption
If I send a you a secret letter about which we have agreed that every alphabet needs to be replaced by the previous 3rd one, then when I write SECRET , I would make S V, E H, C F and so on resulting in VHFUHW. When you get the letter, you would reverse each alphabet with previous 3rd one giving you the word SECRET. You see, the same key is used for both encrypting and decrypting. If the letter gets into some wrong hands, it will make no sense to him unless he knows the key that we have agreed upon.
Asymmetric encryption
Asymmetric key has two keys private and public. Anyone possessing private key can decrypt data encrypted with its corresponding public key.
How GPG works
GPG makes use both encryption methods. It encrypts a text with a key generated with mouse movements and keyboard strokes and attaches the key with the message so the reciver can use it to decrypt the text. But isn't stupid to attach the secret key with text which is like writing the agreed upon key 3 inside the letter in the symmetric encryption example above. No, it is not. Because the key is also encrypted with the public key. When the receiver receives the text, he decrypted the key with private key and then use that key to decrypt the actual message.
In this tutorial, I am going to show you how to protect your sensitive data by encrypting using openGPG.
GPG maintains three files beneath each user's home directory under ~/.gnupg. They are:
1. secring.gpg contains secret key
2. pubring.gpg contains public key
3. trustdb.gpg maintains trust-levels i.e. web of trust of keys in public key ring
Creating Keys
The following command is used to generate the keys. It prompts us for a couple of questions.
gpg -gen-key
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.
Please select what kind of key you want:
(1) DSA and Elgamal (default)
(2) DSA (sign only)
(5) RSA (sign only)
Your selection? 1
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
= key expires in n days
w = key expires in n weeks
m = key expires in n months
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) "
Real name: Test User
Email address: testuser@linuxgravity.com
Comment: This is a test key generation process
You selected this USER-ID:
"Test User (This is a test key generation process) "
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.
You don't want a passphrase - this is probably a *bad* idea!
I will do it anyway. You can change your passphrase at any time,
using this program with the option "-edit-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.
+++++++++++++++++++++++++.++++++++++
++++++++++++++++++++++++++++++.+++++
+++++++++++++++.++++++++++..++++++++++
+++++++++++++++++++++++++>++++++++++
.............................+++++
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/testuser/.gnupg/trustdb.gpg: trustdb created
gpg: key 6A62309F 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/6A62309F 2009-08-19
Key fingerprint = FB4D 4DC7 B093 3714 B507 CD9F F1C0 27B5 6A62 309F
uid Test User (This is a test key generation process)
sub 2048g/7CB6CABD 2009-08-19
Listing Keys
gpg -list-keys
/home/testuser/.gnupg/pubring.gpg
-----------
pub 1024D/6A62309F 2009-08-19
uid Test User (This is a test key generation process)
sub 2048g/7CB6CABD 2009-08-19
Let's explore the output we previous command
pub means its the master public signing key
1024 is length of the keys
D tells us that it is DSA (Digital Signature Algorithm), used for siging
6A62309F is unique key ID
2009-08-19 is the date when the signing master key was created
uid shows an identity tied to the master public and sub-keys
sub indicates that the key is subordinate key. It's used for encryption
2048 is number of bits in the encryption
g - ElGamal used for encryption
7CB6CABD is unique key ID
2005-08-21 is the date when the encryption key was created
To list secret key
gpg -list-secret-keys
/home/testuser/.gnupg/secring.gpg
-----------
sec 1024D/6A62309F 2009-08-19
uid Test User (This is a test key generation process)
ssb 2048g/7CB6CABD 2009-08-19
Importing and Exporting Keys
To ouput armored or ASCII of public key to the screen
gpg -a -export
To dump the ASCII of public key to a file, use -o
gpg -o filename -a -export
Note: After import/export have been performed, encrypts/decrypts/signings/verifications can take place
To confirm the fingerprints of the keys
gpg -fingerprint keyID
(gpg -fingerprint 7CB6CABD)
Encryption
GPG supports both symmetric and asymmetric encryption. In the following example, we will encrypt some text and then send to our partner who will decrypt it with the key we will share with him
echo "This is a very secret message" > secret_file.txt
Now we need to encrypt secret_file.txt. It will ask me for a passphrase we need to put in twice
gpg -c secret_file.txt
Enter passphrase:
This is will result secret_file.txt.gpg. If I cat this file, I will see gibberish
cat secret_file.txt.gpg
??
??P?G:?=B
Amjad Saleem
For more articles at http://www.linuxgravity.com
Follow me on: twitter.com/linuxgravity
![]() |
Superlooper, Ethernet Crossover Adapter Sale Price: $6.79 |
|
The SuperLooper Crossover Adapter converts any standard Ethernet cable to a crossover cable. With it, you can network two computers together without a hub, so it's great for starting a home network and handy for PC technicians and network specialists. |
![]() |
Keychain 802.11B/G WiFi Hotspot Detector List Price: $21.99 Sale Price: $3.82 Used From: $4.99 |
|
You no longer have to boot up your notebook or laptop to check for a wireless signal. This keychain scans a radius of 50 meters (165 feet) to detect the presence and strength of wifi 802.11b/g signals... |
![]() |
Energy SistemĀ® NNaturaTM Neobat AA Batteries, Minimum self-discharge, ready to use, more ecological Sale Price: $7.36 |
|
New generation of batteries that combines the benefits of alkaline and rechargeable batteries: ready to use, minimum self-discharge, up to 1,000 recharge cycles, no memory effect, increased power capacity and improved performance at low temperatures. |
![]() |
Multifunctional RG45 RJ11 Network Cable Tester With Keyring for Hp computer Sale Price: $8.99 |
|
Multifunctional RG45 RJ11 Network Cable Tester With Keyring for Hp computer . FEATURES: It is designed and developed by employing scientific electric circuit that features reliable quality, stable performance, complete functions and good appearance... |
![]() |
3 Legal Limit Keychain Breathalyzers Sale Price: $9.99 |
![]() |
Mini Key Chain Personal Breathalyzer List Price: $19.99 Sale Price: $3.66 |
|
Never again have a doubt about how much alcohol you have had to drink or whether you or your friend is legally OK to drive. This mini breathalyzer has a traffic light readout style system making it super easy use... |
![]() |
BreathKey Keychain Breathalyzer - World's Smallest Breath Alcohol Tester List Price: $69.95 Sale Price: $69.95 |
|
BreathKey is the smallest and lightest breathalyzer in the world, but it is big on features and quality. Unlike other bulky breathalyzers, it easily fits on a keychain so you can take it with you wherever you go... |
![]() |
Accurate Breath Alcohol Tester Keychain Breathalyzer + Flashlight Sale Price: $1.99 |
|
100% NEW . Breath Alcohol Tester with Flashlight Portable and convenient to carry on a key chains Easy to use and quick response and resume Sensor: advanced semiconductor oxide alcohol sensor The Alcohol Tester use two AAA alkaline batteries (not included) Breath Alcohol Tester test accuracy :0... |
|
|
Keyring and Compass $24.99 Chaloner Woods Keyring and Compass - Photographic Print |
|
|
Handbag and Padlock Keyring in Pink $4 Handbag and Padlock Keyring in Pink |
|
|
Bow Keyring in Pink $4 Bow Keyring in Pink |
|
|
Three Charm Keyring in Gold $2 Three Charm Keyring in Gold |
|
|
Missouri Tigers Team Logo Keyring $10.95 Missouri Tigers Team Logo Keyring Missouri Tigers Team Logo Keyring |
|
|
Virginia Cavaliers Team Logo Keyring $10.95 Virginia Cavaliers Team Logo Keyring Virginia Cavaliers Team Logo Keyring |
|
|
UCLA Bruins Team Logo Keyring $10.95 UCLA Bruins Team Logo Keyring UCLA Bruins Team Logo Keyring |
|
|
Jewel Shoe Keyring in Silver and Pink $5 Jewel Shoe Keyring in Silver and Pink |
|
|
Triangle Evening Bag Keyring in Purple $4 Triangle Evening Bag Keyring in Purple |
|
|
Keyring and Compass $24.99 Keyring and Compass Photographic Print by Chaloner Woods. Product size approximately 12 x 16 inches. Available at Art.com. Embrace your Space - your source for high quality fine art posters and prints. |
|
|
Bijan With A Twist by Bijan, 6.7 oz Body Lotion for women. Tester $4.99 Tester. |
|
|
Les Miserables - 25th Anniversary Limited Edition (With Keyring) $29.99 Les Miserables - 25th Anniversary Limited Edition (With Keyring) |
|
|
Musical Keyring Guitar $6 Rock out with this Mini Rock Guitar Keyring. Simply press the button to play a calssic Beatles song. Suitable for children aged 3 years and over. |
|
|
Sainsbury's Mirror and Keyring $6 Ideal for a Christmas stocking this round shaped mirror and shoe shaped keyring are useful gifts. Suitable for children aged 3 years and over. |
|
|
Minnesota Golden Gophers Team Logo Keyring $10.95 Minnesota Golden Gophers Team Logo Keyring Minnesota Golden Gophers Team Logo Keyring |
|
|
Arizona State Sun Devils Team Logo Keyring $10.95 Arizona State Sun Devils Team Logo Keyring Arizona State Sun Devils Team Logo Keyring |
|
|
Colorado State Rams Team Logo Keyring $10.95 Colorado State Rams Team Logo Keyring Colorado State Rams Team Logo Keyring |
|
|
N. Carolina St. Wolfpack Team Logo Keyring $10.95 N. Carolina St. Wolfpack Team Logo Keyring N. Carolina St. Wolfpack Team Logo Keyring |
|
|
Clapboard Heart Photo Keyring $5.99 Clapboard Heart Photo Keyring is constructed of metal with a magnetic flip-top and features a photo placeholder when open. Holds a 1 1/16" x 1 1/8" heart-shaped photo. |
|
|
London 2012 Mandeville Profile Keyring $6 One of the coolest icons around Mandeville - official mascot of the London 2012 Paralympics - makes for the perfect keyring addition. |
|
|
London 2012 Mandeville Profile Keyring $6 One of the coolest icons around, Mandeville - official mascot of the London 2012 Paralympic Games -makes for the perfect keyring addition. |
|
|
KeyTool Keyring Multi-tool $7.99 Special missions ops are able to do a bajillion different tasks - that's what they are trained for. One of the most important is blending in while they wait for their next assignment or action. Finally, there's a little multi-tool that follows this ideal. It hides amongst your keys, surrounding one to blend in. And then when you need it - BAM - it is ready for action. We're talking about the KeyTool Keyring Multi-tool, of course. The KeyTool Keyring Multi-tool is made out of stainless steel for strength and durability. It is tiny, but it holds 8 different tools - 3 different sized screwdrivers, tweezers, wire stripper, and more. Plus, it comes with a fake key (really just part of the packaging display), but that's a bonus feature in itself. Hide it with your keys, and the KeyTool Keyring Multi-tool will be ready to MacGyver you out of any situation. KeyTool Keyring Multi-tool A tiny arsenal of tools that hides surrounding one of your keys. Made of 422 grade stainless steel. Tools: Large screwdriver Medium screwdriver Small screwdriver Nail file Finger nail cleaner Bottle cap opener Wire cutter Tweezers Keyring clip and fake key (for fun) included. Dimensions: 1.97" x 0.79" |
|
|
Space Gun LED Keyring $4.99 Every outer space adventurer needs three things: a fast ship, a quirky sidekick (alien or robot, preferably), and a reliable blaster. It's up to you to win your own fast ship in a gambling game and earn some blood oath or something for the sidekick. But for the blaster, oh have we got you covered. Presenting the Space Gun LED Keyring! It's so small, you'll never be without it. The Space Gun LED Keyring is just a joy. It's little, it's cute, it's space-age plastic with a rubbery coating, and it goes PEW! when you pull the trigger. That's right, the Space Gun LED Keyring isn't just about good looks. A bright red LED with flash and a loud PEW! will sound with each trigger pull. It will vanquish aliens, monsters, coworkers, and any other malevolent entities you come across. Or, at least, it will make them smile. Get a few Space Gun LED Keyring today, and hide them in all your pockets. Never know when you'll need a little Pew Pew!! Space Gun LED Keyring Pull the trigger and get a nice, loud PEW! and a flashing, red LED tip! Attaches to your keys or pants or body hardware - anywhere you might need a quick draw pistol. Batteries: 3 button cell, non-replaceable batteries (included). Dimensions: 2" long. |
|
|
London 2012 Emblem Keyring Multicoloured $10 Show your support for the London 2012 Olympic and Paralympic Games with this keyring which will help your keys stand out from the crowd. |
|
|
London 2012 Emblem Keyring Multicoloured $10 Show your support for the London 2012 Olympic and Paralympic Games with this keyring, which will help your keys stand out from the crowd. |
|
|
Carabiner Pocket Keyring Decoration with Compass $4.99 Description:Carabiner Pocket Keyring Decoration with Compass.This compass is crafted from alloy construction and is pocketable.With a alloy Pocket Carabiner key ring for more useful to carry.You can hang it up to your backpack.The Compass Keyring adopting mechanical magnet object design is accurately labeled in degree increments to indicate the orientation.It's perfect for camping, leisure hiking, and traveling.Color: picture showSize: ~6.8 x 3.1 x 1cmWeight: 30gPackage:1 x Keyring Decoration Compass |
|
|
Keychain Keyring with LED Flashlight Pendant $3.2 Description:New generic Keychain Keyring with LED Flashlight Pendant !Keychain Keyring with a LED light for lighten the dark road and for your return, and help you moreLED Flashlight Keychain is designed for your key and as a amazing decoration for your bags, handbag.Strong white light and durable metal made.Great gift for you allTotal length: 9.4cmPowered by 4 AG3 button cellWeight: 10gPackage:1 x Keyring |
|
|
Keychain Keyring with LED Flashlight Pendant $3.84 Description:New generic Keychain Keyring with LED Flashlight Pendant !Keychain Keyring with a LED light for lighten the dark road and for your return, and help you moreLED Flashlight Keychain is designed for your key and as a amazing decoration for your bags, handbag.Strong white light and durable metal made.Great gift for you allTotal length: 9.4cmPowered by 4 AG3 button cellWeight: 10gPackage:1 x Keyring |
|
|
Carabiner Pocket Keyring Decoration with Compass $4.17 Description:Carabiner Pocket Keyring Decoration with Compass.This compass is crafted from alloy construction and is pocketable.With a alloy Pocket Carabiner key ring for more useful to carry.You can hang it up to your backpack.The Compass Keyring adopting mechanical magnet object design is accurately labeled in degree increments to indicate the orientation.It's perfect for camping, leisure hiking, and traveling.Color: picture showSize: ~6.8 x 3.1 x 1cmWeight: 30gPackage:1 x Keyring Decoration Compass |
|
|
Carabiner Pocket Keyring Decoration with Compass $6.49 Description:Carabiner Pocket Keyring Decoration with Compass.This compass is crafted from alloy construction and is pocketable.With a alloy Pocket Carabiner key ring for more useful to carry.You can hang it up to your backpack.The Compass Keyring adopting mechanical magnet object design is accurately labeled in degree increments to indicate the orientation.It's perfect for camping, leisure hiking, and traveling.Color: picture showSize: ~6.8 x 3.1 x 1cmWeight: 30gPackage:1 x Keyring Decoration Compass |
|
|
Keychain Keyring with LED Flashlight Pendant $4.99 Description:New generic Keychain Keyring with LED Flashlight Pendant !Keychain Keyring with a LED light for lighten the dark road and for your return, and help you moreLED Flashlight Keychain is designed for your key and as a amazing decoration for your bags, handbag.Strong white light and durable metal made.Great gift for you allTotal length: 9.4cmPowered by 4 AG3 button cellWeight: 10gPackage:1 x Keyring |
|
|
Blessing Keyring $10.99 Bring yourself a wee bit of Irish luck with this 4 leaf clover and an ?Irish luck? proverb. Metal with real clover. Shamrock Gifts, Dublin. |
|
|
Accessories: Keyring $695 Stylish key holder in leather with Acne House logo embossed. |
|
|
Accessories: Keyring $695 Stylish key holder in leather with Acne House logo embossed. |
|
|
Accessories: Keyring $595 Stylish key holder in leather with Acne House logo embossed. |
|
|
Accessories: Keyring $595 Stylish key holder in leather with Acne House logo embossed. |
|
|
Switz Keyring $110 . |
|
|
Vuvuzela Keyring $5 Make yourself heard with this unbelievably loud miniature Vuvuzela - great for parties and sports events! Warning! Not suitable for children under 3 years of age due to small parts - choking hazard. Keep away from all sources of ignition. |
|
|
Colombo Snap-closure Keyring Cardholder $18.49 Colombo snap-closure keyring cardholder will keep you organizedWallet is made with the finest Italian top-grain cowhide leather Fashion accessory will get richer and softer over timeKeyring attaches to the walletAvailable in black and cognac color options Measures 4 inches x 3 inchesFeatures Include:Six credit card slotsSix leaf plastic insertsKeyringComes in a handsome Castello gift box |
|
|
Colombo Snap-closure Keyring Cardholder $18.49 Colombo snap-closure keyring cardholder will keep you organizedWallet is made with the finest Italian top-grain cowhide leather Fashion accessory will get richer and softer over timeKeyring attaches to the walletAvailable in black and cognac color options Measures 4 inches x 3 inchesFeatures Include:Six credit card slotsSix leaf plastic insertsKeyringComes in a handsome Castello gift box |


US $18.21























Leave a Reply