Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new secret-key storage abstraction intended to support “durable keys” (disk/HSM/WebCrypto/etc.) by plumbing a SecretKeyStore type parameter through the Keyhive core types and adding initial store implementations (in-memory for core, IndexedDB-backed for wasm).
Changes:
- Added
SecretKeyStore(core) andMemorySecretKeyStoreas the default in-memory implementation. - Added
AsyncSecretKeytrait (crypto) to support opaque/non-extractable secret-key handles and async ECDH operations. - Threaded the
SecretKeyStoretype parameter through core principals/events/listeners, updated tests/benches, and added a wasm IndexedDB-backedJsSecretKeyStorescaffold.
Reviewed changes
Copilot reviewed 57 out of 57 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| keyhive_wasm/src/js/signed_revocation.rs | Plumb JsSecretKeyStore into types |
| keyhive_wasm/src/js/signed_invocation.rs | Plumb JsSecretKeyStore into types |
| keyhive_wasm/src/js/signed_delegation.rs | Plumb JsSecretKeyStore into types |
| keyhive_wasm/src/js/secret_key_store.rs | New IndexedDB-backed store (Rust) |
| keyhive_wasm/src/js/secret_key_store_idb.js | New IndexedDB helper (JS) |
| keyhive_wasm/src/js/revocation.rs | Add store type param |
| keyhive_wasm/src/js/peer.rs | Add store type param |
| keyhive_wasm/src/js/membership.rs | Add store type param |
| keyhive_wasm/src/js/membered.rs | Add store type param |
| keyhive_wasm/src/js/keyhive.rs | InnerKeyhive now uses JsSecretKeyStore |
| keyhive_wasm/src/js/invocation.rs | Add store type param |
| keyhive_wasm/src/js/history.rs | Add store type param |
| keyhive_wasm/src/js/group.rs | Add store type param |
| keyhive_wasm/src/js/event.rs | Add store type param |
| keyhive_wasm/src/js/event_handler.rs | Listener trait param updated |
| keyhive_wasm/src/js/document.rs | Add store type param |
| keyhive_wasm/src/js/delegation.rs | Add store type param |
| keyhive_wasm/src/js/capability.rs | Add store type param |
| keyhive_wasm/src/js/archive.rs | Archive errors param updated |
| keyhive_wasm/src/js/agent.rs | Add store type param |
| keyhive_wasm/src/js.rs | Export new wasm module |
| keyhive_crypto/src/share_key.rs | Add AsyncSecretKey + from_bytes |
| keyhive_core/tests/encrypt.rs | Update generics/store types in tests |
| keyhive_core/src/test_utils.rs | Update helper Keyhive type params |
| keyhive_core/src/store/secret_key/memory.rs | New in-memory store implementation |
| keyhive_core/src/store/secret_key.rs | New SecretKeyStore trait |
| keyhive_core/src/store/revocation.rs | Add store type param |
| keyhive_core/src/store/delegation.rs | Add store type param |
| keyhive_core/src/store.rs | Export store::secret_key |
| keyhive_core/src/principal/public.rs | Plumb store type param |
| keyhive_core/src/principal/peer.rs | Plumb store type param |
| keyhive_core/src/principal/membered.rs | Plumb store type param |
| keyhive_core/src/principal/group/state.rs | Plumb store type param |
| keyhive_core/src/principal/group/revocation.rs | Plumb store type param |
| keyhive_core/src/principal/group/membership_operation.rs | Plumb store type param |
| keyhive_core/src/principal/group/dependencies.rs | Plumb store type param |
| keyhive_core/src/principal/group/delegation.rs | Plumb store type param |
| keyhive_core/src/principal/group.rs | Plumb store type param |
| keyhive_core/src/principal/document.rs | Plumb store type param |
| keyhive_core/src/principal/agent.rs | Plumb store type param |
| keyhive_core/src/principal/active.rs | Add store type param to Active |
| keyhive_core/src/listener/no_listener.rs | Listener trait param updated |
| keyhive_core/src/listener/membership.rs | Listener trait param updated |
| keyhive_core/src/listener/log.rs | Plumb store type param |
| keyhive_core/src/listener/deque.rs | Plumb store type param |
| keyhive_core/src/keyhive.rs | Plumb store type param through Keyhive |
| keyhive_core/src/invocation.rs | Plumb store type param |
| keyhive_core/src/event.rs | Plumb store type param |
| keyhive_core/src/debug_events/terminal.rs | Update doc example generics |
| keyhive_core/src/debug_events.rs | Update debug table generics |
| keyhive_core/src/crypto/signed_ext.rs | Plumb store type param |
| keyhive_core/src/ability.rs | Plumb store type param |
| keyhive_core/benches/bench_utils.rs | Update bench type aliases |
| keyhive_core/benches/bench_toggling_delegate_revoke.rs | Update bench generics |
| keyhive_core/benches/bench_reverse_topsort.rs | Update bench generics |
| keyhive_core/benches/bench_reachable_prekey_ops.rs | Update bench generics |
| keyhive_core/benches/bench_cgka_propagation.rs | Update bench generics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Use a persistent key cache. Disk, HSM, WebCrypto, etc etc