惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
IT之家
IT之家
Google DeepMind News
Google DeepMind News
D
Docker
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
博客园 - Franky
月光博客
月光博客
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
🚨 The EU EN 18031 Countdown: Refactoring EV Charging Gate...
Jessie Wei · 2026-06-18 · via DEV Community

Jessie Wei

In the IoT development circle, the historical attitude towards security was often "as long as it runs, security can wait." But as the EU's Radio Equipment Directive (RED) and the impending Cyber Resilience Act (CRA) loom closer, the compliance hammer is about to drop. Among these regulations, the EN 18031 standard draws a hard line for consumer-grade and connected IoT devices.

Today, we are skipping the dry legal jargon. Let's look at this purely from the perspective of an IoT developer or systems architect: If your gateway devices (especially critical nodes like EV charging gateways that control physical energy assets) are shipping to Europe, what fundamental architectural refactoring is required under the hood?

Here is a technical survival guide to tackling the four core requirements of EN 18031.

  1. Completely Kill Hardcoded "Universal Passwords" The Pain Point: For debugging convenience, many embedded devs have a habit of hardcoding admin:admin or root:123456 into the firmware. Under EN 18031, this is absolutely zero-tolerance. The lessons from the Mirai botnet are painful enough.

Architectural Solutions:

Unique Per Device: During the factory flashing phase, dynamically generate a high-entropy initial random password based on the device's MAC address or CPU serial number combined with a cryptographic algorithm (like HMAC-SHA256). Print this on the device's physical label.

Forced Onboarding Change: During the device's First Boot sequence, intercept all business APIs. Force the administrator to change the password via the Local Web GUI or CLI, and integrate front-end libraries like zxcvbn for password strength validation. Reject anything below the set threshold.

  1. The "Safe Box" Strategy for Sensitive Credentials The Pain Point: Gateways need to store Wi-Fi passwords, APN dial-up credentials, MQTT tokens, and TLS certificates. If these are lying around in plaintext within a JFFS2 or ext4 file system, a hacker only needs to read the Flash (even via physical extraction) to instantly breach the entire network.

Architectural Solutions:

Hardware Root of Trust: During hardware selection, introduce a Secure Element (SE) chip (e.g., ATECC608) or leverage the Trusted Execution Environment (TEE) of your main SoC.

Asymmetric + Symmetric Combo: Generate the core TLS private key inside the SE chip, ensuring it never leaves the chip. For larger sensitive data (like config files), encrypt them using AES-GCM, and store the encryption Key inside the hardware-protected secure zone.

  1. Farewell to Unprotected Upgrades: Refactoring OTA and O&M Channels The Pain Point: EN 18031 mandates Vulnerability Management—meaning devices must be able to patch flaws promptly. But for EV charging gateways, which demand extreme high availability, the biggest fear is an update "bricking" the device or interrupting an active charging/billing session.

Architectural Solutions:
A simple OTA script is no longer enough. It is highly recommended to introduce a Dual-Channel Intelligent O&M Architecture into your system design:

Business & O&M Isolation: Create logically independent channels within the gateway. The "Business Channel" handles EVSE control protocols and billing data flows. A separate "O&M Channel" manages heartbeat monitoring, log collection, and firmware deployment.

Secure Signed OTA: Firmware packages must be digitally signed using algorithms like ECDSA. The gateway verifies this signature at the Bootloader stage; only legitimately signed firmware is written to the Active slot of the A/B partition. The dual-channel architecture ensures that even while an OTA payload is downloading or a security patch is being applied, the underlying charging control logic remains rock solid.

  1. Minimizing Attack Surface & Smooth Protocol Evolution The Pain Point: SSH enabled by default, unprotected RS-485 debug ports, diagnostic data transmitted via plaintext HTTP... these are breeding grounds for attacks. Furthermore, figuring out how to handle the massive installed base of legacy charging stations using outdated protocols is a massive headache.

Architectural Solutions:

Physical & Port Blocking: When building the Release version firmware, you must completely strip out dropbear/sshd in your build system (like Yocto or Buildroot), disable JTAG hardware pin configurations, and only expose absolutely necessary ports.

Protocol Layer Encryption Transition: Security at the charging protocol layer is critical. While the industry is migrating to OCPP 2.0.1, considering the compatibility of legacy devices, a highly pragmatic approach that aligns with the encryption spirit of EN 18031 is to implement a smooth upgrade from OCPP Security Profile 0/1 to Profile 2/3 on the gateway side. By deploying TLS 1.2/1.3 and enforcing mutual TLS (mTLS) authentication on the gateway, you can add a heavy-duty lock to legacy unencrypted links with minimal refactoring costs.

Conclusion
EN 18031 is not just a compliance checkbox to sign off on; it is forcing us to implement "Security by Design" into every line of code and every hardware choice.

When developing IoT gateways, what are some of the worst security pitfalls you've encountered due to underlying architectural flaws? Let's discuss in the comments below!