]> git.ipfire.org Git - thirdparty/iproute2.git/commit
macsec: add Extended Packet Number support
authorEmeel Hakim <ehakim@nvidia.com>
Sun, 11 Sep 2022 09:26:55 +0000 (12:26 +0300)
committerDavid Ahern <dsahern@kernel.org>
Fri, 16 Sep 2022 16:33:43 +0000 (10:33 -0600)
commit6ce23b7c2d79c600c7d8756b9ed3a0497f3491b1
tree16628e823bf5761c58e82aa2d2aa38112561306e
parent89afe6ef89e575f543b0da632c67bd0de8533d00
macsec: add Extended Packet Number support

This patch adds support for extended packet number (XPN).
XPN can be configured by passing 'cipher gcm-aes-xpn-128' as part of
the ip link add command using macsec type.
In addition, using 'xpn' keyword instead of the 'pn', passing a 12
bytes salt using the 'salt' keyword and passing short secure channel
id (ssci) using the 'ssci' keyword as part of the ip macsec command
is required (see example).

e.g:

create a MACsec device on link eth0 with enabled xpn
  # ip link add link eth0 macsec0 type macsec port 11
encrypt on cipher gcm-aes-xpn-128

configure a secure association on the device
  # ip macsec add macsec0 tx sa 0 xpn 1024 on ssci 5
salt 838383838383838383838383
key 01 81818181818181818181818181818181

configure a secure association on the device with ssci = 5
  # ip macsec add macsec0 tx sa 0 xpn 1024 on ssci 5
salt 838383838383838383838383
key 01 82828282828282828282828282828282

Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/ipmacsec.c