BedrockPackCrypto is a small Python library that demonstrates how to encrypt and decrypt Minecraft Bedrock Edition resource packs using AES encryption.
It mimics how encrypted packs are handled by Bedrock (per-file AES keys and an encrypted contents.json).
This can be useful if you want to experiment with custom DRM-like resource pack systems or just learn about AES pack encryption.
- AES encryption/decryption in CFB8 mode (segment size = 8).
- Master key (32 bytes) is used to encrypt
contents.json. - Each file inside the pack is encrypted with its own random key.
- Skips
manifest.jsonandpack_icon.png(kept unencrypted). - Creates and encrypts a
contents.jsonfile containing file paths and keys. - Decrypts an encrypted pack back to the original format.
- Pack validation method (
is_valid_pack) to check encrypted pack structure.
- Works successfully with both Minecraft Bedrock Server and Bedrock Client
- Supports encryption and decryption of:
- Resource Packs (textures, models, sounds, UI, etc.)
- Add-ons / Behavior Packs (game logic, entities, functions, etc.)
- Encrypted packs created with
BedrockPackCryptocan be loaded directly in Bedrock,
just like official encrypted packs.
This means you can protect both your custom resource packs and your gameplay add-ons
with the same encryption system.
pip install -r requirements.txtYou can test the library in just a few steps:
# 1. Clone the repository
git clone https://github.com/reversedcodes/BedrockPackCrypto.git
cd BedrockPackCrypto
# 2. Install requirements
pip install -r requirements.txt
# 3. Place your resource or behavior pack (zip file) into the project folder
# For this test, rename it to "test.zip"
# 4. Run the test script to encrypt/decrypt
python main.py-
Locate your Minecraft resource packs folder:
C:\Users\<your_username>\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\resource_packs -
Copy the generated file
encrypted_pack.zipinto this folder. -
Start Minecraft Bedrock Edition.
- Your encrypted pack should now appear in the Resource Packs menu.
- You can test it on both Bedrock Client and Bedrock Dedicated Server.
This project is licensed under the Apache License 2.0.
You are free to use, modify, and distribute this software under the terms of the license.