Skip to content

Add optional pck xor obfuscation#596

Open
Tekisasu-JohnK wants to merge 2 commits into
blazium-games:blazium-4.5from
Tekisasu-JohnK:Add-optional-XOR-obfuscation-layer-for-PCK-asset-files
Open

Add optional pck xor obfuscation#596
Tekisasu-JohnK wants to merge 2 commits into
blazium-games:blazium-4.5from
Tekisasu-JohnK:Add-optional-XOR-obfuscation-layer-for-PCK-asset-files

Conversation

@Tekisasu-JohnK

@Tekisasu-JohnK Tekisasu-JohnK commented Dec 7, 2025

Copy link
Copy Markdown

Adds optional XOR obfuscation support for reading and writing PCK files.

This is not a fullproof way to protect an exported game developed in Blazium from being dumped and having its contents taken. However, used in conjunction with using the AES256 encryption key and modifying the PACK_HEADER_MAGIC value on a per-project basis currently protects it from unauthorized inspection from tools like Godot PCK Tool and GDRETools.

The xor obfuscation is enabled at build time for the editor and templates. It is only utilized when a valid 1024 key is present in version.py and assigned to the variable blazium_xor_key. By default, blazium_xor_key is set to an empty string and the feature is disabled.

You can generate a valid xor key by running the following:

$ tr -dc 'A-Za-z0-9' </dev/urandom | head -c 1024

Therefore, an example of a valid setting in version.py is as follows:

blazium_xor_key = "j1bchdxZvlrzX6nA6qck0mI6wqr6Gv6VvrbrltuDBNyOzzitdQfRhXLPzRjfuCHS0ZKS6bEieMrsPJ9iWHnJWEMdiktcZy0tCM9j1XQbwv9vY2zdH6q1uYJU1CRohNaD64oRGTXQU799xxDnIvY7DwxBBsxmJiUT9RiwgPVoq4SMqcYZtFXyKWZpeobdPWEF2quYelIqegRjm7Iz6lHxvRNzcY2yxEK9vSDHyyBmukuR7CR8PnfequIPMcLSlnky76kDDSGvz5nJPVkLnT4D5d9xr1z2OtwsF6Ib5OMrJg5XnTPLVnx2BQIZNbT0Dz3VeduIHcgTHMZlfEXmRs9AzroX8o227AyhOncTfg06iCcNh0k5OfAdknK4xfzFcxFLw8qYrYj8GWSYy5W0h9cI4ZA4392nbSVVt9pdMaHLjuHRsb9TY7jXHc5YuhNwNWmqti1VXTp6cu41jzlDht7xtJX2XPDzQMuh5GrCVKQMA2NiyL2JVriVj1pbn2D2N0bVntfmwPjyJ0fIaLQCIdM5NFb33lZUzNzoA7uePsqlk9o30tMF8tpJQ4pNo5aLHHMXLYTs2yCGJVmDMIFaWmRkSDc2wPe1aqiCATybw3fcPpxTLW3P1kuPtlxqyIdt8HLOBogrciXzhDAZHbgpQOWAVk7cGoTenSUB0QTjRti3Vm83lZVASsNgeDatvLgfN4Y68lbQVqj6fU2vYAneVdz3wDfKRzJ3NRf2AO8M18F7YDRSWSxliLxmVgAu5yrApiYO6aJjb35wZCQtKwsqKifHuOhliiGChW1XusRe1GhFKRckqHbZD5bBwrxlzYQgwXYpajYUwiPyIl2eXAeVICssIHw0gqXRwtywG24Wpvm202TWpTEG6Mx7xbUW5fY1tkwOPxiZrS4v7J0clj9x4ztGtu4OonDRYt6hcsLjfyPmloqovE0AK5UHd7fJM62j0ObzyIyj8wtwDfwi7sFs9A6oegONNcHD8YVF6sLOdoWCSQApK7IukLTsEl72Wixs9W0W"

@Tekisasu-JohnK Tekisasu-JohnK force-pushed the Add-optional-XOR-obfuscation-layer-for-PCK-asset-files branch from 2f53b11 to 94ab15c Compare December 7, 2025 12:31
Android gradle configs don't seem to like my adjustments to version.py.  I'm removing the comments and switching from None to an empty string and will retest.
@Tekisasu-JohnK Tekisasu-JohnK marked this pull request as ready for review December 8, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant