Contents

Securing Ethernet: MACsec, IPsec and TLS

How Ethernet traffic in vehicles is protected — link by link with MACsec, end to end with IPsec or TLS — and how to choose.

Why it exists

The Ethernet backbone carries the vehicle’s most important traffic. Without protection, a compromised node could read or inject frames on any link it reaches.

What the options are

Mechanism Layer Protects Typical use
MACsec Link (L2) Each hop, all traffic, in hardware Backbone links between zones and HPCs
IPsec Network (L3) End to end, IP traffic Tunnels between ECUs
TLS / DTLS Transport End to end, per connection Services, backend connections
SecOC PDU Selected messages, across mixed buses Control messages
MACsec-protected Ethernet frame
DA6 bytesDestination address; visible
SA6 bytesSource address; visible
SecTAGvariableMACsec EtherType and security parameters
Secure datavariableIntegrity protected; optionally encrypted
ICVvariableIntegrity check value

Simplified layout: SecTAG includes the MACsec EtherType, tag and ICV lengths depend on configuration, and preamble and FCS are omitted.

How to choose

MACsec protects everything on a link with little software effort but ends at every switch. TLS protects a connection end to end but costs CPU. Many architectures combine MACsec on the backbone with TLS for backend and SecOC for messages that cross into CAN.

Best practices

  • Decide per traffic class, guided by the TARA.
  • Automate key agreement (MKA) and plan for key updates.

Common pitfalls

  • Assuming encryption equals authentication of the application — a compromised endpoint still sends valid traffic.

What it means for your discipline

  • Cybersecurity Core

    Chooses protection layers per traffic class and defines key agreement and management.

  • Networks & communication Core

    MACsec runs in switches and PHYs and affects latency, bandwidth and TSN configuration.

  • Hardware & silicon Partial

    Line-rate MACsec needs hardware support in PHYs, switches or MACs.

  • HPC & application software Partial

    TLS and IPsec run in software stacks on HPCs and need certificates.

  • Base software Partial

    Zone controllers need MACsec or SecOC support in their Ethernet stack.

No direct stake: E/E architecture · Functional safety · Diagnostics & lifecycle · Software update & OTA

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)
  • Security services — Manages credentials, key agreement and key rotation for protected Ethernet connections.
  • BSP · drivers — Configures Ethernet hardware and drivers for MACsec offload on supported links.
  • SOME/IP · DDS — Uses protected connections for service traffic according to the selected TLS or IPsec policy.
MCU-based ECU · AUTOSAR Classic
  • Communication — Integrates selected message protection and routes traffic through the configured secure communication paths.
  • Memory · crypto · WdgM — Provides cryptographic operations and key services for communication authentication and encryption.
  • Microcontroller abstraction (MCAL) — Controls Ethernet hardware that may provide MACsec acceleration.