Skip to content
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

Pass phrase in memory. Creat an encrypted message #1252

Closed
DenBond7 opened this issue May 26, 2021 · 2 comments · Fixed by #1290
Closed

Pass phrase in memory. Creat an encrypted message #1252

DenBond7 opened this issue May 26, 2021 · 2 comments · Fixed by #1290
Assignees
Milestone

Comments

@DenBond7
Copy link
Collaborator

as a part of #372

@DenBond7 DenBond7 added this to the 1.1.9 milestone May 26, 2021
@DenBond7 DenBond7 self-assigned this May 26, 2021
@DenBond7
Copy link
Collaborator Author

We have to discuss the current issue. The best place to ask a user the missing passphrase is a screen where we create a message. I see the following logic:

  1. Create an encrypted message
  2. Select recipients
  3. Click on the "Send" button
  4. Check if the primary key(will be discussed later) has a passphrase.
  5. If 4. == yes - use the same logic as we use for the FIX button(the message details screen). We can ask for the missed passphrases of the right keys. When a user will provide at least one missed passphrase -> Send the message.
  6. if 4. == no - Send the message. All as before.

@tomholub Please let me ask you a few questions

  1. If a user has a single key - there are no cases. Just check the single passphrase.

  2. What about a case when we have 2+ private keys? For now, we have a logic where we choose the first founded key and use it for encryption(and signing). I see the following ways:

    • We can select the first founded key that has a provided passphrase. (simpler, don't need to do additional changes in the code)
    • We should have a thing like "primary(active, main) key". A user should mark some key as a primary that will be used for encryption(and signing). In that case, before sending a message we can check if the primary key has a provided passphrase.

@tomholub
Copy link
Collaborator

tomholub commented Jun 11, 2021 via email

DenBond7 added a commit that referenced this issue Jun 11, 2021
DenBond7 added a commit that referenced this issue Jun 14, 2021
DenBond7 added a commit that referenced this issue Jun 14, 2021
* Added an ability to provide missing passphrase before sending a message.| #1252

* Changed logic to use the first matched key always.| #1252

* Fixed a bug with checking keys in FixNeedPassphraseIssueDialogFragment.| #1252

* Added a test. Refactored code.| #1252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants