Skip to content

HMAC verification failed for newer versions of Signal-Android (6.30.4) and signal-backup-decode 0.2.3 #63

Open
@frans-fuerst

Description

@frans-fuerst

Running Signal 6.30.4, newer backup files can't be decrypted for me anymore with signal-backup-decode 0.2.3. I don't exactly know what's the last Signal-version I've read successfully since I only run the backup every couple of weeks.

Command:

signal-backup-decode -f [--no-verify-mac] --verbosity DEBUG \
    --output-path ./ \
    --password-file path/to/pw-file \
    --output-type RAW \
    path/to/signal-2023-09-05-02-55-00.backup 

Output is:

12:39:45 [INFO] Output path: /path/to/output
12:39:45 [INFO] Input file: /path/to/signal-2023-09-05-02-55-00.backup
12:39:45 [DEBUG] (1) signal_backup_decode::input: Frame type: Header Frame (salt: [24, 97, 92, 29, 6D, 18, 5B, 84, 29, 8B, 5A, 7D, 81, BA, BA, C5, E5, E4, 1E, 65, 06, 5C, B8, 76, E2, BC, D7, 59, E0, C4, 47, 24] (length: 32), iv: [28, 42, 69, CE, DF, 30, BC, 9E, F6, BA, 5B, 71, 25, 67, D6, 27] (length: 16))
12:39:45 [DEBUG] (2) signal_backup_decode::input: Read frame number 1 with length of 1313236731 bytes
12:39:47 [ERROR] HMAC verification failed (their mac: [A5, 56, CB, 80, 5A, 97, 32, 00, F1, C9], our mac: [3D, D8, 0A, 0D, AB, 1C, 27, 23, AD, F5]).

(Error code 0 btw - should be nonzero, shouldn't it?)

I double checked the files didn't get corrupted on the way by manually copying them via adb pull and comparing them with diff. And while the files seem to be close to 4GB (I'm not using any FS supporting only less than 4GB anyway), backups are still of different sizes (i.e. not capped) and more than 100MB below 4GB:

$ ls -alF /path/to/backups/*                                                                       130 ↵
-rw-r--r--. 1 me me 4184806602 Sep  4 02:56 /path/to/backups/signal-2023-09-04-02-55-00.backup
-rw-r--r--. 1 me me 4185059654 Sep  5 02:57 /path/to/backups/signal-2023-09-05-02-55-00.backup

Also I verified my passphrase inside the app and made sure the "Verifying backup.." stage while creating the backup succeeds as well..

Anyone else experiencing this? Or does it work for someone with Signal v6.30.4?

Update: I also checked with https://github.com/mossblaser/signal_for_android_decryption - it also works for the last file I can successfully decrypt with signal-backup-decode but fails with the new ones (Error: Incorrect passphrase or corrupted backup (Bad MAC))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions