Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TreeLock

TreeLock Logo

High-performance directory encryption tool written in Rust

TreeLock is a high-performance directory encryption tool written in Rust. It is designed to protect your files both at rest and during transport by allowing you to encrypt and decrypt files recursively within a folder.


Overview

TreeLock ensures the confidentiality and integrity of your data through a multi-layered encryption architecture inspired by tools like Cryptomator and Age.

You can find all the implementation details in the documentation

Security Features

  • AES-GCM 256-bit Encryption: Protects against unauthorized access, network interception, and tampering.
  • Quantum Resistance: Uses a 256-bit key size to maintain 128 bits of security even against Grover's algorithm.
  • Unique File Keys: Every file is encrypted with a unique key derived from its path and a Master Encryption Key (MEK) using HKDF-SHA256.
  • Memory Safety: Sensitive keys are zeroed out of memory when no longer needed using the Zeroize crate.

Warning

This program has not been seriously audited. Use it at your own risk.


Installation

Since TreeLock is written in Rust, you can compile it using cargo:

  1. Clone the repository.
  2. Build the release version:
cargo build --release
  1. The binary will be available in the ./target/release/ directory.

Usage

When you run the tool, you can choose from several operations:

  • Encrypt/Decrypt: Process a single file or an entire directory.
  • Password Change: Update your password without needing to re-encrypt your actual files.

Key Management Modes

You can manage your Key Encryption Key (KEK) in two ways:

  1. Default Mode: Generates a random 256-bit key shown as a base64 secret.
  2. Password Mode (-u/--using-password): Derives a KEK from a password using Argon2id (less secure).

Threat Model

  • Protected against: Unauthorized access, passive/active network attacks, and brute-force on encrypted data.
  • Not protected against: Side-channel attacks or dynamic reverse analysis (an attacker with local machine access may read the keys from memory).

The management of secrets is the responsibility of the user; ensure you store and share your keys securely.

Open Source & Contribution

TreeLock is an open-source project, and your input is welcome! You are encouraged to use this program however you see fit for your encryption needs.

If you are a developer or a security enthusiast, please don't hesitate to contribute. Whether it’s improving the Rust implementation, identifying potential vulnerabilities, or suggesting new features, your help is appreciated.

Important

As noted in the documentation, this program has not undergone a formal security audit. Contributing to the codebase or helping with security reviews is a great way to make the tool safer for everyone.

About

Blazing fast directory encryption tool

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages