Skip to content

Conform to Gibson's final SQRL spec; release 0.1.2 - #10

Merged
danielpclark merged 1 commit into
mainfrom
spec-conformance-0.1.2
Oct 21, 2026
Merged

danielpclark merged 1 commit into
mainfrom
spec-conformance-0.1.2

Conversation

@danielpclark

@danielpclark danielpclark commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

Audit of the six gems against Steve Gibson's final SQRL documents (December 2019 PDFs) and his latest newsgroup rulings, with his later decisions overriding abandoned earlier designs. The cryptography, S4 storage, wire encoding and TIF vocabulary were already conformant; the server-side transaction logic and the client's stale-nut handling were not. This PR fixes every deviation found; it rides along in the unpublished 0.1.2.

Fixes

Gem Rule (citation) Before After
sqrl-rack CPS: server MUST NOT authenticate the browser session; only the url= token browser gets in (On The Wire v1.07 p.14) polling page completed a CPS login poll and token-less callback refuse logins with a CPS token
sqrl-core suk= MUST be returned whenever opt=suk is present, plus for disabled / previous-ID matches (grc.sqrl:12289, Jan 2016) on query only on every command
sqrl-core TIF describes the post-update state after a re-key (On The Wire p.17; grc.sqrl:22934) 0x07 0x05; disabled state cleared (grc.sqrl:20273)
sqrl-core url= for every non-query command in CPS mode missing on disable issued
sqrl-core sqrlonly/hardlock copied from every successful non-query command (p.7) ident only ident, enable, disable
sqrl-core superseded identity: exactly 0x240 (p.18; grc.sqrl:23020) 0x244 0x240
sqrl-core stale nut on a by-reference server: retry fails identically (grc.sqrl:23543) retry "succeeded" against an orphan pending login fresh nut unregistered, identical 0x60
sqrl-client two identical successive error TIFs: abort and ask the user to refresh (grc.sqrl:23543, 21887) fixed retry count stops on the repeat with GRC's message

Tests

  • New gems/sqrl-core/spec/gibson_rulings_spec.rb pins each rule to its citation.
  • bundle exec rake spec:gems: 497 examples, 0 failures. Integration suite (six example apps, headless Chrome): 240 examples, 0 failures. RuboCop clean.

Changelogs

All six changelogs are reformatted to Keep a Changelog 1.1.0: intro paragraph, [Unreleased], [version] - YYYY-MM-DD headings, Added/Changed/Fixed/Security groups, compare links at the bottom. The links assume v0.1.0, v0.1.1 and v0.1.2 tags, which do not exist on the remote yet.

Release

Rebased onto main after PR #8 (release 0.1.2) and PR #9 (release workflow removed). SQRL::VERSION is already 0.1.2 on main and 0.1.2 is not yet on rubygems.org, so these entries are folded into the existing 0.1.2 changelog sections rather than opening 0.1.3. Releases are built and pushed by hand.

Known, documented differences left for later

sqrl.js probes localhost:25519 once and never fires sqrl://; the QR code carries can=; no Punycode conversion of host names; the loopback-only insecure mode still honours ask/sin/cps; integrations show "login failed" after a CPS disable/remove instead of an acknowledgement. See docs/protocol.md and docs/security.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KbjY2qFzx6ywviQPTia9Ea

@semanticdiff-com

Copy link
Copy Markdown

Review changes with  SemanticDiff

Audit against the December 2019 GRC documents (On The Wire v1.07, Operating
Details v1.01, Cryptography v1.04, Explained v1.03) and Steve Gibson's latest
rulings in the grc.sqrl newsgroup, his later word superseding abandoned designs.

sqrl-core
- Return suk= in the reply to every command when the client sends opt=suk, and
  always for a disabled account or a previous-identity match (grc.sqrl:12289;
  On The Wire p.14). It was returned on query only.
- A successful re-key replies with 0x01 set and 0x02 clear (the post-update
  state) and clears a disabled state (On The Wire p.17; grc.sqrl:20273, 22934).
- disable in CPS mode returns url= like every other non-query command.
- sqrlonly/hardlock are copied from every successful non-query command.
- A superseded identity is refused with exactly 0x240 (grc.sqrl:23020).
- An unknown, expired or reused nut draws a transient error whose fresh nut is
  not registered, so the retry fails identically, the client's cue to have the
  user refresh the page (grc.sqrl:23543). It used to "succeed" against an
  anonymous pending login no browser could complete.
- Handler#status never reports a CPS login; PendingLogin#cps? is new.

sqrl-rack
- A login the client completed with opt=cps can no longer be completed through
  the browser's status poll or a token-less callback: the server "MUST NOT
  authenticate the browser session" in that case (On The Wire, url=). Only the
  browser the client redirects to the one-time token is signed in.

sqrl-client
- After a transient error the agent retries with the fresh nut and stops as soon
  as two successive replies carry the identical TIF, with GRC's "login page has
  expired" message (grc.sqrl:23543, 21887).
- The conformance runner accepts both conforming stale-nut behaviours.

New spec gems/sqrl-core/spec/gibson_rulings_spec.rb pins each rule to its
citation. Docs and all six changelogs updated; the entries join the as yet
unpublished 0.1.2 release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbjY2qFzx6ywviQPTia9Ea
@danielpclark
danielpclark force-pushed the spec-conformance-0.1.2 branch from f4b44a1 to 37f0c64 Compare October 21, 2026 19:48
@danielpclark
danielpclark merged commit cf8cf4b into main Oct 21, 2026
18 checks passed
@danielpclark
danielpclark deleted the spec-conformance-0.1.2 branch October 21, 2026 19:51
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