Network Creator Security#

API and Callbacks for the Network Creator Security Component.

This component performs the necessary security initialization to form a Zigbee 3.0-compliant network. Its main responsibilities include:

  1. Initializing security for network formation (centralized or distributed security).

  2. Managing the process of opening and closing the network for device joining.

  3. Handling link keys, including support for install code-based joining (for enhanced security).

  4. Optionally allowing Trust Center rejoins with a well-known key, if configured.

API#

Initialize the security needed for forming and then operating on a network. This should be called before forming a network to ensure the correct security settings are applied.

sl_zigbee_af_network_creator_security_open_network_with_key_pair(sl_802154_long_addr_t eui64, sl_zigbee_key_data_t keyData)

Set the network to accept the install code only.

Set the insecure rejoin policy for devices using the well-known key.

Variables#

bool

Setting to allow Home Automation devices to remain on the network after joining (non-compliant) Set by SL_ZIGBEE_AF_PLUGIN_NETWORK_CREATOR_SECURITY_ALLOW_HA_DEVICES_TO_STAY.

Macros#

#define
SL_ZIGBEE_AF_PLUGIN_NETWORK_CREATOR_SECURITY_PLUGIN_NAME "NWK Creator Security"

API Documentation#

sl_zigbee_af_network_creator_security_start#

sl_status_t sl_zigbee_af_network_creator_security_start (bool centralizedNetwork)

Initialize the security needed for forming and then operating on a network. This should be called before forming a network to ensure the correct security settings are applied.

Parameters
TypeDirectionArgument NameDescription
bool[in]centralizedNetwork

Whether or not the network that the caller plans to form will use centralized or distributed security.

The centralizedNetwork parameter allows the caller to specify whether or not the network that they plan to form will use centralized or distributed security.

Returns


sl_zigbee_af_network_creator_security_open_network#

sl_status_t sl_zigbee_af_network_creator_security_open_network (void )

Open a network for joining.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This API broadcasts a permit join to the network and adds a transient link key of ZigBeeAlliance09 if this device is a trust center. The network will remain open for SL_ZIGBEE_AF_PLUGIN_NETWORK_CREATOR_SECURITY_NETWORK_OPEN_TIME_S seconds.

Returns


sl_zigbee_af_network_creator_security_close_network#

sl_status_t sl_zigbee_af_network_creator_security_close_network (void )

Close the network.

Parameters
TypeDirectionArgument NameDescription
voidN/A

This API closes the network for joining. It broadcasts a permit join to the network with time 0, as well as clears any transient link keys in the stack.

Returns

  • An sl_status_t value describing closing the network. If this node is not currently on a network, this will return SL_STATUS_FAIL. This API will also return an error code based on the success or failure of the broadcast permit join. See sl_status.h for more information.


sl_zigbee_af_network_creator_security_open_network_with_key_pair#

sl_status_t sl_zigbee_af_network_creator_security_open_network_with_key_pair (sl_802154_long_addr_t eui64, sl_zigbee_key_data_t keyData)

Set the network to accept the install code only.

Parameters
TypeDirectionArgument NameDescription
sl_802154_long_addr_t[in]eui64

EUI 64 of the joining node. A value of all FFs configures a key to be used by all joining or rejoining devices, as long as a key does not exist that matches the joiner's specific EUI.

sl_zigbee_key_data_t[in]keyData

the link key to be used by the joining node.

This API opens a network for joining. It broadcasts a permit join to the network and adds a specified EUI64 and transient key pair if this device is a trust center. Only the node that matches the specified key pair is allowed to join the network.

Returns


sl_zigbee_af_network_creator_security_set_allow_rejoins_with_well_known_key#

sl_status_t sl_zigbee_af_network_creator_security_set_allow_rejoins_with_well_known_key (bool allow)

Set the insecure rejoin policy for devices using the well-known key.

Parameters
TypeDirectionArgument NameDescription
bool[in]allow

Whether to allow a device to rejoin with the well-known key or not

This API sets the policy for Trust Center (insecure) rejoins for devices using the well-known key. Sending a network key to devices using the well- known key is a security risk and the default policy of the stack is to deny such rejoins. Calling this function to allow rejoins with the well-known key will allow the rejoins for a period of sli_zigbee_allow_tc_rejoins_using_well_known_key_timeout_sec seconds.

Returns


Variable Documentation#

allowHaDevices#

bool allowHaDevices

Setting to allow Home Automation devices to remain on the network after joining (non-compliant) Set by SL_ZIGBEE_AF_PLUGIN_NETWORK_CREATOR_SECURITY_ALLOW_HA_DEVICES_TO_STAY.