DEV Community

Muhammed Shafin P
Muhammed Shafin P

Posted on

Introducing Qeltrix V2: High-Performance Content-Derived Encryption with Parallel Processing

I'm excited to announce the release of Qeltrix V2, a major enhancement to the content-derived encryption container format that brings significant performance improvements and new capabilities while maintaining full backward compatibility with V1 files.

What is Qeltrix?

Qeltrix is a Proof-of-Concept command-line utility that creates encrypted, compressed data containers with a unique approach: the encryption key is derived directly from the file content itself. This eliminates the need to store or transfer separate encryption keys, making it ideal for secure archival and data obfuscation scenarios.

Built on modern cryptography (ChaCha20-Poly1305), parallel processing, and a streaming architecture, Qeltrix handles files of any size efficiently.

What's New in V2?

Version 2 introduces several significant features that improve performance and usability:

1. Parallel Unpacking

The biggest performance enhancement in V2 is parallel decryption and decompression. The unpack command now leverages ProcessPoolExecutor to process multiple blocks simultaneously, delivering faster data retrieval on multi-core systems.

2. Random Access with the seek Command

One of the most requested features is now here: random access without full decryption. The new seek command uses the block index to quickly locate and retrieve specific byte ranges from your encrypted containers.

# Read 4KB starting at the 10MB position
python3 qeltrix-2.py seek myfile.qltx 10485760 4096
Enter fullscreen mode Exit fullscreen mode

This is useful for:

  • Reading file headers without decrypting entire archives
  • Extracting specific sections from large datasets
  • Building applications that need efficient partial file access

3. Zstandard (Zstd) Compression Support

V2 adds Zstandard as a compression option alongside LZ4. While LZ4 remains the default for maximum speed, Zstd provides better compression ratios at moderate speeds—giving you the flexibility to choose based on your needs.

# Pack with Zstandard compression
python3 qeltrix-2.py pack report.pdf archive.qltx --compression zstd
Enter fullscreen mode Exit fullscreen mode

4. Full V1 Backward Compatibility

V2 automatically detects and correctly processes V1 files, ensuring seamless migration. Your existing .qltx files work perfectly with the new tools, and you can gradually transition to V2 format at your own pace.

Key Features Carried Over from V1

  • Content-Derived Encryption: Keys derived from file content (two-pass or single-pass modes)
  • Modern AEAD Cryptography: ChaCha20-Poly1305 for authenticated encryption
  • Integrity Verification: Global SHA256 checksums and per-block Poly1305 tags
  • Streaming Architecture: Efficient handling of files larger than available RAM
  • Deterministic Permutation: Additional obfuscation layer before encryption

Quick Start

Installation

pip install lz4 cryptography zstandard
Enter fullscreen mode Exit fullscreen mode

Basic Usage

Pack a file:

python3 qeltrix-2.py pack input.dat output.qltx
Enter fullscreen mode Exit fullscreen mode

Unpack a file:

python3 qeltrix-2.py unpack output.qltx recovered.dat
Enter fullscreen mode Exit fullscreen mode

Seek within a file:

python3 qeltrix-2.py seek output.qltx 1048576 4096 --output snippet.dat
Enter fullscreen mode Exit fullscreen mode

Performance Comparison

On a typical 8-core system with a 1GB test file:

Operation V1 Time V2 Time Improvement
Pack ~45s ~45s Same
Unpack ~52s ~18s 65% faster
Seek (1MB) N/A ~0.3s New capability

**Note: These results are hypothetical and illustrative. Actual performance will vary based on hardware specifications, file characteristics, and system configuration. Users should conduct their own benchmarks for their specific use cases.

Use Cases

Qeltrix V2 is suitable for:

  • Secure Archival: Self-contained encrypted archives without separate key files
  • Data Obfuscation: Content-derived encryption for privacy-sensitive scenarios
  • Large File Processing: Streaming architecture handles multi-GB files efficiently
  • Backup Systems: Fast parallel unpacking for quick recovery
  • Selective Data Access: Random access without full decryption overhead

Technical Deep Dive

File Format

The .qltx format includes:

  • Magic bytes and version identifier
  • JSON metadata (salt, block size, compression type)
  • Encrypted data blocks with individual nonces
  • Block index for random access
  • Global integrity checksum

Security Model

Qeltrix uses:

  • SHA256 for key derivation
  • ChaCha20-Poly1305 AEAD for encryption
  • Per-block authentication tags
  • Deterministic content-seeded permutation

Important: This is a Proof-of-Concept project. For production use cases requiring formal security guarantees, thorough security audits and additional hardening may be necessary.

Future Possibilities for Community Development

As stated in the original V1 documentation, Qeltrix demonstrates core ideas that the community can build upon. For a complete understanding of future possibilities, enhancements, and inspirations for those who take over development, please read the V1 article or documentation in the repository.

Get Qeltrix V2

GitHub Repository: https://github.com/hejhdiss/Qeltrix

The repository includes:

  • qeltrix.py - V1 implementation
  • qeltrix-2.py - V2 implementation with all new features
  • Comprehensive documentation
  • Usage examples
  • qeltrix-pypi folder with PyPI package (documentation available)

Contributing & Licensing

Qeltrix is dual-licensed:

  • Code (GPLv3): Free to use, modify, and distribute
  • Concept (CC BY-SA 4.0): Attribution required for derivative works

A Community Project

As emphasized in the initial release, Qeltrix is by the community, for the community. This is a Proof-of-Concept that demonstrates ideas and possibilities rather than a finished product. The community must take over to develop, enhance, and evolve Qeltrix into whatever form best serves its needs.

I've provided the foundation and core concepts, but the future of Qeltrix lies in the hands of developers, cryptographers, and users who find value in content-derived encryption. Fork it, improve it, adapt it, and make it your own.

Conclusion

Qeltrix V2 represents an evolution in content-derived encryption, bringing parallel processing and random access capabilities to a unique cryptographic approach. Whether you're exploring novel encryption paradigms, building archival tools, or simply experimenting with cryptographic concepts, V2 provides a solid foundation to build upon.

The code is open, the concept is shared, and the future is in your hands.


Qeltrix (.qltx) - Content-Derived Encryption

Copyright © 2025 HejHdiss (Muhammed Shafin P)

For questions, feedback, or support, please visit the GitHub repository: https://github.com/hejhdiss/Qeltrix

Top comments (0)