Uh oh!
There was an error while loading. Please reload this page.
Keep pass phrase only in memory - #323
Conversation
tomholub
left a comment
There was a problem hiding this comment.
Just doing a checkpoint review so later I review the delta
Kharchevskyi
commented
May 26, 2021
Kharchevskyi
commented
Jun 1, 2021
Kharchevskyi
commented
Jun 2, 2021
@tomholub in case of saving passphrase and matching key backups locally - does it mean to save it in Keychain? or we can still save them in encrypted Realm storage but keep only for 4 hours? |
tomholub
commented
Jun 2, 2021
via email
for pass phrase in session, keep pass phrase in memory only up to 4 hours.
then wipe pass phrase, but don’t touch stored private key
for pass phrase in storage, as before
in both cases, key storage remains unchanged- encrypt key with pass phrase,
the store key in encrypted realm, long term
let me know if that answers your question …On Wednesday, June 2, 2021, Anton Kharchevskyi ***@***.***> wrote:
@tomholub <https://github.com/tomholub> in case of saving passphrase and
matching key backups locally - does it mean to save it in Keychain? or we
can still save them in encrypted Realm storage but keep only for 4 hours?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#323 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEKRXYTSYOFWB7A5XHDTQZGEFANCNFSM45L7VJPQ>
.
-- --
Tom James Holub <http://holub.me/> |
Kharchevskyi
commented
Jun 3, 2021
@tomholub correct me if I'm wrong please. |
tomholub
commented
Jun 3, 2021
This is correct
yup
I didn't understand this sentence :-) You'll probably want to change the |
@tomholub Mac autocorrected from longid to longed 🙃
Correct. I just didn't want to rename it to
thanks for clarifying! |
tomholub
commented
Jun 4, 2021
@Kharchevskyi for simplicity and smaller PR, on Android, we merged a PR first that only implements the setup flow, but not the message decrypt flow and other parts of app. Then we did PR review. Then we set the checkbox during setup to "disabled" and merged it. After that, you can implement individual other flows that use pass phrase in other PRs. This minimizes merge conflicts and makes it easier to review. |
Kharchevskyi
commented
Jun 4, 2021
@tomholub unfortunately we didn't have split setup. SetupViewController on iOS app was responsible for almost all setup related logic. It was impossible to add additional logic to existed implementation. That's why I had to implement SetupInitialViewController(which responsible for fetching backups and farther navigation), SetupKeyViewController (responsible for setup account with generated key), SetupBackupsViewController and so on. I think I will finish this PR before Sunday. Is it ok? |
tomholub
commented
Jun 4, 2021
No worries, I understand it was not very extendable. Thanks! |
Kharchevskyi
commented
Jun 6, 2021
Kharchevskyi
commented
Jun 7, 2021
@tomholub is it possible for you to check why https://flowcrypt.com/attester/pub/flow.test.anton@gmail.com returns 404? |
There were 1 email addresses found in the above comment. Please:
|
…ure/issue-197-pass-phrase-memory
tomholub
commented
Jun 7, 2021
No public key was submitted for that email address. During setup flow, the app should be calling the attester API to submit the public key. |
tomholub
commented
Jun 14, 2021
Now I was able to use the behavior the way I'd expect, except tests are failing and there is a problem when I enter a wrong pass phrase. To reproduce:
Actual behavior: Expected behavior: This way I can keep trying until I enter a pass phrase that matches or until I give up. |
tomholub
commented
Jun 18, 2021
@Kharchevskyi I'll test this, but could you fix tests? Without it I won't be able to merge. |
Kharchevskyi
commented
Jun 18, 2021
Tests are already fixed |
tomholub
commented
Jun 18, 2021
Ah, didn't notice - will take a look. |
Uh oh!
There was an error while loading. Please reload this page.
tomholub
commented
Jun 18, 2021
I'm removing Codacy from the project, it's not very useful. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…wCrypt/flowcrypt-ios into feature/issue-197-pass-phrase-memory
Uh oh!
There was an error while loading. Please reload this page.
tomholub
left a comment
There was a problem hiding this comment.
Code looks good with some remarks. I'll have a second look at the in-memory storage.
Uh oh!
There was an error while loading. Please reload this page.
tomholub
left a comment
There was a problem hiding this comment.
I understood the code better now. It's the naming that confused me. Please rename classes as suggested in comments below, and for the rest, I'll file another issue.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.







This PR allows to keep pass phrase only in memory
close#197
CreatePrivateKeyViewControllerUnit Tests:
resolveAfterwhich helps to create promise with expected resultDataServicetoKeyDataStorageServicewhich can be mocked for testing purposesManual Tests:
Test next flows:
To be filled by reviewers