Skip to content
Merged
Show file tree
Hide file tree
Changes from 134 commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
c16d1de
Revise README: Describe how it will be used with Sigsum
mchack-work Aug 15, 2025
fbdbbfb
Add experimental sigsum support to verify
mchack-work Aug 19, 2025
e5c7fa8
Support both vendor signatures and Sigsum proofs
mchack-work Aug 19, 2025
e11d99b
Add test data for sigsum verification
mchack-work Aug 19, 2025
68fe257
doc: Escape newlines in JSON
mchack-work Aug 19, 2025
209bb90
Add tool to sigsum log devices and generate verification files
agren Aug 20, 2025
ee2ba59
Simplify errors
mchack-work Aug 21, 2025
0c92b08
Move Verification type to own package
mchack-work Aug 21, 2025
67bb581
Re-arrange to internal packages
mchack-work Aug 22, 2025
37ce4bd
Add VerifyProofDigest() for verifiying the raw hash
mchack-work Aug 22, 2025
77069f3
Add initial tests for verification
mchack-work Aug 22, 2025
2c0e7a2
Update signing procedure diagram use Sigsum
agren Aug 25, 2025
3314aa8
doc: Revise README
mchack-work Aug 25, 2025
be73c59
doc: Revise README
mchack-work Aug 26, 2025
48657fc
vendorkey: Prepare to be initialized from different sources
mchack-work Aug 26, 2025
5e31820
Add simple test to verify vendor signatures
mchack-work Aug 26, 2025
2731104
Add missing arg to fmt.Errorf()
mchack-work Aug 26, 2025
1b5e84e
Add test to verify message with proof, not just raw hash
mchack-work Aug 26, 2025
5555073
Lose debug print
mchack-work Aug 26, 2025
4e186e2
Clean up verify()
mchack-work Aug 26, 2025
fe50bc7
Update tkeyclient and its deps
mchack-work Sep 3, 2025
f305877
verify: Introduce --sigsum to demand a Sigsum proof
mchack-work Sep 3, 2025
d7776c7
docs: Revise README
mchack-work Sep 4, 2025
2bbb282
log-submit: Switch to using the new verification package
agren Aug 25, 2025
657b49b
serve-signer: Create submission request file instead of verification …
agren Aug 26, 2025
1050e58
remotesign: Use new tk.Challenge method
agren Aug 28, 2025
0e099f2
Test Submission JSON encoding/decoding
agren Sep 3, 2025
6a4ef18
Assume latest Bellatrix firmware when detecting a default TKey
agren Sep 2, 2025
7f91c01
verify: Verify sigsum proof using default TKey pubkey for now
agren Sep 3, 2025
7aae007
Add missing err message
agren Sep 5, 2025
ce5670c
Test sigsum log submission
agren Aug 22, 2025
d75afc8
Add state to fake sigsum server
agren Sep 2, 2025
9cbd39c
submit: Move submission, verification and policy test strings to files
agren Sep 3, 2025
e5d3aa7
submit: Extract file processing loop from main()
agren Sep 3, 2025
30c3b9b
submit: Remove proof debug print
agren Sep 3, 2025
b284f15
submit: Add parameterized test
agren Sep 4, 2025
23b5e15
submit: Move submission files once processed
agren Sep 4, 2025
c905433
submit: Abort if verification directory is not empty
agren Sep 4, 2025
d5f2d8c
submit: Name test directories for easier debugging
agren Sep 4, 2025
e778dbb
submit: Abort if processed submissions directory is not empty
agren Sep 4, 2025
32398a9
submit: Move test parameters to named struct for readability
agren Sep 4, 2025
1ee129c
submit: Make sure all submission files can be opened before logging a…
agren Sep 4, 2025
58fec41
submit: Move all test samples to the same directory
agren Sep 5, 2025
2c0fbac
submit: Break out test sample copying code
agren Sep 5, 2025
66d35de
submit: Add tkey-sigsum-submit to Makefile
agren Sep 5, 2025
601783e
Move doc string to correct function
mchack-work Sep 5, 2025
fbac5ea
Introduce SigsumLog type and methods
mchack-work Sep 5, 2025
777c402
submit: Move repetitive test assertions into helper functions
agren Sep 5, 2025
60002aa
submit: Mark assertions as test helpers to get useful line numbers on…
agren Sep 5, 2025
b8e9f62
submit: Document test
agren Sep 9, 2025
4e80a74
doc: Add tkey-sigsum-submit to Testing chapter
agren Sep 9, 2025
8ba735e
doc: Document submit request file
agren Sep 9, 2025
4a6cdd7
doc: Replace inline example files with links to test files
agren Sep 9, 2025
f7064c4
doc: Clarify what data is sent to the monitor
agren Sep 9, 2025
61a609a
Move Sigsum static data to internal/data
mchack-work Sep 8, 2025
21e39a3
Move firmwares.go to package internal/firmware
mchack-work Sep 8, 2025
01c95ab
Refactor remoteSign()
mchack-work Sep 8, 2025
19f88c0
Add SPDX to verification
mchack-work Sep 8, 2025
6b3c1f5
Break out tkey-verify as its own program
mchack-work Sep 8, 2025
9bf3bf4
Move embedded vendor pubkey to internal/data
mchack-work Sep 8, 2025
0c86e11
doc: Update location of embedded device apps
mchack-work Sep 8, 2025
345923d
Change types for appbin hashes
mchack-work Sep 8, 2025
7b488f0
firmwares: Store embedded firmware data as simple lines instead
mchack-work Sep 8, 2025
b61f2be
submit: Use embedded policy from internal/data
mchack-work Sep 9, 2025
dd9fb0c
Add test Sigsum submit key
mchack-work Sep 9, 2025
b39ba77
Teach show-pubkey how to print the pubkey in SSH format
mchack-work Sep 9, 2025
a251b2c
submit: Update help text
mchack-work Sep 10, 2025
986cb1a
Add man page for tkey-sigsum-submit
mchack-work Sep 10, 2025
da15f40
doc: Update tkey-verify man page
mchack-work Sep 10, 2025
115930c
doc: Update man page for tkey-verification
mchack-work Sep 10, 2025
e886ee4
submit: Add spdx to .go files
agren Sep 10, 2025
b93ba52
spdx: Change types for appbin hashes - util.go
agren Sep 10, 2025
e48e64b
submit: Add testdata to REUSE.toml
agren Sep 10, 2025
63c5996
spdx: Add man page for tkey-sigsum-submit
agren Sep 10, 2025
5f0eeb2
spdx: Re-arrange to internal packages - Move bins to internal/appbins
agren Sep 10, 2025
a737e82
spdx: doc/tkey-verify.*
agren Sep 10, 2025
7a9341f
spdx: internal/ssh/README.md
agren Sep 10, 2025
fcb8147
spdx: Remove stray verifications folder
agren Sep 10, 2025
947e974
Remove spdx-ensure since its functionality is covered by REUSE.toml
agren Sep 10, 2025
093635a
gitignore: tkey-verify
agren Sep 10, 2025
87269d0
gitignore: tkey-sigsum-submit
agren Sep 10, 2025
b1b1bde
Fix out-of-sync comments in firmware_test:TestWrongFirmware
agren Sep 10, 2025
5de849e
verify: Fill in vendorkeys & Sigsum config early
agren Sep 11, 2025
3b99e83
Move separate buildMessage implementations to util
agren Sep 11, 2025
3c641bc
Tidy tkey-verify.scd
agren Sep 11, 2025
3890f66
Add --version to tkey-verify & tkey-sigsum-submit
mchack-work Sep 11, 2025
3e2941a
Update golangci-lint config to new config format
mchack-work Sep 11, 2025
26b5283
ci: Update to new golangci-lint
mchack-work Sep 12, 2025
c798f3d
ci: Remove SPDX check
mchack-work Sep 12, 2025
18708b3
Follow initialism and acronym style rules
agren Sep 12, 2025
ef0037f
Follow perfsprint linting rules
agren Sep 12, 2025
693ac7d
Follow errorlint linting rules
agren Sep 12, 2025
fb7c08c
Remove unused functions
agren Sep 12, 2025
08b236d
Fix typos
agren Sep 12, 2025
baf07ca
Check error
agren Sep 12, 2025
72257e4
Follow revive indent-error-flow linting rule
agren Sep 12, 2025
8477ab7
Use bytes.Equal instead of bytes.Compare unless necessary
agren Sep 12, 2025
a6310c7
Create files with 0600 mode instead of 0644
agren Sep 12, 2025
415de01
Remove todo
agren Sep 12, 2025
6c0c05c
Silence gosec false positives
agren Sep 12, 2025
513917d
Disable testpackage linter
agren Sep 12, 2025
59c686d
Follow wrapcheck linting rules
agren Sep 12, 2025
b508ae3
Silence gosec false positive
agren Sep 15, 2025
cdc6675
lint: Allow package name "util"
agren Sep 15, 2025
cc0483e
Follow revive linting rules
agren Sep 15, 2025
425fa1d
Follow govet shadow rule
agren Sep 15, 2025
2878067
Change Sigsum submit key configuration
mchack-work Sep 15, 2025
a822796
Add support for Sigsum submit key lifetimes
mchack-work Sep 18, 2025
45e6ce8
Increase test submit key lifetime to ~100 years
agren Sep 19, 2025
129c739
submit: Verify witness timestamps
agren Sep 19, 2025
2a65f60
submit: Use policy from embedded sigsum configuration
agren Sep 19, 2025
d087dbb
verify: Allow forcing sigsum verification using flag --sigsum
agren Sep 19, 2025
fb21a7d
Return error if submit key is not found
agren Sep 19, 2025
ca151e5
Print sigsum submit key used in verified proof
agren Sep 19, 2025
dc584da
Change type of argument ssh public key helper functions
mchack-work Sep 19, 2025
0de24ec
Use own copy of Sigsum log config in submission tests
mchack-work Sep 19, 2025
969a8de
doc: Update vendor's public key chapter to mention sigsum
agren Sep 22, 2025
bac46fd
Add new signer with tag tkey-verification1
mchack-work Sep 22, 2025
a47d568
doc: Update tkey-verification man page
mchack-work Sep 22, 2025
3bb3c54
doc: Update README about maintainance
mchack-work Sep 22, 2025
a3266e2
build: Bump to tkey-builder:5rc2
mchack-work Sep 22, 2025
132ea78
doc: Revise README, break out design, integrate implementation notes
mchack-work Sep 22, 2025
967a863
Reenable --verbose flag for remote-sign
agren Sep 23, 2025
bd1d2ee
ci: Add go test
mchack-work Sep 23, 2025
4f447cb
Remove -build flag from tkey-verify
mchack-work Sep 23, 2025
ae56f3d
Add Sigsum config to --build
mchack-work Sep 23, 2025
7ce288b
doc: Add release notes for upcoming release
mchack-work Sep 23, 2025
d33277b
doc: fixup
agren Sep 23, 2025
2089220
doc: Fix links
agren Sep 24, 2025
243a021
doc: Remove duplicate monitor step
agren Sep 24, 2025
f276751
Remove flags that are remainders from the split to tkey-verify
dehanj Oct 1, 2025
8acae09
submit: Make sure post-submission and verification dir are different
dehanj Oct 1, 2025
6d24fb3
submit: make the help message a bit cleaner
dehanj Oct 1, 2025
d6bac6a
doc: fix typos
dehanj Oct 1, 2025
16e9bbb
doc: Revise design document
mchack-work Oct 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: check for SPDX tags
run: ./tools/spdx-ensure

