Skip to content

Godot Secure is a Simple Python Script That modify the Godot Source Code Automatically, to integrate Camellia-256 / AES-256 encryption with a unique security token system. This solution creates a cryptographically unique engine build that prevents generic decryption tools from accessing your game assets.

License

Notifications You must be signed in to change notification settings

KnifeXRage/Godot-Secure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Godot Secure - Enhanced Asset Protection For Godot

Godot Engine 4.x MIT License Buy Me a Coffee at ko-fi.com

Godot Engine Logo

Description

Godot Secure is a Simple Python Script That modify the Godot Source Code Automatically, to integrate Camellia-256 / AES-256 encryption with a unique security token system. This solution creates a cryptographically unique engine build that prevents generic decryption tools from accessing your game assets.

Effortless Security for Godot Games

This script enhances your Godot engine with Camellia/AES encryption and a unique security token system with just one command. Unlike standard encryption, this creates a custom Godot build that's cryptographically unique to you, preventing universal decryption tools from working with your game assets.

Key Features

  • 🎲 Randomized Magic Headers: Unique file signatures per engine's build (Not Game)
  • πŸ”‘ Security Token System: 32-byte token embedded directly in engine's binary
  • πŸ›‘οΈ Per-Build Uniqueness: Each compilation of engine and templates is cryptographically distinct from others
  • ⚑ Automated Setup: One-command modification of Godot source
  • πŸ’Ύ No external dependencies: Everything included

Difference

Standard Godot encryption has known vulnerabilities. Our solution:

Feature Standard Godot Godot Secure
Encryption Algorithm AES-256 Camellia-256 / AES-256
Universal Decryption Tools Vulnerable Protected
Per Engine-Build Uniqueness No Yes
Key Obfuscation No Yes
Magic Header Fixed Randomized
Required Reverse Engineering Generic Per-Build

Requirements

  1. Godot Source Code (4.x recommended)
  2. Python 3.6+
  3. OpenSSL (for key generation)
  4. Build Tools (SCons, compilers)

Download Godot Secure: πŸ”—Download

Pro Tip:

Directly Run The Script inside Godot Source and Build your Engine and Templates as usual with encryption Key!!

Installation & Usage

Must Read Godot's Official Documentation: πŸ”—View Official Documentation

Step 1: Prepare Environment

git clone https://github.com/godotengine/godot.git
cd godot

Step 2: Generate Encryption Key

# Generate 256-bit key (KEEP THIS SECURE!)
openssl rand -hex 32 > godot.gdkey

## Set environment variable

# For Linux/macOS:
export SCRIPT_AES256_ENCRYPTION_KEY=$(cat godot.gdkey)

# For Windows (PowerShell):
$env:SCRIPT_AES256_ENCRYPTION_KEY = Get-Content godot.gdkey

# Or Set it Permanently from Control Panel (Windows)

Step 3: Run Setup Script

You Can the Script directly inside Godot Source folder without using arguments! Using: python godot_secure.py

# Run The Godot Secure Script
python godot_secure.py /path/to/godot_source/

#Example:
python godot_secure.py godot/

Step 4: Compile Godot Engine and Export Templates

# For Engine (Must REQUIRED):
scons platform=windows target=editor use_llvm=yes use_mingw=yes # Example for Windows
scons platform=linuxbsd target=editor use_llvm=yes use_mingw=yes # Example for Linux BSD
scons platform=macos target=editor use_llvm=yes use_mingw=yes # Example for MacOS

# For Export Templates (Must REQUIRED):
scons platform=windows target=template_debug use_llvm=yes use_mingw=yes
scons platform=windows target=template_release use_llvm=yes use_mingw=yes
...

Build others Templates like these too and use platform=macos or platform=linuxbsd to build for MacOS or Linux BSD, Also use use_llvm=yes use_mingw=yes for faster builds!

How It Works

The script makes these key modifications:

  1. Unique Identifiers

    • Generates random magic headers for file signatures
    • Creates security token embedded in engine binary
  2. Key Protection

    • Actual Key = (Input Key) XOR (Security Token)
    • Token exists only in compiled binary

Troubleshooting

Script not working?

  • Ensure Python 3.6+ installed
  • Verify correct Godot source path
  • Run with absolute path if needed:
    python godot_secure.py /path/to/godot_source

Compilation errors?

  • Clean build: scons --clean
  • Ensure all submodules: git submodule update --init

Common Issues

  1. File not found errors: Ensure correct Godot source path
  2. Compilation errors: Verify Mbed TLS is properly included
  3. Encryption/decryption mismatch: Always use matching engine builds with matching template(s) builds

Verification Steps

  1. Check script output for success messages
  2. Confirm security_token.h exists in core/crypto/
  3. Search for CamelliaContext / AESContext in modified files
  4. Verify magic header values in file headers

Disclaimer

❗ Use at Your Own Risk
This script modifies core Godot engine files. Always:

  • Back up your source code before running
  • Test builds thoroughly before deployment
  • Maintain secure copies of security tokens
  • Understand that enhanced security increases complexity

Security Disclaimer

πŸͺ§ Important Considerations

  • This creates a custom Godot engine
  • Standard export templates won't work
  • Always test builds before deployment
  • Maintain backups of security tokens

Rebuild Protocol

πŸ”„ Always rebuild when:

  • Updating Godot source
  • Changing security parameters
  • Creating new game versions
  • Suspecting key compromise

License

  • MIT License - Free for Personal and Commercial use with attribution: πŸ”—View License

πŸ’– Support Me

Hi there! I'm a college student passionate about game development and programming. While this project will always remain free, your support would mean the world as I balance studies and financial challenges.

  • If you've found this security tool valuable, I'd sincerely appreciate any support as I work through my studies.

ko-fi

Every contribution helps maintain and improve this project. And encourage me to make more projects like this!

This is optional support. The tool remains free and open-source regardless.


Created with ❀️ for Godot Developers
For contributions, please open issues on GitHub

About

Godot Secure is a Simple Python Script That modify the Godot Source Code Automatically, to integrate Camellia-256 / AES-256 encryption with a unique security token system. This solution creates a cryptographically unique engine build that prevents generic decryption tools from accessing your game assets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages