Core Framework Encryption Service + Proxy server - with a Cryptonote twist
Find a file
Claude afb11667e6
feat: add encryption sigil with pre-obfuscation layer
Implements ChaChaPolySigil that applies pre-obfuscation before sending
data to CPU encryption routines. This ensures raw plaintext is never
passed directly to encryption functions.

Key improvements:
- XORObfuscator and ShuffleMaskObfuscator for pre-encryption transforms
- Nonce is now properly embedded in ciphertext, not stored separately
  in headers (production-ready, not demo-style)
- Trix crypto integration with EncryptPayload/DecryptPayload methods
- Comprehensive test coverage following Good/Bad/Ugly pattern
2025-12-25 12:36:32 +00:00
.dataset Switching machines, ffmpeg + readable byte stream 2022-01-24 07:43:24 +00:00
.github fix: Correctly scope fuzz test in CI workflow 2025-11-04 01:28:24 +00:00
.run Switching machines, ffmpeg + readable byte stream 2022-01-24 07:43:24 +00:00
cmd/trix test: Increase test coverage to over 90% 2025-11-13 20:21:25 +00:00
docs docs: add CLI reference, PGP examples, and detailed sigil list 2025-11-25 00:00:24 +00:00
examples test: Improve test coverage and add examples 2025-11-13 19:51:11 +00:00
pkg feat: add encryption sigil with pre-obfuscation layer 2025-12-25 12:36:32 +00:00
vault feat: Port crypt library from Core 2025-10-30 17:11:31 +00:00
.gitignore feat: add MkDocs documentation site and update README with usage instructions 2025-11-04 11:27:35 +00:00
.goreleaser.yml feat: add trix command-line tool for encoding, decoding, and hashing files 2025-11-03 04:05:32 +00:00
DISCLAIMER.md 42 2022-01-23 21:49:14 +00:00
go.mod feat: improve pgp testability and coverage 2025-11-23 19:26:56 +00:00
go.sum feat: Add OpenPGP implementation 2025-11-13 19:02:03 +00:00
go.work feat: Update Go version and workflow 2025-10-30 17:47:40 +00:00
go.work.sum feat: improve pgp testability and coverage 2025-11-23 19:26:56 +00:00
LICENCE Create LICENCE 2022-01-23 13:07:49 +00:00
mkdocs.yml docs: add CLI reference, PGP examples, and detailed sigil list 2025-11-25 00:00:24 +00:00
README.md docs: Add Go project badges to README 2025-11-13 20:31:44 +00:00
Taskfile.yml Merge pull request #32 from Snider/feature-add-go-vet 2025-11-04 13:22:18 +00:00

Enchantrix

Go Report Card GoDoc Build Status codecov Release License

Enchantrix is a Go-based encryption library designed to provide a secure and easy-to-use framework for handling sensitive data in Web3 applications. It will feature Poly-ChaCha stream proxying and a custom .trix file format for encrypted data.

Documentation

A MkDocs site (Material theme) lives in this repository. To preview it locally:

# Requires Python mkdocs and mkdocs-material
pip install mkdocs mkdocs-material

# Serve docs
mkdocs serve -a 127.0.0.1:8000

# Build static site to ./site/
mkdocs build --strict

The site configuration is at ./mkdocs.yml and sources are under ./docs/docs/.

Go Version and Workspace

  • Minimum Go version: 1.25
  • This repository includes a go.work to streamline development across tools. Use standard Go commands; no special steps are required.

Test-Driven Development

This project follows a strict Test-Driven Development (TDD) methodology. All new functionality must be accompanied by a comprehensive suite of tests.

Getting Started

To get started with Enchantrix, you'll need to have Go installed. You can then run the tests using the following command:

go test ./...

trix Command-Line Tool

Enchantrix includes a command-line tool called trix for encoding and decoding files using the .trix format.

Installation

You can install the trix tool using go install:

go install github.com/Snider/Enchantrix/cmd/trix@latest

Usage

The trix tool can read from a file using the --input flag or from stdin if the flag is omitted.

Encode

To encode a file, use the encode subcommand, followed by any sigils you want to apply:

trix encode --output <output-file> --magic <magic-number> [sigil1] [sigil2]...
  • --input: The path to the input file (optional, reads from stdin if omitted).
  • --output: The path to the output .trix file.
  • --magic: A 4-byte magic number to identify the file type.
  • [sigil...]: A space-separated list of sigils to apply to the data.

Example:

echo "Hello, Trix!" | trix encode --output test.trix --magic TRIX base64

Decode

To decode a .trix file, use the decode subcommand:

trix decode --output <output-file> --magic <magic-number> [sigil1] [sigil2]...
  • --input: The path to the input .trix file (optional, reads from stdin if omitted).
  • --output: The path to the decoded output file.
  • --magic: The 4-byte magic number used during encoding.
  • [sigil...]: A space-separated list of sigils to apply for unpacking.

Example:

trix decode --input test.trix --output test.txt --magic TRIX base64

Hash

To hash data, use the hash subcommand, followed by the desired algorithm:

trix hash [algorithm]
  • --input: The path to the input file (optional, reads from stdin if omitted).
  • [algorithm]: The hashing algorithm to use (e.g., sha256).

Example:

echo "Hello, Trix!" | trix hash sha256

Sigils

You can also apply any sigil directly as a subcommand:

trix [sigil]
  • --input: The path to the input file or a string (optional, reads from stdin if omitted).

Example:

echo "Hello, Trix!" | trix hex

Releases

This repository includes a basic GoReleaser configuration at .goreleaser.yml.

  • Snapshot release (local, no publish):
goreleaser release --snapshot --clean
  • Regular release (expects CI and Git tag):
goreleaser release --clean

Artifacts are produced under ./dist/.