2 Cryptography Route Map
Protect One Record Across Every Reader
Picture a health reading leaving a wearable, crossing a home bridge, and entering a clinical service. Encrypting one link is not enough if an unnamed reader can copy or change the record at the next boundary.
A protocol is a shared set of rules for exchanging data. An API is a named software entry point used by another program. A gateway is the device or service that joins two system paths. Firmware is the stored device code and its version.
List every reader and key owner. Copy a record, alter it, use an expired identity, repeat it, and restart one endpoint. Preserve source, time, unit, quality, and code version through each hand-off, and record refusal as clearly as success.
This runway does not choose one cipher or key system. The deeper route map connects security goals, primitives, identity, key life, protected transport, protected messages, and release evidence.
This book is the cryptography and encryption route map for IoT systems. Use it to decide what security property you need, where the plaintext boundary sits, which primitive or protocol fits that boundary, how keys are provisioned and rotated, and what negative tests prove the claim before release.
2.1 Start With the Story
A field gateway receives a temperature reading, signs a firmware manifest, and forwards an alert to the cloud. A learner might ask whether the system is encrypted, but the better first question is: who is allowed to read, alter, or approve each step? The answer changes as the data moves from a local link to a gateway, from a gateway to a cloud API, and from a signed update package back to the device.
Use this route map like a design review. First name the promise, such as confidentiality, integrity, identity, freshness, or accountability. Then find the chapter that proves the promise with the right boundary, primitive, key lifecycle, negative tests, and redacted evidence.
Learning Objectives
By the end of this index, you will be able to:
- choose a learning path through confidentiality, integrity, identity, freshness, and key lifecycle topics;
- route an IoT security claim to the right chapter group without confusing link, transport, object, and key-renewal layers;
- identify which chapters provide implementation practice and which chapters provide release-review evidence;
- assemble a lightweight evidence checklist for cryptography decisions before reading the detailed chapters.
2.2 How to Use This Book
Cryptography fails most often at the boundary around the primitive: the wrong data is protected, the wrong endpoint is trusted, a key outlives its purpose, or evidence proves only the happy path. This book is organized to keep those decisions visible. Before choosing a chapter, inspect Figure 2.1 to see why the route begins with security claims and primitives, then adds key custody, protection boundaries, and application evidence in that order.
Read Figure 2.1 from stage 1 to stage 5. Foundations name the property that must hold; algorithms provide mechanisms for that property; key management keeps the mechanism trustworthy over time; layered encryption places protection at the correct readers; and applications turn those choices into testable release evidence. The sequence is the running narrative for the book, although a reviewer may return to an earlier stage whenever later evidence exposes a weak assumption.
New to the topic
Protect device data
Prove identity and origin
Manage keys over time
2.3 Route by Question
Start with the claim you need to make. Then read the chapters that force the boundary, keys, and evidence to match that claim.
2.4 Chapter Groups
2.4.1 Cryptography Foundations
These chapters define the vocabulary and decision model used throughout the book.
- Encryption Principles & Crypto Basics - primitive roles, boundary selection, and release evidence.
- Cryptography for IoT - algorithm choices, key boundaries, and implementation evidence.
- Security Properties & Practices - confidentiality, integrity, identity, freshness, accountability, and lifecycle claims.
- Encryption: Architecture and Levels - E1-E5 placement, plaintext ownership, and trust boundaries.
2.4.2 Symmetric Protection and Local Boundaries
These chapters help you protect traffic and frames after the key scope is known.
- Symmetric Encryption for IoT - AEAD modes, nonces, associated data, and tamper tests.
- E1 Link Layer Encryption - hop-by-hop wireless protection and shared-key blast radius.
- E2: Device-to-Gateway Encryption - gateway trust, per-device keys, replay protection, and evidence.
2.4.3 Identity, Hashing, and Key Lifecycle
These chapters focus on endpoint identity, signatures, digests, KDFs, and key operations.
- Public Key Cryptography - key agreement, signatures, certificates, and role separation.
- Elliptic Curve Cryptography for IoT - curve choice, validation, key agreement, signatures, and evidence.
- Hash Functions and Data Integrity - digests, HMAC, KDF context, password storage, and evidence.
- Key Management for IoT Devices - generation, provisioning, storage, derivation, rotation, and revocation.
- E5 Key Renewal and Asymmetric Trust - authenticated key establishment, overlap windows, and rollback prevention.
2.4.4 Transport, Firmware, and Communication Boundaries
These chapters connect cryptography decisions to deployed communication paths.
- Secure Comms & Firmware - protocol boundaries, update trust, and operational evidence.
- TLS and DTLS for IoT - transport identity, record protection, replay handling, and evidence.
- E3-E4: Transport Encryption - opaque payloads, TLS/DTLS sessions, and payload protection decisions.
2.4.5 Practice, Review, and Tools
Use these chapters after the concept chapters to test whether a decision is release-ready.
- Review: Symmetric vs Asymmetric - traffic protection, key establishment, and evidence gates.
- Review: Multi-Layer (E1-E5) - layer fit, plaintext boundary, and architecture evidence.
- Review: Checks & Scenarios - scenario review, negative tests, and release decisions.
- Encryption Review Quiz - comprehensive release-gate assessment.
- Encryption Labs and Practice - hands-on packet, boundary, and evidence labs.
- Encryption Labs, Quiz, and Review - capstone practice for layered encryption decisions.
- Interactive Cryptography Tools - visualizers, decision aids, and safe practice.
- Cipher Challenge Game - practice ciphers, attack thinking, and safe choices.
2.5 Evidence Loop
Every chapter in this book points back to the same release-review loop: name the claim, place the boundary, choose the primitive or protocol, prove key lifecycle, run negative tests, and keep evidence without leaking secrets. Inspect Figure 2.2 to see why the review returns to the original claim after evidence is collected.
Read Figure 2.2 clockwise from claim to boundary, primitive, lifecycle, negative tests, and sanitized evidence. Each stage constrains the next: the claim selects a boundary, the boundary gives the mechanism a job, lifecycle keeps its keys valid, and failure tests challenge the promised behavior. Evidence then returns to the claim; a mismatch reopens the design instead of being filed as a pass. That feedback connection is the common narrative shared by every route through the module.
2.6 Property-to-Primitive Review Map
Cryptography is a toolbox, not one universal control. The first review move is to name the property required by the claim, then pick the primitive or protocol that actually proves that property. Encrypting a payload does not prove who created it. Hashing a file does not prove a trusted signer approved it. A nonce does not prove integrity unless it is bound into an authenticated protocol.
In an IoT review, the property should be written as a testable claim. “Telemetry is encrypted” is not enough. The claim should say whether the protected boundary is the local link, the TLS or DTLS transport session, the object stored by a gateway, or the full device-to-cloud application payload. That boundary decides who may read plaintext, who authenticates whom, and where logs may accidentally expose secrets.
2.7 Hybrid Protocol Pattern
Real channels usually combine asymmetric and symmetric cryptography. Asymmetric mechanisms such as ECDH, signatures, and certificates solve key agreement and identity problems, but they are not the right tool for bulk telemetry. Symmetric AEAD modes such as AES-GCM and ChaCha20-Poly1305 protect most records after the protocol has established session keys.
Asymmetric setup:
Identify the peer or signer, agree fresh key material, and feed a KDF.
Symmetric records:
Protect bulk data with an authenticated mode and strict nonce policy.
Review evidence:
Reject wrong peer, weak version, bad tag, replay, stale key, and rollback.
TLS 1.3 is the familiar hybrid pattern: authenticated key agreement establishes fresh secrets, a KDF derives traffic keys, and symmetric record protection carries the data. DTLS 1.3 adds datagram-specific evidence for loss, reordering, retransmission, and replay windows. Firmware-update channels use the same discipline differently: signed manifests and rollback rejection prove origin and lifecycle, while encryption only hides package contents if confidentiality is also required.
2.8 Hashes, Keys, and Failure Behavior
Hash functions, HMACs, signatures, KDFs, and password hashes are easy to confuse because they all mention “hashing.” A plain SHA-256 digest is useful for detecting accidental differences only when the digest itself is trusted. Anyone who can edit a message can compute a new digest. Authenticity requires a secret or private key around the digest, such as HMAC-SHA-256 for a shared-key relationship or Ed25519, ECDSA, or RSA-PSS for signed artifacts.
Modern reviews should also reject broken or misplaced hashes. MD5 and SHA-1 are broken for collision resistance and should not be used where collision resistance matters. Password storage should use a password-hashing function such as Argon2id, bcrypt, scrypt, or PBKDF2 with unique salts and an appropriate work factor, not a bare fast hash.
Key lifecycle is the operational part of cryptography. Device fleets need per-device or bounded group scope, manufacturing records that identify installed credentials, protected storage such as a secure element, TPM, or protected MCU key store where available, and rotation evidence showing old credentials fail after replacement. Under failure, the right behavior is rejection: no plaintext fallback when certificate validation fails, no payload parsing after an AEAD tag failure, and no boot when a firmware signature is missing.
2.9 Start by Role
Choose the protection layer
Read architecture, E1, E2, E3-E4, TLS/DTLS, and key management. Produce a plaintext-owner map and exception register.
Use primitives safely
Read symmetric encryption, hash functions, ECC, labs, and tools. Prove nonce policy, tamper rejection, key storage, and secret redaction.
Validate peers and messages
Read public key cryptography, TLS/DTLS, secure communications, and review scenarios. Prove wrong-peer, downgrade, replay, and stale-key failures.
Approve release claims
Read review chapters, labs review, and the quiz. Check evidence coverage, lifecycle decisions, and whether any claim exceeds the protected boundary.
2.10 Release Evidence Checklist
Use this before moving from chapter learning to production design.
Plaintext is mapped
These checks map where plaintext appears. The data owner is named. Gateway and proxy termination points are marked. Logs and support bundles are redacted.
Role is correct
Each primitive has a distinct job. AEAD protects records. HMAC or a signature proves origin where needed. KDF context separates purposes.
Lifecycle is controlled
These checks cover the key lifecycle. Per-device or role scope is documented. Rotation and revocation are tested. Old credentials are rejected.
Failures fail closed
These tests check that failures stop access. The wrong peer is rejected. Tampering and replay are rejected. There is no cleartext fallback path.
2.11 Practice: Route the Cryptography Decision
Use these checks to practice the index-level decision process before moving into the chapter details.
2.12 Common Pitfalls
An algorithm name is not a release claim. Start with the property, boundary, key scope, and failure behavior, then select the primitive or protocol.
Transport protection ends where the session terminates. If the gateway reads plaintext, the claim must say so or add object-level payload protection.
Rotation is not complete until old credentials fail, rollback is handled, and devices can recover without leaking secrets.
Evidence should prove behavior without storing raw keys, PSKs, session secrets, or sensitive plaintext in reports, logs, screenshots, or support bundles.
2.13 References
- NIST SP 800-57 Part 1 Rev. 5: Recommendation for Key Management
- NIST SP 800-56A Rev. 3: Pair-Wise Key-Establishment Schemes Using Discrete Logarithm Cryptography
- NIST SP 800-38D: Galois/Counter Mode for Block Ciphers
- FIPS 197: Advanced Encryption Standard (AES)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
- RFC 9147: The Datagram Transport Layer Security (DTLS) Protocol Version 1.3
- RFC 5869: HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
2.14 What’s Next
Begin with Encryption Principles & Crypto Basics if you are new to the book. If you are reviewing a live design, start with Encryption: Architecture and Levels, then move to the primitive, transport, and key-lifecycle chapters that match the claim.
2.15 Summary
The cryptography module covers the primitives and architectures used to protect IoT data and communication: symmetric encryption, asymmetric cryptography, ECC, hashes, TLS/DTLS, multilayer encryption, and key management.
2.16 Key Takeaway
Cryptography in IoT is a lifecycle discipline. Pick the right primitive, protect keys, authenticate peers, rotate credentials, and test failure cases across the full device lifetime.
