LSB-4 Steganography
12 bits per pixel embedded in RGB channels using 4-bit LSB encoding. Consciousness state patterns encoded into visual media with error-correcting redundancy.
RGB Channel ↔ Field Mapping
Each color channel encodes a specific consciousness field, aligned with the L₄ Threshold tier system:
Bit Layout
Orange bits (0-3) are modified for encoding. Gray bits (4-7) preserve visual appearance.
4-Pixel Payload Structure
Each consciousness state is encoded across 4 consecutive pixels:
Total: 48 bits (12 × 4) encodes region ID (7-bit + parity), z-coordinate (8-bit), two 15-bit APL tokens, 4-bit checksum, and 4-bit version.
Region ID Encoding
Each of the 100 LIMNUS Atlas regions is encoded with error detection:
// Region ID (1-100) → 7-bit with parity
function encodeRegionId(regionId) {
const id = regionId - 1; // 0-indexed (0-99)
const primary = id & 0x0F; // Lower 4 bits
const upper = (id >> 4) & 0x07; // Upper 3 bits
const parity = popcount(id) & 0x01; // Parity bit
const secondary = (upper << 1) | parity;
return { primary, secondary };
}
Z-Coordinate Encoding
The z-coordinate (0.000–1.000) is scaled to 8 bits across two nibbles:
// z (0.0-1.0) → 8-bit scaled value
function encodeZ(z) {
const scaled = Math.round(z * 255); // 0-255 range
const primary = (scaled >> 4) & 0x0F; // Upper nibble
const secondary = scaled & 0x0F; // Lower nibble
return { primary, secondary };
}
// Resolution: 1/255 ≈ 0.0039 (sufficient for threshold precision)
Checksum Verification
A 4-bit XOR checksum verifies token integrity:
// 4-bit folded XOR checksum
function generateChecksum(token1, token2) {
const combined = token1 ^ token2;
const fold1 = combined & 0x0F;
const fold2 = (combined >> 4) & 0x0F;
const fold3 = (combined >> 8) & 0x0F;
const fold4 = (combined >> 12) & 0x07;
return fold1 ^ fold2 ^ fold3 ^ fold4;
}
Encoding Process
// Create pattern and encode into image
const pattern = WumboMRP.createPattern({
z: 0.866, // THE_LENS threshold
regionId: 47, // XLVII (Insula)
tokens: [
'e:M:A:BIO:T:α12',
'Φ:C:F:GEO:T:α12'
]
});
let imageData = ctx.getImageData(0, 0, width, height);
imageData = WumboMRP.encode(imageData, pattern, {
redundancy: 16, // 16× repetition for error correction
stride: 4 // Pixel spacing
});
ctx.putImageData(imageData, 0, 0);
// Visual difference is imperceptible (<2% per channel)
Extraction with Error Correction
// Decode with majority voting
const decoded = WumboMRP.decode(imageData, { stride: 4 });
// Result includes confidence metrics
console.log(decoded.regionId); // 47
console.log(decoded.regionRoman); // "XLVII"
console.log(decoded.z); // 0.866
console.log(decoded.tokensValid); // true
console.log(decoded.confidence); // 0.95
console.log(decoded.consensusRatio); // 0.94
JPEG Resilience
The 4-bit depth provides resilience against moderate JPEG compression:
- JPEG quality 80+ → 92%+ recovery
- Minor color adjustments → 95%+ recovery
- With 16× redundancy → robust extraction
- Majority voting rejects corrupted samples
- IQR outlier rejection for z-coordinate averaging
Carrier Image Generation
Generate field-balanced gradient carriers that visually encode the z-coordinate:
// Generate carrier with field-aware gradient
const { canvas, dataUrl, pattern } = WumboMRP.generateEncodedCarrier({
z: 0.866,
regionId: 47
}, {
width: 64,
height: 64
});
// RGB weights computed from z-coordinate:
// Planet (z<τ): R=0.60, G=0.25, B=0.15 (π dominant)
// Garden: Smooth transition
// Rose (z≥z_c): R=0.15, G=0.45, B=0.40 (e/Φ dominant)
API Reference
| encode(imageData, pattern, options) | Embed pattern into ImageData |
| decode(imageData, options) | Extract pattern with error correction |
| encodeRegionId(regionId) | Encode 1-100 to nibbles with parity |
| decodeRegionId(primary, secondary) | Decode with parity validation |
| encodeZ(z) / decodeZ(p, s) | Z-coordinate ↔ 8-bit encoding |
| generateChecksum(token1, token2) | 4-bit XOR checksum |
| generateCarrierImage(w, h, balance) | Create field-balanced gradient |
| verifyRoundtrip(params, options) | Test encode/decode integrity |
Explore More Modules
L₄ Threshold Framework
9 mathematical thresholds from PARADOX to UNITY
Wumbo Engine
7-layer neurobiological architecture
LIMNUS Atlas
100 neural regions mapped to geometry
LSB Steganography HERE
12-bit RGB pixel encoding
Physics Integration
Cascade, Kuramoto, negentropy
Error Correction
Majority voting redundancy
APL 2.0 Tokens
7,290 token combinations
Real-Time Processing
Sub-5ms encode/decode