Conversation
Fixed initialization Implemented deniable identity store Started key ids from 1 instead of 0
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for a deniable identity key store alongside existing identity flows, adjusts key ID initialization to start from 1, and adds a helper to extract a contact’s display name from a processed envelope.
- Added
try_get_name_as_stringtoProcessedEnvelopefor easier contact name retrieval. - Implemented new
save/is_trusted/get_deniable_identitymethods and wired aDeniableIdentityKeyStorethrough the storage stack and client. - Changed default key ID start value in
KeyManagerfrom 0 to 1 and updated related tests.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| common/src/envelope.rs | Added try_get_name_as_string, unwraps first contact display. |
| client/src/storage/in_memory.rs | Forwarding methods for deniable identity operations. |
| client/src/storage/generic.rs | Introduced deniable_identity_key_store in ProtocolStore. |
| client/src/storage/device.rs | SQL table CRUD for deniable identities; new trait impls. |
| client/src/storage/database.rs | Expanded ClientDB trait with deniable identity methods; new DeniableIdentityKeyStore. |
| client/src/main.rs | Removed old name map, updated login/register to include alias, updated receive/display logic. |
| client/src/key_manager.rs | Changed initial key counters to 1 and updated tests accordingly. |
| client/src/client.rs | Added alias to Client, populated contact lists, wired deniable identity store in encryption/decryption paths. |
| client/client_db/migrations/02-denim/* | Created/dropped DeniableDeviceIdentityKeyStore table. |
Comments suppressed due to low confidence (3)
client/src/storage/device.rs:490
- Calling
.expecton a database operation can panic in production. It would be safer to propagate or map this error toSignalProtocolErrorinstead of unconditionally panicking.
.await.expect("This function cannot return err")
client/src/storage/device.rs:565
- The
try_into()?conversion error isn't mapped toSignalProtocolError, which may lead to an unexpected error type. Consider wrapping this in.map_err(...)to return a consistent error variant.
.as_slice().try_into()?,
client/src/storage/device.rs:443
- No unit tests cover
save_deniable_identity,is_trusted_deniable_identity, orget_deniable_identity. Adding tests would ensure new database logic is verified and prevent regressions.
async fn save_deniable_identity(
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.
Fixed initialization
Implemented deniable identity store
Started key ids from 1 instead of 0