- name: make
run: make

- name: tests
run: go test ./...

reuse-compliance-check:
runs-on: ubuntu-latest
steps:
Expand Down
41 changes: 6 additions & 35 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,19 @@ on:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# Optional: allow read access to pull requests. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '1.21'
cache: false
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v8
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.55.2

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true, then all caching functionality will be completely disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
version: v2.4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/dist
/show-pubkey
/tkey-verification
/tkey-sigsum-submit
/tkey-verify
/certs


107 changes: 81 additions & 26 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,92 @@
version: "2"
linters:
presets:
# found in: golangci-lint help linters
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
# - style # turned off, can be too much
- test
- unused
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- contextcheck
- dupword
- durationcheck
- errchkjson
- errorlint
- exhaustive
- fatcontext
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- gocyclo
- godox
- gomoddirectives
- gomodguard
- gosec
- gosmopolitan
- loggercheck
- maintidx
- makezero
- misspell
- musttag
- nilerr
- nilnesserr
- perfsprint
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- spancheck
- sqlclosecheck
- testableexamples
- testifylint
- thelper
- tparallel
- usetesting
- wrapcheck
- zerologlint
disable:
- cyclop
- depguard
- exhaustruct
- funlen
- gci
- gocognit
- gofumpt
- nestif
- exhaustruct # TODO? annoying for now
- godot
- depguard
- nestif
- noctx
- unparam

