network_stuff:macsec
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| network_stuff:macsec [2026/10/08 13:33] – created admin | network_stuff:macsec [2026/10/08 20:33] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | | + | ====== MACsec explained ====== |
| - | + | ===== The idea in one paragraph ===== | |
| - | ===== The idea in one paragraph ===== | + | MACsec encrypts **one Ethernet hop** (port to port). It has two parts: |
| - | + | * **MKA** (MACsec Key Agreement) is the **control plane**. The two ends prove they share a secret, elect one of them as the boss (the **Key Server**, KS), and that boss hands out the actual traffic key. | |
| + | * **MACsec** proper is the **data plane**. Every frame gets encrypted, signed and numbered with that key. | ||
| - | MACsec encrypts | + | **Keep these apart when troubleshooting.** MKA can look perfectly healthy while the data plane is dropping everything. |
| - | + | ===== 1. The keys: three layers, each made from the one above ===== | |
| - | | + | ^ Term ^ Plain English ^ Lifetime ^ |
| + | | **CAK** (Connectivity Association | ||
| + | | **CKN** (CAK Name) | The " | ||
| + | | **ICK / KEK** | Two keys made automatically from the CAK. The **ICK** signs MKA messages so they can't be forged. The **KEK** encrypts the SAK when the Key Server | ||
| + | | **SAK** (Secure Association Key) | **The key that actually encrypts | ||
| - | | + | In short: |
| - | + | A key chain can hold more than one CKN/CAK pair. That's normally used for hitless CAK rollover. Normally only one pair is the live session at a time, with a brief overlap during rollover. | |
| - | **Keep these apart when troubleshooting.** MKA can look perfectly healthy while the data plane is dropping everything. | + | ===== 2. Who's who: the identifiers ===== |
| - | + | ^ Term ^ Plain English ^ | |
| + | | **CA** (Connectivity Association) | The " | ||
| + | | **SC** (Secure Channel) | **One direction** of traffic. Each sender has its own SC, so a link has two, one per direction. That's why MACsec faults can be one-way only. | | ||
| + | | **SCI** (SC Identifier) | The SC's name tag: the sender' | ||
| + | | **SA** (Secure Association) | One SAK being used on one SC. Each rekey creates a new SA. | | ||
| + | | **AN** (Association Number) | The **slot number** of an SA. It's a 2-bit field, so only **0 to 3**. AN + SCI identifies the SA. The 5th SAK reuses slot 0, the 6th reuses slot 1, and so on. Having 4 slots is what lets the new key overlap the old one during a rekey. | | ||
| + | | **KN** (Key Number) | MKA's running count of SAKs: 1, 2, 3 and upwards. Typically **AN = (KN-1) mod 4**. If KN drops back to 1, the CA was rebuilt. | | ||
| + | | **KS** (Key Server) | The elected boss that generates and distributes SAKs. Lowest '' | ||
| + | | **MKPDU** | An MKA protocol message. Peers exchange one about every 2 s, and the session dies after about 6 s without one. If a carrier in the path swallows them, MKA never comes up. | | ||
| - | | + | ===== 3. What's added to every frame ===== |
| - | + | < | |
| + | DA | SA | SecTAG | encrypted payload | ICV | ||
| + | </ | ||
| - | | + | |
| + | * **ICV** (Integrity Check Value) is the 16-byte signature. A bad ICV means a wrong key or a tampered frame, and it shows up in the "not valid" counters. | ||
| + | * **Cipher suite**: the algorithm, e.g. '' | ||
| - | | **CAK** (Connectivity Association Key) | The master password. It's either pre-shared (configured in a key chain) or comes from 802.1X. It never encrypts traffic itself. | Until you change the config | | + | ===== 4. Packet numbers and replay protection ===== |
| - | | + | ^ Term ^ Plain English ^ |
| + | | **PN** (Packet Number) | A frame counter, **32 bits**, | ||
| + | | **XPN** (Extended PN) | The same counter at **64 bits**. **Only | ||
| + | | **Replay window** | How far **behind** | ||
| + | | **Lowest acceptable PN** | The highest PN seen minus the window. Anything below it is dropped | ||
| + | | **SSCI / salt** | XPN-only extras. They' | ||
| - | | **ICK / KEK** | Two keys made automatically from the CAK. The **ICK** signs MKA messages | + | **Why XPN matters:** what matters is packet rate, not link speed. A 32-bit counter allows about 4.3 billion frames per key. At 10G with minimum-size frames that's used up in **5-7 minutes**, which forces a rekey long before a typical hourly timer. XPN removes that limit, |
| - | | **SAK** (Secure Association Key) | **The key that actually | + | ===== 5. The knobs you' |
| - | + | ^ Knob ^ Effect ^ | |
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| - | In short: **CKN says which password. The CAK proves who you are. The SAK encrypts the traffic.** | + | ===== 6. How a session comes up ===== |
| - | + | | |
| - | + | - They elect the **Key Server**. | |
| - | A key chain can hold more than one CKN/CAK pair. That's normally used for hitless CAK rollover. Only one is the live session at a time. | + | - The KS generates a **SAK**, wraps it with the **KEK** and sends it. |
| - | + | - Both install it in slot **AN**: the receive side first, then transmit. Traffic is now encrypted, starting from **PN 1**. | |
| - | + | - At each rekey: a new SAK goes into the next AN slot, the KN goes up by one, the PN restarts at 1, and the old slot is retired. | |
| - | + | ||
| - | ===== 2. Who's who: the identifiers ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ^ Term ^ Plain English ^ | + | |
| - | + | ||
| - | | **CA** (Connectivity Association) | The " | + | |
| - | + | ||
| - | | **SC** (Secure Channel) | **One direction** of traffic. Each sender has its own SC, so a link has two, one per direction. That's why MACsec faults can be one-way only. | | + | |
| - | + | ||
| - | | **SCI** (SC Identifier) | The SC's name tag: the sender' | + | |
| - | + | ||
| - | | **SA** (Secure Association) | One SAK being used on one SC. Each rekey creates a new SA. | | + | |
| - | + | ||
| - | | **AN** (Association Number) | The **slot number** of an SA. It's a 2-bit field, so only **0 to 3**. AN + SCI identifies the SA. Rekey #5 reuses slot 0, #6 reuses slot 1, and so on. Having 4 slots is what lets the new key overlap the old one during a rekey. | | + | |
| - | + | ||
| - | | **KN** (Key Number) | MKA's running count of SAKs: 1, 2, 3 and upwards. Typically **AN = (KN-1) mod 4**. If KN drops back to 1, the CA was rebuilt. | | + | |
| - | + | ||
| - | | **KS** (Key Server) | The elected boss that generates and distributes SAKs. Lowest '' | + | |
| - | + | ||
| - | | **MKPDU** | An MKA protocol message. Peers exchange one about every 2 s, and the session dies after about 6 s without one. If a carrier in the path swallows them, MKA never comes up. | | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== 3. What's added to every frame ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | < | + | |
| - | + | ||
| - | DA | SA | SecTAG | encrypted payload | ICV | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | * **SecTAG** sits in front of the payload. It carries the AN (which key slot), the PN (which frame number) and optionally the SCI. It adds about 16 bytes. | + | |
| - | + | ||
| - | * **ICV** (Integrity Check Value) is the 16-byte signature. A bad ICV means a wrong key or a tampered frame, and it shows up in the "not valid" counters. | + | |
| - | + | ||
| - | * **Cipher suite**: the algorithm, e.g. '' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== 4. Packet numbers and replay protection ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ^ Term ^ Plain English ^ | + | |
| - | + | ||
| - | | **PN** (Packet Number) | A frame counter, **32 bits**, that **restarts at 1 with every new SAK**. It stops an attacker re-sending a recorded frame. | | + | |
| - | + | ||
| - | | **XPN** (Extended PN) | The same counter at **64 bits**. **Only the low 32 bits go on the wire**, and the receiver works out the upper 32 bits itself. | | + | |
| - | + | ||
| - | | **Replay window** | How far **behind** the highest PN seen a frame may arrive and still be accepted. **0** means strict in-order only, which drops legitimate frames that QoS queues have reordered. | | + | |
| - | + | ||
| - | | **Lowest acceptable PN** | The highest PN seen minus the window. Anything below it is dropped as **" | + | |
| - | + | ||
| - | | **SSCI / salt** | XPN-only extras. They' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | **Why XPN matters:** what matters is packet rate, not link speed. A 32-bit counter allows about 4.3 billion frames per key. At 10G with minimum-size frames that's used up in **5-7 minutes**, which forces a rekey long before a typical hourly timer. XPN removes that limit, so it matters at 10G too, not only at 40G+. | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== 5. The knobs you'll actually touch ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ^ Knob ^ Effect ^ | + | |
| - | + | ||
| - | | '' | + | |
| - | + | ||
| - | | '' | + | |
| - | + | ||
| - | | '' | + | |
| - | + | ||
| - | | '' | + | |
| - | + | ||
| - | | '' | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ===== 6. How a session comes up ===== | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | | + | |
| - | + | ||
| - | G-RESEARCH believes the information provided herein is reliable. While every care has been taken to ensure accuracy, the information is furnished to the recipients with no warranty as to the completeness and accuracy of its contents and on condition that any errors or omissions shall not be made the basis of any claim, demand or cause of action. The information in this email is intended only for the named recipient. If you are not the intended recipient please notify us immediately and do not copy, distribute or take action based on this e-mail. | + | |
| - | All messages sent to and from this e-mail address will be logged by G-RESEARCH and are subject to archival storage, monitoring, review and disclosure. For information about how G-RESEARCH uses your personal data, please refer to our Privacy Policy. | + | |
| - | G-RESEARCH is the trading name of Barlowe LLP and its affiliates globally. Barlowe LLP is a limited liability partnership registered in England with number OC451516 and registered office 8th Floor One Soho Place, London, W1D 3BG. | + | |
network_stuff/macsec.1791466408.txt.gz · Last modified: by admin
