Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

BedrockPackCrypto is a small Python library that demonstrates how to encrypt and decrypt Minecraft Bedrock Edition resource packs using AES encryption.

License

Notifications You must be signed in to change notification settings

reversedcodes/BedrockPackCrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BedrockPackCrypto

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.

Features

  • 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.json and pack_icon.png (kept unencrypted).
  • Creates and encrypts a contents.json file 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.

Compatibility

  • 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 BedrockPackCrypto can 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.

Install dependencies

pip install -r requirements.txt

Quick Test

You 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

Add the Encrypted Pack to Minecraft

  1. Locate your Minecraft resource packs folder:

    C:\Users\<your_username>\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\resource_packs
    
  2. Copy the generated file encrypted_pack.zip into this folder.

  3. 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.

License

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.

About

BedrockPackCrypto is a small Python library that demonstrates how to encrypt and decrypt Minecraft Bedrock Edition resource packs using AES encryption.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages