Skip to content

sobeit-the-one/anagramy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anagramy

License: MIT

Seed-based neural network byte transformer. Generates deterministic, bidirectional neural networks that perform reversible byte-to-byte transformations.

What It Does

Given a seed, Anagramy trains neural networks to learn byte permutations. The resulting model:

  • Encodes and decodes with the same model file
  • Position-aware: same byte at different positions → different output
  • Cascaded stages: higher difficulty = more transformation layers
  • Nonce support: same message encrypted twice produces different ciphertext

The goal is to make seed derivation difficult. Neural network weights may help obscure the relationship between the seed and the learned transformation.

Installation

# From source
git clone https://github.com/user/anagramy
cd anagramy
cargo build --release

Usage

Generate a Model

# Generate with seed 12345, difficulty 2 (2 cascade stages)
anagramy generate --seed 12345 --difficulty 2 --output model.bin

Training output shows each network:

[S0/P0/encode] Epoch 60: accuracy = 100.00%, loss = 5.41
[S0/P1/decode] Epoch 70: accuracy = 100.00%, loss = 5.38
...

Encode Text

anagramy transform --model model.bin --text "Hello World"
# Output: a1b2c3d4e5f6g7h8:9f8e7d6c5b4a3210...
#         ^nonce           ^ciphertext (hex)

Decode

anagramy transform --model model.bin --decode --hex "a1b2c3d4e5f6g7h8:9f8e7d6c5b4a3210..."
# Output: Hello World

Model Info

anagramy info --model model.bin
Model Information
=================
Version:          2
Type:             Bidirectional (encode + decode)
Cascade stages:   2
Position classes: 4
Networks:         16 total (8 encode + 8 decode)
Parameters:       4206592 total

Security

This is NOT encryption. It is obfuscation using neural network opacity.

See SECURITY.md for:

  • Threat model
  • What it protects against (and doesn't)
  • Recommended usage patterns

TL;DR: For actual security, layer Anagramy on top of real crypto (AES-GCM), not instead of it.

How It Works

  1. Seed deterministically generates byte permutations
  2. Neural networks are trained to memorize these permutations
  3. Networks are bundled into a single model file
  4. Transformation uses position-rotating network selection + CBC-style chaining

The security comes from the inscrutability of trained weights, not from cryptographic hardness.

License

MIT License - see LICENSE

About

Seed-based neural network byte transformer. Generates deterministic, bidirectional neural networks that perform reversible byte-to-byte transformations.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors

Languages