Skip to content

CanciuCostin/crypt12-decrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO

Crypt12 Decrypt

Decrypt Whatsapp crypt12 sqlite database files

Crypt12 algorithm

  • AES GCM mode encryption using 128 bit block size and 16 bytes IV (nonce)

  • key file must be 158 byte long (only last 32bytes represent the key)

Key

  • crypt12 file includes 67 byte header and 20 byte trailer which needs to be removed

crypt12file

Usage example

  1. Ensure you have the key file (key) and crypt12 file (msgstore.db.crypt12) in the same directory with the go entrypoint. You can use the existing key and msgstore files in the repo for testing.
  • Run using GO:
go run crypt12-decrypt
  • Or run Windows executable:
crypt12-decrypt.exe
  1. Otherwise use the necessery arguments:
go run crypt12-decrypt.go -h
Usage of crypt12-decrypt.exe:
  -crypt12file string
        crypt12 file path (default "msgstore.db.crypt12")
  -keyfile string
        decryption key file path (default "key")
  -outputfile string
        decrypted output file path (default "msgstore.db")

Build

go get github.com/CanciuCostin/crypt12-decrypt

go build crypt12-decrypt -> built with go version 1.14.4