English

MACsec

Posted on Apr 2, 2024 by
95

What Is MACsec?

MACsec, or Media Access Control Security, based on 802.1AE and 802.1X, is a secure communication method used in local area networks (LANs). It ensures identity authentication, data encryption, integrity checks, and protection against replay attacks to safeguard Ethernet frames and prevent devices from processing malicious packets.

Why Is MACsec Needed?

In the realm of local area networks (LANs), where data is often transmitted in plaintext, there exists a significant vulnerability to security breaches. This vulnerability exposes LANs to various potential attacks, such as the unauthorized access or alteration of sensitive information, such as financial data. MACsec, founded upon the standards 802.1AE and 802.1X, addresses this vulnerability by providing a robust security framework.

MACsec serves to protect Ethernet frames traversing a LAN by offering identity authentication, data encryption, integrity checks, and safeguards against replay attacks. By implementing MACsec, organizations can ensure the confidentiality and integrity of data transmitted over Ethernet networks, thwarting potential information leaks and malicious attacks.

The key functions of MACsec ensure the secure transmission of user service data within a LAN:

- Data Encryption: Utilizing the AES-CMAC algorithm, MACsec encrypts data before transmission, ensuring that it is only accessible to authorized recipients.

- Integrity Check: MACsec verifies the integrity of received data packets to detect any tampering attempts. By calculating and comparing Integrity Check Values (ICVs), MACsec ensures the integrity of transmitted data.

- Replay Prevention: MACsec incorporates mechanisms to prevent attackers from replaying intercepted packets to disrupt network operations. By managing packet sequence numbers and implementing a replay prevention window, MACsec ensures that out-of-order packets are discarded, thus mitigating potential attacks.

How MACsec Works

MACsec operates through the MACsec Key Agreement (MKA) protocol, which handles the establishment and management of MACsec security channels and the negotiation of keys used by MACsec. The following outlines the fundamental concepts within the MKA protocol:

- Secure Connectivity Association (CA): This is a security association established and maintained by the key negotiation protocol. It comprises two or more MACsec-capable members that utilize the same key and key algorithm suite on the LAN. The key employed by CA members is known as the Secure Connectivity Association Key (CAK). MACsec exclusively supports point-to-point connections, meaning a MACsec session is established between two devices. Hence, both ends of a MACsec session must utilize the same CAK, forming a CA where both devices use the same CAK.

- Secure Association (SA): SA ensures secure data frame transmission between CA members. Each SA possesses a Secure Association Key (SAK) or a group of SAKs for encrypting frames. SAKs are derived from CAKs using algorithms and are utilized for data packet encryption and decryption.

Operation Mechanism:

The point-to-point MACsec interaction encompasses three phases: session negotiation, secure communication, and session keepalive.

Session Negotiation:

Upon enabling MACsec on the interfaces of two devices, a key server is designated based on priority, where interface priorities are user-configurable. The lower the priority value, the higher the priority. If two interfaces possess identical priorities, their Secure Channel Identifier (SCI) values, comprising the interface MAC address and the last two bytes of the interface index, are compared. The interface with the lower SCI value becomes the key server.

Both devices are configured statically with the same CAK. The key server generates an SAK for encrypting data packets based on the statically configured CAK and transmits the SAK to the remote device.

Secure Communication:

The sender utilizes the SAK to encrypt data packets, while the receiver uses the SAK to decrypt them. Both devices can act as sender or receiver, with their communication safeguarded by MACsec.

The SAK supports a timeout interval setting, where it needs replacement after encrypting a certain number of packets or being in use for a specific period, enhancing key security.

Session Keepalive:

The MKA protocol features an MKA session keepalive timer, defining the timeout period of an MKA session. Following successful MKA session negotiation, the two devices exchange MKA protocol packets to ensure session continuity. The local device initiates the timer upon receiving MKA protocol packets from the remote device.

If subsequent MKA protocol packets are received within the timeout period, the timer is reset.

If no MKA protocol packets are received within the timeout period, the local device considers the session insecure, disconnects from the remote device, and initiates MKA session negotiation anew.

Application Scenarios of MACsec

Scenario 1: Secure Point-to-Point Data Transmission

In situations where critical data exchange occurs between SwitchA and SwitchB, MACsec is implemented for point-to-point communication to enhance data security.

Illustration of MACsec deployed between switches for point-to-point communication

Illustration of MACsec deployed between switches for point-to-point communication

Scenario 2: Secure Point-to-Point Data Transmission with Intermediate Devices

When intermediate switches like SwitchC, SwitchD, and SwitchE are inserted between SwitchA and SwitchB, MACsec is configured for point-to-point communication between SwitchA and SwitchB to ensure data protection. Enabling Layer 2 protocol transparent transmission on intermediate switches facilitates MACsec session negotiation between SwitchA and SwitchB.

Illustration of configuring point-to-point MACsec for secure communication with intermediate devices

Illustration of configuring point-to-point MACsec for secure communication with intermediate devices

You might be interested in

See profile for undefined.
FS Official
Load Balancing
See profile for undefined.
FS Official
Malware
See profile for undefined.
FS Official
Orthogonal Architecture