Mojic is a sophisticated CLI tool designed to transform readable C source code into an unrecognizable, chaotic stream of emojis. It is not a simple substitution cipher; it is a cryptographic obfuscation tool engineered to defeat static analysis.
Operation Ironclad (Algorithm)
Early versions of Mojic relied on simple 64-bit bitwise XOR masking. While fast, it was fundamentally weak against frequency analysis. Real security requires real entropy. The v2.1 overhaul introduced "Operation Ironclad":
- GPU-Resistant Keys: Using a raw user password is dangerous. Mojic integrates the memory-hard Scrypt Key Derivation Function (KDF). This makes deriving keys exceptionally expensive for attackers using GPU clusters or ASIC rigs.
- The Emoji Universe: The engine generates a pool of ~1,100 valid unicode characters. This pool is shuffled using a CSPRNG (AES-256-CTR) seeded by the derived key.
- XOR Whitening: Before raw data is encoded, it is XORed with a mask generated from the AES stream. This ensures that repeating patterns—like 4 spaces of indentation—never look the same twice.
- Base-1024 Compression: Whitened data is buffered into 5-byte chunks and converted into 4 base-1024 digits (emojis) to manage file bloat.
The Moon Protocol & CLI
Mojic files do not look like random noise immediately. They start with a distinct "Moon Header Protocol". The header contains the 32-byte Salt and a 4-byte Auth Check encoded using an alphabet of moon phases and clocks. This allows the decode command to instantly verify a password without processing the entire garbage stream.
Security & Rotation Tools (SRT)
The CLI includes an srt suite for managing encrypted files:
mojic srt --re secret.mojic
This command performs an Entropy Shuffle. It keeps the same password but generates a new salt and AES keystream, completely changing the visual emoji output to defeat pattern analysis over time.