Add Steam Guard TOTP variant (#44) - #97
Merged
Merged
Conversation
sidick
enabled auto-merge (squash)
July 22, 2026 07:10
Steam's mobile authenticator uses the same HMAC-SHA1/30s TOTP construction
as everyone else, but renders the truncated value as 5 characters from
Steam's own 26-symbol alphabet instead of decimal digits. Adds a new
account type ("steam", vault type id 2) with its own renderer
(src/core/steamguard.c, sharing otp.c's RFC 4226 dynamic-truncation step
via the new otp_truncate()), reachable via otpauth://steam/... URIs, a
STEAM switch on the CLI's bare-secret ADD, and the GUI's existing typed-
URI/secret entry point and IPC forwarding. Vectors in
tests/test_steamguard.c were derived independently via Python's stdlib
hmac/hashlib, not this codebase's own HMAC, so the test doesn't just
check the implementation against itself.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Mirrors the ChaCha20 dead-end already documented here: unlike SHA-1 (which backs PBKDF2's iteration-heavy vault KDF), the new primitives each do at most one HMAC per code render, so there's no hot loop for hand-written asm to pay off in. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
sidick
force-pushed
the
issue-44-steam-guard
branch
from
July 22, 2026 08:55
2556b97 to
1f3335d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Stacked on #96 (issue-43-sha2-totp) — targets that branch, not
main, since both touchotp.c's dispatch."steam", vault type id 2) with its own renderer (src/core/steamguard.c), sharingotp.c's RFC 4226 dynamic-truncation step via a newotp_truncate().otpauth://steam/...URIs, aSTEAMswitch on the CLI's bare-secretADD, and the GUI's existing typed-URI/secret entry point (extended IPC forwarding: newAAP_ADD_SECRET_STEAMcommand).Test plan
make test— 292 host unit tests pass, including Steam Guard vectorstests/test_steamguard.cwere derived independently via Python's stdlibhmac/hashlib, not this codebase's own HMAC-SHA1 — so the test isn't just checking the implementation against itselfmake m68k-docker/make gui-docker— plain 68000 baseline cross-builds succeedmake gui-smoke— headless Copperline GUI smoke test passesmake smoke— CLI smoke test passesSTEAMbare-secret flag and anotpauth://steam/...URI, confirmed identical correct codes, and confirmed a plain bare-secret add is unaffecteduserdocs/updated in this PR (new "Steam Guard" section in Managing-Accounts.md, CLI-Reference.md, Troubleshooting-and-FAQ.md);docs/VAULT_FORMAT.mdupdated for the new type id🤖 Generated with Claude Code