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.

  1. Visit the Matrix Blueprints page.

  2. Click Create Godot Matrix.

  3. Click the cog icon to configure the matrix.
    Godot Modal
  4. Enable Environment Variables by clicking the corresponding button.
    Enable vars
  5. Click the Add + button to add a new environment variable.
    Enable vars
  6. Set the variable name to:

    SCRIPT_AES256_ENCRYPTION_KEY

    Enable vars
  7. Set the variable value to a 256-bit AES key.

    You can generate this key using the “Generate a 256-bit AES key” button:

    Variable Value

    Or use openssl to generate it manually:

    openssl rand -hex 32 > godot.gdkey
    
  8. 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.