AnemoneLabs / nymphemeral

Ephemeral pseudonym client
GNU General Public License v3.0
5 stars 1 forks source link

Undecrypted Message #34

Open PowerPress opened 9 years ago

PowerPress commented 9 years ago

I have gotten several undecrypted messages, which were probably messages I have previously viewed with the app. if you dont save to disk and then recheck for messages and select a different message then it will continue to show as undecrypted right?

Anyway to prevent it from showing undecrypted message for messages it has already seen? Otherwise overtime you will build a massive list of previous messages as they will all show undecrypted.

felipedau commented 9 years ago

I have gotten several undecrypted messages, which were probably messages I have previously viewed with the app. if you dont save to disk and then recheck for messages and select a different message then it will continue to show as undecrypted right?

I believe you mean undecipherable. And you are right: those messages probably have been decrypted already, but not necessarily saved. Due to the Axolotl protocol, the keys are ephemeral and once you use them, they ratchet forward so you cannot decrypt a message more than once.

Anyway to prevent it from showing undecrypted message for messages it has already seen? Otherwise overtime you will build a massive list of previous messages as they will all show undecrypted.

That's a bug, I just don't know how to fix that yet.

Here is how it works: every time you retrieve messages, nymphemeral provides a timestamp (the date of the last message retrieved) to the NNTP server and prompts for a list of messages delivered after that. Then nymphemeral starts to check the hSub of each message: if matches, it is saved to the unread messages directory and the timestamp is updated. It should prevent old messages from being downloaded, but as you see, it isn't. As I noticed in some tests I made a while ago, sometimes nymphemeral downloads messages (around an hour if I'm not mistaken) older than the timestamp. There are a some possible reasons for that:

What you should know is that nymphemeral will not re-download every message you received, but you might get some that are a bit older than the current timestamp sometimes.

Thank you for the report. I forgot to open an issue for that. Unfortunately I didn't find what exactly causes that and I currently cannot fix that :(