[GH-ISSUE #31] Can't decrypt Crypt14 - key format change? #20

Closed
opened 2026-03-02 03:59:22 +03:00 by kerem · 25 comments
Owner

Originally created by @himan1000 on GitHub (Jul 27, 2022).
Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/31

Originally assigned to: @ElDavoo on GitHub.

Dont decrypt14

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db
[I] Crypt12/14 key loaded
[E] Key version mismatch: b'3' != b'2'
To bypass checks, use the "--force" parameter

or
E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -f -v
[V] Reading keyfile...
[I] Crypt12/14 key loaded
[V] Parsing database header...
[V] WhatsApp version: 2.22.14.74
[V] Your phone number ends with
[E] Key version mismatch: b'3' != b'2'
[E] Server salt mismatch: ....
[E] Google ID mismatch: .... != b....
[I] Database header parsed
[V] Decrypting...
[E] I can't recognize decrypted data. Decryption not successful.
The key probably does not match with the encrypted file.
[I] Done

OR

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -np -f
[V] Reading keyfile...
[I] Crypt12/14 key loaded
[V] WhatsApp version: 2.22.14.74
[F] Could not create a decryption cipher

The Key and the Backup are from the same Phone.

[E] Server salt mismatch: ....
[E] Google ID mismatch: .... != b.... -> may i post this here?

Originally created by @himan1000 on GitHub (Jul 27, 2022). Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/31 Originally assigned to: @ElDavoo on GitHub. Dont decrypt14 E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db [I] Crypt12/14 key loaded [E] Key version mismatch: b'3' != b'2' To bypass checks, use the "--force" parameter or E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -f -v [V] Reading keyfile... [I] Crypt12/14 key loaded [V] Parsing database header... [V] WhatsApp version: 2.22.14.74 [V] Your phone number ends with [E] Key version mismatch: b'3' != b'2' [E] Server salt mismatch: .... [E] Google ID mismatch: .... != b.... [I] Database header parsed [V] Decrypting... [E] I can't recognize decrypted data. Decryption not successful. The key probably does not match with the encrypted file. [I] Done OR E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -np -f [V] Reading keyfile... [I] Crypt12/14 key loaded [V] WhatsApp version: 2.22.14.74 [F] Could not create a decryption cipher The Key and the Backup are from the same Phone. [E] Server salt mismatch: .... [E] Google ID mismatch: .... != b.... -> may i post this here?
kerem 2026-03-02 03:59:22 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@ElDavoo commented on GitHub (Jul 27, 2022):

Is the key updated? WhatsApp started auto-regenerating keys in recent versions.

<!-- gh-comment-id:1196471465 --> @ElDavoo commented on GitHub (Jul 27, 2022): Is the key updated? WhatsApp started auto-regenerating keys in recent versions.
Author
Owner

@himan1000 commented on GitHub (Jul 27, 2022):

Is the key updated? WhatsApp started auto-regenerating keys in recent versions.

i dont know -> the key is from 15.7. copy from the phone

<!-- gh-comment-id:1196507712 --> @himan1000 commented on GitHub (Jul 27, 2022): > Is the key updated? WhatsApp started auto-regenerating keys in recent versions. i dont know -> the key is from 15.7. copy from the phone
Author
Owner

@himan1000 commented on GitHub (Jul 27, 2022):

Is the key updated? WhatsApp started auto-regenerating keys in recent versions.

Is decryption then possible at all?

<!-- gh-comment-id:1196510620 --> @himan1000 commented on GitHub (Jul 27, 2022): > Is the key updated? WhatsApp started auto-regenerating keys in recent versions. Is decryption then possible at all?
Author
Owner

@ElDavoo commented on GitHub (Jul 27, 2022):

You are trying to decrypt a backup created with an older key (the key you currently have is version 3, while the backups want a version 2 key).
As the version 2 key got overridden by the version 3 key, unfortunately your backup is lost.
The only thing you can try is to restore from these older backups using the official WhatsApp client. It shouldn't work, but you never know.

<!-- gh-comment-id:1196511040 --> @ElDavoo commented on GitHub (Jul 27, 2022): You are trying to decrypt a backup created with an older key (the key you currently have is version 3, while the backups want a version 2 key). As the version 2 key got overridden by the version 3 key, unfortunately your backup is lost. The only thing you can try is to restore from these older backups using the official WhatsApp client. It shouldn't work, but you never know.
Author
Owner

@himan1000 commented on GitHub (Jul 27, 2022):

You are trying to decrypt a backup created with an older key (the key you currently have is version 3, while the backups want a version 2 key). As the version 2 key got overridden by the version 3 key, unfortunately your backup is lost. The only thing you can try is to restore from these older backups using the official WhatsApp client. It shouldn't work, but you never know.

can't I just install an older Whatsapp version and import the backup there? And export the key from there?

<!-- gh-comment-id:1196523846 --> @himan1000 commented on GitHub (Jul 27, 2022): > You are trying to decrypt a backup created with an older key (the key you currently have is version 3, while the backups want a version 2 key). As the version 2 key got overridden by the version 3 key, unfortunately your backup is lost. The only thing you can try is to restore from these older backups using the official WhatsApp client. It shouldn't work, but you never know. can't I just install an older Whatsapp version and import the backup there? And export the key from there?
Author
Owner

@ElDavoo commented on GitHub (Jul 27, 2022):

I don't know. You can try.

<!-- gh-comment-id:1196531491 --> @ElDavoo commented on GitHub (Jul 27, 2022): I don't know. You can try.
Author
Owner

@himan1000 commented on GitHub (Jul 27, 2022):

And the keystore.xml file doesn't help me here?

<!-- gh-comment-id:1196563573 --> @himan1000 commented on GitHub (Jul 27, 2022): And the keystore.xml file doesn't help me here?
Author
Owner

@himan1000 commented on GitHub (Jul 27, 2022):

I exported everything from the old cell phone. Unfortunately, the key was no longer in the directory. Probably because my new cell phone was already registered.

<!-- gh-comment-id:1196564409 --> @himan1000 commented on GitHub (Jul 27, 2022): I exported everything from the old cell phone. Unfortunately, the key was no longer in the directory. Probably because my new cell phone was already registered.
Author
Owner

@ElDavoo commented on GitHub (Jul 27, 2022):

And the keystore.xml file doesn't help me here?

I don't think those keys are related to backups.

<!-- gh-comment-id:1196567685 --> @ElDavoo commented on GitHub (Jul 27, 2022): > And the keystore.xml file doesn't help me here? I don't think those keys are related to backups.
Author
Owner

@himan1000 commented on GitHub (Jul 28, 2022):

Even a current file with the right key cannot be decrypted....

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f
[V] Reading keyfile...
[I] Crypt12/14 key loaded
[V] Parsing database header...
[V] WhatsApp version: 2.22.15.74
[V] Your phone number ends with ...
[E] Server salt mismatch: b'\xb9\x.........................................
[E] Google ID mismatch: b'^\xb9\x04^\xbei\xe3......................................' != b'_f\xb5.........................
[I] Database header parsed
[V] Decrypting...
[E] I can't recognize decrypted data. Decryption not successful.
The key probably does not match with the encrypted file.
[I] Done

<!-- gh-comment-id:1198094027 --> @himan1000 commented on GitHub (Jul 28, 2022): Even a current file with the right key cannot be decrypted.... E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f [V] Reading keyfile... [I] Crypt12/14 key loaded [V] Parsing database header... [V] WhatsApp version: 2.22.15.74 [V] Your phone number ends with ... [E] Server salt mismatch: b'\xb9\x......................................... [E] Google ID mismatch: b'^\xb9\x04^\xbei\xe3......................................' != b'_f\xb5......................... [I] Database header parsed [V] Decrypting... [E] I can't recognize decrypted data. Decryption not successful. The key probably does not match with the encrypted file. [I] Done
Author
Owner

@himan1000 commented on GitHub (Jul 28, 2022):

or:

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np
[V] Reading keyfile...
[I] Crypt12/14 key loaded
[V] WhatsApp version: 2.22.15.74
[F] Could not create a decryption cipher

<!-- gh-comment-id:1198095022 --> @himan1000 commented on GitHub (Jul 28, 2022): or: E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np [V] Reading keyfile... [I] Crypt12/14 key loaded [V] WhatsApp version: 2.22.15.74 [F] Could not create a decryption cipher
Author
Owner

@ElDavoo commented on GitHub (Jul 28, 2022):

No idea, it works for me. The keys you are using do not match the keys used to encrypt the DB. I can't know for sure, but I think WhatsApp regenerates the key if you delete the account and recreate it, or if you reinstall the app without restoring a backup.
Honestly I wouldn't even know what to do if you sent me the files as the program output is clear: the key format is still the same, the backup header is still the same. The only thing I can think about is, if WhatsApp decryption method really changed, other people should complain.

<!-- gh-comment-id:1198224203 --> @ElDavoo commented on GitHub (Jul 28, 2022): No idea, it works for me. The keys you are using do not match the keys used to encrypt the DB. I can't know for sure, but I think WhatsApp regenerates the key if you delete the account and recreate it, or if you reinstall the app without restoring a backup. Honestly I wouldn't even know what to do if you sent me the files as the program output is clear: the key format is still the same, the backup header is still the same. The only thing I can think about is, if WhatsApp decryption method really changed, other people should complain.
Author
Owner

@himan1000 commented on GitHub (Jul 29, 2022):

https://forum.xda-developers.com/t/help-thread-export-whatsapp-key-crypt14-android-11-decrypting-database.4285625/page-5#posts

...Apparently others have the same problem

<!-- gh-comment-id:1198911180 --> @himan1000 commented on GitHub (Jul 29, 2022): https://forum.xda-developers.com/t/help-thread-export-whatsapp-key-crypt14-android-11-decrypting-database.4285625/page-5#posts ...Apparently others have the same problem
Author
Owner

@ElDavoo commented on GitHub (Jul 29, 2022):

Hmmmm. WhatsApp is up to something.
In the device i used for testing, the key file auto-regenerated, but I grabbed the new one and everything works.

As I already said, however, I have no idea of what to do. :(

<!-- gh-comment-id:1198947300 --> @ElDavoo commented on GitHub (Jul 29, 2022): Hmmmm. WhatsApp is up to something. In the device i used for testing, the key file auto-regenerated, but I grabbed the new one and everything works. As I already said, however, I have no idea of what to do. :(
Author
Owner

@ElDavoo commented on GitHub (Jul 29, 2022):

Can you send me all the keys you have and some backups? You can see my email in the profile page.
I'm on vacation however so I will take a look in 2 weeks.

<!-- gh-comment-id:1198952828 --> @ElDavoo commented on GitHub (Jul 29, 2022): Can you send me all the keys you have and some backups? You can see my email in the profile page. I'm on vacation however so I will take a look in 2 weeks.
Author
Owner

@himan1000 commented on GitHub (Jul 29, 2022):

thank you for the offer.
The key is from 15.7. he cannot decrypt the current backup. The old backups apparently still have an old key 2.....that would actually be more important than the new one. I have everything there. ... I will soon see that I try the decryption on my cell phone. However, the original cell phone is broken, so I would have to take another one, will that work? (Other IMEI) ....

<!-- gh-comment-id:1199008791 --> @himan1000 commented on GitHub (Jul 29, 2022): thank you for the offer. The key is from 15.7. he cannot decrypt the current backup. The old backups apparently still have an old key 2.....that would actually be more important than the new one. I have everything there. ... I will soon see that I try the decryption on my cell phone. However, the original cell phone is broken, so I would have to take another one, will that work? (Other IMEI) ....
Author
Owner

@himan1000 commented on GitHub (Jul 29, 2022):

This is what my batch file looks like:

python -m venv venv source venv/bin/activate .\venv\Scripts\activate.bat .\venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np

OUTPUT:

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m venv venv source venv/bin/activate .\venv\Scripts\activate.bat .\venv\Scripts\Activate.ps1
Error: Unable to create directory 'E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main\venv\Scripts\activate.bat'

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m pip install --upgrade pip
Requirement already satisfied: pip in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (22.2.1)

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m pip install -r requirements.txt
Requirement already satisfied: javaobj-py3==0.4.3 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (0.4.3)
Requirement already satisfied: pycryptodomex==3.15.0 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (3.15.0)
Requirement already satisfied: protobuf==4.21.3 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (4.21.3)

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np
[V] Reading keyfile...
[I] Crypt12/14 key loaded
[V] WhatsApp version: 2.22.15.74
[F] Could not create a decryption cipher

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>cmd
Microsoft Windows [Version 10.0.19044.1826]
(c) Microsoft Corporation. Alle Rechte vorbehalten.

E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>

<!-- gh-comment-id:1199030432 --> @himan1000 commented on GitHub (Jul 29, 2022): This is what my batch file looks like: python -m venv venv source venv/bin/activate .\venv\Scripts\activate.bat .\venv\Scripts\Activate.ps1 python -m pip install --upgrade pip python -m pip install -r requirements.txt python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np OUTPUT: E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m venv venv source venv/bin/activate .\venv\Scripts\activate.bat .\venv\Scripts\Activate.ps1 Error: Unable to create directory 'E:\\Backup\\Whatsapp\\WhatsApp-Crypt14-Crypt15-Decrypter-main\\WhatsApp-Crypt14-Crypt15-Decrypter-main\\venv\\Scripts\\activate.bat' E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m pip install --upgrade pip Requirement already satisfied: pip in c:\users\martin\appdata\local\programs\python\python310\lib\site-packages (22.2.1) E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python -m pip install -r requirements.txt Requirement already satisfied: javaobj-py3==0.4.3 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (0.4.3) Requirement already satisfied: pycryptodomex==3.15.0 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (3.15.0) Requirement already satisfied: protobuf==4.21.3 in c:\users\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (4.21.3) E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>python ./decrypt14_15.py ./key ./msgstore.db.crypt14 ./msgstore.db -v -f -np [V] Reading keyfile... [I] Crypt12/14 key loaded [V] WhatsApp version: 2.22.15.74 [F] Could not create a decryption cipher E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>cmd Microsoft Windows [Version 10.0.19044.1826] (c) Microsoft Corporation. Alle Rechte vorbehalten. E:\Backup\Whatsapp\WhatsApp-Crypt14-Crypt15-Decrypter-main\WhatsApp-Crypt14-Crypt15-Decrypter-main>
Author
Owner

@ElDavoo commented on GitHub (Jul 29, 2022):

thank you for the offer.
The key is from 15.7. he cannot decrypt the current backup. The old backups apparently still have an old key 2.....that would actually be more important than the new one. I have everything there. ... I will soon see that I try the decryption on my cell phone. However, the original cell phone is broken, so I would have to take another one, will that work? (Other IMEI) ....

You should get the key of today and the backup of today and try.

<!-- gh-comment-id:1199962059 --> @ElDavoo commented on GitHub (Jul 29, 2022): > > > thank you for the offer. > The key is from 15.7. he cannot decrypt the current backup. The old backups apparently still have an old key 2.....that would actually be more important than the new one. I have everything there. ... I will soon see that I try the decryption on my cell phone. However, the original cell phone is broken, so I would have to take another one, will that work? (Other IMEI) .... You should get the key of today and the backup of today and try.
Author
Owner

@himan1000 commented on GitHub (Jul 30, 2022):

I was able to restore all backups despite different keys on the Whatsapp client.

<!-- gh-comment-id:1200168689 --> @himan1000 commented on GitHub (Jul 30, 2022): I was able to restore all backups despite different keys on the Whatsapp client.
Author
Owner

@ElDavoo commented on GitHub (Aug 3, 2022):

No idea then, send me the files and I will take a look, the only case in which I can do something is that the key file format changed

<!-- gh-comment-id:1204113754 --> @ElDavoo commented on GitHub (Aug 3, 2022): No idea then, send me the files and I will take a look, the only case in which I can do something is that the key file format changed
Author
Owner

@ElDavoo commented on GitHub (Aug 8, 2022):

Came back home and I have no internet. waiting for it to be repaired

<!-- gh-comment-id:1207858661 --> @ElDavoo commented on GitHub (Aug 8, 2022): Came back home and I have no internet. waiting for it to be repaired
Author
Owner

@ElDavoo commented on GitHub (Aug 14, 2022):

@himan1000 Would you mind sending me your files via email?

<!-- gh-comment-id:1214402726 --> @ElDavoo commented on GitHub (Aug 14, 2022): @himan1000 Would you mind sending me your files via email?
Author
Owner

@ElDavoo commented on GitHub (Aug 28, 2022):

Closing as stale.
If WhatsApp decides to change your backup key, I can't do anything about it. Please only reopen if the program can't decrypt today's backup with today's key.

<!-- gh-comment-id:1229434126 --> @ElDavoo commented on GitHub (Aug 28, 2022): Closing as stale. If WhatsApp decides to change your backup key, I can't do anything about it. Please only reopen if the program can't decrypt today's backup with today's key.
Author
Owner

@ElDavoo commented on GitHub (Aug 28, 2022):

:)

<!-- gh-comment-id:1229434204 --> @ElDavoo commented on GitHub (Aug 28, 2022): :)
Author
Owner

@ElDavoo commented on GitHub (Aug 28, 2022):

since when you need to comment to close the issue

<!-- gh-comment-id:1229434279 --> @ElDavoo commented on GitHub (Aug 28, 2022): since when you need to comment to close the issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wa-crypt-tools#20
No description provided.