Unlike the traditional fiat currencies such as the dollar and the Sterling pound, Bitcoin does not have a central authority to propagate and safeguard trust in it. For that single reason, it requires a lot of reliable security for users’ worth and transactions.

At the center of this is cryptography. It indeed donates part of the name crypto currency, which describes all decentralized digital currencies.

But, what is cryptography?

It is the art of codifying or encrypting messages for transmission so that only those who have a secret pre-shared key can restore the message into readable format and act upon it.

Cryptography has been part of human civilization for thousands of years. The ancient Egyptians as early as 1900 BC used some form of it to protect information. And Julius Caesar of Rome used it as part of his military communication protocol especially in war time.

Symmetric cryptography

The sole type of cryptography used up until 1970s is known as a Substitution cipher. This is whereby text is substituted by other letters or symbols to create a collection of mumbo jumbo, useless to a stranger with no key.

Think of it as a safe used to transport valuables. The sender, say John, has one copy of the key to the safe and the receiver, say Mary, has the other copy. John will put valuable stuff in the safe, lock (encrypt) and hand it over to a courier.

While in transit, the courier or anyone else who comes into contact with the safe cannot open the safe unless they have a copy of the key.

When Mary receives the safe, she will use her copy of the key to open (Decrypt) the safe and get the valuable stuff.

Since the same key (in two copies) is used to encrypt and decrypt a message, this is also known as symmetric cryptography.

As you can figure out, the biggest problem with this arrangement is sharing the key securely, which has been described as the key distribution problem.

The sender has to find a way to get a copy of the key to the receiver before sending the encrypted message. If this is not done well you may end with both the secret key and the message falling into the wrong hands and thus compromising the security of communication.

Asymmetric cryptography

Asymmetric or public key cryptography overcomes this challenge. And that is what Bitcoin uses to create digital signatures for proving ownership of bitcoins on the blockchain as well as signing out expenditures.

This newer version of cryptography does not require a secret key to be pre-shared. Instead, a public key is shared and used as an address to which bitcoins are attached.

Think of it as mailbox where everyone can drop a letter but only the owner has the key to open it.

As a receiver of a message, in this case bitcoins, you generate a pair of public (encrypting) and private (decrypting) keys. You will share out the public key with the one who is willing to send you bitcoins. It does not matter if a thousand people get hold of key, they will do little harm with it.

You will use the private key to prove that you own bitcoins send to the corresponding public key. You can also send these bitcoins to other people by using the private key as a signature.

While there are more details as to how cryptography works in bitcoin transactions, the reality is that it has made trust unnecessary!