- err113
- paralleltest
- recvcheck
- testpackage
settings:
govet:
enable:
- shadow
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
rules:
- linters:
- revive
text: "var-naming: avoid meaningless package names"
issues:
max-issues-per-linter: 0
max-same-issues: 0

linters-settings:
govet:
enable:
- shadow
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
23 changes: 20 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@ shasum = sha512sum
CGO = 0

.PHONY: all
all: tkey-verification
all: tkey-sigsum-submit tkey-verification tkey-verify

# APP_VERSION ?= $(shell git describe --dirty --always | sed -n "s/^v\(.*\)/\1/p")
APP_VERSION ?= $(shell git describe --dirty --always | sed -n "s/^v\(.*\)/\1/p")

# .PHONY to let go-build handle deps and rebuilds
.PHONY: tkey-sigsum-submit
tkey-sigsum-submit:
CGO_ENABLED=$(CGO) go build -ldflags "-w -X main.version=$(APP_VERSION) -buildid=" -trimpath -buildvcs=false ./cmd/tkey-sigsum-submit

.PHONY: tkey-verify
tkey-verify:
CGO_ENABLED=$(CGO) go build -ldflags "-w -X main.version=$(APP_VERSION) -buildid=" -trimpath -buildvcs=false ./cmd/tkey-verify

