MSTR Cat

Blockchain/Level I · Money/1.2 The cypherpunk road/Lesson 1

Public-key cryptography: Diffie-Hellman and RSA

The secret shared without meeting, and the signature that proves ownership

MaterialsA calculator or spreadsheet that handles modular arithmeticThe Diffie-Hellman paper (1976)

Wonder

  1. How do two strangers agree on a secret key while everyone else listens?
  2. Why is multiplying two large primes trivial but finding those primes from their product nearly impossible?
  3. What does it mean to own something if possession is defined by the ability to sign?

Explore

  1. Before 1976, secure communication required a shared secret exchanged over a trusted channel. If an interceptor captured that key, all subsequent traffic was compromised. Whitfield Diffie and Martin Hellman proposed a solution in ‘New Directions in Cryptography’ (IEEE Transactions on Information Theory, November 1976). Two parties could derive a shared secret over an open channel using modular exponentiation. The math is one-way: easy to compute forward, computationally infeasible to reverse without the private input.
  2. Ralph Merkle conceived similar puzzles between 1974 and 1975, publishing them in 1978. One party published many small encrypted puzzles; the other solved one at random and used its contents as the key. The advantage was only quadratic: with n puzzles, the two parties did about n units of work and an eavesdropper about n². Diffie-Hellman’s gap grows with key size, and when fresh key pairs are used for each session, a later leak of long-term keys does not expose past traffic.
  3. Ron Rivest, Adi Shamir, and Leonard Adleman at MIT developed RSA in 1977. Martin Gardner described the system in his August 1977 Scientific American column before the formal paper appeared in Communications of the ACM (February 1978). RSA relies on the difficulty of factoring the product of two large primes into its components. It enabled digital signatures: a private key signs data, and the corresponding public key verifies it without revealing the signer’s secret.
  4. James Ellis at GCHQ conceived ‘non-secret encryption’ around 1969 and wrote it up in 1970; Clifford Cocks derived an RSA-equivalent system in 1973; Malcolm Williamson derived a Diffie-Hellman equivalent in 1974. These discoveries remained classified until 1997. The parallel development shows the mathematical foundations were mature by the early 1970s, but adoption followed only after open publication by academic researchers. Secret work does not build public infrastructure.
  5. Rivest, Shamir and Adleman received the Turing Award in 2002; Diffie and Hellman received it in 2015. This matters for bitcoin: ownership is no longer tied to physical custody or bank records, but to the ability to produce a valid signature with a private key. Bitcoin uses secp256k1 elliptic curve cryptography rather than RSA, yet the core structure persists. A user proves control over funds by signing transactions; the network verifies via public keys without ever seeing the private ones.
  6. Work through Diffie-Hellman with small numbers. Agree publicly on a prime p = 23 and a base g = 5. Alice picks a secret a = 6 and sends 5^6 mod 23 = 8. Bob picks b = 15 and sends 5^15 mod 23 = 19. Alice computes 19^6 mod 23 = 2; Bob computes 8^15 mod 23 = 2. Both now hold the secret 2, though only 23, 5, 8 and 19 crossed the open channel. Real systems use numbers hundreds of digits long, where recovering a or b from the public values is infeasible.

Key facts

  • Diffie and Hellman published their key exchange protocol in November 1976.
  • RSA was developed at MIT in 1977 and published in Communications of the ACM in February 1978.
  • At GCHQ, James Ellis, Clifford Cocks and Malcolm Williamson developed public-key methods between about 1970 and 1974, independently of the later American work.
  • GCHQ’s work on public-key cryptography was declassified in 1997.
  • RSA’s security rests on the difficulty of factoring the product of two large primes.
  • Bitcoin ownership is defined by the ability to sign with a private key.

Exercise nine, six, three, one

9CollectList 9 cryptographic primitives or protocols from 1970–2008. Note their inventor, year, and core mathematical property.
6ClusterGroup the 9 into 6 categories: key exchange, digital signatures, hashing, symmetric encryption, authentication, or other.
3DistillReduce the 6 groups to 3 reasons asymmetric cryptography enabled decentralized systems.
1CrystallizeWrite 1 sentence on what a private key proves and why that changes ownership.

Fact check

Dates, figures and claims checked against the published sources listed below.

Open in the interactive academy →

PT ES ZH JA KO RU DE FR MS