mossblaser / signal_for_android_decryption

An (unofficial) tool which decrypts backup files produced by the Signal Android app.
GNU General Public License v3.0
38 stars 8 forks source link

google.protobuf.message.DecodeError: Error parsing message #8

Closed afg137 closed 1 month ago

afg137 commented 5 months ago

Getting the error "google.protobuf.message.DecodeError: Error parsing message" in line 152 in decrypt_frame (return BackupFrame.FromString(frame_bytes)) when trying to decrypt a backup.

The backup was generated a few weeks ago, using the latest version of Signal at the time.

This seems strange, since your Backups.proto file since to be the same one as Signal's, so not sure why there is a decoding error.

Any help would be very appreciated. Thanks!

mossblaser commented 5 months ago

Uh-oh! Sounds like something in the serialisation format they're using has changed :/. If you're getting to that point (rather than getting a HMAC error) then it sounds like all the obvious stuff like incorrect keys or changes in cryptography can be ruled out.

Unfortunately I don't really have any suggestions on where to go next with this besides take a look at where in the bitstream you're hitting that error (e.g. which type of frame you've got, how far through the file it is, etc.) and digging into the signal sources.

Sorry to not be of much help, though I'd be delighted to accept any PRs if you find out what's going on!

afg137 commented 5 months ago

Seems like the error is in the first frame; adding a print statement right before line 152 results in only one loop. Is there anything special about this frame?

mossblaser commented 5 months ago

I don't think so! :/ Hmm.

mossblaser commented 5 months ago

I've just attempted to decrypt a freshly generated backup by a recent version of Signal and it seems I don't run into this problem.

I'll leave this issue open in case anyone else runs into the same thing, though!

Have you had any luck getting this to work? Perhaps it would be worth trying again with a fresh backup file?

mossblaser commented 1 month ago

Closing this for now as I can't reproduce the issue and I've not heard any more. Please re-open if you manage to make any further headway!