bocajthomas / SE-Extended

SE Extended is a fork from the original SnapEnhance app offering an enhanced Snapchat experience
https://t.me/SE_Extended
GNU General Public License v3.0
28 stars 3 forks source link

E-2-E Encryption Crash #97

Closed suryadip2008 closed 1 week ago

suryadip2008 commented 1 week ago

Description

So, today me and @BrokenOG conducted a test for the End-To-End Encrytion Feature. @BrokenOG sent me the shared secret key(He was the sender of the key) and I recieved it and I got an option to accept it(Me being the reciever). I accepted the key and Snapchat instantly crashed on my end.

However, on the sender's end, there was an error message on the chat which read: "Failed to decrypt message, id=4995. Check logs for more details." The sender did not face any Snapchat crash issue and only got this error message. The logs of SE Extended App of the Sender are attached.

However, on the reciever's end(me) whenever I open Snapchat and then go to the Sender's chat(@BrokenOG), Snapchat instantly crashes. Since it's an application crash, there was no logs in SE Extended in the reciever's end. However, I have also attached the necessary app crash logs of the reciever(me).

Whenever, the conversation of the Sender is opened on the reciever's(my) end, Snapchat automatically crashes. Clearing the chat of the sender's chat in reciever's end(Profile>Settings>Clear Conversation) also doesn't help. Opening the chat again is only possible after clearing Snapchat's Storage/by reinstalling Snapchat.(Note: The Sender @BrokenOG doesn't face any crash issue and only gets an error message)

I have attached all the neccessary logs(Look in the SE Extended-2024-06-22_08-15-23.txt from 9 am for the log in the Senders_SE Extended-logs-1719028505887.zip) and screenshots of the issue.

Reproduction steps

  1. Ensure both users (sender and the receiver) have the latest version of Snapchat & SE Extended installed.
  2. Sender generates and sends a shared secret key to the receiver.
  3. The receiver receives the shared secret key and is prompted with an option to accept it.
  4. The receiver accepts the shared secret key.
  5. Observe that Snapchat crashes instantly on the receiver's device upon accepting the key.
  6. Sender observes an error message in the chat: "Failed to decrypt message, id=4995. Check logs for more details." Note that Snapchat does not crash on Sender's device.
  7. The receiver attempts to reopen Snapchat and navigates to sender's chat.
  8. Observe that Snapchat crashes again when attempting to open the conversation with sender.
  9. Clear the conversation of sender in the Snapchat's settings: Go to Profile > Settings > Clear Conversation > Select Sender > Confirm.
  10. Reopen Snapchat and navigate to sender's chat again.
  11. Observe that Snapchat continues to crash despite clearing the conversation.
  12. To temporarily resolve the issue, the receiver clears Snapchat's storage or reinstalls the application: Go to Device Settings > Apps > Snapchat > Storage > Clear Storage or uninstall and reinstall Snapchat.
  13. Open Snapchat again and navigate to sender's chat.
  14. Observe that the crash issue is fixed.

Logs

Senders_SE Extended-logs-1719028505887.zip Receiver's Log.zip photo_6318728140842712302_y

Snapchat Version

12.93.0.37

SE Extended Version

1.0.0

Agreement

bocajthomas commented 1 week ago

Looks like it's a file issue

suryadip2008 commented 1 week ago

Looks like it's a file issue

File issue?

bocajthomas commented 1 week ago

File issue?

Error: java.io.FileNotFoundException Suggests it can't find/read a file

Your also on beta version of Snapchat, can you try the lastest stable release of Snapchat

rhunk commented 1 week ago

@suryadip2008 I'll give you a complete reason why it doesn't work, I've spent quite a bit of time on this exchange system. This is not a Snapchat issue, it's from snapenhance. You haven't exchanged the symmetrical key correctly. When you send an exchange request, you must disable e2e encryption so that the receiver can accept and send you its key response. However, you can always import/export your own keys using the social tab if the exchange fails. If you want to learn more about how this works, check out: https://en.wikipedia.org/wiki/Kyber