What is Public Key Cryptography?
The idea of public key cryptography was first introduced to the world by Whitfield Diffie and Martin Hellman. A little off topic, but Whitfield Diffie has been closely advising the NKN project as of late.
Anyway, in 1976 (before cryptocurrencies and blockchains had even been invented), they proposed the idea of a “public key” and a “private key”, whereby the public key could be used by anyone to encrypt a message, but the private key could only be used by the intended recipient to decrypt the message. This was a major breakthrough in the field of cryptography, and is now widely used to secure information. Without this breakthrough, the entire cryptocurrency industry might not even exist.
How Does Public Key Cryptography Work?
Public key cryptography is a way to secure and authenticate information by using two different keys. One key is called the public key, which is used to encrypt (conceal) the information that’s being sent. The other key is called the private key, which is used to decrypt (reveal) the information that is being received.
Think of it like a secret message you want to send to your friend. You write the message, then you use a special tool (the public key) to scramble the message so that only your friend can read it. You can then send the scrambled message to your friend. They use another special tool (the private key) to unscramble the message so they can read it.
This process also works for “digital signatures”. A digital signature is essentially a way for a user to prove that they’re the sender of the message, and that the message hasn’t been tampered with.
For example, when you send a cryptocurrency transaction, you’ll get a prompt that asks you to “sign” the transaction. You’ll then be shown amount of tokens/coins you’re sending, along with the address that you’ll be sending it to – at which point you can accept or reject the outgoing transfer. If you accept it, your “digital signature” gets added and once verified by the network, the funds will be sent.
As for how this encryption and decryption works on a technical level, it comes down to the utilization of complex math algorithms that are beyond the scope of this article. However, if you’re interested in learning more, two of those most common algorithms used in cryptocurrencies are “RSA” and the “Elliptic Curve Digital Signature Algorithm”, also known as ECDSA.
Summary
What is it? Public key cryptography is a way to encrypt and decrypt messages and information using a pair of keys, a public key and a private key. The public key can be freely shared with others and is used to encrypt messages, while the private key is kept secret and is used to decrypt messages. This allows for secure communication and verifies the identity of the sender.
How does it work? The encryption and decryption process is done mathematically using complex algorithms like RSA and ECDSA.