How public key encryption and what we call cyberspace got started.

Gary Mersham
6 min readSep 6, 2021

A story about primes and rational numbers.

Perhaps the single most significant invention in the history of cryptography came about in 1973 with the public-key encryption. It is probably the only mathematical algorithm that ultimately spawned its own political philosophy. Public-key encryption was revolutionary for a simple reason. It solved the age-old security problem of key distribution. Sharing a secret key had previously required a secure communication channel. If Alice wanted to send Bob a secret message, she would first need to share the secret key with him. But a secret could not be shared on an insecure channel.

Suppose Gary sent Ahmed a letter containing the secret key and asking him to use it to scramble their subsequent correspondence, for example, by replacing every letter with a specified alternative. The evil eavesdropper (government or crooks) could intercept the letter and make a copy of Gary’s secret key as the message made its way to Ahmed. Dr Evil would then be able to read all future messages encrypted with this key.

In 1973 a Cambridge mathematician, Clifford Cocks, realised that the solution was to find a finding a one-way function, a mathematical operation that could only be performed in one direction- that is, something that could be done but not undone.

“If you wanted a function that couldn’t be in he remembered, “it seemed very natural to me to think of multiplying quite large prime numbers together.”
Multiplying two large primes is easy, even if they are more hundred digits long. Factoring the two numbers from the much larger product is hard — very hard. It took the then freshly recruited spy about half an hour to come up with this prime solution.

Cocks didn’t grasp the implications of what he had just done. The young mathematician’s discovery seemed immediately applicable to military communications, and it would become one of the UK’s intelligence and cyber agency’s (GCHQ) most prized secrets. GCHQ called its discovery “non-secret encryption.”

But there was a problem. In the mid-1970s, room-sized mainframe computers were not yet sufficiently powerful to crunch large primes into a secure one-way function fast enough.

Fast forward to 1977. MIT academic Ron Rivest had a Eureka moment on the couch at home. The sought after one-way function could be based on using very large, randomly chosen prime numbers over a hundred digits long.

The numbers are easily multiplied, but it is nearly impossible to reverse the step and find the two primes that were multiplied using powerful computers. This lopsided, asymmetric factorization allowed for encryption. The public encryption key would contain the product; the private decryption key would contain the two primes. It was safe to share the public key on an insecure channel because the factorisation problem was so hard to solve that it was in effect encrypted — scrambled by a one-way function that was easy to perform but nearly impossible to reverse.

Rivest offered the solution freely to anyone who wrote to him “enclosing a self-addressed, 9-by12 inch clasp envelope with 35 cents in postage”. Thousands did, including governments all over the world who wanted to get hold of Rivest’s encryption algorithm.

In 1979 the National Security Agency (NSA), the intelligence agency of the US Department of Defense decided the spread of cryptographic knowledge was dangerous and tried to reign it in.

They tried everything they could to stop it from going public for the next two decades, cutting government funding for cryptographic research, vetting papers before publication, threating scholars with criminal prosecution, classifying encryption as weapon and raising the danger of damage to the national interest (sound familiar?. All of which would ultimately fail.

The NSA’s attempts to reign in cryptography in the late 1970s sparked an alternative trend: the government’s attempts confirmed the worldview of those distrustful of the government’s secret intrigues. The leaking of Pentagon Papers and the ensuing Watergate affair earlier in the decade had eroded trust in the federal government, especially on the libertarian left. Resistance was fermenting.

Public-key cryptography made it possible to keep a message private and the seeds of the Crypto world that we know today were planted.

The term “public” in public-key encryption had an important meaning. The method was simple enough for widespread adoption at a time that coincided with the dawn of the mass-marketed personal computer and the subsequent massive reach of the internet. This combination inspired a set of ideas around privacy -some realistic, some utopian — that continue to this day.

Rewind to 5th century BC in ancient Greece. Entering a Pythagorean school of mathematics above the entrance it is written ‘All is number’ and a group of students contemplate an earlier mathematical operation that could only be performed in one direction.

They consider a square of which each side is one metre in length. To determine the length of the diagonal seems easy for it is the hypotenuse of the right-angled triangle it forms with two sides of the square. We know that the square of the diagonal’s length is the sum of the squares on the other two sides. It is two metres square because (1+1) + (1x1) = 2.

But what is the square root of 2? Well according to the formula it is the number which, when multiplied by itself, makes 2. What is the number? It cannot be 1, because 1 x 1 = 1. It cannot be 2, because 2 X 2 = 4. Clearly it is somewhere between 1 and 2.

But whatever it is, it cannot be expressed as a ratio of two whole (rational) numbers; it is not a simple fraction. This is best understood in decimal terms: an irrational number is one whose decimal expansion never either terminates or becomes periodic (repeats regularly). How can nature consist of numbers that misbehave in this way?

There is no way of expressing the ratio of the length of the diagonal to the length of a side in integers (whole numbers). Pythagoreans regarded this incommensurability as an evil phenomenon so traumatic, legend has it, that Hippasos of Metapontum who made the discovery and revealed it after having been sworn to secrecy, was punished by being drowned.

Image: Cryptocurrency News

In what some see as a contemporary cautionary tale, the recent killing of Brazilian crypto trader Wesley Pessano Santarem has been linked to his extravagant lifestyle he been revealing on his social media accounts — reminding crypto holders of the importance of safeguarding not only their funds, but their lives.

In January, a trader in Hong Kong was robbed of nearly half a million dollars’ worth of bitcoin (BTC). A Norwegian trader was forced to jump from a window of his house when an armed man showed up at his door. The same year in the Netherlands, crypto community was shocked by a brutal robbery attempt in which three armed robbers with police vests broke into a residential building and tortured a 38-year-old trader for over an hour using a drill. In 2018, a Norwegian trader was found dead in his apartment in Oslo after selling bitcoins to another person for cash.

These are just a few of many reported attacks threatening crypto traders and crypto holders personal safety.

#cryptography #publickey #encryption #cyberspace #cyber punk #bitcoin

--

--