============================================================
 DEF CON 34
 Post-Quantum Cryptography (PQC) for Hackers
 Eijah
============================================================

------------------------------------------------------------
[ Abstract ]
------------------------------------------------------------

Secure communications are not a luxury - they are a foundational requirement for human dignity in the digital age. Our most meaningful conversations, transactions, and decisions demand end-to-end encryption, strong authentication, and verifiable integrity. The notion that "only those with something to hide need strong crypto" is not merely lazy; it is dangerously shortsighted. Privacy is the space where autonomy, intimacy, and authentic human experience thrive. When that space is violated, the damage ripples far beyond the individual.

For decades, classical public-key cryptography has quietly protected everything from online banking to private messaging. That era is ending. Quantum computers are advancing rapidly, and the break of today's asymmetric algorithms - often called the Quantum Apocalypse - is no longer a question of if, but when. The window to prepare is narrowing. Migration must begin now.

In this workshop, you'll implement PQC algorithms from the NSA's CNSA Suite 2.0. You'll use C++, OpenSSL and Linux to demonstrate the secure usage of ML-KEM, ML-DSA, AES-256, and SHA-512. You'll leave with clean, reusable code, deep implementation insight, and the practical skills needed to integrate PQC into real-world systems.

We might not all have something to hide, but we all have something worth protecting.

------------------------------------------------------------
[ Prerequisites ]
------------------------------------------------------------

Host System Hardware
• A laptop with a multi-core 64-bit processor (4+ cores recommended).
• 8 GB of RAM (minimum).
• At least 20 GB of free disk space.

Host System Software
• VirtualBox (latest version) installed and running. Administrator rights are required to install and run VirtualBox. (https://www.virtualbox.org/wiki/Downloads)

What to Expect
• This is an intermediate workshop and requires that you have some prior experience programming on a Linux environment with GCC and CMake, and C/C++. Basic knowledge of cryptography, OpenSSL and a familiarly with the Linux operating system is also helpful.
• Although this is an intermediate workshop, it’s also designed to be flexible to meet the needs of as many students as possible.
• You can progress through the material in a variety of ways:
    o You can take a passive approach with a focus on listening, learning, and understanding the course material.  
    o You can compile and run the lesson solutions as opposed to writing the code yourself.
    o You can code all solutions yourself
    o Or any combination thereof
	
------------------------------------------------------------
[ Default Setup Instructions ]
------------------------------------------------------------

Step 1: Download Required Files
To save time, you must download the Virtual Machine (VM) before arriving. If you are unable to use the default VM method, it is your responsibility to read through the alternative options and set up your environment ahead of time. The workshop files and presentation slides are optional downloads for your reference, as the necessary files are already inside the VM.

Downloads located here: https://codesiren.com/defcon34

Step 2: Prepare the Virtual Machine
• Extract the PQC.zip archive. This will produce a file named PQC.ova.
• The OVA is a pre-configured Debian VM with an XFCE desktop environment and all necessary development tools (build-essential, gdb, cmake, ninja-build, VS Code, etc.).

Step 3: Import the VM into VirtualBox
• Open VirtualBox.
• Go to File -> Import Appliance... in the menu.
• Select the Hacker_VPN.ova file you extracted.
• Follow the on-screen instructions to import the appliance. You can leave the default settings.
• Start the VM to ensure it boots correctly.

Step 4: Final Prep
• The most important step is to have the Virtual Machine downloaded and imported into VirtualBox before arriving at the workshop.
• All necessary workshop files are pre-loaded into the VM for your convenience. The other downloads are optional.
• The VM username/password will be provided at the beginning of our session.

------------------------------------------------------------
[ Alternative Setup Instructions ]
------------------------------------------------------------

Hopefully the default instructions work for you. If you have issues, here are some alternatives. In the worst case, you can follow along without compiling.

Linux Native
• Note: The code and included libs have only been tested on Debian 13.6.0 x86-64.
• Install the dependencies: build-essential gdb cmake ninja-build dos2unix
• You can use a text editor for coding but the workshop is structured around using VS Code. You can download and install VS Code for your distribution here: https://code.visualstudio.com/
• Download the Workshop Files from above which includes the code and docs.
• The defcon_34 folder in the downloaded Workshop Files archive needs to be located in /defcon_34 to follow along with the presentation.
• You can verify your setup by running the build script in /defcon_34

Mac
* Run: brew install qemu
* Install UTM from their website
* Extract PQC.ova: tar -xvf filename.ova
* Run: qemu-img convert -p -f vmdk -O qcow2 filename.vmdk filename.qcow2
* Run UTM
* Create a New Virtual Machine
  -> Emulate
  -> Other
  -> Machine: Intel ICH9 based PC (2009, x86_64)
  -> Boot Device: None
  -> Uncheck "UEFI Boot"
  -> Storage Size: 24 GB
  -> Save
* Right-Click "Edit" Virtual Machine
  -> Delete "IDE Drive" under "Drives" section
  -> Add "New..." Drive
  -> Import: Select the qcow2 file
  -> Save
* Start Virtual Machine
  -> Emulation will be slow - this is normal

Other
• Note: The code and included libs have only been tested on Debian 13.6.0 x86-64.
• We recommend using a VM and emulation for non-native x86_64 CPUs.
• In the worst case, you can follow along without compiling.
