Repository navigation
Server 2.0.0-alpha.4: recover an account with its 12-word phrase - #13
Merged
Merged
Conversation
SecretSpace 3, phase 5. - GET /v2/recovery/<name> (no login): the account's keyset under its recovery phrase, for a device that does not have the account. It opens only with the phrase. For a name with no account a made-up copy is returned (same size and header, the same on every ask), so names cannot be probed. - POST /v2/recovery (no login): the device proves it opened the keyset with a value derived from the account's own keys (recovery_proof, stored here only as a hash) and sends the same keys under a new password and a new phrase. Every session of the account ends. Wrong proofs count with wrong logins. - PUT /v2/me/recovery-proof: an account made before this sets its proof once, at its next sync. PUT /v2/me/recovery: a new phrase from a session. - Sign-up takes recovery_proof; /v2/me says can_recover; /health lists "recovery"; logins.log gets account_recovered, recovery_failed and recovery_phrase_changed lines. 2.x routes unchanged; accounts made with earlier 2.0 alphas keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
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.
SecretSpace 3, phase 5, server side: an account can be recovered with its 12-word phrase. Server version 2.0.0-alpha.4 (a test version; Latest stays as it is).
What changes
GET /v2/recovery/<name>(no login): the account's keyset under its recovery phrase, for a device that does not have the account. It opens only with the phrase (128 random bits). For a name with no account a made-up copy comes back (same size and header, the same on every ask), so names cannot be probed.POST /v2/recovery(no login): the device proves it opened the keyset with a value derived from the account's own keys (recovery_proof, stored here only as a hash, like the Login Key), and sends the same keys under a new password and a new phrase. Every session of the account ends. Wrong proofs count with wrong logins.PUT /v2/me/recovery-proof: an account made before this sets its proof once, at its next sync; it cannot be replaced afterwards.PUT /v2/me/recovery: a new phrase, from a session.recovery_proof;/v2/mesayscan_recover;/healthlists"recovery";logins.loggetsaccount_recovered,recovery_failedandrecovery_phrase_changedlines.What does not change
Tests
tests/test_server_v2_recovery.py: 106 tests over real HTTP. Every refused recovery is also checked to have changed nothing on disk.server/passman_server.pyis the same file in SecretSpace-Server-Linux and SecretSpace-Server-Windows.🤖 Generated with Claude Code
https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH