WIP V improve UX [snapshot task 2]

This commit is contained in:
Schluffe committed 2026-10-17 14:51:48 +02:00
1 parent 5f8c6a1916
commit a73b3075b6
16 files changed
+238 -232

No files matched your search

+30 -24
View File
@@ -34,42 +34,48 @@ fresh contributions from both peers prevent replay into a new connection.
The signed fingerprints bind the identity to the encrypted transport. A proof
from another connection cannot authenticate an attacker-controlled DTLS peer.
A local user either compares both full fingerprints or explicitly selects an
expected saved public key. A nickname alone has no protocol meaning. A matching
expected key permits local verification to proceed automatically, but metadata
and file data stay gated until the peer's fresh signature verifies. Unknown,
changed, missing, or downgraded identities require manual fingerprint comparison.
A changed key never replaces a saved contact automatically. An invalid or missing
Each connection opts in separately and trusts at most one public key, its paired
device. A local user either compares both full fingerprints or connects on a
paired connection. A connection name has no protocol meaning. A matching paired
key permits local verification to proceed automatically, but metadata and file
data stay gated until the peer's fresh signature verifies. Unknown, changed,
missing, or downgraded identities require manual fingerprint comparison.
A changed key never replaces a paired device automatically: replacing it is an
explicit, unticked choice on the verification step. An invalid or missing
signature in a negotiated identity session closes the session. Each file still
requires acceptance. The session receive queue is bounded to 2 MiB while signature
verification is pending and throughout transfers; the existing 1 MiB send windows
remain unchanged.
Contacts may only be saved after both peers' ready frames pass verification.
Manual first pairing therefore authenticates the keys through the compared
transport fingerprints and proofs. Public identities in codes are linkable;
the UI makes this explicit before opt-in. No identities or nicknames are added
to diagnostic logs, and nicknames are not sent to peers.
A peer key is only saved to a connection after both peers' ready frames pass
verification, and only if the user left **Remember this device** ticked on the
verification step. Manual first pairing therefore authenticates the keys through
the compared transport fingerprints and proofs. Public identities in codes are
linkable; the UI makes this explicit before opt-in. No identities or connection
names are added to diagnostic logs, and connection names are not sent to peers.
## Storage and recovery
IndexedDB holds a CryptoKey private key, the public key, and at most 100 contacts.
New private keys are non-extractable; existing stored keys remain usable.
The `hellcon-devices` IndexedDB store holds one CryptoKey private key and its
public key, shared by all connections. Each record in `hellcon-connections`
holds its own opt-in flag and paired public key. New private keys are
non-extractable; existing stored keys remain usable.
Browser storage does not protect against compromised app code, a hostile host,
or compromised browser: app code can still use a stored key to sign.
The identity-use checkbox defaults off after page load. Clearing site data loses
identity and contacts; an empty store never creates trust automatically. Storage
errors leave temporary sessions available. Unreadable storage can be explicitly
cleared before creating a new identity and pairing again. Atomic revision checks
reject stale writes from other tabs instead of overwriting a newer identity or
contact list. Identity deletion requires explicit consent and is disabled during
a session.
Before each identity-enabled connection, settings are read again from storage.
A contact forgotten in another tab loses automatic verification on the next
connection; a replaced or deleted local identity requires opting in again.
New connections are not opted in. Creating an identity opts in the connection it
was created from. Clearing site data loses the identity and pairings; an empty
store never creates trust automatically. Storage errors leave temporary sessions
available. Unreadable identity storage can be explicitly cleared before creating
a new identity and pairing again. Atomic revision checks reject stale identity
writes from other tabs; connection records are read and written in single
transactions. Identity deletion requires explicit consent, keeps paired devices,
and is disabled during a session. Removing a connection forgets its device.
Before each identity-enabled connection, the connection record and identity are
read again from storage. A device forgotten in another tab loses automatic
verification on the next connection, and a replaced local identity is picked up.
A failed refresh stops setup instead of using cached trust.
There is no central revocation service. Contacts must forget a compromised key.
There is no central revocation service. Peers must forget a compromised key.
Review checks: both role directions, substitution of either identity, alteration
of either nonce or fingerprint, forged signatures, replay into fresh contexts,
+11 -11
View File
@@ -11,15 +11,15 @@ its setup, transfer controls, and persistent activity timeline. Cached workspace
keep live sessions and file selections intact while navigating between slots.
The sidebar collapses on mobile; network configuration is expandable.
IndexedDB stores slot names, paired-device associations, and up to 50 transfer
IndexedDB stores slot names, paired devices, and up to 50 transfer
results per slot. Each result includes its direction, filename, size, timestamp,
and completion/decline/interruption status. File contents and connection codes
are never stored. Slot mutations are transactional and other tabs refresh their
lists after changes. Storage failures show an explicit warning.
Disconnect and Reset retain history. Reloading ends live sessions and requires
fresh codes; saved identities can authenticate a remembered peer. A slot's device
association only preselects an existing trusted contact and does not grant trust.
fresh codes; a slot's paired device is authenticated by fresh signed proofs, and
setup re-reads it from storage so a device forgotten elsewhere is not trusted.
## 1. Send another file on a verified connection — implemented first
@@ -63,16 +63,16 @@ both directions, real bytes, accessibility, and streaming downloads.
## 3. Remember trusted devices — implemented
The hosted app offers opt-in device identities and up to 100 named contacts in
browser storage. First pairing requires manual fingerprint comparison; contacts
can be saved only after successful mutual verification. Later connections can
select an expected saved public key and verify fresh signed proofs bound to both
keys, both nonces, both DTLS fingerprints, and participant roles. Nicknames and
saved codes never authenticate a peer. Changed or missing identities require
manual comparison and never replace saved contacts automatically.
The hosted app offers an opt-in device identity, and each connection slot can
remember one paired device. First pairing requires manual fingerprint comparison;
a slot is paired only after successful mutual verification. Later sessions on a
paired slot verify fresh signed proofs bound to both keys, both nonces, both DTLS
fingerprints, and participant roles. Slot names and saved codes never
authenticate a peer. Changed or missing identities require manual comparison and
never replace a paired device automatically.
Temporary sessions remain the default, and every file still requires acceptance.
Contact removal, identity deletion, storage failure
Forgetting devices, identity deletion, storage failure
fallback, unreadable-storage recovery, and conflicting-tab write protection are
implemented. Identity-enabled signaling uses v4;
temporary connections retain v3. Browser keys remain accessible to app code.