Conversation
tomholub
left a comment
There was a problem hiding this comment.
Just doing a checkpoint review so later I review the delta
|
@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? |
|
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/>
|
|
@tomholub correct me if I'm wrong please. |
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! |
|
@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. |
|
@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? |
|
No worries, I understand it was not very extendable. Thanks! |
|
@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
|
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. |
|
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. |
|
@Kharchevskyi I'll test this, but could you fix tests? Without it I won't be able to merge. |
|
Tests are already fixed |
|
Ah, didn't notice - will take a look. |
|
I'm removing Codacy from the project, it's not very useful. |
FlowCrypt/Controllers/Setup/SetupEnterPassPhraseViewController.swift
Outdated
Show resolved
Hide resolved
FlowCrypt/Functionality/Mail Provider/Message Provider/MessageService.swift
Outdated
Show resolved
Hide resolved
FlowCrypt/Functionality/Mail Provider/Message Provider/MessageService.swift
Outdated
Show resolved
Hide resolved
FlowCrypt/Functionality/Services/Key Services/PassPhraseStorage.swift
Outdated
Show resolved
Hide resolved
…wCrypt/flowcrypt-ios into feature/issue-197-pass-phrase-memory
FlowCrypt/Functionality/Mail Provider/Message Provider/MessageService.swift
Show resolved
Hide resolved
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.
FlowCrypt/Functionality/Mail Provider/Message Provider/MessageService.swift
Show resolved
Hide resolved
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.







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