Repository navigation
PrintVect 0.5.9: host key before every job, 8-character PINs, one-time proofs - #24
Merged
Merged
Conversation
…e proofs The owner's three follow-ups to the 0.5.8 security review: - TcpJobSender checks the PC at the printer's saved address before a job goes there: it must sign a challenge with the remembered host key (MovedHostCheck). A passed check is trusted for 5 minutes; a failed one is HostUnreachableException with the reason, so the job searches for the host and then waits for Retry, saying "Nothing was sent there". A printer without a key learns it here (HostKeyLearned: the app saves config.json). - New sharing PINs need 8 to 12 characters (PinDialog.MinLength, also the Turn on sharing window). A shorter saved PIN keeps working; Settings shows "Short" and a note, and Diagnostics "Sharing PIN is short". - NonceMemory: the host remembers every nonce it accepted until its proof expires (time + 24 h, capped at 100,000, soonest-to-expire dropped first) and refuses one that comes again, counting it as a wrong try. Memory only; a replayed job still cannot print twice after a restart. - Fix (0.5.8 regression): the PIN window is as tall as its content with room for the longest message; its four-line explanation had left the message row no room, so a refused PIN showed nothing. - Tests: the saved-address check (passes, cached, refused, learns), nonce memory rules, an exact copy of an accepted request refused while Retry still works. - Version 0.5.9; protocol.md, SECURITY.md, README, CLAUDE.md, CHANGELOG, testing.md steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFV1W7wPfiMU9itafQutsk
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.
These are the owner's three follow-ups to the 0.5.8 security review, plus a fix for a PIN-window bug introduced in 0.5.8.
Changes
TcpJobSendermakes the PC at the printer's saved address sign a challenge with the remembered host key (MovedHostCheck) before a job goes there. A check that passed is trusted for 5 minutes.HostUnreachableExceptionwith the reason. The job then searches for the host and otherwise waits for Retry, saying "Nothing was sent there".HostKeyLearnedevent makes the app saveconfig.json.NonceMemory: the host remembers every nonce it accepted until its proof expires (the proof's time plus 24 h). It holds at most 100,000, dropping the soonest-to-expire first when full.Version 0.5.9. Also updated:
protocol.md,SECURITY.md,README.md,CLAUDE.md,CHANGELOG.mdanddocs/testing.md(new 0.5.9 section).Checked
Generated by Claude Code