.PHONY: tkey-verification
tkey-verification:
CGO_ENABLED=$(CGO) go build -ldflags "-w -X main.version=$(APP_VERSION) -buildid=" -trimpath -buildvcs=false ./cmd/tkey-verification
./tkey-verification --version

.PHONY: podman
podman:
podman run --arch=amd64 --rm --mount type=bind,source=$(CURDIR),target=/src -w /src -it ghcr.io/tillitis/tkey-builder:4 make -j
podman run --arch=amd64 --rm --mount type=bind,source=$(CURDIR),target=/src -w /src -it ghcr.io/tillitis/tkey-builder:5rc2 make -j

.PHONY: check-digests
check-digests:
Expand All @@ -23,14 +32,22 @@ check-digests:
$(shasum) -c verisigner-v0.0.3.bin.sha512

.PHONY: man
man: doc/tkey-verification.1
man: doc/tkey-verification.1 doc/tkey-verify.1 doc/tkey-sigsum-submit.1

doc/tkey-verification.1: doc/tkey-verification.scd
scdoc < $^ > $@

doc/tkey-verify.1: doc/tkey-verify.scd
scdoc < $^ > $@

doc/tkey-sigsum-submit.1: doc/tkey-sigsum-submit.scd
scdoc < $^ > $@

.PHONY: clean
clean:
rm -f tkey-sigsum-submit
rm -f tkey-verification
rm -f tkey-verify

.PHONY: lint
lint:
Expand Down
Loading