Hardware accelerated crypto engine for MACsec encryption/ decryption per device or per LAG member port at line rate. #459
Open
Hardware accelerated crypto engine for MACsec encryption/ decryption per device or per LAG member port at line rate. #459
Conversation
…ant stats updated for remaining choices.
…tware implementation should validate Rx frames for LAG member port MACsec.
apratimmukherjee
approved these changes
Feb 26, 2026
…extensiblity. Remove inline_crypto config per LAG member port.
… 1) Change CAK name to simple short string. 2) Make PSK chain start time description to cover single and multiple keys scenario. 3) Set key chain default start time to Unix epoch time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature Overview
Support for hardware accelerated crypto engine for MACsec encryption/ decryption at line rate. Such crypto engine can both encrypt and decrypt protocol/ traffic packets at Tx and Rx respectively at line rate. Both per device and per LAG member port MACsec support is provided in this PR.
Also support is provided for encrypted or cleartext VLAN(s) for Ethernet device configured with MACsec.
Previous MACsec/ MKA related PRs
Support for a) Line rate encrypt only MACsec crypto engine b) Key generation protocol MKA or static key is described in following PR. Such engine can only encrypt traffic packets at Tx at line rate but cannot decrypt MACsec packets at Rx.( #412 )
Feature Details
Redocly link for set_config
Redocly link for get_metrics
Relevant Locations/Nomenclature:
config/devices/macsec/ ( pre-existing with secure_entity/data_plane/encapsulation/crypto_engine added for support for h/w accelerated mode ) "encrypt_decrypt . MKA configuration is optional , alongwith static as choice of Key Generation protocol within macsec.
config/lags/port/macsec added. ( Re-uses macsec and mka attributes from device macsec )
monitor/get_metrics/macsec and monitor/get_metrics/mka ( pre-existing metrics for tracking macsec / mka sessions )
This feature aims to support MACsec for following feature profile (FP) test cases:
IPSEC-1.1: IPSec with MACSec over aggregated links: https://github.com/openconfig/featureprofiles/blob/main/feature/ipsec/otg_tests/ipsec_base/README.md
IPSEC-1.3: IPSec Packet-Order with MACSec over aggregated links:
https://github.com/openconfig/featureprofiles/blob/main/feature/ipsec/otg_tests/ipsec_packetorder/README.md
IPSEC-1.2: IPSec Scaling with MACSec over aggregated links: https://github.com/openconfig/featureprofiles/blob/main/feature/ipsec/otg_tests/ipsec_scale/README.md
Other/ advance configs
For both LAG member port or Ethernet devices configured with MACsec:
For Ethernet devices configured with MACsec:
All Ethernet VLANs can be sent either in encrypted or in cleartext by setting secure_entity.data_plane.encapsulation.vlan_options.encrypt_interface_vlans to true or false respectively.
For hardware accelerated inline_crypto engine, there are following configurable parameters:
-- Rx secTAG offset i.e. the offset of first byte of MACsec header starting from Ethernet frame
-- Rx SC identifying field type which is primarily used to find SC of sender and hence decryption key on Rx path
-- CA (connectivity association) type i.e. pairwise (CA) or group CA can be configured in options.per_port_options[].protocols[].macsec.hardware_acceleration.inline_crypto.type_of_ca.
-- Group CA related configuration is also in the same configuration path.
gosnappi example configuration for MACsec on LAG member port
gosnappi example configuration for MACsec on Device ethernet .
JSON view for MACsec configuration on single LAG member port