We are ready to assist you with any website and digital marketing requirements. Please get in touch if you need a hand.




Public Key, Private Key and the garbage!

Public Key, Private Key and the garbage!

Posted in Internet Security, Something Useful by Abilash on February 16, 2016

Cryptography in plain English is all about securing your communication that travels through a network. The two most common and major parts of cryptography are:

  • Encryption & Decryption
  • Keys

The main goal of cryptography is to make sure that the decryption of the encrypted message sent by the sender (who originally encrypts) is possible ONLY by the intended receiver on the network. Thus any unintended receiver SHOULD NOT be able to decrypt the message, and it only remains a garbage to them. The two most popular and common cryptography  are:

  • Symmetric-key Cryptography
  • Assemetric-key Cryptography

Symmetric-key or Secret key Cryptography

In this technique, the sender and receiver has a common ‘secret key’. The sender encrypts the message using the key. This encrypted message is no more readable. When the receiver receives the encrypted message, they can use the secret key to decrypt the message. This technique involves only a single key but available with both the sender and the receiver. Key issue with this technique is when you (the sender) want to share the secret key with the receiver. The only way to share the key securely is to do it in person – best known as offline key exchange. This is literally not possible when the receiver is too far from you.

In a real world, you can compare this to an old padlock. Anyone who has the key can lock or unlock a box using the padlock.

old padlock

Assymetric-key or Public-key Cryptography

This technique was proposed to overcome the difficulties in managing the secret keys of symmetric-key cryptography. Here there are two keys involved. One is a public key and the other is the private key, both different but mathematically related. Most of the times public keys are shared with almost everyone who wants it. This is because, one CAN NOT use a public key to decrypt the encrypted message.

So, how does it really work?

The sender usually has the public key which he can obtain from the receiver or from a common place like a key store. The sender then uses this key to encrypt or lock the message. This locked or encrypted message can not be opened by anyone with a public key. However, the receiver is able to decrypt or open this message using his private key. So, whenever the receiver wants someone to send him or her an encrypted and secure message, all he has to do is share his public key. The only one who has access to the private key is the receiver and so is the private key also safe and secure.

In real world, you can compare this to a press type padlock (public key) and key (private key). Anyone who has the padlock can lock a box by just pressing it. One can not unlock the box by pressing it again but will need the actual key.


Try it yourself!

If you’d like to try this yourself, you could use consider using the opensource tool GNU Privacy Guard. GPG4win is a user friendly implementation of GNUPG on Windows. You can use this software to encrypt files (eg, a text file) or an email among others. If you find this post useful, let me know by leaving your feedback below.

Connect with us

Would you like to know the best tools and business resources we recommend?

Connect with us on social media as we share links to news, vital updates and other cool stuff to make you money and save you money.

Learn with us

Now you can learn how to stay on top of change in the digital world. We run workshops and webinars to help our clients and our community. Most of these are free.

Join up for webinar invites

Concise Digital Site Map