Blog
CANsec Protocol Enhancing Security in Automotive Communication Networks
December 4, 2026
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.
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:
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 specifies the security configuration needed to process the protected message, so the receiving node knows how to handle it.
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 information is used to determine whether a message is current or a repeat. It is included in the verification checks.
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.
CANsec provides several security features using cryptography.
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 ensures that protected messages cannot be altered without detection. The receiver checks the authentication information in the message to confirm it is valid.
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.
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.
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 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 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.
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.
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:
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.
Message authentication and (where applicable) encryption require cryptographic processing. This can be done in software, or with hardware acceleration where available.
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 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.
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.
CANsec provides additional security features within CAN XL networks, but it also introduces new requirements.
The entire system design, including network architecture, hardware capabilities, software configuration, and overall cybersecurity design, must be considered to ensure a secure system.
CANsec can be applied in CAN XL-based communication where additional security is required.
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.
Information is sent between ECUs so the vehicle operates correctly. CANsec can provide authentication and integrity on selected communication channels between nodes.
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.
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.
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.
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.