Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements the Key Refresh Procedure.
Basic workflow is complete. There is no UI for this feature in the Sample app, but required messages are supported in the library. To update a Network Key and optionally bound Application Keys do the following:
IOS-nRF-Mesh-Library/nRFMeshProvision/Classes/Mesh Model/Node.swift
Lines 207 to 210 in bc05b9a
ConfigNetKeyUpdate
message to all non-excluded Nodes, including the local Node (phone). This step will distribute the new key to all Nodes. They will all go to Phase 1 of Key Refresh Procedure, also called Key Distribution.ConfigAppKeyUpdate
to the same set of Nodes to update the Application Key(s). Mind, that updating Application Keys is only possible if the bound Network Key is in Phase 1.ConfigKeyRefreshPhaseSet
withtransition
set to.finalize
to the same set of Nodes. This will transition them to Phase 2 of Key Refresh Procedure, also called "Finalizing". In that phase they will start encrypting message using the new keys, and continue to receive messages (other than Secure Network beacons) using both old or new keys.ConfigKeyRefreshPhaseSet
withtransition
set to.revokeOldKeys
to all Nodes. This will make them forget the old keys and transition to the Phase 0 (Normal Operation).Remember, that all messages in the iOS version of nRF Mesh library must be sent also to the local Node.