What this section is about
If it runs, you have learned it.
- Experiments from zero, with open-source tools like liboqs
- Every step has verifiable output — nothing skipped
- Pitfall logs: the errors, the causes and the fixes, all in the open
Subcategories
Articles in this section
Benchmarking Your Own PQC Code: Measuring Right Matters More Than Measuring Fast
A wrong benchmark is worse than none at all. This tutorial covers PQC benchmarking methodology: timing the three operations separately, warm-up and medians, separating binding overhead from algorithm cost, and liboqs's bundled speed_kem and speed_sig tools.
liboqsBenchmarkingPerformanceProgramming
Handling Algorithm Deprecation and Data Re-encryption: An Engineering Method from Announcement to Zero
A deprecation announcement is only the beginning; the hard part is moving legacy data, historical signatures, and long-lived tokens over smoothly. This article gives an engineering process for handling deprecation: inventory, dual-track transition, batch re-encryption, the special handling of signatures and tokens, and the verification bar for final retirement.
Algorithm DeprecationData MigrationRe-encryptionCryptographic Agility
Botan vs Crypto++: A Positioning Guide to the Two C++ Cryptography Libraries
Both are C++ cryptography libraries, but Botan pursues a modern interface with a full TLS stack while Crypto++ wins on algorithm breadth and heritage: interface styles, post-quantum status and the scenarios each fits.
C++BotanCrypto++Library Choice
Systematic Debugging of Build Failures: Logs, Bisection and Minimal Reproductions
A general method for build failures: preserve the scene completely first, read the log from the first error, narrow the scope layer by layer with version, configuration and dependency bisection, and converge on a minimal reproduction.
Debugging MethodBuildsBisectionMinimal Reproduction
Building liboqs from Source: A Walkthrough of the Build Options
Skip the distribution packages and compile liboqs yourself with CMake: what the algorithm-selection, distribution-build and OpenSSL options actually do, and how to validate the result with the library's own tests.
liboqsCMakesource build
Project: A Post-Quantum Certificate Chain Size Calculator
A zero-dependency tool in pure standard-library Python: turn the parameter tables of FIPS 203/204/205 into data, accumulate public key and signature sizes level by level, and compute exactly how many bytes a certificate chain gains when it moves to post-quantum algorithms.
Certificate ChainsParameter CalculationFIPS 204Standard Library
Certificates and Chains of Trust: Why Your Browser Believes a Public Key
From letters of introduction and notary offices to the real nature of a certificate — an authority's signature over the statement 'this public key belongs to this domain' — how trust chains link together ring by ring, and what expired, revoked, and self-signed each mean.
digital certificatesCAchain of trustprimer
Choosing a PQC Library by Scenario: A Decision Guide to the Open-Source Ecosystem
Research prototypes, production integration and embedded targets want completely different things from a cryptography library: candidates and criteria per scenario, the upgrade traps of renames (Kyber to ML-KEM) and removals, and a final actionable checklist.
library selectionliboqsOpenSSLembedded
Linking OpenSSL and liboqs into One Project with CMake
A walkthrough of a working CMakeLists: find_package for OpenSSL, pkg-config for liboqs, imported targets and link order, include paths and build types — with the reason behind every line.
CMakeOpenSSLliboqsEngineering
Deployment in Practice: Switching Code Signing to LMS / XMSS
Firmware and software signing is the first-priority post-quantum migration scenario: LMS and XMSS already have RFC and SP 800-208 backing. This article covers parameter selection, state management — the real engineering difficulty — and the dual-signing transition.
Code SigningLMSXMSSSP 800-208
Constant-Time Comparison and Reliable Wiping in C
memcmp's early exit and an optimized-away memset are the two classic traps in C cryptography code: the real semantics of CRYPTO_memcmp and OPENSSL_cleanse, plus every platform's secure-wipe function.
CConstant TimeOpenSSLSide Channels
The dudect-Style Lab: Quantifying Your Constant-Time Implementation with Statistical Tests
Borrowing the fixed-versus-random input method of the open-source tool dudect, run statistical timing-leak tests on cryptographic functions you wrote yourself in an isolated environment, and learn to judge leakage with t values instead of eyeballs.
dudectconstant timestatistical testingside-channel self-test
Handling Large Key Material in C++: From Stack Overflows to Buffer Strategy
A Classic McEliece public key can be 1.3 MB and an SLH-DSA signature nearly 50 KB: where the stack/heap boundary lies, how vector and span divide the work, avoiding pointless copies, and wiping strategies for large secret buffers.
C++Classic McElieceMemory ManagementBuffers
Making Algorithms Replaceable: Code Structure for Cryptographic Agility
Algorithms age, get broken, and get replaced by standards. This article covers the code-level structure of cryptographic agility: abstraction interfaces, algorithm identifiers and versioning, ciphertext that carries its own metadata, configuration-driven switching, and engineering the dual-read transition period.
Cryptographic AgilityArchitectureAlgorithm MigrationSecure Coding
A Code Review Checklist for Cryptography: The Questions a Reviewer Should Ask, Item by Item
Bugs in cryptographic code usually do not crash — they silently stop protecting. This article provides a checklist ready to use in review: randomness, algorithms and modes, key handling, comparison and timing, error handling, parameters and encoding — with the question to ask and the rejection bar for each item.
Code ReviewCryptographyChecklistSecure Coding
Dependency and Supply-Chain Hygiene: The Daily Discipline of Lockfiles, Auditing, and Signature Verification
Most of a modern application's code comes from third-party dependencies, and crypto libraries are a single point of trust. This article sets out the daily discipline of dependency hygiene: pinning versions, verifying integrity, continuously auditing for vulnerabilities, checking provenance and signatures, and a review process for updates and replacements.
Supply-Chain SecurityDependency ManagementVulnerability AuditingSecure Coding
What Problem Do Digital Signatures Solve? More Than Proving 'I Wrote This'
From handwritten signatures and seals to the three guarantees of digital signatures — authenticity, integrity, and non-repudiation — plus the key fact that signing runs in the opposite direction to encryption, and where signatures actually work: software updates, contracts, and certificates.
digital signaturesML-DSAnon-repudiationprimer
Freezing a Reproducible PQC Lab Environment into a Docker Image
Write your PQC lab environment into a Dockerfile and pin every layer: base image, system packages and source commits all fixed, with the digest recorded after the build, so the same experiment gets the same environment on any machine.
DockerReproducibilityImagesEnvironment Freezing
Entropy Source Health-Check Lab: A Routine Physical for Your Own Service's Randomness
In an isolated environment, collect raw output from the random number generator your own service uses, run health checks with public statistical tools and operating-system counters, and learn to distinguish what a statistical checkup can prove from what it cannot.
random numbersentropy sourceshealth checksoperations lab
Fault-Injection Simulation Lab: Understanding in Software Why Signatures Fear a Single Skipped Step
Without any real hardware attack technique, simulate faults purely at the software level against signature-verification and key-handling code you wrote yourself, in an isolated environment; observe how a single-point perturbation affects results, and evaluate countermeasures such as redundant checks accordingly.
fault injectionsoftware simulationdefense evaluationsignature security
Parser Fuzzing Intro Lab: Let Malformed Input Crash in the Lab First
Using coverage-guided fuzzing tools, feed large volumes of automatically mutated malformed input to parsers you wrote yourself — certificates, protocol messages, configuration files — in an isolated environment, and learn the complete workflow of setup, running, and reproducing crash samples.
fuzzingparsersdefensive testingrobustness
Deployment in Practice: The Real-World Constraints of Post-Quantum in HSMs
What to establish before putting PQC keys into a hardware security module: PKCS#11 mechanism coverage, firmware support cadence, counter custody for stateful signatures, and hybrid architectures for when the HSM is not ready.
HSMPKCS#11Key ManagementDeployment
Project: A File Encryption Tool Built on a Hybrid KEM
Wire ML-KEM-768 and X25519 together as a hybrid key encapsulation, derive a session key with HKDF, and encrypt files with AES-256-GCM: a complete, runnable, verifiable teaching-grade file encryption tool.
ML-KEMHybrid EncryptionliboqsFile Encryption
A Hybrid Key Exchange Skeleton: How X25519 and ML-KEM Fit Together
A complete code skeleton for hybrid key exchange with X25519 plus ML-KEM-768: two independent agreements, a combiner, transcript binding — and a clear account of how it relates to, and differs from, the TLS hybrid groups and X-Wing.
Hybrid Key ExchangeX25519ML-KEMProgramming
Deployment in Practice: Issuing a PQC Test Certificate Chain for Internal Services
Build an ML-DSA root and intermediate CA with OpenSSL 3.5, issue certificates for internal services, and verify the chain; with clear applicability boundaries and the right dual-track posture alongside classical PKI.
PKIML-DSACertificatesInternal Services
Deployment in Practice: The Current Post-Quantum Options for IPsec and WireGuard
IPsec has two standardized paths — RFC 8784 preshared-key mixing and RFC 9370 multiple key exchanges; WireGuard relies on its built-in PSK as the symmetric safety net. This article gives each one's configuration surface and selection guidance.
IPsecWireGuardVPNRFC 8784
Project: A Batch Verifier for KAT Test Vectors
Parse NIST-style KAT vector files and run three layers of batch checks — field lengths against the parameter table, shared-secret recomputation by decapsulation, and signature verification — to learn what standards conformance testing actually tests.
KATConformance TestingML-KEMTest Vectors
Verify Your PQC Wiring with KATs: Known Answer Tests for liboqs Builds
KATs pin an algorithm's entire output down with fixed inputs and a deterministic random source, producing answers that can be compared byte for byte. This tutorial explains the principle, liboqs's bundled KAT tools and hash lists, and how to validate a self-built library.
liboqsKATTestingProgramming
KAT Vector Verification Lab: Confirming Your Crypto Calls Are Wired Correctly
Using known-answer test vectors published by standards bodies, check the outputs of the hash, KEM, and signature calls in your own programs item by item in an isolated environment, and master a wiring-check procedure that is mandatory before launch.
KATknown answer testsverification workflowcrypto engineering
Project: A Two-Process Local KEM Key Exchange Demo Service
Run a server and a client as two local processes over Python sockets, complete a full ML-KEM-768 encapsulation exchange, then carry an encrypted echo channel on the negotiated shared secret.
KEMSocket ProgrammingML-KEMProtocol Demo
Key Length and Security Strength: How Strong Is 128 Bits, Really?
Dismantling the 'longer is safer' intuition: what security strength in bits actually means, the scale of brute force, why RSA-2048 only delivers about 112 bits of strength, and why post-quantum algorithms are labelled by security categories instead of raw key length.
key lengthsecurity strengthbrute forceprimer
Where Key Material Belongs: Envelope Encryption, KMS, and the Limits of Environment Variables
What are the risks of putting keys in code, config files, or environment variables? This article explains the layered structure of envelope encryption, the boundary of what a KMS is responsible for, and why environment variables are only a thin last line of defense.
Key ManagementEnvelope EncryptionKMSSecure Coding
Lab Isolation and Data Discipline: House Rules for a Security Lab
A systematic treatment of isolation architecture and data discipline for security testing labs: network segmentation, snapshots and restoration, labeling and management of samples and keys, retention of lab logs, and how to close out an experiment cleanly.
lab managementnetwork isolationdata disciplinelab norms
Version Pinning and Snapshots for Your Lab Environment
A four-layer pinning method for reproducible environments: system packages, language packages, source commits and image digests fixed layer by layer, paired with a snapshot strategy and a rollback drill, so any experiment can return to the environment state it ran in.
Version PinningSnapshotsReproducibilityEnvironment Management
Beyond Python: Comparing the liboqs Language Bindings
Open Quantum Safe maintains liboqs bindings for Python, Go, Rust and .NET: how each wraps the C library, how installation works, how actively each is maintained, and a framework for choosing by language ecosystem.
liboqslanguage bindingsGoRust
Memory Management and Key Destruction in the liboqs C API
liboqs keeps key material in caller-managed buffers: how the length fields of the OQS_KEM object define every allocation, who allocates and who frees, and the correct OQS_MEM_cleanse procedure for destroying secret keys.
liboqsCMemory SafetyML-KEM
The KEM Three-Step with liboqs in C: Key Generation, Encapsulation, Decapsulation
Starting from OQS_KEM_new, this tutorial walks through the full liboqs C API flow for key generation, encapsulation and decapsulation, covering buffer sizes, status checks and secret-memory hygiene.
liboqsCML-KEMProgramming
Error-Handling Discipline for liboqs: Status Codes, Exceptions, and the Failures That Stay Silent
A systematic tour of OQS_STATUS return values in the C API, the two mechanism exceptions in the Python bindings, and the most dangerous failure class of all — decapsulation and verification paths that return wrong results without any error.
liboqsError HandlingProgrammingRobustness
Calling liboqs Through FFI: The oqs Crate and unsafe Safety Boundaries
The oqs crate is the official Rust binding for liboqs with a friendly interface, but beneath the boundary lie FFI and unsafe. This article explains its usage shape and the disciplines to hold on four boundaries: length checks, secret wiping, panics never crossing FFI, and thread safety.
RustliboqsFFIunsafe
Building liboqs from Source: An Environment Troubleshooting Handbook
The common environment failures of a liboqs source build, class by class: missing or outdated toolchain pieces, OpenSSL headers and link paths, the dynamic-library cache, and Python bindings that cannot find the library — each with a locating command and a fix.
liboqsBuild TroubleshootingCMakeSource Build
Lab Setup Checklist: Building a PQC Development Environment on Linux from Scratch
A tick-box checklist for setting up a PQC lab environment: verify the distribution and CPU instruction sets, install the toolchain and cryptography dependencies item by item, and finish with a set of version checks so environment drift never contaminates your results.
LinuxEnvironment SetupToolchainChecklist
Project: A Software Update Package Verifier with ML-DSA Signatures
Design a signed manifest for software update packages: the publisher signs the manifest with ML-DSA-65, and the client verifies the signature first, then checks every file hash — installation only proceeds when both channels pass.
ML-DSASoftware UpdatesDigital Signaturesliboqs
Hands-On: ML-KEM-768 Encapsulation with Rust's ml-kem Crate
Run a complete ML-KEM-768 key generation, encapsulation and decapsulation with RustCrypto's ml-kem crate, check the sizes against FIPS 203, and learn what to watch for in no_std environments.
RustML-KEMRustCryptoHands-On
Never Roll Your Own Crypto: A Concrete Catalog of Failures
Home-grown encryption algorithms, hand-assembled protocols, hashing used as encryption, ECB mode... This article lists, one by one, the most common ways developers roll their own crypto and fail, explains why each mistake is dangerous, and gives the correct off-the-shelf approach.
Secure CodingAnti-PatternsEncryption PracticeCode Review
Deployment in Practice: Enabling Hybrid Post-Quantum TLS on nginx
Two real paths: native hybrid groups in OpenSSL 3.5, or the oqs-provider on older versions. Prerequisites, configuration steps, negotiation verification, and rollback.
nginxTLSHybrid Key ExchangeDeployment
Deployment in Practice: Configuring and Verifying OpenSSH Post-Quantum Key Exchange
OpenSSH has enabled the sntrup761 hybrid exchange by default since 9.0 and added an ML-KEM hybrid group in 9.9. This article covers version checks, explicit configuration, log-based verification, and safe fallback.
OpenSSHSSHML-KEMDeployment
Building OpenSSL 3.5 from Source: Isolated Installation and Verification Steps
When your distribution's repositories do not yet carry OpenSSL 3.5, building from source is the reliable path to native ML-KEM. This article covers the prerequisites, the Configure options that matter, isolated installation and post-build verification — without polluting the system libraries.
OpenSSLsource buildConfigurelab environment
Building a Local Test CA with openssl ca
Stand up a local test certificate authority from scratch with OpenSSL's built-in ca command: the directory skeleton and configuration file, root CA generation, server certificate issuance and verification, plus the classic failures — serial conflicts and database corruption.
OpenSSLCACertificatesPKI Lab
Anatomy of openssl.cnf: The Sections That Actually Do Something
openssl.cnf is a file most people have never opened, yet it is in effect every day. This article dissects its entry structure, the provider activation sections and the TLS system-default section, and explains how to verify a change really took effect.
OpenSSLopenssl.cnfconfigurationprovider
Troubleshooting Common OpenSSL Errors: A Map by Error Category
OpenSSL's error messages are famously cryptic, but once categorised there are only a few kinds: provider load failures, unsupported algorithms, configuration problems, no common negotiation parameters, and file and permission issues. This article gives a fixed localisation path per category.
OpenSSLtroubleshootingerrorsprovider
OpenSSL EVP Usage Patterns: From Key Generation to Key Encapsulation
Use OpenSSL 3.x's high-level EVP interface to generate ML-KEM keys, encapsulate and decapsulate, with a clear account of context objects, parameter passing and error handling — the three things most often gotten wrong.
OpenSSLEVPML-KEMC
Inspecting the PQC Certificates and Keys in Your Hands: x509, pkey and asn1parse in Practice
Someone hands you a certificate that claims to be post-quantum — how do you confirm it really uses ML-DSA, which parameter set it is, and whether the private key matches? This article turns the inspection into concrete steps with x509, pkey and asn1parse.
OpenSSLx509certificate inspectionML-DSA
Taking Stock of a Machine's OpenSSL Algorithms with the list Command
Before and after upgrades, when moving machines, and when troubleshooting, spend five minutes exporting the machine's OpenSSL version, providers and algorithm lists into an archive. This article gives a fixed inventory procedure and how to read it, so algorithm-support questions have evidence behind them.
OpenSSLlistinventoryoperations
Generate an ML-KEM Key with genpkey and Verify It with an Encapsulation Round Trip
From OpenSSL 3.5, genpkey can generate ML-KEM key pairs directly. This article walks through generation, text inspection, and a full encapsulation/decapsulation check with pkeyutl to prove the key really works.
OpenSSLML-KEMgenpkeypkeyutl
Understanding OpenSSL 3's Provider Architecture: Where Algorithms Come From and How to Switch Them
OpenSSL 3 moved algorithm implementations into pluggable providers. Understanding how default, fips, legacy and external providers divide the work explains why some algorithms work on a given machine while others report unsupported.
OpenSSLproviderFIPStroubleshooting
The OQS-BoringSSL Fork: How Browser-Scale Post-Quantum Experiments Are Done
Why BoringSSL needs an experimental fork: the relationship between BoringSSL and OpenSSL, how the OQS fork integrates liboqs algorithms into the TLS handshake, its division of labour with Chrome's real deployment, and where this path does and does not apply.
BoringSSLOQSbrowsers
oqs-provider: Plugging Post-Quantum Algorithms into OpenSSL 3
Without patching OpenSSL itself, one provider plug-in lets existing OpenSSL 3 applications use ML-KEM, ML-DSA and hybrid key exchange: the provider mechanism, build and install, configuration, and a layered verification routine.
oqs-providerOpenSSLTLS
Digital Signatures End to End with oqs-python: Generate, Sign, Verify, Export
Use the liboqs Python bindings to run the full ML-DSA-65 flow — key generation, signing, independent third-party verification and secret-key export — with the details dict and correct verifier construction explained.
liboqs-pythonML-DSADigital SignaturesProgramming
Project: The Cryptographic Core of a Password Vault (Teaching Implementation)
Derive a key from a master password with scrypt and seal the whole vault file with AES-256-GCM: implement a minimal working password vault core, with an itemized account of how it falls short of a production vault.
Password VaultKDFAEADTeaching Implementation
Deployment in Practice: Verification and Continuous Monitoring After Post-Quantum Deployment
Launch is not the finish line: how to prove with negotiation telemetry that protection is actually in effect, which indicators and alerts to watch, how to put certificates and key rotation on the calendar, and an annual review checklist.
MonitoringOperationsNegotiation TelemetryDeployment
Project: Build Your Own PQC Benchmark Suite
A uniform timing framework on top of liboqs: batch-measure key generation, encapsulation, signing, and verification across ML-KEM, ML-DSA, SLH-DSA and more, and emit a reproducible report with medians and spread.
BenchmarkingliboqsMeasurement MethodML-KEM
Deployment in Practice: Post-Quantum Canary Rollout and Interoperability Checklist
The phased playbook for taking PQC from lab to production: shadow observation, proportional canary, and full rollout; how to test the client interoperability matrix; and explicit rollback trigger conditions.
Canary ReleaseInteroperabilityRollout ChecklistDeployment
PQClean: Reading Reference Implementations as a Textbook
PQClean collects clean C implementations written for readability: its inclusion criteria, unified API and directory layout, a method for understanding an algorithm line by line, and how it divides labour with production libraries and benchmarking frameworks.
PQCleansource readingreference implementations
The pqcrypto Crates: Another Road to PQClean Algorithms in Rust
The pqcrypto family of crates provides Rust bindings for the PQClean reference implementations, covering many KEM and signature algorithms. This article explains its per-parameter-set modules and typed-wrapper interface pattern, and the trade-offs against RustCrypto's pure-Rust route.
RustpqcryptoPQCleanBindings
Serializing PQC Keys and Ciphertexts: Design a Storage Format That Won't Bite You
liboqs hands you raw byte strings; the on-disk format is yours to design. This tutorial builds a self-describing container with an algorithm identifier and length prefixes, and covers versioning, permissions and cross-parameter-set discipline.
liboqsSerializationKey ManagementProgramming
First Steps with Cryptography in Python: Hashing, HMAC, and AES-GCM
Three fundamentals with the standard library and the cryptography package — hashing with hashlib, message authentication with hmac, encryption with AES-GCM — plus the three beginner traps to avoid: ECB, home-grown randomness, and hashing-as-encryption.
PythonhashlibAES-GCMHMACcryptography
Encoding Formats in Practice: PEM, DER, Base64 and Hex, and How They Differ
In memory a key is an object; on disk and on the wire it must become bytes, and the same key material can wear several different outer layers — PEM, DER, Base64 and more. This tutorial walks through exporting and loading keys with the cryptography library's serialization interface and clears up the confusions that bite most often.
PythonPEMDEREncoding
Signing API Requests: HMAC in Practice with Full Replay Protection
Open APIs commonly use HMAC signatures to prove a request really came from the key holder and was not tampered with. This tutorial implements signing and verification for an API request end to end with the standard library's hmac module: a canonical signing string, timestamps and nonces against replay, constant-time comparison, and a dissection of the signing mistakes beginners make most.
PythonHMACAPI SigningReplay Protection
Property Tests for Crypto Code: Round-Trips, Tamper Detection and Randomness Sanity Checks
The scariest crypto bugs do not crash — they compute wrongly in silence: decryption returns garbage without complaint, or tampered ciphertext sails through. This tutorial writes assertion-only property tests for AES-GCM encryption — round-trip consistency, detection of any single-bit flip, different ciphertexts for the same plaintext, guaranteed failure under a wrong key — and explains why properties suit crypto code better than examples.
PythonProperty TestingAES-GCMTesting
Toy Experiment: Stitching X25519 and ML-KEM into a Hybrid Key Exchange with oqs-python
The hybrid idea is to let a classical algorithm and a post-quantum algorithm each contribute half of the secret and combine the halves into one key — if either half falls, the other still holds. This tutorial builds a runnable teaching version with liboqs-python's KEM interface and cryptography's X25519, and explains why the combiner must be more than plain concatenation.
PythonliboqsML-KEMHybrid Key Exchange
Password Storage in Practice: Storing Passwords Correctly with hashlib.scrypt and pbkdf2_hmac
User passwords must never be stored in plaintext, nor with a single SHA-256 — ordinary hashes are fast in exactly the way offline crackers want. This tutorial explains how password hashing fundamentally differs from ordinary hashing, and builds a complete salted, parameterized, verifiable storage format with hashlib.scrypt and hashlib.pbkdf2_hmac.
PythonscryptPBKDF2Password Hashing
Randomness Discipline: Why Keys Must Come from secrets, Never from random
The random module's Mersenne Twister is a predictable pseudorandom generator; keys, tokens and verification codes produced with it are effectively public. This tutorial explains how secrets, os.urandom and SystemRandom divide the work, with correct patterns for tokens, codes and generated passwords.
PythonsecretsRandomnessSecure Coding
X25519 Key Exchange with cryptography: From Shared Secret to Session Key
The core idea of Diffie-Hellman is that two parties derive the same secret over a public channel. This tutorial performs a complete elliptic-curve key exchange with the cryptography library's X25519 interface, then processes the raw shared secret into a usable session key with HKDF, and explains the checks you must not skip.
PythonX25519HKDFcryptography
Your First Quantum Circuit with Qiskit: From a Bell State to a Measurement Histogram
Set up the environment and build a first quantum circuit: prepare a Bell state with a Hadamard gate and a CNOT, run it on a simulator, learn to read the measurement histogram, and understand how real hardware execution differs.
Qiskitquantum circuitsBell statequantum computing basics
What Exactly Does the Quantum Threat Threaten? A Beginner's Map
The quantum threat explained without formulas: Shor's algorithm threatens public-key cryptography, Grover's only weakens symmetric encryption, why 'harvest now, decrypt later' makes the threat arrive early, and what lies entirely outside its range.
quantum threatShor's algorithmharvest now decrypt laterprimer
Wrapping Cryptographic Objects in RAII: Making Forget-to-Free Unwritable
Put C objects such as EVP_PKEY and OQS_KEM into std::unique_ptr with custom deleters, then write a self-wiping guard class for secret-key buffers, turning release and erasure from discipline into construction.
C++RAIIOpenSSLliboqs
Why Randomness Is the Foundation of Cryptography: Every Secret Starts with 'Unguessable'
From dice and shuffled cards to the real division of labour between entropy sources and CSPRNGs: why keys, nonces, and salts all rest on unpredictable randomness, and the famous real-world disasters caused not by broken algorithms but by broken randomness.
randomnessentropyCSPRNGprimer
How to Read Algorithm Names and Parameter Sets: Taking ML-KEM-768 Apart
Learn to decode post-quantum naming: what the prefixes, algorithm families, and trailing numbers in ML-KEM, ML-DSA, and SLH-DSA each mean, how to look up FIPS standard numbers, and how to read the public-key, ciphertext, and signature sizes in a parameter table.
ML-KEMparameter setsFIPS 203primer
ring and rustls: From Cryptographic Primitives to a TLS Implementation
ring is a low-level cryptographic primitives library and rustls is a pure-Rust TLS implementation; the two are often confused. This article clarifies each one's role, rustls's pluggable CryptoProvider architecture, and the realistic path to post-quantum key exchange today.
RustringrustlsTLS
Supply-Chain Hygiene for Cryptography Projects: cargo audit, deny and vet
Every dependency a cryptography project takes on is a potential attack surface. This article lays out a complete supply-chain hygiene pipeline: Cargo.lock and reproducible builds, cargo audit watching advisories, cargo deny enforcing policy, cargo vet recording reviews — and wires them into CI.
RustSupply Chaincargo auditCI
The RustCrypto Ecosystem: Modular Crates and How to Choose
RustCrypto is not a single library but a family of modular crates built on traits. This article maps its repositories, lays out the selection dimensions that matter — pure Rust versus FFI bindings, audit status, no_std support — and shows where post-quantum algorithms sit in the landscape.
RustRustCryptoSelectionEcosystem
Catching Bugs in Cryptographic Code with AddressSanitizer and UBSan
Turn on -fsanitize=address,undefined for test builds: what each sanitizer catches, what it cannot catch, and exactly how to wire a sanitizer build into CI.
CC++TestingDebugging
Getting Randomness Right in Code: Secure Random Entry Points by Language and Common Misuses
Randomness is the source of keys, nonces, and tokens. This article lists, by language, the cryptographically secure random entry points you should use, explains how OS entropy sources work, and catalogs the classic failures of timestamps, ordinary PRNGs, and bad seeding.
RandomnessEntropy SourcesSecure CodingKey Generation
Secrets and Certificates in CI Pipelines: Injection, Redaction, and Least-Privilege Discipline
A CI system is one of the most secret-dense places in an organization, and one of the most overlooked leak channels. This article explains how secrets should be injected in CI, log redaction, preferring short-lived credentials, least privilege per job, and the practical discipline of certificate rotation.
CI/CDKey ManagementPipeline SecurityCertificate Rotation
Never Compare a MAC with ==: An Introduction to subtle and Constant-Time Programming
Ordinary equality comparison exits byte by byte and leaks the position of the first mismatching byte. This article explains timing side channels, subtle's Choice, ConstantTimeEq and ConditionallySelectable, and the capability limits of constant-time programming.
RustsubtleConstant-TimeSide Channels
Symmetric vs. Asymmetric Encryption: One Key or Two?
Build intuition for symmetric and asymmetric encryption with padlock and mailbox analogies, then return to the real mechanisms: the key distribution problem, hybrid encryption, and why the internet uses both.
symmetric encryptionasymmetric encryptionkey exchangeprimer
Timing-Leak Self-Test Lab: Giving Your Own Comparison Function a Checkup
In an isolated environment, use statistical methods to measure timing differences in comparison functions you wrote yourself — password checks, token comparisons — and learn to judge whether a piece of comparison code leaks secret length information to anyone holding a stopwatch.
timing side channelconstant timeself-test labdefensive programming
TLS Downgrade Drill Lab: Triggering a Protocol Downgrade Alert by Hand in a Lab Network
In a fully isolated lab network, use a server and client you deployed yourself to drill the classic TLS version and cipher-suite downgrade scenarios, observe handshake failures and log alerts, and verify whether your monitoring really can see downgrade events.
TLSdowngrade attacksdrillsmonitoring and alerting
Wiring a KEM into a Toy Protocol: From Key Agreement to an Encrypted Conversation
Assemble a working two-party encrypted channel from four parts — ML-KEM agreement, HKDF derivation, key confirmation and AES-GCM encryption — with every gap between this toy and a real protocol labelled in place.
ML-KEMProtocol DesignHKDFProgramming
Two-Machine and VM Lab Topologies: Putting Client and Server in Their Places
Build a two-machine topology for PQC protocol experiments: choosing among the three VM network modes, static addresses and connectivity checks, injecting delay and loss with tc netem, and finally documenting the topology so it can be reset in one step.
Virtual MachinesNetwork TopologynetemExperiment Design
What Is a Hash Function? A Unique Fingerprint for Data
Starting from fingerprints and meat grinders, this article explains the three core properties of hash functions — one-wayness, collision resistance, and the avalanche effect — their real roles in download verification, password storage, and signatures, and the common misconception that hashing is encryption.
hash functionsSHA-256integrityprimer
Setting Up Wireshark to Capture a TLS 1.3 Handshake with PQC Groups
From installation and capture privileges to reading the capture: capture a TLS 1.3 handshake in Wireshark or tshark, locate hybrid post-quantum groups such as X25519MLKEM768 in the key_share extension, and decrypt application data with a key log file for cross-checking.
WiresharkTLS 1.3Packet CaptureHybrid Key Exchange
Erase Keys When Done: Managing Secret Memory in Rust with zeroize
Why does assigning zero to a key variable so often fail to erase it? This article explains how compiler dead-store elimination defeats manual wiping, covers zeroize's Zeroize, ZeroizeOnDrop and Zeroizing trio, and shows how it pairs with secrecy.
RustzeroizeMemory SafetyKey Management
Hands-On: Your First ML-DSA Signature with liboqs
In the liboqs environment from the previous lab, run the full ML-DSA flow: key generation, signing, verification, a tamper test that must fail, and a size comparison across all three parameter sets.
liboqsML-DSAPythonlab
Hands-On: Local TLS with ML-KEM + ML-DSA Using OpenSSL 3.5
No research libraries needed: use the OpenSSL 3.5 shipped by mainstream distributions to issue an ML-DSA certificate, serve local TLS, and verify hybrid key exchange negotiation yourself.
OpenSSLTLSML-KEMML-DSAlab
Hands-On: Your First ML-KEM Key Encapsulation with liboqs
Use the Open Quantum Safe Python bindings locally to run ML-KEM-768 key generation, encapsulation and decapsulation — and verify that both sides arrive at exactly the same shared secret.
liboqsML-KEMPythonLab