Skip to content

Import tlvtool from mutask with history - #328

Open
mfield4 wants to merge 7 commits into
mutask-graftfrom
tlvtool-graft
Open

mfield4 wants to merge 7 commits into
mutask-graftfrom
tlvtool-graft

Conversation

@mfield4

@mfield4 mfield4 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part 3 of 3 (#324, #327, #328).

This PR imports tlvtool (a host tool for building, signing, and inspecting TLV records like key rotation records) from mutask with its commit history intact, and moves it to tools/tlvtool.

Please merge with "Rebase and merge" (not squash) to keep the imported commit history. The imported commits still use the pre-#327 crate names and paths, so only the PR head builds.

What to review

Commits 1-6 are imported history from mutask with original author, dates, and commit messages preserved. They were already reviewed in mutask, so there's no need to review them line by line.

Commit 7 (tlvtool: Build in libhoth under tools/tlvtool) is the only new commit in libhoth. It moves tlvtool/ to tools/tlvtool/, updates labels and crate/proto names to //shared/... and openprot_* from #327, and looks up the binary under _main in runfiles.

Note that tlvtool krr sign currently attaches signatures without verifying them; verification depends on the vendored PQC library mentioned in #327 and will be added when that lands.

History import

This uses the same filter pass from contrib/libhoth_graft/ as #327: filtering to tlvtool/, scrubbing internal names and comments, stripping Change-Id: and Bug: footers, and adding Apache-2.0 headers. The public keys embedded in src/crypto.rs and tests/cli_test.rs are test keys.

Googlers with mutask access can verify commits 1-6 from the same /tmp/libhoth-graft checkout used in #327:

git fetch https://github.com/google/libhoth mutask-graft:mutask-graft tlvtool-graft:tlvtool-graft
<mutask>/contrib/libhoth_graft/verify.py mutask-graft..tlvtool-graft
# expect: 6 imported (graft #32..#37 of 37), 0 mismatched, 1 not imported
<mutask>/contrib/libhoth_graft/audit.py mutask-graft..tlvtool-graft

@mfield4
mfield4 changed the base branch from main to mutask-graft November 9, 2026 20:09
@mfield4
mfield4 added this pull request to stack #329 November 9, 2026 20:09
@mfield4
mfield4 removed this pull request from stack #329 November 10, 2026 00:13
@mfield4
mfield4 changed the base branch from mutask-graft to mutask-graft-cleanup November 10, 2026 00:14
@mfield4
mfield4 added this pull request to stack #332 November 10, 2026 00:14
@mfield4
mfield4 removed this pull request from stack #332 November 10, 2026 00:35
@mfield4
mfield4 changed the base branch from mutask-graft-cleanup to mutask-graft November 10, 2026 00:37
An error occurred while trying to automatically change base from mutask-graft-cleanup to mutask-graft November 10, 2026 00:37
@mfield4
mfield4 added this pull request to stack #333 November 10, 2026 00:37
@mfield4 mfield4 changed the title Tlvtool graft Import tlvtool from mutask with history Nov 10, 2026
@mfield4
mfield4 marked this pull request as ready for review November 10, 2026 00:42
@mfield4
mfield4 force-pushed the tlvtool-graft branch 4 times, most recently from 989d4e5 to 74ef727 Compare November 13, 2026 19:28
Build each record through the public builder API and compare the whole
inspect report to a committed golden file. This covers byte offsets, word
counts, padding and the shape of the tree, none of which a search for tag
names can check.

Regenerate with:
  UPDATE_GOLDEN=1 bazel run //tlvtool/tests:inspect_test
tlvtool joins the other host tools under tools/. Point it at the TLV
libraries in shared/ and their openprot_* crate and proto names, and find
the binary under the main repository (_main) in runfiles.
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