Reading Time: 3 minutes

Cryptography is the study and practice of secure communication, concealing messages from third parties with logical and mathematical functions.

During encryption, a piece of secret information is converted into a cipher– seemingly unreadable coded text. To reveal the original message, we need to decrypt the code with the cipher key.

Modern technology enabled us to make more and more complex ciphers, and also enhanced cryptanalysis- the science of breaking the encryption. With computers, we can encrypt not only language texts, but any kind of digital information.

The algorithms are designed around computational hardness assumptions. It means, that it is theoretically possible to break the decrypted information by brute force attack- guessing the correct key until you get it right. However, running all the possible solutions while trying to decrypt the message is infeasible by our current means-it would take too much time and computational power. Think in the range of 100 computers working for 100 years.

Public-key cryptography

In blockchain technology the asymmetric encryption system, alias public key cryptography is used.

In public-key cryptography the information in concealed by 2 keys- a public and a private key, which are connected in a mathematical algorithm.

Image from Twilio

How it works:

  • Alice decides to send a message to Bob in secret. Alice encrypts the message with Bob’s public key and sends him the data. When Bob receives the data, he will decrypt it with his private key, and get the original information from Alice.
  • None of these keys can be solved just by guessing.
  • The public key encryption can only be decoded with its private key pair.
  • No secret hacking- if a message sent encoded with the public key is manipulated with along the way, the private key will not be able to open it anymore.

Super simple example!

Suppose that the public key is like a box with a lock, and Alice wants to send something to Bob. Alice gets the box with a lock from Bob, puts all kind of fun stuff inside, then locks it. Alice sends the locked box to Bob, and only Bob will be able to open the lock with his own private key.

There is some very cool mathematics behind asymmetrical cryptography, if you feel like grinding your brain, go for it here!

In the blockchain world:

  • the public key is the address of the digital wallet, where one can keep tokenized assets, digital currencies, private information. To receive funds one has to share their public key with the sender.
  • private key grants access to manipulate the contents of the digital wallet and should be kept secret and safe
  • The biggest threat of private keys is a human flaw- storing the private key to our wallet unsafely

Public-key cryptography is also the technology behind digital signatures, helping to verify the identity: the message is encoded with the private key and verified with the public key of the sender.

Public- key cryptography is a key feature in providing security on the blockchain and ensures that outside actors cannot see nor manipulate our transactions and assets.

By Barbora Juhaszova