Skip to content

gateway: support local root key#109

Merged
JordanYates merged 12 commits into
mainfrom
feature/key_wrappers
Jan 23, 2026
Merged

gateway: support local root key#109
JordanYates merged 12 commits into
mainfrom
feature/key_wrappers

Conversation

@JordanYates
Copy link
Copy Markdown
Contributor

Add support for using a local root device key with the --root argument.

Depends on the embedded device enabling CONFIG_INFUSE_SECURITY_SECONDARY_REMOTE_ENABLE and the secondary root being present (can be written with infuse rpc security_key_update --secondary-root root.pem)

Rename class fields to more accurately match the standard Infuse-IoT
nomenclature.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Extract the common internals from key derivation functions to internal
helpers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Enable providing a local root key to the gateway script, which is then
passed to the underlying device database for key management.

Signed-off-by: Jordan Yates <jordan@embeint.com>
For `VLACompatLittleEndianStruct` subclasses, `vla_counted_by` always
exists, but can be `None`. Ensure it is not `None` before attempting
to use.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Update RPC definitions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Add wrapper for the `security_public_keys` RPC.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Add a wrapper for writing a secondary device root key.

Signed-off-by: Jordan Yates <jordan@embeint.com>
If a local root identity is provided, query remote devices for secondary
public keys and compute shared secrets if the keys match.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Add the option to provide the device key ID used for the packet to the
key retrieval service. Use this for decrypting data from devices.

Signed-off-by: Jordan Yates <jordan@embeint.com>
If we know the shared key from the secondary (local) root key, use that
instead of the cloud derived key.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Return the key identifier associated with the returned key, as the
caller no longer knows the value.

Signed-off-by: Jordan Yates <jordan@embeint.com>
Handle observing the secondary device key without raising an exception.

Signed-off-by: Jordan Yates <jordan@embeint.com>
@JordanYates JordanYates merged commit a7711d4 into main Jan 23, 2026
7 checks passed
@JordanYates JordanYates deleted the feature/key_wrappers branch January 23, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant