How technica-engineering/mkadaemon works
MKAdaemon implements IEEE 802.1X MACsec Key Agreement on Linux, with PSK support and GCM-AES cipher suites. The user-facing workflow is to configure the daemon, run its per-bus MKA processing, and control or inspect buses through the D-Bus CLI; Linux interfaces provide packet and MACsec integration. The graph preserves the protocol, key-agreement, control, SecY, crypto, and daemon capabilities. Some internal links are omitted because sampled evidence does not show their calls; unsampled configuration and PHY implementations are represented only at their source paths.
Main entry points: main.c Daemon launcher · mka_kay.c Key agreement · mka_main.c MKA main loop · dbus_server.c D-Bus service
Components 17
Linux daemon
- Control CLI
src/mkad_cli/main.c - Daemon launcher
src/linux_daemon/main.c - Configuration
src/linux_daemon/mka_daemon_config.c - D-Bus service
src/linux_daemon/dbus_server.c
MKA protocol
- MKA main loop
src/mka_main.c - Key agreement
src/pae/mka_kay.c - KAY parameters
src/pae/mka_kay_params.c - Connectivity control
src/pae/mka_cp.c - Logon process
src/pae/mka_logon.c
Crypto and SecY
- SecY management
src/pae/mka_secy.c - Crypto primitives
src/crypto/mka_crypto_openssl.c - Key derivation
src/crypto/aes-kdf.c
Linux platform
- Layer 2 transport
src/l2/mka_l2_linux.c - MACsec PHY driver
src/linux_daemon/mka_phy_driver_libnl.c - Link monitor
src/linux_daemon/mka_link_monitor.c - Timer events
src/linux_daemon/mka_timers_event.c
Other components
- Operator
Connections 19
- Operator → Control CLI: runs
- Control CLI → D-Bus service: controls bus
src/mkad_cli/main.c - Operator → Daemon launcher: starts daemon
- Daemon launcher → Configuration: loads config
src/linux_daemon/main.c - Daemon launcher → MKA main loop: runs loop
src/linux_daemon/main.c - Daemon launcher → D-Bus service: uses service
src/linux_daemon/main.c - Daemon launcher → MACsec PHY driver: initializes driver
- MKA main loop → Key agreement: processes MKA
- Key agreement → Connectivity control: updates control
src/pae/mka_cp.c - Key agreement → SecY management: manages security
- Logon process → Key agreement: uses KAY
src/pae/mka_logon.c - Logon process → Connectivity control: uses control
src/pae/mka_logon.c - SecY management → D-Bus service: uses interface
src/pae/mka_secy.c - Key agreement → KAY parameters: uses parameters
- Key agreement → Crypto primitives: derives keys
- Crypto primitives → Key derivation: uses derivation
- MKA main loop → Layer 2 transport: sends frames
- Daemon launcher → Link monitor: monitors link
- Daemon launcher → Timer events: services timers