Blog

CANsec Protocol Enhancing Security in Automotive Communication Networks

December 4, 2026

CANsec Protocol Enhancing Security in Automotive Communication Networks

CAN-based networks in vehicles contain many Electronic Control Units (ECUs) that send and receive information to perform operations such as engine control, braking, steering, and driver assistance. As vehicle networks become increasingly connected, securing the communication within them is becoming very important.

Traditionally, Controller Area Network (CAN) communication between ECUs does not provide inherent security features such as authentication and encryption. If an attacker gains access to the communication network, this may present a security risk.

CANsec adds security to CAN XL communication. With CANsec, messages can be protected against tampering, replay, and eavesdropping. Understanding how CANsec works, what security features it provides, and what is required to implement it can help automotive engineers and embedded software developers use it effectively in modern vehicle networks.

What Is CANsec?

CANsec is a security protocol applied at the data link layer of CAN XL networks, improving the security of communication within CAN networks.

The CANsec standard is part of the CiA 613 family of standards, defined by CAN in Automation (CiA). The CANsec data plane is defined in CiA 613-2.

Compared with conventional CAN communication, CANsec adds security features that allow verification of message authenticity, data integrity, message freshness, and confidentiality.

CANsec can provide the following security properties:

  • Data integrity – ensures that the contents of a message have not been altered.
  • Source authenticity – ensures that received messages have come from an authorized source.
  • Freshness – helps ensure that previously sent messages cannot be re-sent and accepted.
  • Confidentiality – prevents unauthorized users from viewing message contents (when encryption is used).

CANsec is an optional feature, so it is not applied automatically to all CAN XL networks. It requires appropriate hardware, software, and security configuration to be implemented.

Why Is Security Required in Automotive CAN Communication?

Communication between vehicle components over CAN can present security concerns. Conventional CAN does not provide cryptographic authentication or confidentiality. If a device can connect to the CAN network, it may be able to send messages using existing CAN IDs. Without authentication, it can be difficult to identify whether a message has come from an unauthorized source.

Common security concerns include:

Message Spoofing

Messages may be sent from an unauthorized source while appearing to come from an authorized node in the network. For example, an attacker may create a malicious message using an existing ECU ID. If authentication is not performed appropriately, it may be difficult to identify that the message is unauthorized.

Message Tampering

Messages may be altered. If an ECU receives altered data, it may cause incorrect operation of the vehicle's electronic systems. Data integrity checks can determine whether unauthorized changes have been made to protected messages.

Replay Attacks

A message may be intercepted by an attacker and resent at a later time. Even if the original message was legitimate, resending it in a different context may cause unwanted effects. Freshness checks allow devices to identify messages that are no longer valid.

Unauthorized Data Access

If an attacker can connect to an automotive network, they may try to eavesdrop on communications to gain access to sensitive data. Encrypting data can prevent unwanted users from reading message contents.

Because of these concerns, additional security measures are important in increasingly complex automotive communication.

How Does CANsec Work?

CANsec adds extra information to CAN XL messages so that receiving nodes can verify them. Secure communication takes place between nodes, and each secure channel must have appropriate security configuration in place.

The general CANsec communication process is as follows.

1. Security Configuration

To perform secure CANsec communication, appropriate security configuration must be in place between communicating nodes. Cryptographic keys, secure channel configuration, and the other parameters needed to process CANsec messages must exist on both the sending and receiving nodes.

2. Message Protection

Once a message to be sent is prepared, the security mechanisms defined in the configuration are applied. Depending on the cryptographic method used, authentication information is added to ensure data integrity and source authenticity. If confidentiality is required, encryption can also be applied.

3. Message Transmission

The protected message is sent over the CAN XL network. Additional security information is included in the CAN XL frame: cipher control information, secure channel ID information, and freshness information. An authentication tag is also included so the message can be verified.

4. Message Verification

On receiving a protected message, the receiver checks it using its security configuration. The authentication and freshness information are checked. If the message passes verification, the protected message data can be passed on to the next stage of processing. If the required security checks are not met, the message should not be considered authenticated.

In this way, CANsec helps mitigate several security threats to CAN XL networks.

