Repository navigation
1.0.0-alpha.8: security fix, a vault key is taken only with a trusted signature - #26
Merged
Merged
Conversation
Affects the SecretSpace 3 test versions alpha.6 and alpha.7. The app took whatever wrapped vault key the server listed, so a dishonest server could wrap a key of its own, call it a new key generation, and read the vault uploaded under it. - Every wrapped key is signed by the account that wrapped it (account_sync.key_message / sign_key), on create, share and key change. - check_key: a vault this device does not have is taken when signed by its own account or by another account (remembered on first sight, shown as not checked). A new key for a vault it has must be signed by its own account, by the signer of the key it holds, or by a contact whose fingerprint was compared. - Never: an older key generation, another key at the same generation, a key without a signature (KeyNotTrusted; nothing changed, nothing sent). - Vaults from alpha.6/7 are signed at the next sync by a device that holds them. A server without "signed-keys" gets only the Personal vault. - Remove / Change key name the members never checked on this PC. - A plain http:// address of another machine asks before it is used. Needs SecretSpace Server 2.0.0-alpha.5. Tests: test_account_key_trust.py. Co-Authored-By: Claude Fable 5.2 <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.
Security fix for the SecretSpace 3 test versions alpha.6 and alpha.7 (the stable 2.x releases are not affected). Needs SecretSpace Server 2.0.0-alpha.5.
The problem
The server stores each member's wrapped copy of a vault key, and the app took whatever copy the server listed. A dishonest server, or someone who broke into it, could wrap a key of its own to a member's public key, call it a new key generation, and read the vault the app uploaded under it at the next sync. A test reproduced this and read a stored password.
The fix
account_sync.key_message,sign_key,check_key.KeyNotTrusted; nothing is changed and nothing of that vault is uploaded.signed-keys, only the Personal vault syncs.Two smaller fixes from the same review
http://address of another machine asks before it is used (connect, sign in, recovery). On such a connection someone on the network could take over the account on the server, though not read a vault.Tests
test_account_key_trust.py: 24 tests. The server's files are edited directly, as a dishonest server would: unsigned key, wrong signature under the owner's name, signature by an unknown account, a two-step attack through a bait vault, an older generation put back, another key at the same generation, an invented vault. Plus what must keep working: key change by the sharing owner, by a second owner after a fingerprint check, a second device, and vaults from before signatures.tests/sync_server/passman_server.pyis server 2.0.0-alpha.5 (Server PRs #14), byte for byte.🤖 Generated with Claude Code
https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH