the original author is zigmaster.
Hashed Link Keys are a shortcut for unique link key storage on devices with constrained key table capacity. They facilitate pseudo-random link keys by hashing the remote's EUI64 with a given Master Key (chosen by the centralized Trust Center and stored in the Global Link Key slot of TOKEN_STACK_TRUST_CENTER's data) using the AES HMAC algorithm. Derivation of the key can then be done "just in time" for decryption or encryption as long as the Trust Center knows the remote node's EUI64. This is in contrast to the mechanism of using pre-programmed unique install codes as described in AN1089 and AN1233.
Note that because there is no permanent storage of these hashed keys on the Trust Center, there is also no memory of incoming APS frame counters, so this method has a vulnerability of APS replay attacks. Also note that the hashing only occurs on the Trust Center side, where many keys may be needed. Other nodes receive this Trust Center Link Key upon request from the TC and treat it like any other "randomly" derived TCLK.
Hashed Link Keys are enabled on a centralized Trust Center node by setting the
EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY bit in the EmberInitialSecurityBitmask during emberSetInitialSecurityState() prior to forming the network.
In recent versions of the ZNet stack (6.x), this is automatically enabled if your Trust Center is using the Network Creator Security plugin. This is visible in the start function of network-creator-security.c where there is a bit which is set during the Network Creator Security Start function. You can see how this is done in network-creator-security.c:
// Use hashed link keys for improved storage and speed. state.bitmask |= EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY;
If you know the Master Key, you can get Network Analyzer to give you the hashed link key for a given EUI64.... Just go into Network Analyzer's Security Key preferences (Window >> Preferences >> Network Analyzer >> Decoding >> Security Keys) and click the "Run HMAC" button. Then input your Master Key and an EUI64 to get the HMAC hashed key.