Note
Godot Official documentation on PCK encryption PCK Encryption.
Compiling Godot with Encryption Key
Follow these steps to create a Godot Matrix and configure it with a new AES-256 encryption key.
Visit the Matrix Blueprints page.
Click Create Godot Matrix.
- Click the cog icon to configure the matrix.
- Enable Environment Variables by clicking the corresponding button.
- Click the Add + button to add a new environment variable.
- Set the variable name to:
SCRIPT_AES256_ENCRYPTION_KEY
Set the variable value to a 256-bit AES key.
You can generate this key using the “Generate a 256-bit AES key” button:
Or use openssl to generate it manually:
openssl rand -hex 32 > godot.gdkey
Copy the AES key value, since it will be used to export your game
Click Save.
Warning
Make sure to click Save! If you don’t, the variables will not be added.