Issue 372 keep pass phrase in memory#1249
Conversation
…he database version to 25. Refactored code.| #372
… it is possible. Refactored code.| #372
…yEntity.PassphraseType.RAM.| #372
…sViewModel. Refactored code.| #372
# Conflicts: # FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/CheckPrivateKeysViewModel.kt # FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/PrivateKeysViewModel.kt # FlowCrypt/src/main/java/com/flowcrypt/email/security/KeysStorageImpl.kt # FlowCrypt/src/main/java/com/flowcrypt/email/security/SecurityUtils.kt # FlowCrypt/src/main/java/com/flowcrypt/email/security/pgp/PgpKey.kt # FlowCrypt/src/main/java/com/flowcrypt/email/service/actionqueue/actions/BackupPrivateKeyToInboxAction.kt # FlowCrypt/src/main/java/com/flowcrypt/email/service/attachment/AttachmentDownloadManagerService.kt
…Refactored code in KeysStorageImpl.| #372
… a pass phrase for passphraseType == KeyEntity.PassphraseType.RAM.| #372
|
Instead of |
|
The node key caching is causing confusion indeed - just purged pass phrase from memory, but can still decrypt. Since it will take some time before we can completely drop node (while Ivan works on re-implementing parsing messages), we should consider keeping this feature enabled only on debug builds for now. |
Yup. I totally agree. It confuses me too. |
|
Is it possible to restart the node process? That would clear the cache. Otherwise I'd need to add a call for purging cache. Maybe actually there already is one. |
|
Unfortunately, I didn't expose this through an endpoint earlier. |
|
Otherwise it works as expected 👍 |
|
(except the missing UI functionality to re-enter pass phrase in various places) |
I'm not sure that restart it's a good idea. That process is not fast. On slow devices it can take up to 5-7 seconds |
|
That may be ok if it only happens when I click "forget pass phrase" - a rare thing to do |
|
It would allow us to start testing this new functionality with users already now before node is dropped |
Yup. I've created a few issues where we can discuss that. Too many changes need to make for that. |
Got it. Please let me think about that. I'll create a separate issue. |
|
it's ready for a review |
This PR adds a base realization of "keep pass phrase in memory" support
close #372 //
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):