PassLok-Privacy icon indicating copy to clipboard operation
PassLok-Privacy copied to clipboard

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

Open erreip opened this issue 9 years ago • 4 comments

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

erreip avatar Jun 20 '16 19:06 erreip

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.

fruiz500 avatar Jun 21 '16 15:06 fruiz500

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?

erreip avatar Jun 21 '16 19:06 erreip

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.

fruiz500 avatar Jun 21 '16 20:06 fruiz500

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.

erreip avatar Jun 23 '16 13:06 erreip