Pinky Promises, Nuclear Warheads and AES: A History of Secure Communication
Morgan Swaak (Student · UNSW)
BSides Canberra VII (2024) · Day 2 · Bradman Theatrette
Overview
In "Pinky Promises, Nuclear Warheads and AES: A History of Secure Communication," Morgan Swaak, a student from UNSW, takes the audience on an engaging journey through the evolution of secure information exchange. The talk begins with a relatable anecdote about a simple message to his grandma, highlighting the often-overlooked marvels of modern communication: its reliability, privacy, and authenticated origin. Swaak masterfully distills the complex landscape of cryptography into fundamental principles, illustrating how humanity transitioned from whispered secrets and wax seals to the sophisticated digital security systems we rely on today.

Key moments
- 1:40 Defining secure communication: confidentiality, integrity, authenticity
- 7:45 Digital authenticity challenge: the Copy-Paste problem
- 9:00 The paradox: needing a secret to share a secret
- 12:45 Mutually Assured Destruction as a trust model
- 17:30 Diffie-Hellman: Sharing a secret with modular arithmetic
- 21:15 Asymmetric encryption defends against Man-in-the-Middle
- 22:50 Conclusion: Appreciating the math behind secure communication
Pinky Promises, Nuclear Warheads and AES: A History of Secure Communication
Speakers: Morgan Swaak, Student, UNSW
Conference: BSides Canberra
YouTube: https://www.youtube.com/watch?v=QQTb4Wx-mIE
Overview
In "Pinky Promises, Nuclear Warheads and AES: A History of Secure Communication," Morgan Swaak, a student from UNSW, takes the audience on an engaging journey through the evolution of secure information exchange. The talk begins with a relatable anecdote about a simple message to his grandma, highlighting the often-overlooked marvels of modern communication: its reliability, privacy, and authenticated origin. Swaak masterfully distills the complex landscape of cryptography into fundamental principles, illustrating how humanity transitioned from whispered secrets and wax seals to the sophisticated digital security systems we rely on today.
This presentation is not merely a historical recount but an illuminating exploration of the core challenges in securing information—confidentiality, integrity, and authenticity—and the ingenious solutions developed over centuries. Swaak makes complex mathematical concepts accessible, empowering the audience to understand the underpinnings of secure digital interactions. His enthusiasm for the subject, particularly the "magic" of mathematics in cryptography, shines through, making a potentially daunting topic both understandable and fascinating for a broad security audience.
The talk ultimately underscores the profound impact of cryptographic advancements on our daily lives, from sending a text message to safeguarding national secrets. It serves as a crucial reminder that the ability to communicate securely is a hard-won achievement, built upon foundational mathematical breakthroughs and a continuous pursuit of robust security mechanisms. For anyone who has ever taken digital communication for granted, this talk provides a compelling reason to appreciate the intricate layers of security protecting our "pinky promises" in a digital world.
Background
▶ Watch: Defining secure communication: confidentiality, integrity, authenticity (1:40)
The journey into secure communication begins with a fundamental question: what does it mean for information to be "secure"? Swaak frames this around the concept of controlling access to a secret. He uses a personal, humorous example of eating paper as a child to illustrate that a secret is something private, intended for a limited audience. Historically, sharing secrets was straightforward: a whisper in someone's ear, relying on direct physical proximity for authenticity ("I know it's you") and confidentiality (only the recipient hears).
However, the advent of distance introduces significant challenges. Sending a letter, for instance, immediately raises questions about authenticity ("Is this really from Morgan?") and integrity ("Has the message been altered?"). Early solutions included physical signatures and wax seals. A signature provided a "something you have" form of authentication, though it could be copied. A wax seal served a dual purpose: it visually confirmed the sender's identity (authenticity) and indicated whether the message had been tampered with (integrity). The unbroken seal guaranteed the message's original state.
The digital age, however, dismantled these physical assurances. The internet, while offering unparalleled speed, also introduced the "control C, control V" problem. Digital copies are perfect and indistinguishable from the original, rendering physical signatures and seals meaningless. Furthermore, the anonymity of online interaction makes "something you are" (like seeing someone's face) impossible. Even "something you know" (like a shared secret phrase) becomes problematic: if it's used to authenticate a message, the secret itself is transmitted and potentially intercepted, compromising its future use. This dilemma — needing a secret to share a secret, and then another secret for that, ad infinitum — highlights the fundamental paradox that early cryptographers faced, pushing the need for a truly novel approach to digital secure communication.
Key Findings
▶ Watch: The paradox: needing a secret to share a secret (9:00)
The central "finding" or contribution of this talk lies in demystifying the breakthroughs that allowed us to overcome the inherent paradox of digital secret sharing. Swaak illustrates how the initial, intuitive attempts at sharing secrets digitally quickly fail, leading to the necessity of more sophisticated, mathematically-driven solutions. The talk pivots from the concept of a "pinky promise" – a social contract based on mutual trust and fear of consequence – to the mathematical equivalent that provides verifiable security without prior shared secrets.
The speaker introduces the concept of mutually assured destruction (MAD) as an analogy for the "pinky promise" in a high-stakes scenario like the Cold War. While effective in preventing direct conflict, this mechanism ultimately fails in a digital context because an eavesdropper ("Eve") cannot be physically tracked or punished. This failure underscores the need for a system where security is inherent in the communication method itself, rather than relying on external threats or social contracts.
The true "key finding" presented is the Diffie-Hellman key exchange, pioneered by Whitfield Diffie and Martin Hellman. This revolutionary procedure provides a way for two parties (Alice and Bob) to establish a shared secret over an insecure channel without ever transmitting the secret itself. This breakthrough addresses the core problem of how to initiate secure communication without a pre-existing secure channel for key exchange. By leveraging mathematical properties that make certain operations easy in one direction but computationally infeasible in reverse, Diffie-Hellman laid the groundwork for modern public-key cryptography, enabling the secure establishment of shared keys that can then be used for efficient, high-volume data encryption. This transition from social trust to mathematical certainty is the talk's primary revelation.
Technical Deep Dive
▶ Watch: Mutually Assured Destruction as a trust model (12:45)
The technical core of the talk revolves around explaining how Diffie-Hellman key exchange works and how it addresses the challenges of secure communication. Swaak first introduces a simplified, flawed version using addition to illustrate the basic concept of deriving a shared secret.
The Flawed Additive Example:
Imagine Alice (Red Laptop) and Bob (Blue Tablet) want to agree on a secret number.
- Shared Public Knowledge: Both agree on a public number, say 10.
- Private Secrets: Alice chooses a private secret, 15. Bob chooses 2.
- Exchange of Derived Values:
- Alice adds her secret to the public number:
10 + 15 = 25. She sends 25 to Bob. - Bob adds his secret to the public number:
10 + 2 = 12. He sends 12 to Alice.
- Deriving Shared Secret:
- Alice receives Bob's 12 and adds her private secret:
12 + 15 = 27. - Bob receives Alice's 25 and adds his private secret:
25 + 2 = 27. - Both arrive at 27 as their shared secret.
However, Swaak quickly points out the flaw: an eavesdropper (Eve) who sees 10, 25, and 12 can easily deduce the private secrets and thus the shared secret. Alice's secret = 25 - 10 = 15. Bob's secret = 12 - 10 = 2. Then Shared Secret = 10 + 15 + 2 = 27. The operation (addition) is easily reversible. This demonstrates that for a key exchange to be secure, it must rely on a one-way function – easy to compute in one direction, but extremely difficult to reverse.
The Secure Diffie-Hellman Key Exchange (using Modular Exponentiation):
To achieve this one-way property, Diffie-Hellman leverages modular arithmetic and discrete logarithms.
The formula X^a mod B = C is introduced:
X: A public base number.a: A private secret exponent.B: A public modulus (a large prime number).C: The public result.
The security comes from the fact that while calculating C from X, a, and B is straightforward, finding a given X, B, and C (the discrete logarithm problem) is computationally very hard for large prime numbers B.
Here's how it works with Alice (Red) and Bob (Blue):
- Shared Public Knowledge: Alice and Bob agree on a public base
C(e.g., 2) and a public modulusD(e.g., a large prime like 5). - Private Secrets:
- Alice chooses a private secret exponent,
a(e.g., 3). - Bob chooses a private secret exponent,
b(e.g., 4).
- Exchange of Derived Public Values:
- Alice computes
C^a mod D(e.g.,2^3 mod 5 = 8 mod 5 = 3). She sends 3 to Bob. - Bob computes
C^b mod D(e.g.,2^4 mod 5 = 16 mod 5 = 1). He sends 1 to Alice. - An eavesdropper sees
C,D, 3, and 1, but cannot easily determineaorbfrom these values alone due to the difficulty of the discrete logarithm problem.
- Deriving Shared Secret:
- Alice receives Bob's public value (1) and computes
(Bob's value)^a mod D(e.g.,1^3 mod 5 = 1). - Bob receives Alice's public value (3) and computes
(Alice's value)^b mod D(e.g.,3^4 mod 5 = 81 mod 5 = 1). - Both arrive at the same shared secret (1). This shared secret is
C^(a*b) mod D.
From Key Exchange to Encryption:
Once Alice and Bob have derived a shared secret, they can use it as a key for a symmetric encryption algorithm like AES (Advanced Encryption Standard). This key is plugged into the AES formula, allowing them to encrypt and decrypt messages efficiently.
Addressing the Man-in-the-Middle (MITM) Attack:
A critical vulnerability in the basic Diffie-Hellman exchange is the Man-in-the-Middle (MITM) attack. If an attacker (Mallory) intercepts the public values exchanged, Mallory can establish separate shared secrets with both Alice and Bob. Alice thinks she's talking to Bob, but she's talking to Mallory. Bob thinks he's talking to Alice, but he's talking to Mallory. Mallory can then decrypt, read, potentially alter, and re-encrypt all communications.
To counter MITM, Swaak introduces the concept of asymmetric encryption, also known as public-key cryptography.
- Each party generates a key pair: a public key and a private key.
- The public key can be freely distributed; it's used to encrypt messages for that person.
- The private key is kept secret; it's used to decrypt messages encrypted with the corresponding public key.
The speaker provides an example:
- Alice (Red Laptop) generates a public key
Pand a private keyA. She publishesPalong with a modulusB. - If someone wants to send Alice a message
X, they computeX^P mod Bto get the encrypted messageC. - Alice receives
Cand uses her private keyAto decrypt:C^A mod Bwhich yieldsX.
The key insight is that Alice can publish her public key (e.g., on an email or a trusted website). When Bob wants to communicate securely, he uses Alice's known public key to encrypt a session key or to authenticate Alice's part of a Diffie-Hellman exchange. This ensures that Bob is truly exchanging keys with Alice, and not an imposter. The combination of Diffie-Hellman for efficient key exchange and asymmetric encryption for authenticating the public keys forms the foundation of modern secure communication protocols, providing confidentiality, integrity, and authenticity.
Demo / Proof of Concept
▶ Watch: Asymmetric encryption defends against Man-in-the-Middle (21:15)
While the talk did not feature a live software demonstration or a physical proof of concept, Morgan Swaak effectively employed a conceptual demonstration using analogies and numerical examples to illustrate the core principles of the Diffie-Hellman key exchange. He used "red and blue laptops" to represent the communicating parties (Alice and Bob) and walked through numerical steps, first with a simple additive model and then with the more complex modular exponentiation.
This "demo" served to concretely show how two parties could arrive at a shared secret without ever explicitly transmitting that secret over an insecure channel. By presenting the intermediate public values exchanged and then demonstrating how each party, using their private secret, could independently calculate the final shared secret, Swaak made the abstract mathematical process tangible. He also highlighted the "attacker's view" by showing how an eavesdropper could easily break the additive model but would face an extremely difficult computational problem with the modular exponentiation, thereby illustrating the cryptographic strength derived from one-way functions. This conceptual walk-through was crucial for making the sophisticated mathematics of cryptography accessible and understandable to the audience.
Defensive Implications
▶ Watch: Conclusion: Appreciating the math behind secure communication (22:50)
Understanding the foundational principles of secure communication, as outlined in this talk, provides several critical defensive implications for individuals and organizations:
- Appreciate the Value of Cryptography: Defenders should recognize that modern digital security, from secure websites (HTTPS) to encrypted messaging, relies heavily on the cryptographic primitives discussed. This appreciation fosters a deeper understanding of why these protocols are essential and why their correct implementation is non-negotiable.
- Validate Authenticity: The talk highlights the challenge of authenticity in a digital world. Defenders must prioritize mechanisms that verify the identity of communicating parties. This includes proper certificate validation for public keys (e.g., ensuring SSL/TLS certificates are legitimate and not self-signed or expired), robust multi-factor authentication (MFA), and secure key management practices for both symmetric and asymmetric keys.
- Protect Private Keys: The security of asymmetric encryption hinges entirely on the secrecy of the private key. Defenders must implement stringent controls around private key storage, access, and usage, treating them as highly sensitive assets. Compromise of a private key can lead to widespread impersonation and decryption of past and future communications.
- Guard Against Man-in-the-Middle (MITM) Attacks: The vulnerability of basic Diffie-Hellman to MITM attacks underscores the need for robust authentication during key exchange. Protocols like TLS (Transport Layer Security), which combine Diffie-Hellman for key exchange with asymmetric cryptography (like RSA or ECC) for server authentication, are designed to mitigate this. Defenders should ensure their systems use the latest TLS versions and strong cipher suites.
- Understand Cryptographic Limitations: While powerful, cryptography is not a silver bullet. The talk implicitly touches on the idea that security is a system. A strong cryptographic algorithm like AES is only as secure as the key used and the process by which it was exchanged. Weak random number generation for keys, poor key management, or vulnerabilities in the implementation of cryptographic libraries can undermine even the strongest algorithms.
- Maintain Software Updates: Cryptographic research is ongoing, and new vulnerabilities or more efficient attack methods are discovered. Keeping systems, libraries, and protocols updated ensures that the latest, most secure cryptographic implementations are in use, protecting against known weaknesses (e.g., deprecating older, weaker key exchange algorithms or hash functions).
- Educate Users: The "pinky promise" analogy highlights the human element of trust. While technology provides mathematical assurances, user education on phishing, social engineering, and the importance of verifying communication channels remains critical. No amount of encryption can protect against a user willingly giving away their secrets.
Morgan Swaak's concluding remarks, relating these concepts to a BSides badge (something you have for authentication) or a buffer overflow (changing integrity), underscore that these fundamental cryptographic principles are deeply embedded in various aspects of cybersecurity, guiding how defenders approach system design, threat modeling, and incident response.
Key Takeaways
- Modern secure communication is a marvel: The ability to send private, authentic, and untampered messages globally is a complex achievement, built upon centuries of innovation.
- The core challenges are Authenticity, Integrity, and Confidentiality: Early methods like whispers and wax seals addressed these physically, but digital communication required new, mathematical solutions.
- Diffie-Hellman key exchange is foundational: It allows two parties to establish a shared secret over an insecure channel without ever transmitting the secret itself, leveraging computationally difficult problems like the discrete logarithm.
- One-way functions are critical for cryptographic security: Operations that are easy to compute in one direction but extremely hard to reverse form the backbone of secure key exchange mechanisms.
- Asymmetric encryption counters Man-in-the-Middle (MITM) attacks: By providing public/private key pairs, it enables authentication of communicating parties, ensuring that key exchanges are conducted with the intended recipient.
- Cryptography empowers robust security: The combination of key exchange (Diffie-Hellman), symmetric encryption (like AES), and asymmetric authentication forms the basis for secure digital communication, providing the confidentiality, integrity, and authenticity we rely on daily.
About the Speaker(s)
Morgan Swaak is a student at UNSW (University of New South Wales). His presentation at BSides Canberra demonstrates a passion for making complex technical subjects, particularly the history and mathematics of cryptography, accessible and engaging for a broad audience. His ability to distill intricate concepts into relatable analogies underscores his talent for communication in the security field.