mirror of
https://github.com/ElDavoo/wa-crypt-tools.git
synced 2026-04-26 14:15:55 +03:00
[GH-ISSUE #13] Decrypt WhatsApp Encrypted Google Backup - crypt15 - with custom password #11
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
info needed
invalid
low priority
pull-request
skill issue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wa-crypt-tools#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vHanda on GitHub (Mar 6, 2022).
Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/13
Originally assigned to: @ElDavoo on GitHub.
Hi. I've enabled end-to-end whatsapp backups on my Android phone with a custom password. These are being stored in my Google Drive. I've downloaded all the files via this awesome tool. It has given me a
msgstore.db.crypt15file.I'm confused on how to decrypt this, as I don't have a 'backup key', just a password. I tried just writing the password in the
encrypted_backup.keyfile, but I get the following error -[F] The keyfile is not a valid Java object: Invalid file magic: 0x3732Any help would be appreciated.
@ElDavoo commented on GitHub (Mar 6, 2022):
Hi,
This is not the way it works. I suggest you to read WhatsApp 's backup encryption white paper. I will summarize the paper for you.
Basically the decryption key is stored on WhatsApp servers. You send the password to their servers (the password is encrypted in such a way that they do not know the password, they only know that you know it) and they give you the key.
In other words: the only purpose of the password is to get the actual key from WhatsApp servers. It is not used in any way for the decryption.
To the best of my knowledge there are no third party programs that download the key for you, and the only way to get the key is to configure WhatsApp on a new phone and get the "encrypted_backup.key" file. The app downloads the key from the server and then stores it locally to decrypt and encrypt new backups.
Let me know if you have further questions.
@vHanda commented on GitHub (Mar 7, 2022):
Thank you for the clarification.
When enabling the e2e encrypted backups, WhatsApp gives me an option to choose a password or a 64 bit encryption key. From what I understand from here, by choosing the 64-bit key option, I'm not using the "HSM-based Backup Key Vault".
The key is given to be like this -
where
xis a hexadecimal number. This gives a "32 byte" key.I managed to modify the existing code a little bit and make it work -
Could you please let me know what would be the best way to contribute this? I could add another command line argument?
@ElDavoo commented on GitHub (Mar 7, 2022):
Exactly: how would you prove to the key vault you are the owner of that key? You need another proof of ownership (that is the password).
I think that adding an argument would be nice but it might be hard to implement as of now, the program is designed to have a key file as an input.
I will also make an utility to create an encrypted_backup.key from a hex string. Imho this is the easiest way
@ElDavoo commented on GitHub (Mar 7, 2022):
I added an utility to create an encrypted_backup.key file starting from a hex encoded key.
@vHanda commented on GitHub (Mar 7, 2022):
Thank you. I really appreciate you taking the time.
I'm going to close this issue as there doesn't seem anything else to do.
@ElDavoo commented on GitHub (Mar 7, 2022):
There is! :) You can now specify a raw hex string instead of a key file and it will work. I just hope this didn't break anything as I didn't test much.
@vHanda commented on GitHub (Mar 7, 2022):
I tried it out. It works perfectly!
@KP1107 commented on GitHub (Feb 8, 2025):
I've forgotten my WA Encryption Key and I am not able to restore my encrypted WhatsApp chats. Are there any hopes?