CANsec Architecture and Message Structure

Because CANsec is a data link layer protocol within the CAN XL architecture, security features can be applied close to the network communication. Protected CAN XL messages carry additional information, as described below.

SEC Indication

The SEC indication shows whether CANsec functionality has been applied to the CAN XL message. This lets receiving systems know that additional processing is required.

Cipher Control Information

Cipher control information specifies the security configuration needed to process the protected message, so the receiving node knows how to handle it.

Secure Channel ID

The secure channel ID indicates which secure channel a message belongs to. Multiple secure channels can exist within the same physical network, each potentially with different security configurations and cryptographic keys. This allows certain groups of nodes to communicate securely with each other.

Freshness

Freshness information is used to determine whether a message is current or a repeat. It is included in the verification checks.

Authentication Tag

The authentication tag is used to verify message authenticity and integrity. The receiving node performs cryptographic processing on the tag, and if the message does not pass verification, it should be rejected.

By including this information in messages, CANsec provides security functionality for CAN XL messages at the data link layer.

Security Provided

CANsec provides several security features using cryptography.

Message Authentication

Message authentication verifies that a protected message was sent by a node with access to the correct cryptographic keys. This reduces the chance of unauthorized messages being accepted as if they came from legitimate ECUs.

Data Integrity

Data integrity ensures that protected messages cannot be altered without detection. The receiver checks the authentication information in the message to confirm it is valid.

Protection From Replay Attacks

Freshness information can be used to determine whether messages have been repeated. In automotive networks, the same message may mean different things depending on the current operation of the vehicle.

Data Confidentiality

CANsec can encrypt data to make message contents confidential. This is particularly useful when sensitive information is exchanged between components in an automotive network.

Whether confidentiality is provided depends on the cryptographic configuration chosen, as not all authentication methods include encryption.

Cryptographic Algorithms

Cryptography is an important part of CANsec, as it enables authentication and secure communication. Two cryptographic algorithms can be used within CANsec: AES-CMAC and AES-GCM.

AES-CMAC

AES-CMAC is a cryptographic message authentication method based on AES. A message authentication code (MAC) is calculated and used to verify the authenticity and integrity of a message. On receiving a protected message, the receiver calculates the authentication information and compares it with that in the received message to determine whether it is valid.

AES-CMAC provides message authentication and integrity. It does not provide confidentiality on its own.

AES-GCM

AES-GCM is an authenticated encryption method. It provides confidentiality as well as message integrity and authentication, which makes it useful where confidentiality and data integrity are both required.

Depending on the security required and the capabilities of the system, an appropriate algorithm can be chosen.

Comparison With AUTOSAR SecOC

CANsec and AUTOSAR Secure Onboard Communication (SecOC) both aims to improve security in automotive communication, but they differ in architecture.

CANsec provides security at the data link layer of CAN XL communication. AUTOSAR SecOC is a software module within the communication stack that provides authentication and freshness checks on Protocol Data Units (PDUs).

The main differences are as follows:

Feature CANsec AUTOSAR SecOC
Architecture CAN XL data link layer AUTOSAR communication stack
Main function Protects CAN XL communication Authenticates onboard communication PDUs
Message authentication Yes Yes
Freshness Yes Yes
Confidentiality Can be provided using encryption Not provided by SecOC itself
Integration CAN XL security extension AUTOSAR software module

Depending on the network architecture, communication requirements, hardware and software, either CANsec or AUTOSAR SecOC may be the more appropriate solution. Because their security features and integration requirements differ, they cannot be treated as interchangeable.

Implementation Considerations

Implementing CANsec takes more than enabling the security function in CAN XL controllers. Appropriate hardware, embedded software, cryptographic processing, and key configuration must all be in place. Considerations include:

CAN XL Support

CANsec requires CAN XL support in the communication controller. The controller and its software should be checked to ensure the required security functionality is supported.

Cryptographic Processing

Message authentication and (where applicable) encryption require cryptographic processing. This can be done in software, or with hardware acceleration where available.

Key Management

Keys must be configured and managed securely. To authenticate protected messages, the sending and receiving nodes must have compatible key information. During system design, consider how keys are provisioned, stored, updated, and replaced. CiA 613-2 covers key requirements in general terms, but specific protocols for key exchange and distribution are outside its scope.

Embedded Software

Embedded software must configure the security parameters, handle messages, and process verification results. Error handling, communication timing, memory usage, and integration with higher-layer protocols must be considered.

Testing

CANsec implementations should be tested in a variety of situations, including messages that fail authentication, replay attempts, incorrect security configurations, key handling and communication performance. This helps identify implementation issues before deployment.

Advantages and Disadvantages

CANsec provides additional security features within CAN XL networks, but it also introduces new requirements.

Advantages

  • Improved message security – message authentication and integrity checking make it harder for unauthorized sources to alter messages.
  • Message freshness – helps prevent previously sent messages from being re-accepted.
  • Confidentiality – message content can be made confidential using encryption.
  • Secure channels – can provide secure communication between different groups of nodes.
  • Data link layer security – security is added at the data link layer of CAN XL communication.

Disadvantages

  • Hardware requirements – appropriate hardware is needed to support CAN XL communication with CANsec.
  • Processing requirements – authentication and encryption increase processing requirements.
  • Key management – security relies on appropriate key provisioning, storage, distribution and updating.
  • Complex implementation – security must be configured and tested carefully.
  • Not a complete solution – CANsec does not provide complete protection against all types of attack.

The entire system design, including network architecture, hardware capabilities, software configuration, and overall cybersecurity design, must be considered to ensure a secure system.

Applications in Automotive Networks

CANsec can be applied in CAN XL-based communication where additional security is required.

Backbone Networks in Vehicles

Modern vehicles may include backbone networks that connect different communication domains and systems. CANsec can be used to secure CAN XL messages sent between sections of a network.

Communication Between ECUs

Information is sent between ECUs so the vehicle operates correctly. CANsec can provide authentication and integrity on selected communication channels between nodes.

Connected Vehicle Systems

As vehicles become increasingly connected, the security of internal communication becomes an important part of overall vehicle cybersecurity. CANsec can help secure CAN XL communication within these systems.

Sensitive Embedded Systems

In embedded systems using CAN XL, additional security may be required for data sent between components. CANsec provides security features to consider when designing such systems.

Whether CANsec is appropriate depends on network design, security requirements, controller support, and the resources available for implementation.

Future Development

As vehicles contain an increasing number of electronic components, connected technologies and software-based features, CAN XL provides larger data field sizes and improved communication capabilities. CANsec can be used as an optional security measure for this communication.

The CAN XL add-on services, including the CANsec data plane specification (CiA 613-2), are defined within the CiA 613 specification family. As CANsec implementations develop, hardware support, cryptographic processing, compatibility, and key management will be important considerations for engineers. For embedded software developers, knowledge of CANsec can help in understanding security requirements in CAN XL-based communication systems.

FAQs

CANsec is a security enhancement to CAN XL communication at the data link layer. It provides data integrity, message freshness, source authenticity, and confidentiality.

CANsec is specified only as an enhancement to CAN XL communication. It should not be described as natively available in Classical CAN or CAN FD.

Freshness information is applied to messages within CANsec, so receivers can detect previously sent messages.

Optionally, yes. AES-GCM can be used to encrypt messages. AES-CMAC provides authentication and integrity but no encryption.

CANsec is a data link layer enhancement to CAN XL communication. AUTOSAR SecOC is a software module that provides authentication and freshness for onboard communication PDUs. They differ in integration and overall security scope.

No. CANsec is an optional enhancement. Even if CAN XL is used in a network, it is not secured by CANsec unless the appropriate functionality is implemented and configured.

Conclusion

CANsec provides important security features for CAN XL communication: message authentication, data integrity, message freshness, and confidentiality.

By applying security at the data link layer, secure channels can be established using cryptographic techniques. However, successful implementation requires appropriate hardware, software integration, secure key management, and thorough testing. As automotive communication systems become increasingly complex, CANsec gives engineers and embedded software developers another option for increasing the security of CAN XL-based systems.