For the past six months, I’ve been building Mango — a cryptographic engine that mutates its encryption behavior based on the structure and entropy of the data it processes.
The goal?
To match or exceed AES—while avoiding the rigid, static model AES and most modern ciphers rely on.
🍃 Why Adaptivity?
Mango doesn’t just encrypt—it adapts.
It adjusts both how encryption is performed and how much effort is required, depending on the input. Core principles include:
- Optimal Transform Selection
Applies the right transforms, in the right order—eliminating redundant or wasteful steps.
- Granular Round Control
Dynamically adjusts encryption rounds—globally and per-transform.
- Context-Aware Execution
Tailors computation to the complexity and security needs of the data.
- Adaptive Workload Scaling
Avoids over-processing simple inputs, while increasing effort on complex ones.
🧰 Mango Includes Both Engine and Tools
Mango isn’t just an encryption algorithm—it’s a full adaptive cryptographic system, with components for development, research, and real-world application:
- CryptoLib — The adaptive cryptographic engine (class library)
- InputProfiler — Classifies data to drive encryption decisions
- MangoAC — A demo app showing encryption on real-world files
- MangoBM — A batch-mode variant for block-based encryption
- Mango Workbench — A full-featured environment for tuning and testing transform sequences
Out of the box, Mango supports 4 input profiles:
- 📚 Natural — Structured text, HTML, human-readable content
- 🎲 Random — High-entropy, pseudorandom input
- 📈 Sequence — Predictable, low-entropy patterns
- 🧬 Combined — Real-world blends of structure and noise
And you can go even deeper.
With Mango Workbench, developers can:
- Analyze domain-specific data
- Run adaptive profiling
- Generate custom encryption sequences optimized for your exact input
Perfect for:
- Genomic datasets
- Sensor telemetry
- Financial tick streams
- Embedded control systems
⚡ Mango Outpaces AES—Intelligently
At ~2× faster than AES, Mango is built for real-world scale.
Whether you’re encrypting massive telemetry archives or streaming structured logs, Mango’s block-mode architecture keeps up—without compromising cryptographic integrity.
And unlike AES, Mango doesn’t just run fast—it runs smart.
📈 Check the performance chart below 👇
🧠 Key Observations
- ✅ Mango passed all 9/9 cryptographic metrics, while AES failed 4 out of 9 on Natural input.
- ⚡ Mango encrypted 2× faster than AES in this test (108.7 ms vs. 203.5 ms), despite running on the same CLR.
- 🧪 Mango demonstrated stronger diffusion and consistency, with higher Avalanche and Key Dependency scores and fewer threshold violations — especially on real-world structured input.
📊 Mango’s metrics breakdown per data type:
🔐 Mango and Side-Channel Attack Resilience
Traditional side-channel attacks — such as power or timing analysis — rely on the fact that most cryptographic algorithms execute a fixed sequence of operations, regardless of the input. This consistency allows attackers to measure subtle variations in runtime or energy usage to infer internal state, keys, or structure.
Mango disrupts this model entirely.
Because Mango selects a different sequence of transforms and custom round configuration for each input type, there is no single “algorithm” to profile. Each encryption session may involve a completely different execution path depending on the data’s structure, entropy, and classification.
This architectural variability makes it extremely difficult for side-channel attacks to find consistent signals to exploit. Timing and power traces become data-dependent noise rather than exploitable patterns.
GitHub: github.com/Luke-Tomasello/Mango-Adaptive-Cryptographic-System
