*Author: Wilton Thornburg*

## Introduction to Cryptography

“There’s nothing you can know that isn’t known.

Nothing you can see that isn’t shown.

All you need is…PUBLIC KEY CRYPTOGRAPHY!!!”

– with apologies to Lennon-McCartney

Without public key cryptography, cryptocurrency fails. Public key cryptography proves ownership and enforces privacy. It arrived relatively recently, though, appearing on the scene in the mid-1970’s at the same time as the personal computer revolution.

The art and science of cryptography encode (i.e., encrypt) messages so that no one can read them except the intended audience. Only the proper recipient decodes (i.e., decrypts) the message, maintaining privacy between communicators.

A key is used to encrypt and decrypt messages. In asymmetric cryptography (another name for public key cryptography), the key to encrypt a message is different from the key to decrypt the message.

In symmetric encryption, the key to decrypt a message is the same as the key used to encrypt it. This strategy creates a key distribution problem: the sender not only has to send the message but also find a secure way to send the key as well. When a villain intercepts the key and the message both, privacy disintegrates.

*16th-century French cypher machine in the shape of a book with the arms of Henry II*

## Whitfield-Diffie Key Distribution Solution

Linguistics, language, and puzzle skills ruled cryptography through most of history, but from the mid-twentieth century onward, math has been predominant.

In the 1970’s at Stanford University, Whitfield Diffie, Martin Hellman, and Ralph Merkle found a mathematical solution to the key distribution problem. In their solution, they used modular arithmetic and one-way functions. (Among other accomplishments, Ralph Merkle also contributed greatly to cryptocurrency as the inventor of Merkle trees.)

Modular arithmetic deals with remainders and incorporates a set of numbers that wrap around to the beginning after a certain point. That is, 7 mod 3 equals 1 because 1 is what remains after dividing 3 into 7. A 12-hour clock provides the most common example of the wrap-around nature of modular arithmetic. If it’s 8:00 a.m. now, 6 hours from now will not be 14:00 o’clock but 2:00 p.m. The main point to remember is that modular arithmetic behaves non-intuitively and yields unexpected results.

In mathematics, one-way functions execute easily but strongly resist reverse engineering. Think of a bowl of soup served in a restaurant. The cook easily followed the recipe to create it, perhaps even improvising some ingredients at hand. You may well be able to detect this flavour and the spices, but without the recipe and exact ingredients the chef used, you’ll have a difficult time duplicating that bowl of soup.

In the Whitfield-Diffie algorithm, correspondents share some public information for the key but keep private information that prevents an eavesdropper from reproducing that key. The team presented their solution publicly in June 1976 at the National Computer Conference.

## Enter Asymmetric Cryptography

Whitfield-Diffie solves the key distribution problem but still uses symmetric encryption.

Upon learning of the Whitfield-Diffie solution, Ron Rivest, Adi Shamir, and Leonard Adelman at the MIT Laboratory for Computer Science began building on those mathematical concepts to discover a solution for asymmetric encryption. In April 1977, they succeeded. This became known as RSA after the names of the creators.

In asymmetric encryption, you publish a public key that everyone knows. People use this to encrypt messages that only you can decrypt because you know the private key. Simply put, a public key is just a number created by multiplying two numbers of the private key. If the numbers used are sufficiently large, discovering those two numbers is computationally intensive and time-consuming.

## Encryption for the Rest of Us

*The patent application for an electric code machine, 1923.*

Using RSA encryption challenged the resources of the computers in those days. Encryption belonged only to the powerful and wealthy — the military, governments, large corporations, etc. Paul Zimmerman envisioned encryption available to anyone with a personal computer. He implemented Pretty Good Privacy (PGP) and released it to the public for free in June 1991.

Zimmerman overcame the resource intensive computational slowness of asymmetric encryption by implementing a hybrid algorithm. The message itself used a symmetric key, and asymmetric cryptography encrypted the key to safely send it with the message.

## Hello, Hal Finney

*Secret decoder ring*

The first employee Phil Zimmerman hired at PGP was Hal Finney. Hal Finney would become the first person to show any interest when an unknown person calling himself Satoshi Nakamoto arrived on the scene in 2008 proposing something he called Bitcoin.

Multiple attempts to create private digital money protected by asymmetric encryption failed throughout the 1990’s. In Amsterdam, David Chaum created DigiCash but required all transactions to be validated by a centralized company. DigiCash failed when Chaum’s company went bankrupt in 1998. British researcher Adam Back created HashCash in 1997 utilizing a Proof of Work method to create new coins. HashCash failed because a coin could only be used once. Users needed to create new coins every time they wanted to purchase something.

Hal Finney solved the HashCash problem by making the first reusable proof of work system (RPOW). He made his attempt at a digital money project with something he called CRASH (for Crypto cASH). (Lesson learned: call a computer program CRASH and expect it to fail.)

*ALSO READ: How to Buy Bitcoin in Nigeria with Debit Card*

*This article first appeared at Coincentral.com*