-
-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Encrypted Reticulum identity key storage #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
torlando-tech
wants to merge
6
commits into
main
Choose a base branch
from
feature/encrypted-identity-keys
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Implements layered AES-256-GCM encryption for identity key protection: - IdentityKeyEncryptor: Core encryption using Android Keystore (device key) with optional PBKDF2-based password protection layer - IdentityKeyMigrator: Silent auto-migration of unencrypted keys at startup - IdentityKeyProvider: Runtime decrypted key access with in-memory caching and lifecycle-aware cleanup when app goes to background Database changes: - Add encryptedKeyData, keyEncryptionVersion, passwordSalt, passwordVerificationHash columns to LocalIdentityEntity - Migration 30→31 for new columns Migration export/import: - Password-protected export encryption for portable backups - MigrationData version bumped to 7 Security properties: - Hardware-backed encryption via TEE/StrongBox - Random IV per encryption for forward secrecy - GCM authentication prevents tampering - Secure memory wiping after use Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
❌ Threading Architecture Audit FailedView Audit ReportPlease fix the dispatcher violations before merging. |
Replace runBlocking with synchronous cache clearing in onStop() lifecycle callback. ConcurrentHashMap is thread-safe for this cleanup scenario. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fix compilation error caused by trailing lambda being interpreted as the new importPassword parameter instead of onProgress. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add mock initializations for keyEncryptor, keyMigrator, and keyProvider parameters that were added to IdentityRepository constructor as part of the encrypted identity key storage feature. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The migration bundle version was bumped to 7 for encrypted identity key support. Update test assertion to match. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test was flaky because yield() doesn't guarantee the collector is
subscribed before downloadRegion starts emitting statuses. Use onStart{}
with CompletableDeferred to ensure the collector is fully subscribed
before starting the download.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Security Properties
Architecture
Files Changed
New files:
IdentityKeyEncryptor.kt- Core AES-256-GCM encryption with KeystoreIdentityKeyMigrator.kt- Auto-migration of unencrypted keysIdentityKeyProvider.kt- Runtime key access with cachingModified files:
LocalIdentityEntity.kt- Added encrypted storage columnsLocalIdentityDao.kt- New queries for encrypted key managementDatabaseModule.kt- Migration 30→31IdentityRepository.kt- Integration with encryption systemMigrationData/Exporter/Importer.kt- Password-protected exportTest plan
🤖 Generated with Claude Code