A vehicle ECU does not automatically become trustworthy simply because it is connected to a legitimate vehicle network.
Modern vehicles contain many electronic control units that exchange information continuously. Some messages may influence functions that are important to vehicle operation, diagnostics, comfort or safety.
This creates a fundamental cybersecurity question:
How can one ECU determine whether a received message was actually generated by an authorized source and whether that message is still valid?
One mechanism used within AUTOSAR-based vehicle architectures is Secure Onboard Communication, commonly known as SecOC.
SecOC provides a mechanism for protecting PDU-based communication between ECUs through authentication and freshness-related controls. AUTOSAR documentation describes SecOC as a mechanism for verifying authenticity and freshness of protected communication. [oai_citation:0‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
It is important, however, to understand exactly what SecOC does, what it does not do, and where it fits within the larger automotive cybersecurity architecture.
What Is AUTOSAR SecOC?
SecOC stands for Secure Onboard Communication.
It is an AUTOSAR security mechanism designed to protect selected in-vehicle communication against unauthorized manipulation and replay attacks.
At a high level, a sender protects an automotive PDU with an authenticator and freshness information. The receiver then verifies the protected message before accepting it as valid.
A simplified model is:
Sender ECU
|
| Application Data
v
SecOC
|
+---- Data Identifier
|
+---- Freshness Value
|
+---- Authentication
|
v
Secured PDU
|
v
Vehicle Network
|
v
Receiver ECU
|
v
SecOC Verification
|
+---- Authentication valid?
|
+---- Freshness valid?
|
v
Accept / Reject
Why Is SecOC Needed?
Protocols such as classical CAN were designed primarily for efficient and reliable communication between controllers. They do not inherently provide the complete cryptographic security properties expected from modern connected vehicle systems.
This creates a gap between communication and trusted communication.
A receiver may know that a message has the expected CAN identifier, but that identifier alone does not cryptographically prove which ECU generated the message.
SecOC addresses part of this problem by adding authentication information to selected protected communication.
AUTOSAR’s security overview describes SecOC as providing authenticity and freshness verification for PDU-based communication between ECUs. It also makes an important distinction: SecOC provides authenticity and integrity protection, but not confidentiality. [oai_citation:1‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/FO/AUTOSAR_FO_EXP_SecurityOverview.pdf?utm_source=chatgpt.com)
SecOC in One Architecture
Vehicle Network
|
+--------------+--------------+
| |
v v
Sender ECU Receiver ECU
| |
v v
SecOC SecOC
| |
| Authentication | Verification
| Freshness | Freshness
| |
+------------- Network -------+
|
v
Protected PDU
The important point is that SecOC operates around the communication data rather than replacing the underlying vehicle network.
What Does SecOC Protect?
AUTOSAR describes an Authentic I-PDU as an I-PDU requiring protection against unauthorized manipulation and replay attacks.
The secured communication can contain the original protected data together with authentication information and, depending on configuration, freshness information. [oai_citation:2‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R21-11/CP/AUTOSAR_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
This gives SecOC two important security objectives:
- Verify the authenticity and integrity of protected communication.
- Help protect against replay of previously valid communication.
Authentication and Freshness Are Different
One of the most important concepts in SecOC is that authentication and freshness solve different problems.
| Security Property | Question |
|---|---|
| Authentication | Was the message generated by an authorized source? |
| Integrity | Was the protected data altered? |
| Freshness | Is the message current rather than an old replay? |
| Confidentiality | Can unauthorized parties read the protected data? |
SecOC focuses on authenticity, integrity and freshness-related protection. It is not a general-purpose encryption mechanism for making the communication confidential. [oai_citation:3‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/FO/AUTOSAR_FO_EXP_SecurityOverview.pdf?utm_source=chatgpt.com)
How SecOC Authentication Works
At a simplified level, the sender calculates an authenticator over protected information.
In the AUTOSAR SecOC specification, the authenticated data includes the Data Identifier, the secured part of the Authentic I-PDU and the complete Freshness Value. [oai_citation:4‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
Data Identifier
+
Secured I-PDU Data
+
Freshness Value
|
v
Authentication Algorithm
|
v
Authenticator
|
v
Secured I-PDU
The receiver independently performs the required verification using the corresponding security information.
If the verification fails, the message should not be treated as successfully authenticated communication.
What Is a Message Authentication Code?
A Message Authentication Code, or MAC, is a cryptographic value calculated from protected data using secret key material.
The receiver can calculate or verify the expected authentication value using the appropriate security key and compare the result with the received authenticator.
If the values do not verify correctly, the receiver has evidence that the message cannot be accepted as authenticated according to the configured security mechanism.
AUTOSAR’s SecOC specification defines the authenticator as part of the secured PDU structure and specifies how the authentication input is constructed. [oai_citation:5‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
Why Freshness Matters
Authentication by itself does not completely solve replay attacks.
Imagine that an attacker records a legitimate authenticated message.
Legitimate Message
|
v
Captured by attacker
|
v
Stored for later
|
v
Transmitted again
The original message was legitimate.
The problem is that it is no longer being used in the context for which it was originally generated.
This is why SecOC incorporates freshness into the security calculation.
What Is a SecOC Freshness Value?
A Freshness Value provides information that allows the communication system to distinguish current messages from older communication.
AUTOSAR specifies that each Secured I-PDU is configured with at least one Freshness Value. The value can be based on mechanisms such as a monotonic counter or timestamp, depending on the implementation. [oai_citation:6‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
In simplified terms:
Message 101 → Freshness 501
Message 102 → Freshness 502
Message 103 → Freshness 503
Message 104 → Freshness 504
If an older protected message is presented again, the receiver can use freshness information as part of the decision about whether that message remains valid.
Freshness Is More Complicated Than a Simple Counter
In a real automotive implementation, sender and receiver must maintain compatible freshness state.
This creates engineering considerations around synchronization, counter management, persistence, rollover and recovery.
AUTOSAR’s specification explicitly defines freshness-related behavior and configuration, including handling of truncated freshness values. [oai_citation:7‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
This means that simply asking “Does the ECU use SecOC?” is not enough.
A better security question is:
“Is SecOC correctly configured and implemented, and does the complete freshness management design provide the intended security property?”
SecOC Data Flow
APPLICATION
|
v
Authentic I-PDU
|
v
SecOC
|
+----------------------+
| |
v v
Data Identifier Freshness Value
| |
+----------+-----------+
|
v
Authentication
Calculation
|
v
Authenticator
|
v
Secured I-PDU
|
v
CAN / CAN-FD
|
v
Receiver SecOC
|
v
Authentication +
Freshness Check
|
+-------+-------+
| |
v v
Accept Reject
Does SecOC Encrypt CAN Messages?
No.
This is one of the most common misunderstandings about SecOC.
SecOC is designed to provide authenticity, integrity and freshness-related protection. It does not provide confidentiality of the protected data. AUTOSAR explicitly identifies this distinction in its security overview. [oai_citation:8‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R24-11/FO/AUTOSAR_FO_EXP_SecurityOverview.pdf?utm_source=chatgpt.com)
Therefore:
| Security Requirement | SecOC |
|---|---|
| Message authenticity | Yes |
| Message integrity | Yes |
| Replay protection | Supported through freshness mechanisms |
| Data confidentiality | No |
| Network segmentation | No |
| Gateway policy enforcement | No |
| Complete vehicle cybersecurity | No |
SecOC and CAN
CAN has limited payload capacity, so adding security information requires careful engineering.
SecOC is designed to support authenticated communication in resource-constrained automotive environments.
This makes it particularly relevant when security requirements must be implemented over communication technologies such as CAN.
The security design must account for the additional communication overhead, available payload, timing requirements and ECU resources.
SecOC and CAN-FD
CAN-FD provides a larger payload capacity than classical CAN, which can provide more flexibility when designing secured communication.
However, CAN-FD itself still does not automatically authenticate messages.
This distinction connects directly to the previous Cautivra article on CAN-FD security.
The architecture can therefore be understood as:
CAN / CAN-FD
|
v
Communication Transport
|
v
AUTOSAR Communication Stack
|
v
SecOC
|
+-- Authentication
|
+-- Integrity
|
+-- Freshness
|
v
Protected ECU Communication
What SecOC Does Not Protect
SecOC should not be treated as a complete security boundary.
It does not automatically protect an automotive system from every attack path.
- Compromised ECU software
- Insecure diagnostic interfaces
- Weak gateway configuration
- Compromised cryptographic keys
- Insecure key management
- Denial-of-service attacks against the network
- Physical attacks against hardware
- Vulnerable external interfaces
- Insecure OTA infrastructure
- Application-layer vulnerabilities
The exact exposure depends on the vehicle architecture and implementation.
SecOC Is Part of a Larger Security Architecture
Automotive Cybersecurity
|
+---------------+---------------+
| | |
v v v
ECU Security Network Security Lifecycle
| | |
| | v
| | ISO/SAE 21434
| |
| +-- Gateway
| +-- Segmentation
| +-- IDS
|
+-- Secure Boot
+-- Key Protection
+-- SecOC
+-- Secure Diagnostics
SecOC is therefore one technical security mechanism within a broader cybersecurity engineering process.
SecOC and ISO/SAE 21434 Are Not the Same Thing
This distinction is essential.
| Technology / Standard | Role |
|---|---|
| CAN | Vehicle communication protocol. |
| CAN-FD | Higher-capacity CAN communication. |
| AUTOSAR SecOC | Authenticated and freshness-aware PDU communication mechanism. |
| ISO/SAE 21434 | Cybersecurity engineering requirements across the vehicle lifecycle. |
| IDS | Detection of suspicious or anomalous behavior. |
ISO/SAE 21434 defines engineering requirements for cybersecurity risk management across the lifecycle of vehicle electrical and electronic systems. ISO describes its scope as extending from concept and development through production, operation, maintenance and decommissioning. [oai_citation:9‡ISO](https://www.iso.org/standard/70918.html?utm_source=chatgpt.com)
SecOC, by contrast, is a specific technical mechanism within an AUTOSAR architecture.
Why ISO/SAE 21434 Still Matters to SecOC
A security mechanism should exist because a threat analysis and security design require it, not simply because the technology is available.
ISO/SAE 21434 provides the broader engineering context for identifying cybersecurity risks and defining appropriate security requirements. [oai_citation:10‡ISO](https://www.iso.org/standard/70918.html?utm_source=chatgpt.com)
A simplified relationship is:
Threat Analysis
|
v
Cybersecurity Goals
|
v
Security Requirements
|
v
Security Architecture
|
v
Authentication Requirement
|
v
Possible Technical Control
|
v
AUTOSAR SecOC
|
v
Implementation
|
v
Verification / Validation
This is a much stronger engineering model than simply saying “the vehicle uses SecOC, therefore it is secure.”
How to Assess an AUTOSAR SecOC Implementation
A SecOC review should examine the complete implementation rather than checking only whether a SecOC module exists in the software architecture.
Phase 1: Architecture Review
- Identify protected communication.
- Identify sending ECUs.
- Identify receiving ECUs.
- Identify relevant PDUs.
- Identify gateways.
- Identify communication networks.
Phase 2: Configuration Review
- Review protected Data IDs.
- Review authentication configuration.
- Review freshness configuration.
- Review freshness truncation.
- Review sender and receiver configuration.
- Review relevant SecOC parameters.
Phase 3: Key Management Review
- Identify key ownership.
- Review key provisioning.
- Review key storage.
- Review key lifecycle.
- Review key update procedures.
- Review compromise handling.
Phase 4: Freshness Review
- Identify the freshness mechanism.
- Review synchronization behavior.
- Review counter or timestamp handling.
- Review rollover behavior.
- Review reset behavior.
- Review recovery after communication loss.
Phase 5: Traffic Validation
Where an authorized test environment is available, protected traffic can be examined to determine whether the implementation behaves as expected.
- Valid message accepted.
- Modified message rejected.
- Invalid authenticator rejected.
- Stale message handled correctly.
- Unexpected freshness behavior detected.
Phase 6: Reporting
Findings should identify the affected PDU, ECU, configuration or process, explain the security impact and provide an actionable remediation recommendation.
SecOC Security Assessment Checklist
| Area | Assessment Question |
|---|---|
| Scope | Which PDUs require protection? |
| Data ID | Are protected Data IDs correctly configured? |
| Authentication | Is the authenticator correctly generated and verified? |
| Freshness | Is freshness correctly implemented? |
| Synchronization | Can sender and receiver maintain compatible freshness state? |
| Keys | Are cryptographic keys protected throughout their lifecycle? |
| Configuration | Are SecOC parameters consistent between communication endpoints? |
| Diagnostics | Can diagnostic functionality bypass intended security controls? |
| Gateway | Are protected messages appropriately controlled across network boundaries? |
| Monitoring | Are authentication or freshness failures visible to the security monitoring architecture? |
Authentication Failure Is a Security Signal
A failed authentication check should not simply disappear into application logs.
Modern AUTOSAR SecOC specifications include security event reporting for authentication verification failures and freshness-related failures. AUTOSAR documentation notes that freshness failures can, depending on the freshness management design, indicate replay-related attacks. [oai_citation:11‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R25-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
This creates an important connection between preventive controls and security monitoring.
SecOC Verification
|
+---- Valid
| |
| v
| Accept
|
+---- Invalid
|
v
Security Event
|
v
Monitoring / IDS
|
v
Investigation
A well-designed system should consider what happens after a security verification failure, not only how the failure is detected.
Common SecOC Implementation Questions
During a technical review, these questions can reveal important implementation details.
- Which PDUs are protected?
- Why were those PDUs selected?
- Which security requirements drove the selection?
- Which authentication algorithm is configured?
- How are keys provisioned?
- Where are keys stored?
- How is freshness generated?
- How is freshness synchronized?
- What happens after a counter rollover?
- What happens after an ECU restart?
- How are authentication failures reported?
- How are freshness failures investigated?
Common SecOC Security Mistakes
- Assuming SecOC automatically secures every ECU message.
- Confusing authentication with encryption.
- Ignoring freshness management.
- Ignoring key management.
- Protecting the wrong PDUs.
- Failing to validate sender and receiver configuration.
- Ignoring counter synchronization.
- Ignoring diagnostic paths.
- Ignoring gateway behavior.
- Failing to monitor authentication failures.
- Assuming the presence of SecOC proves the implementation is secure.
What a Remote SecOC Review Can Examine
Not every SecOC assessment requires physical access to a vehicle.
Depending on project scope, an independent reviewer can work with engineering documentation, configuration data, architecture diagrams, CAN or CAN-FD captures and test evidence.
- AUTOSAR architecture documentation
- SecOC configuration extracts
- ECU communication matrices
- CAN or CAN-FD captures
- Protected PDU definitions
- Security requirements
- Freshness management documentation
- Key management documentation
- Test results
- Security event logs
This makes SecOC review a practical candidate for a remote automotive cybersecurity consulting service.
What a SecOC Security Report Should Contain
| Section | Purpose |
|---|---|
| Executive summary | Explain the overall security posture. |
| Scope | Define ECUs, PDUs and systems reviewed. |
| Architecture | Explain the relevant communication design. |
| Configuration review | Document relevant SecOC settings. |
| Freshness analysis | Evaluate replay protection design. |
| Authentication analysis | Evaluate message authentication controls. |
| Key management | Review cryptographic key handling. |
| Traffic evidence | Document relevant observations. |
| Findings | Identify weaknesses and their impact. |
| Recommendations | Provide practical remediation steps. |
| Limitations | Clearly document what was not tested. |
SecOC Assessment Workflow
Define Scope
↓
Identify Protected PDUs
↓
Review AUTOSAR Architecture
↓
Review SecOC Configuration
↓
Review Authentication
↓
Review Freshness Management
↓
Review Key Management
↓
Analyze Traffic / Test Evidence
↓
Review Security Events
↓
Identify Gaps
↓
Risk Prioritization
↓
Engineering Recommendations
↓
Final Security Report
SecOC and Intrusion Detection
SecOC and an intrusion detection system have different roles.
| Control | Primary Function |
|---|---|
| SecOC | Authenticate and protect selected PDU communication. |
| IDS | Identify suspicious or abnormal behavior. |
| Gateway | Control communication between network domains. |
| Secure Boot | Help ensure trusted software execution. |
| Key Management | Protect and manage cryptographic credentials. |
These controls can complement one another.
For example, an authentication failure detected by SecOC can become a security event that is investigated by the broader vehicle security monitoring architecture. AUTOSAR’s current SecOC specification defines security events for authenticator verification failure and freshness-related failures. [oai_citation:12‡AUTOSAR](https://www.autosar.org/fileadmin/standards/R25-11/CP/AUTOSAR_CP_SWS_SecureOnboardCommunication.pdf?utm_source=chatgpt.com)
SecOC Does Not Replace Threat Analysis
A common engineering mistake is to begin with a technology and then assume that the technology defines the security architecture.
The stronger approach is the reverse.
Asset
↓
Threat
↓
Attack Path
↓
Risk
↓
Cybersecurity Goal
↓
Security Requirement
↓
Security Control
↓
Implementation
↓
Verification
SecOC can become one of the technical controls selected when the security requirements call for authenticated and freshness-aware communication.
ISO/SAE 21434 provides the broader cybersecurity engineering framework for managing such risks throughout the vehicle E/E lifecycle. [oai_citation:13‡ISO](https://www.iso.org/standard/70918.html?utm_source=chatgpt.com)
Can SecOC Make a Vehicle Secure?
No single mechanism can make an entire vehicle secure.
SecOC can provide important protection for selected communication paths, but the vehicle still has other attack surfaces.
- Wireless interfaces
- Telematics
- Infotainment
- Diagnostics
- Mobile applications
- Cloud services
- ECU firmware
- Automotive Ethernet
- OTA infrastructure
- Physical interfaces
A mature automotive cybersecurity architecture therefore uses multiple layers rather than depending on one mechanism.
Practical SecOC Security Checklist
| Check | Question | Status |
|---|---|---|
| Protected PDUs | Are security-critical PDUs identified? | ☐ |
| Data IDs | Are Data IDs correctly configured? | ☐ |
| Authentication | Is authentication correctly implemented? | ☐ |
| Freshness | Is replay protection correctly designed? | ☐ |
| Synchronization | Are sender and receiver freshness states managed correctly? | ☐ |
| Keys | Are cryptographic keys securely managed? | ☐ |
| Diagnostics | Can diagnostic paths bypass intended protections? | ☐ |
| Gateway | Are network boundaries correctly enforced? | ☐ |
| Monitoring | Are authentication failures monitored? | ☐ |
| Testing | Has the implementation been validated? | ☐ |
| Lifecycle | Is the control connected to the wider cybersecurity process? | ☐ |
Final Perspective
AUTOSAR SecOC solves a specific problem in automotive communication security.
It provides a structured mechanism for protecting selected PDU communication through authentication and freshness-related controls.
But the important engineering lesson is broader.
A security mechanism is only as strong as the architecture, configuration, keys, implementation and lifecycle processes surrounding it.
SecOC should therefore be evaluated as part of a complete automotive cybersecurity design rather than treated as a checkbox.
Start with the threat. Define the security requirement. Select the appropriate control. Verify the implementation. Then monitor what happens in operation.
Secure communication is not simply about adding a MAC. It is about establishing trust between ECUs and maintaining that trust throughout the vehicle lifecycle.
Need an AUTOSAR SecOC Security Review?
Cautivra provides remote automotive cybersecurity analysis focused on ECU communication, CAN and CAN-FD security, AUTOSAR security controls and technical security documentation.
Depending on the project scope, a review can use AUTOSAR architecture documentation, SecOC configuration information, ECU communication matrices, CAN or CAN-FD captures, security requirements and authorized test evidence.
The objective is to identify implementation and configuration gaps that can be supported by evidence and translated into practical engineering recommendations.
Request an Automotive Security Review
Frequently Asked Questions
What is AUTOSAR SecOC?
AUTOSAR SecOC, or Secure Onboard Communication, is an AUTOSAR mechanism for protecting selected PDU-based communication between ECUs through authentication and freshness-related controls.
What does SecOC protect against?
SecOC is designed to protect selected communication against unauthorized manipulation and replay attacks by using authentication and freshness mechanisms.
Does AUTOSAR SecOC encrypt messages?
No. SecOC provides authenticity and integrity protection and supports freshness-based replay protection. It does not provide confidentiality of the protected communication.
What is a SecOC Freshness Value?
A Freshness Value provides information used to help determine whether a protected message is current rather than an older message being replayed. AUTOSAR describes freshness values using mechanisms such as monotonic counters or timestamps depending on the implementation.
Does SecOC work with CAN?
SecOC is designed for AUTOSAR communication architectures and can be used to protect selected communication carried over resource-constrained automotive networks. The exact implementation depends on the ECU architecture and configuration.
Does CAN-FD make SecOC unnecessary?
No. CAN-FD provides higher payload capacity and a faster data phase, but it does not inherently provide cryptographic authentication. Security mechanisms such as SecOC can still be relevant where authenticated communication is required.
Is SecOC the same as ISO/SAE 21434?
No. ISO/SAE 21434 defines engineering requirements for cybersecurity risk management across the vehicle E/E lifecycle. SecOC is a specific AUTOSAR technical mechanism for protecting selected in-vehicle communication.
Can SecOC be assessed remotely?
Yes. Depending on access and project scope, a remote review can examine architecture documentation, SecOC configuration, protected PDU definitions, freshness management, key management documentation, CAN or CAN-FD captures and authorized test evidence.
What should be checked during a SecOC security review?
A review should consider protected PDUs, Data IDs, authenticator configuration, freshness management, synchronization, cryptographic key handling, diagnostics, gateway behavior, security-event reporting and validation evidence.
Sources and Further Reading
- AUTOSAR: Specification of Secure Onboard Communication
- AUTOSAR: Explanation of Security Overview
- ISO: ISO/SAE 21434 Road Vehicles — Cybersecurity Engineering
- ISO: Guidelines for Auditing Cybersecurity Engineering