[seal] Sealed boxes and key import (v0.5.0) #7
Reference in New Issue
Block a user
Delete Branch "feature/seal-import"
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 3: sealed boxes for the factor service, key import, and the header's factor ids. Version 0.5.0.
What
custos-seal(new crate,docs/SEAL.md):contextbinds eachbox to one request.
custos_keys::import(docs/KEYS.md"Importing"):TryFrom<&RsaKeypair>passesptwice.Vault::factor_ids: each factor's id and type from the header alone, so the app can ask the TOTPservice or a paired device for a factor.
Tests (79, all pass)
07×32 →684361, checked independently with Python);ssh-keygenfixture imports with the fingerprintssh-keygen -lprinted;The fixtures are throwaway test keys made for this test only.
factor_idsmatches the unlocked vault's factor list; a v1 file has none.Self-review
x25519-dalek2 (same family ased25519-dalek),chacha20poly1305,hkdfandsha2, with randomness fromSysRng.StaticSecretwithzeroize. It is never serialised, andDebugshows only the match code.
Algorithmis unchanged. Imported RSA-2048 is only a string in the item'salgorithmfield, sodependents' exhaustive matches still compile.