V Vant Docs

Stego

Hide data in images. The mechanism underneath horcrux, also usable on its own for brain snapshots and recovery.

Vant can encode an entire brain (memory, learnings, decisions) into an image using LSB (Least Significant Bit) steganography. The pipeline is: serialize the brain to JSON, compress with zlib (about 70 percent smaller), optionally encrypt with AES-256-GCM, then hide the payload in the image’s low bits. Decoding reverses the process.

What it is for

CLI

Hide the brain in an image:

vant stego snapshot --input=avatar.png --output=brain.png

Options: --input is the carrier image (default avatar.png), --output is the result (default brain.png), and --encrypt takes a password.

Extract the brain again:

vant stego recover --input=brain.png --output=brain.json

Options: --input is the image with the hidden brain, --output is the JSON destination (optional), --decrypt takes the password.

Check how much an image can hold:

vant stego capacity --image=avatar.png

Code

const stego = require('./lib/stego');

// Encode a brain into an image
stego.encodeBrain('input.png', 'output.png', { encrypt: 'optional-password' });

// Decode it back
const brainData = stego.decodeBrain('output.png', { decrypt: 'optional-password' });

Large brains can span several images:

const outputs = stego.encodeBrainChunked(['img1.png', 'img2.png', 'img3.png']);
const brainData = stego.decodeBrainChunked(outputs);

The same module carries the SVG variant that horcrux uses (encodeSvg / decodeSvg) plus the manifest functions behind hocrux bootstrap.

Capacity

Image size Max payload
100x100 about 2.5 KB
256x256 about 16 KB
512x512 about 65 KB
1000x1000 about 250 KB

Security notes