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

[Bug] Read-Once messages fail to decrypt every-so-often #20

Open
erreip opened this issue Jun 20, 2016 · 4 comments
Open

[Bug] Read-Once messages fail to decrypt every-so-often #20

erreip opened this issue Jun 20, 2016 · 4 comments

Comments

@erreip
Copy link

erreip commented Jun 20, 2016

Read-Once messages fail to decrypt every-so-often and for no apparent reason.
ISSUE happens sporadically when:

  • recipient and myself are using same mode or
  • recipient and myself are using mixed modes (e.g. Advanced to Basic, Advanced to Advanced, Advanced to Email AND Viceversa)
  • recipient and myself have had successful back-and-forth messages in Read-Once mode
@fruiz500
Copy link
Owner

What is the message? "decryption failed", "no message for you", "decryption successful" but nothing there? Those would point to different causes.
I changed the code recently to make it harder for a Read-once conversation to go out of sync, which was happening, for instance, when the sender sent several messages without waiting for a reply, and the recipient decrypted them in a different order. But this may have introduced other problems.
Thanks for the report.

@erreip
Copy link
Author

erreip commented Jun 21, 2016

fruiz500:
What is the message? "decryption failed", "no message for you", "decryption successful" but nothing there? Those would point to different causes.

Most common error is: "no message for you"
I don't think I've seen the "decryption failed" as much with Read-once

I changed the code recently to make it harder for a Read-once conversation to go out of sync, which was happening, for instance, when the sender sent several messages without waiting for a reply, and the recipient decrypted them in a different order. But this may have introduced other problems.

I think THAT may be the issue, recipient and I may often engage in messages that would (arbitrarily or not) need to be Read-once that ONE time (or more) then a regular 'Anon' or 'Signed' in between then back to Read-once.

Perhaps forcing a reset after each pair of Read-once messages are sent/replied?

@fruiz500
Copy link
Owner

Encrypting Anonymous or Signed messages should not have any influence on Read-once conversations because those modes don't create any ephemeral data (private and public keys) that need to be stored between messages. A "no message for you" error usually comes from the recipient's ID (a part of their public key, after encrypting it with the key made by combining their ephemeral private key and the sender's public key with a ECDH operation) not being the same as that in the message, which usually comes from having gone out of sync so that the stored ephemeral private key does not match the ephemeral public key stored on the sender's end. . . Sorry about the long explanation ;-)
Please report back if this keeps happening even though both sides are in sync and using the latest version.
To get a conversation back in sync, click "Edit" (small button by the directory box), then type the recipient's name in the top box and click the Reset button when the recipient is identified. This deletes the ephemeral data pertaining to that recipient. Next Read-once message from you will be a special message that will delete the ephemeral data also on the recipient's side, after which the exchange of new ephemeral keys will be complete within a couple messages.

@erreip
Copy link
Author

erreip commented Jun 23, 2016

fruiz500: Sorry about the long explanation ;-)

Not at all, thanks for taking the time.
Now that I understand the ephemeral data that becomes part of the recipient's ID when Read-Once is invoked needs reset, I know how to proceed. I'll report back.

FYI: To reset myself's Read-Once I tried to do it from the Edit menu and a prompt states that this should be done form the "Reset" button in Options but, I am unable to find this under any of the interface options.

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

No branches or pull requests

2 participants