mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-14 21:47:19 +02:00
feat: decrypt Chromium v10/v11 across host OS
Chromium's v10 means AES-GCM on Windows but AES-CBC on macOS/Linux. Dispatch the cipher by master-key length (32B GCM, 16B CBC) so one binary can decrypt a key dumped from a different OS.
This commit is contained in:
@@ -2,22 +2,6 @@
|
||||
|
||||
package crypto
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
)
|
||||
|
||||
var chromiumCBCIV = bytes.Repeat([]byte{0x20}, aes.BlockSize)
|
||||
|
||||
const minCBCDataSize = versionPrefixLen + aes.BlockSize // "v10" + one AES block = 19 bytes minimum
|
||||
|
||||
func DecryptChromium(key, ciphertext []byte) ([]byte, error) {
|
||||
if len(ciphertext) < minCBCDataSize {
|
||||
return nil, errShortCiphertext
|
||||
}
|
||||
return AESCBCDecrypt(key, chromiumCBCIV, ciphertext[versionPrefixLen:])
|
||||
}
|
||||
|
||||
func DecryptDPAPI(_ []byte) ([]byte, error) {
|
||||
return nil, errDPAPINotSupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user