-
Notifications
You must be signed in to change notification settings - Fork 11
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. Decrypt a message #1251
Comments
This one is the most important of similar issues. |
@tomholub Let me ask you a few questions about the logic. When we noticed the NEED_PASSPHRASE error what should we do?
|
Option 2 is definitely better |
Let's imagine that we try to decrypt some message and receive the following error {
"type": "decryptErr",
"content": "---...---",
"decryptErr": {
"success": false,
"error": {
"type": "need_passphrase",
"message": "Missing pass phrase"
},
"longids": {
"message": [
"D7A3DEDB65CB1EFB",
"4F1458BD22B7BB53"
],
"matching": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
],
"chosen": [],
"needPassphrase": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
]
},
"isEncrypted": true
},
"complete": true
} What about |
possibly. if the message was encrypted for two keys, and you have both, and
both are missing pass phrase.
in that case, you only need pass phrase for any one of the two to decrypt
the message.
…On Thursday, June 3, 2021, Den ***@***.***> wrote:
@tomholub <https://github.com/tomholub>
Let's imagine that we try to decrypt some message and receive the
following error
{
"type": "decryptErr",
"content": "---...---",
"decryptErr": {
"success": false,
"error": {
"type": "need_passphrase",
"message": "Missing pass phrase"
},
"longids": {
"message": [
"D7A3DEDB65CB1EFB",
"4F1458BD22B7BB53"
],
"matching": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
],
"chosen": [],
"needPassphrase": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
]
},
"isEncrypted": true
},
"complete": true
}
What about needPassphrase: can we have more than 1 element here?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1251 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQDZEKZUZLBK27WGH5JGG3TQ54XVANCNFSM45RQHNWQ>
.
--
--
Tom James Holub <http://holub.me/>
|
@tomholub One more question. Is there a situation when we have the following: |
…rase for the given keys only (filtered by a fingerprint). Refactored code.| #1251
Need to add tests for the following cases
|
That shouldn't happen. You could make an acra report for this. |
I've found an interesting behavior. Let me provide steps:
{
"type": "decryptErr",
"content": "---...---",
"decryptErr": {
"success": false,
"error": {
"type": "need_passphrase",
"message": "Missing pass phrase"
},
"longids": {
"message": [
"D7A3DEDB65CB1EFB",
"4F1458BD22B7BB53"
],
"matching": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
],
"chosen": [],
"needPassphrase": [
"3DEBE9F677D5B9BB38E5A244225F8023C20D0957"
]
},
"isEncrypted": true
},
"complete": true
}
{
"type": "decryptErr",
"content": "---...---",
"decryptErr": {
"success": false,
"error": {
"type": "need_passphrase",
"message": "Missing pass phrase"
},
"longids": {
"message": [
"D7A3DEDB65CB1EFB",
"4F1458BD22B7BB53"
],
"matching": [
"868AD9D0A54CF0E8A188D4820BF67A84CAB84A5A",
"39202AB83667ADF3AC87E28AEFE0DFD8E30D9F23",
"9D23DCD96224DED21A5C1AB38C0661EEF4B22DCD",
"3A5BCBE96D1FEABE7E3CA91E732201290C68E3DA",
"27EB4C42D3AC343D4C9EDA8740A2DD702DD0CD1E",
"C223AF94FA02D2F3465A64670F610EA685B111FA"
],
"chosen": [],
"needPassphrase": [
"868AD9D0A54CF0E8A188D4820BF67A84CAB84A5A",
"39202AB83667ADF3AC87E28AEFE0DFD8E30D9F23",
"9D23DCD96224DED21A5C1AB38C0661EEF4B22DCD",
"3A5BCBE96D1FEABE7E3CA91E732201290C68E3DA",
"27EB4C42D3AC343D4C9EDA8740A2DD702DD0CD1E",
"C223AF94FA02D2F3465A64670F610EA685B111FA"
]
},
"isEncrypted": true
},
"complete": true
}
|
It's expected behavior as far as when it was designed, but I think we could start considering it a bug today. Sometimes you may receive a message that was badly constructed: it's encrypted for your key A, but it says it's encrypted for B and C. You have no key B or C, you only have A and it looks like you cannot decrypt the message because of key mismatch. But when you actually enter the pass phrase for A, and try decryption, it will decrypt. This situation results from an error on sender side and therefore we don't have to support it anymore. I'll see if I can easily change it in NodeJS. |
Looks good. "missed pass phrase" -> "missing pass phrase" :-) |
I'm going to add a few tests and this issue will be completed. |
* Added some UI and logic. Refactored code.| #1251 * Modified a logic in FixEmptyPassphraseDialogFragment. Improved UI.| #1251 * Added logic to re-decrypt a message automatically when a user added a missed passphrase.| #1251 * Improved logic and UI.| #1251 * Cahnged logic in FixNeedPassphraseIssueDialogFragment to ask a passphrase for the given keys only (filtered by a fingerprint). Refactored code.| #1251 * Added handling some errors.| #1251 * Improved CheckPrivateKeysViewModel.| #1251 * Added an action button to the error layout.| #1251 * flowcrypt-email-server:0.0.3| #1251 * Added tests.| #1251 * Added using 'keyCacheWipe' endpoint. Fixed tests.| #1251
as a part of #372
The text was updated successfully, but these errors were encountered: