]> git.proxmox.com Git - mirror_iproute2.git/commit - tipc/misc.c
tipc: add new commands to set TIPC AEAD key
authorTuong Lien <tuong.t.lien@dektech.com.au>
Thu, 21 Nov 2019 03:46:46 +0000 (10:46 +0700)
committerDavid Ahern <dsahern@gmail.com>
Mon, 25 Nov 2019 23:14:11 +0000 (23:14 +0000)
commit24bee3bf97527e649397814765b96951231a0670
treef92c860062142ffb3b792924f08f110edde49229
parent7438afd2cc8d37fd7f12e29963e1d926de53dda7
tipc: add new commands to set TIPC AEAD key

Two new commands are added as part of 'tipc node' command:

 $tipc node set key KEY [algname ALGNAME] [nodeid NODEID]
 $tipc node flush key

which enable user to set and remove AEAD keys in kernel TIPC (requires
the kernel option - 'TIPC_CRYPTO').

For the 'set key' command, the given 'nodeid' parameter decides the
mode to be applied to the key, particularly:

- If NODEID is empty, the key is a 'cluster' key which will be used for
all message encryption/decryption from/to the node (i.e. both TX & RX).
The same key will be set in the other nodes.

- If NODEID is own node, the key is used for message encryption (TX)
from the node. Whereas, if NODEID is a peer node, the key is for
message decryption (RX) from that peer node. This is the 'per-node-key'
mode that each nodes in the cluster has its specific (TX) key.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David Ahern <dsahern@gmail.com>
tipc/misc.c
tipc/misc.h
tipc/node.c