unplugged-system/tools/security/remote_provisioning/hwtrust
2025-10-06 13:59:42 +00:00
..
cxxbridge Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
src Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
testdata/dice Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
tests Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
Android.bp Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
Cargo.lock Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
Cargo.toml Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
OWNERS Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
README.md Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
TEST_MAPPING Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00

Hardware trust

Reliable trust in a device's hardware is the basis of a growing set of features, for example remote key provisioning.

libhwtrust

The library for handling, inspecting and validating data realted to the hardware root-of-trust and the features that rely on it is libhwtrust.

hwtrust

There is a command-line utility that provides easy access to the logic in libhwtrust called hwtrust.

Build it as part of Android with m hwtrust and run hwtrust --help to see a list of its functions.

Alternatively, use Cargo by running cargo run -- --help in this directory to build and run the utility. If the Cargo build has errors, please help to keep it working by sending fixes or reporting the problem. Building as part of Android should always work as a fallback.

Verifying DICE chains

hwtrust can be used to validate that a DICE chain is well-formed and check that the signatures verify correctly. To do so, place the CBOR-encoded DICE chain in a file, e.g. chain.bin, then call the tool.

hwtrust verify-dice-chain chain.bin

The exit code is zero if the chain passed verification and non-zero otherwise.