Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TREE0007 TRE Encryption Kit

This folder is a standalone integration kit for adding an encrypted TRE archive format to an SWGSource-style client tree.

It does not modify the source checkout in place. Copy or install these files into a full source clone when you are ready to integrate.

Contents

  • tools/trecrypt.py - self-contained TREE0007 pack/list/extract/convert tool.
  • tools/install_trecrypt.py - overlay installer for a full SWGSource tree.
  • cpp/TreeFileCrypt.h and cpp/TreeFileCrypt.cpp - Windows CNG AES-GCM helper.
  • docs/TREE0007_FORMAT.md - exact on-disk format.
  • docs/KEY_DELIVERY.md - practical key delivery and threat model notes.
  • patches/TreeFile_SearchNode.integration.md - anchored C++ integration guide.
  • v2/ - hardened TREE0007 v2 kit using TAG_0008, keyed path hashes, encrypted file records, chunked payload encryption, and session-secret HKDF.

Quick Smoke Test

Generate a key:

python E:\TRECRYPT\tools\trecrypt.py gen-key

Pack a loose directory:

python E:\TRECRYPT\tools\trecrypt.py pack-dir `
  --input-dir E:\some\loose\assets `
  --output E:\some\out\secure_assets.tre `
  --key-hex <64 hex chars>

List or extract with the same key:

python E:\TRECRYPT\tools\trecrypt.py list --input E:\some\out\secure_assets.tre --key-hex <key>
python E:\TRECRYPT\tools\trecrypt.py extract --input E:\some\out\secure_assets.tre --out E:\some\extract --key-hex <key>

Integration

From this folder:

python E:\TRECRYPT\tools\install_trecrypt.py --repo E:\Path\To\SWGSource

The installer copies the new C++ helper and Python packer into the target repo and prints the C++ reader edits that still need review. It intentionally does not overwrite TreeFile_SearchNode.cpp automatically, because local SWG forks usually carry reader changes for 0006, TOC quirks, and diagnostics.

Important Boundary

TREE0007 uses real authenticated encryption, but if the client can decrypt an asset locally, a determined attacker can eventually capture the key or plaintext from that local process. The meaningful security gain comes from keeping archive keys out of source, out of shipped TRE files, and out of static client binaries. Use launcher/server key delivery for production.

For the tighter design, use v2/. It removes filenames from the archive and requires a live session secret before even path lookup can work.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages