feat(kryphos): add fjall-backed vault storage with advisory locking#35
Merged
forkwright merged 1 commit intomainfrom Mar 17, 2026
Merged
feat(kryphos): add fjall-backed vault storage with advisory locking#35forkwright merged 1 commit intomainfrom
forkwright merged 1 commit intomainfrom
Conversation
Implement Vault struct providing encrypted credential CRUD over fjall. Each entry is individually encrypted with ChaCha20-Poly1305 using a key derived from the user's passphrase via Argon2id. Advisory file locking (fs2) prevents concurrent access. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Consider splitting into smaller PRs for easier review. Not a blocker, just a signal. |
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.
Summary
Vaultstruct backed by fjall for encrypted credential CRUDcreate/openwith Argon2id key derivation and ChaCha20-Poly1305 key check verificationadd/get/list/removefor credential management, each entry individually encryptedTest plan
Vault::create+Vault::openround-trip worksadd→getreturns original secretlistreturns metadata without decrypted secretsremovedeletes the entryopenreturns error (not garbage data)openfails with lock errorcargo fmt --all -- --checkpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepasses (307 tests, 0 failures)Observations
SALT_LENconstants exist (vault::SALT_LEN = 16,crypto::SALT_LEN = 32). The vault header used 16-byte salts; the new storage module uses 32-byte salts fromcrypto::generate_salt(). Should unify. (crates/kryphos/src/vault.rs:12,crates/kryphos/src/crypto.rs:14)DecryptedEntry.secretis a plainVec<u8>. Consider wrapping inzeroize::Zeroizing<Vec<u8>>so secrets are cleared on drop.🤖 Generated with Claude Code