Overview
PhasmoDecrypt uses industry-standard AES encryption in CBC mode with PBKDF2 key derivation to secure Phasmophobia save files. This page provides technical details about the encryption implementation.Encryption Algorithm
AES-CBC Configuration
The encryption uses the following AES settings:- Algorithm: AES (Advanced Encryption Standard)
- Mode: CBC (Cipher Block Chaining)
- Padding: PKCS7
- Key Size: 128-bit (16 bytes)
- IV Size: 128-bit (16 bytes)
AES-CBC mode requires an initialization vector (IV) that must be unique for each encryption operation to ensure security.
Key Derivation
PBKDF2 Parameters
PhasmoDecrypt uses PBKDF2 (Password-Based Key Derivation Function 2) to derive the encryption key:- Password:
t36gref9u84y7f43g(defined inGlobals.cs:7) - Salt: The 16-byte IV (different for each file)
- Iterations: 100
- Hash Algorithm: SHA-1
- Output Size: 16 bytes (128 bits)
Initialization Vector (IV) Handling
IV Generation (Encryption)
When encrypting data, a new random IV is generated for each operation:IV Storage
The IV is prepended to the encrypted data in the save file:IV Extraction (Decryption)
When decrypting, the IV is extracted from the beginning of the file:data.Length - 16) are then decrypted using this IV.
Encryption Process
The encryption workflow follows these steps:Derive Encryption Key
Use PBKDF2 with the hardcoded password, the generated IV as salt, and 100 iterations to derive a 16-byte key
Decryption Process
The decryption workflow reverses the encryption process:Implementation Details
File Format
Encrypted save files have the following structure:| Offset | Size | Description |
|---|---|---|
| 0 | 16 bytes | Initialization Vector (IV) |
| 16 | Variable | AES-CBC encrypted JSON data |
Character Encoding
All text data is encoded using UTF-8:JSON Formatting
After decryption, the JSON is formatted with indentation for readability:Security Considerations
Why is the password hardcoded?
Why is the password hardcoded?
The encryption password
t36gref9u84y7f43g is hardcoded in the game itself. Phasmophobia uses this shared secret to encrypt save files on all platforms. PhasmoDecrypt uses the same password to decrypt and re-encrypt save files.Is 100 iterations secure enough?
Is 100 iterations secure enough?
While modern standards recommend 100,000+ iterations for password hashing, this implementation uses 100 iterations because:
- It matches the game’s original implementation
- The password is not user-provided (it’s a fixed secret)
- The IV provides uniqueness for each encryption
Why use the IV as the salt?
Why use the IV as the salt?
Using the IV as the PBKDF2 salt ensures that each encrypted file has a unique derived key, even though the password is the same. This is a valid approach when the IV is randomly generated and stored with the ciphertext.
Code References
Key encryption code is located in:- Encryption Method:
Classes/Crypter.cs:54-86 - Decryption Method:
Classes/Crypter.cs:14-52 - Encryption Secret:
Classes/Globals.cs:7
All encryption parameters must match Phasmophobia’s implementation exactly for save file compatibility.