Two factors in the browser and on a phone; factors on one device never pair (v0.6.0) #8
Reference in New Issue
Block a user
Delete Branch "feature/web-factors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Core for Custos phase 4 (the phone). Version 0.6.0.
What
custos-wasm: two factors in the browser.factors: a vault's version and factor ids/types from the header.recipient: a one-time key. Its secret half stays in WebAssembly memory and is used once.open_with: any two factors. A factor is the password, a sealed answer (a TOTP release, a device'sapproval), or material the page holds (a passkey's PRF output).
match_code.phone_enrol: the phone makes its approval key and seals it, with the PRF output, to the PC(
pair:<id>). It keeps the key only wrapped with the PRF output.phone_approve: unwraps the key with a fresh PRF output and seals it to a requester.Vault::add_factor_apart,Error::SameDevice. Two factors kept on one device (a phone's passkey andits approval key, a PC's key and its approval key) never open the vault together. Each still pairs with
every other factor. Found while designing the phone: without it, a phone's two factors alone would have
opened the vault behind one Face ID.
custos_seal::sender_code: the match code of a box's ephemeral key. The receiver uses it to confirmwho sealed the box.
sender code), THREAT_MODEL.md (a paired phone's storage).
Tests (84, all pass)
tests/factors.rs:leaves only sealed or wrapped;
SameDevice);later; unknown ids are refused.
Self-review
password, and both go straight into the module.