Privacy and Security
Build secure IoT systems that protect users and resist attacks
Learning Objectives
After completing this part, you will be able to:
Explain why traditional IT security approaches fail for IoT and apply defense-in-depth strategies
Implement authentication, authorization, and encryption mechanisms appropriate for resource-constrained devices
Apply threat modeling frameworks (STRIDE, OWASP IoT Top 10) to identify and prioritize IoT security risks
Design privacy-preserving IoT architectures that meet GDPR and regulatory compliance requirements
Part Overview
Security in IoT is fundamentally different from traditional IT security because IoT devices directly interact with the physical world, making security failures potentially life-threatening. A compromised smart home lock isn’t just data loss – it’s physical access. A hacked insulin pump or cardiac device can cause direct harm. This comprehensive part covers the entire security landscape from zero-trust architecture through encryption, authentication, threat modeling, and privacy-preserving techniques.
You’ll learn why traditional IT security approaches fail for IoT (devices can’t be easily patched, have minimal compute resources, and operate for years), and master the defense-in-depth strategies that protect production systems. Through real case studies like the Mirai botnet (300,000+ compromised devices) and the Jeep Cherokee hack (remote control via infotainment system), you’ll understand how attacks happen and how to prevent them.
What makes this part unique : We focus on practical security that works within IoT constraints. Every security mechanism includes concrete implementation guidance (code examples, configuration snippets), cost-benefit analysis (security vs. usability), and real-world validation through labs. You’ll design systems that meet NIST, OWASP, and GDPR requirements while remaining usable and maintainable.
Learning Paths
Beginner Path
Start Here: New to IoT security
Security Foundations (2h)
Security Architecture Overview (2h)
Common Threats & Attacks (2h)
Privacy Fundamentals (2h)
Basic Encryption Concepts (2h)
Time: ~10 hours
Intermediate Path
Prerequisites: Security basics, networking
Zero-Trust Architecture (4h)
Authentication & Access Control (4h)
Encryption Implementation (5h)
Threat Modeling (STRIDE) (3h)
Device & Network Security (4h)
Time: ~20 hours
Advanced Path
Prerequisites: Crypto, threat modeling
Privacy-by-Design Patterns (4h)
Advanced Encryption (E1-E5 levels) (5h)
Security Frameworks (NIST, OWASP) (3h)
Mobile Privacy Analysis (3h)
Compliance (GDPR, CCPA) (3h)
Time: ~18 hours
Key Topics & Sub-Sections
Security Foundations
Core Chapters (10)
Quick Win : Start with Security Foundations – understand the CIA triad in 45 minutes
Key Insight : Most IoT breaches exploit basic security failures (default passwords, no encryption) that cost less than $1 per device to prevent
Real Incident : Mirai botnet compromised 300,000+ devices using approximately 60 default username/password combinations
Zero-Trust Architecture
Core Chapters (6)
Key Insight : Traditional perimeter security fails for IoT. Zero-trust reduces breach impact by 80% through segmentation
Example : Smart building with 10,000 devices: Zero-trust limits breach to 1 VLAN (~100 devices) vs. the entire network
Authentication & Access Control
Core Chapters (6)
Quick Win : Jump to Cyber Security Authentication for practical implementations
Key Insight : Multi-factor authentication reduces account takeover by 99.9% but adds deployment complexity
Use Cases : Smart home with 50 devices: Certificate-based auth vs. username/password (security and UX trade-offs)
Encryption & Cryptography
Core Chapters (19)
Encryption Principles - Symmetric vs. asymmetric, hashing
Symmetric Encryption - AES implementation details
Asymmetric Encryption - RSA, ECC for IoT
TLS/DTLS - Secure transport layer protocols
E1-E5 Multi-Layer Encryption - Link, network, transport, app, key renewal
Key Management - Generation, storage, rotation, revocation
Encryption Labs - Hands-on AES, RSA implementation
Quick Win : Start with Hash Functions for a simple intro (SHA-256, HMAC)
Key Insight : E1-E5 multi-layer encryption protects even if one layer is compromised (defense-in-depth)
Practical : AES-128 adds 2-5 ms latency and less than 5% power overhead on ESP32 – acceptable for most IoT
Security Levels :
E1 : Link-layer (Zigbee AES-128)
E2 : Device-to-gateway (DTLS)
E3 : Gateway-to-cloud (TLS)
E4 : End-to-end application encryption
E5 : Key renewal and rotation
Threats, Attacks & Vulnerabilities
Core Chapters (13)
Key Insight : STRIDE categorizes threats: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege
Real Attack : Jeep Cherokee hack (2015) exploited unprotected CAN bus via infotainment system, leading to a 1.4 million vehicle recall
Privacy & Compliance
Core Chapters (16)
Key Insight : Privacy-by-design costs 10x less than retrofitting privacy compliance after launch
Compliance Examples :
GDPR : Up to 20 million euros or 4% of annual global revenue for violations (WhatsApp fined 225 million euros in 2021)
CCPA : $7,500 per violation for intentional breaches
UK PSTI Act : Bans default passwords, requires vulnerability disclosure
Popular Chapters (Start Here!)
Hands-On Security Labs
This part includes hands-on labs and practice exercises:
Wokwi Security Labs
AES encryption implementation on ESP32
RSA key generation and signing
Secure boot sequence
TLS/DTLS handshake
Certificate validation
Practice Labs
IoT Security Cost-Benefit Calculator
Use this interactive calculator to estimate the security overhead for common IoT encryption choices.
Show code
viewof algorithm = Inputs. select (
["AES-128" , "AES-256" , "RSA-2048" , "ECC-256 (ECDSA)" , "ChaCha20-Poly1305" ],
{ label : "Encryption Algorithm" , value : "AES-128" }
)
viewof deviceType = Inputs. select (
["ESP32 (240 MHz)" , "Raspberry Pi (1.5 GHz)" , "ARM Cortex-M4 (168 MHz)" , "8-bit AVR (16 MHz)" ],
{ label : "Target Device" , value : "ESP32 (240 MHz)" }
)
viewof messageSize = Inputs. range ([16 , 4096 ], {
label : "Message Size (bytes)" ,
step : 16 ,
value : 256
})
viewof messagesPerDay = Inputs. range ([1 , 10000 ], {
label : "Messages per Day" ,
step : 1 ,
value : 100
})
Show code
securityData = {
const algorithms = {
"AES-128" : { latency : { "ESP32 (240 MHz)" : 2 , "Raspberry Pi (1.5 GHz)" : 0.3 , "ARM Cortex-M4 (168 MHz)" : 3 , "8-bit AVR (16 MHz)" : 25 }, powerPct : 3 , keyBits : 128 , type : "Symmetric" , securityYears : 15 },
"AES-256" : { latency : { "ESP32 (240 MHz)" : 3.2 , "Raspberry Pi (1.5 GHz)" : 0.5 , "ARM Cortex-M4 (168 MHz)" : 4.5 , "8-bit AVR (16 MHz)" : 35 }, powerPct : 4.2 , keyBits : 256 , type : "Symmetric" , securityYears : 30 },
"RSA-2048" : { latency : { "ESP32 (240 MHz)" : 150 , "Raspberry Pi (1.5 GHz)" : 15 , "ARM Cortex-M4 (168 MHz)" : 400 , "8-bit AVR (16 MHz)" : 5000 }, powerPct : 15 , keyBits : 2048 , type : "Asymmetric" , securityYears : 10 },
"ECC-256 (ECDSA)" : { latency : { "ESP32 (240 MHz)" : 12 , "Raspberry Pi (1.5 GHz)" : 1.5 , "ARM Cortex-M4 (168 MHz)" : 20 , "8-bit AVR (16 MHz)" : 300 }, powerPct : 5 , keyBits : 256 , type : "Asymmetric" , securityYears : 20 },
"ChaCha20-Poly1305" : { latency : { "ESP32 (240 MHz)" : 1.5 , "Raspberry Pi (1.5 GHz)" : 0.2 , "ARM Cortex-M4 (168 MHz)" : 2.5 , "8-bit AVR (16 MHz)" : 20 }, powerPct : 2.5 , keyBits : 256 , type : "Symmetric" , securityYears : 25 }
};
const alg = algorithms[algorithm];
const latencyMs = alg. latency [deviceType];
const scaledLatency = latencyMs * (messageSize / 256 );
const dailyOverheadMs = scaledLatency * messagesPerDay;
const dailyOverheadSec = dailyOverheadMs / 1000 ;
const suitability = scaledLatency < 10 ? "Excellent" : scaledLatency < 50 ? "Good" : scaledLatency < 200 ? "Marginal" : "Not recommended" ;
const suitColor = scaledLatency < 10 ? "#16A085" : scaledLatency < 50 ? "#3498DB" : scaledLatency < 200 ? "#E67E22" : "#E74C3C" ;
return { alg, latencyMs, scaledLatency, dailyOverheadMs, dailyOverheadSec, suitability, suitColor };
}
html `<div style="border-left: 4px solid #3498DB; padding: 1rem 1.5rem; background: #f8f9fa; border-radius: 0 8px 8px 0; margin: 1rem 0;">
<h4 style="margin-top: 0; color: #2C3E50;">Security Overhead Analysis: ${ algorithm} on ${ deviceType} </h4>
<table style="width: 100%; border-collapse: collapse;">
<tr><td style="padding: 4px 8px;"><strong>Algorithm Type</strong></td><td> ${ securityData. alg . type } ( ${ securityData. alg . keyBits } -bit key)</td></tr>
<tr><td style="padding: 4px 8px;"><strong>Latency per Message</strong></td><td> ${ securityData. scaledLatency . toFixed (2 )} ms (for ${ messageSize} bytes)</td></tr>
<tr><td style="padding: 4px 8px;"><strong>Power Overhead</strong></td><td> ${ securityData. alg . powerPct } % additional power consumption</td></tr>
<tr><td style="padding: 4px 8px;"><strong>Daily Crypto Overhead</strong></td><td> ${ securityData. dailyOverheadSec . toFixed (2 )} seconds ( ${ messagesPerDay} messages)</td></tr>
<tr><td style="padding: 4px 8px;"><strong>Estimated Security Lifespan</strong></td><td> ${ securityData. alg . securityYears } + years against brute-force</td></tr>
<tr><td style="padding: 4px 8px;"><strong>IoT Suitability</strong></td><td style="color: ${ securityData. suitColor } ; font-weight: bold;"> ${ securityData. suitability } </td></tr>
</table>
<p style="margin-bottom: 0; font-size: 0.85em; color: #7F8C8D;"><em>Recommendation: ${ securityData. alg . type === "Symmetric" ? "Use for bulk data encryption. Pair with an asymmetric algorithm for key exchange." : "Use for key exchange and digital signatures. Pair with a symmetric algorithm (AES or ChaCha20) for bulk data." } </em></p>
</div>`
Estimated Time to Complete
Full Part Completion
Beginner Track
20 chapters
3 basic labs
2 quizzes
~25 hours
Intermediate Track
45 chapters
7 labs
5 assessments
~50 hours
Advanced Track
All 113 chapters
All 10+ labs
All assessments
~95 hours
Quick Learning Options
Weekend Sprint (10 hours):
Security Foundations (3h)
Zero-Trust Architecture (3h)
Encryption Basics (2h)
Threat Modeling (2h)
One-Week Intensive (25 hours):
Complete Beginner Path (10h)
5 Interactive Labs (8h)
Case Studies & Reviews (7h)
Professional Mastery (3 months, 10h/week):
All learning paths (48h)
All labs and tools (28h)
Compliance project (security audit) (14h)
Learning Outcomes
By completing this part, you will be able to:
Foundation Skills
Explain the CIA triad and why IoT security is fundamentally different from IT security
Identify attack surfaces across device, network, and cloud layers
Apply the OWASP IoT Top 10 to prevent common vulnerabilities
Understand zero-trust architecture and the “never trust, always verify” principle
Practical Implementation
Design multi-layer encryption (E1-E5) for IoT communications
Implement authentication systems with PKI, certificates, and MFA
Build network segmentation with VLANs to isolate IoT devices
Configure secure boot and hardware root of trust on IoT devices
Apply the STRIDE framework for systematic threat modeling
Implement key management (generation, storage, rotation, revocation)
Advanced Capabilities
Design privacy-by-design systems following 7 foundational principles
Achieve GDPR, CCPA, and NIST compliance
Build zero-trust architectures with micro-segmentation and continuous verification
Implement advanced privacy techniques (k-anonymity, differential privacy)
Conduct security audits using OWASP, NIST, and ETSI frameworks
Debug cryptographic issues (key distribution, certificate validation, timing attacks)
Decision-Making
Choose between symmetric (AES) and asymmetric (RSA, ECC) encryption based on constraints
Evaluate security vs. usability trade-offs (MFA adds security but complexity)
Calculate security costs (encryption overhead: 2-5 ms latency, less than 5% power)
Select authentication methods (certificates vs. tokens vs. biometrics)
Apply lessons from the Mirai botnet, Jeep hack, and smart grid deployments
Prerequisites
Before starting this part, ensure familiarity with:
Essential
Basic networking concepts (TCP/IP, firewalls, VPNs)
Programming in any language (for crypto implementations)
Understanding of data structures and algorithms
Binary/hexadecimal number systems
Helpful but Not Required
Mathematics
Basic probability (for understanding crypto strength)
Modular arithmetic (for RSA understanding)
Binary operations (XOR, shifts for crypto)
What’s Next
After completing Privacy and Security:
Immediate Next Steps
Related Advanced Topics
Real-World Impact: Case Studies
Mirai Botnet (2016)
Attack : 300,000+ IoT devices compromised using approximately 60 default username/password combinations
Impact : ~1.2 Tbps DDoS attack took down Dyn DNS, causing outages at Twitter, Netflix, and Reddit
Root Cause : Weak default passwords, no security updates
Lesson : Default passwords must be banned (UK PSTI Act 2024 mandates unique passwords per device)
Jeep Cherokee Hack (2015)
Attack : Remote takeover via unprotected CAN bus through infotainment system
Impact : 1.4 million vehicle recall
Root Cause : No network segmentation between entertainment and critical systems
Cost : $1.4B recall, brand damage
Lesson : Network segmentation is critical – isolate safety-critical from non-critical systems
St. Jude Pacemaker Vulnerability (2017)
Attack : 465,000 pacemakers recalled due to remote exploitation vulnerability
Impact : FDA recall, patients required firmware updates
Root Cause : Weak encryption, no authentication
Lesson : Medical IoT requires hardware security modules and secure boot
Smart Grid Success Story
Scale : 50M smart meters deployed with security-by-design
Security : Multi-layer encryption (E1-E5), zero-trust architecture
Results : Zero major breaches in 10+ years, 99.99% uptime
Cost : Security added less than $2 per device (2% of total cost)
Lesson : Security-by-design costs 10x less than retrofitting
Support Resources
Quick References
Practice Materials
Start Your Journey
Ready to begin? Choose your path:
Active Learning Approach
Read security concepts (25%)
Study real attack case studies (25%)
Use threat modeling tools (25%)
Complete hands-on security labs (25%)
Recommended Study Pattern
Session 1 (2h): Read chapter + case study
Session 2 (1h): Complete interactive tool
Session 3 (1.5h): Hands-on security lab (encryption, auth)
Session 4 (30m): Threat modeling exercise
Common Pitfalls to Avoid
Don’t skip the fundamentals – the CIA triad is foundational
Practice threat modeling early – it changes how you design
Test encryption implementations – subtle bugs create vulnerabilities
Study real attacks (Mirai, Jeep) – learn from actual failures
Pro Tips
Keep an OWASP Top 10 checklist for every project
Build a threat model template using STRIDE
Join security communities (OWASP, ISSA)
Document your security decisions and trade-offs
Practice zero-trust policy design on paper first
Security Calculation Practice
Encryption overhead : AES-128 adds 2-5 ms latency, less than 5% power (acceptable for most IoT)
Key size trade-off : AES-256 is ~40% slower than AES-128 (14 vs. 10 rounds) but future-proof for 20+ years
MFA security : Reduces account takeover by 99.9% but adds 5-10 seconds per login
Network segmentation : Limits breach to 1 VLAN (100 devices) vs. entire network (10,000 devices)
Compliance Checklist
GDPR: Data minimization, purpose limitation, right to erasure, 72-hour breach notification
OWASP Top 10: No default passwords, encrypted storage, secure updates, hardware security
NIST 8259: Device identity, data protection, logical access, updates, incident response
Navigation : Data Analytics | Human Factors